Closed bvisonl closed 5 years ago
Thank you for taking the time to contribute, but I have some concerns about this:
Understood your point.
+1 for the test, completely forgot about that, if you are still interested in this let me know and I will proceed to make the test and also make sure it works with custom configurations... I like the bundle, and I have a lot of use for it. Nice work and keep it up!
Hello,
I second this. This bundle is really useful (crazy this seems to be the only one out there to store settings in database...) BUT not being able to create settings programmatically or via CLI makes some simple things really complicated.
@craue I don't understand how you manage fresh installations when you say "use migrations"? Consider the following use case:
doctrine:schema:create
to create the schema. When creating a new instance of some app, migrations wont be executed: I would have used doctrine:migrations:version --add --all
, because the code and the schema is already at the latest version.
Are you suggesting to create a migration which is dedicated to create the initial settings?
Like Version000000000000
? This seems like a hack...
Looks like @bvisonl has deleted his fork, I can make another pull request for this.
You can take a look at my implementation of the command here
Just a simple create command, I saw someone on the issues that was asking for this and I needed it myself as well. I am aware that it may seem like more trouble but when you have a bunch of settings and you just want to create a new one instead of having to touch the database it can be done through here and avoid a potential risk.
Also, an important note is that if someone has a custom entity this wouldn't work properly.
Let me know what you think!