-
-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Simple Demo repo #5
Comments
+1 |
Hi @tacman . I will create a demonstration bundle for you and link it here. This is really a cool project, and I only got to find out about it only recently. |
Hi @tacman @jbtronics , I have created a demo repo that you can use for a "real world" Symfony 7 example application. Let me know if this is helpful. Regards, |
Thanks! Very helpful. Any reason not to use php 8.3? I wanted to run it with sqlite (instead of doing the whole docker install), but I don't have sqlite installed on php8.2. Once I made those changes, the installation instructions become really easy, after cloning
I can make a PR if you'd like. Also, Symfony 7.1 is coming out in a few days, so I tweaked the composer file to allow it. |
One thing that would really help is to make the pagination setting specific to the user. That is, the admin might want 25, and the 'user' only 15 per page. Only the admin should be able to change the global settings. It's not clear how to make the pagination a user-specific setting, that is, part of the User class. Of course, what I'm trying to avoid is adding a "pageLength" property to my user record, and instead use this bundle. Thx. |
Hi @tacman There is no reason not to use PHP 8.3, it should work with any of the supported PHP versions for Symfony 7. You may send a pull request through since I think SQLite would simplify the code as well. At the moment it appears that settings are global, and user-specific settings are not possible. @jbtronics may give us clarity. Regards, |
Thanks @gmurambadoro . I did not have the time to look into your demo yet, but I certainly will. And yes, for the moment this bundle only allows for global settings. |
@gmurambadoro Maybe a few suggestions to improve it: The Also, I would recommend to use dependency injection of settings instances over getting them from the entity manager, whenever possible. That makes type derivation easier and decouples your code from the SettingsManager, making it easier for testing. That will probably not work for user related settings (as you somehow have to bring in the connection to a certain user in there), but this case will probably require some changes to the code anyway. In a real world application, you should probably configure the storageAdapters via the central config file, but I guess for a demo, its good to demonstrate the ability to specify it on a per class base. |
Also if somebody is interested, I am currently in the process of using this bundle for another project of mine, Part-DB, which was more or less the reason why I created this bundle. You can find the settings definitions here: https://github.com/Part-DB/Part-DB-server/tree/settings-bundle/src/Settings With the right template, this allows for the easy creation of complex structured settings forms, completly alone from the infos from the attributes: |
Is there a demo repo for this bundle? I'd love to see it in action, without having to create the Settings classes and such. Thanks.
The text was updated successfully, but these errors were encountered: