-
Notifications
You must be signed in to change notification settings - Fork 71
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
Configuration in Crayfish #603
Comments
Déjà vu @acoburn, its like time traveling. Crayfish had YAML file configuration loading a year and a few months ago. Same piece Jared added to your static ldp. That/or similar is more microservice friendly than the whole Symfony implementation (which is what drupal 8 uses), one of the reasons Silex is based on and compatible with Symfony but simpler (and faster). Ups! update, this piece god cropped. If you can re-implement it for sure claw committers will be happy. YAML configs make more sense since people will dealing with them on the drupal 8 side a lot. |
+1 for YAML config. I was thinking this should be a next step in Crayfish as well. |
👍 sounds like a good improvement |
@acoburn do you mind if I try this one? I was thinking about making the config we do in |
@jonathangreen that's fine with me |
@jonathangreen has completed some nice work around a Yaml config for Crayfish microservices, but the question I and @acoburn had raised was whether the Symfony ConfigurationInterface would not be a better choice for handling our configuration. @jonathangreen described his position here on his PR. I think my concerns/questions with regard to the choice difference between the YamlConfigServiceProvider and ConfigurationInterface has a couple parts to it. Some of them are personal preference and so not a statement about what is right. They are:
|
@acoburn could you look at allowing for any and all possible Doctrine DBAL configuration options. At the very least I am thinking about setting up some functional tests using a sqlite in-memory (non-persistent) database so I would need it to respect the |
@whikloj this is an excellent idea. This does raise the question of default values -- should there be a default database configuration? If we want to support all of these configurations, I am leaning toward not having a complete set of default values. Thoughts? |
As per http://symfony.com/doc/current/best_practices/configuration.html, I plan to split out the db configuration into separate files ( |
Also, (sorry @jonathangreen) but I will be removing a lot of the code that was merged recently related to configuration. |
No worries. Remove away. I will say that I am of the opinion that |
@jonathangreen what I have in mind is that the
Where the |
@acoburn I'm not sure, perhaps we should consider using something like the environment configuration instead? Then we can set the environment different? Maybe that absolves us of having to account for any and all DBAL values? |
@acoburn that seems reasonable to me. |
As this is still open and with the deprecation of Silex, we will have to move to Symfony/Flex. @jonathangreen and I had a conversation on IRC and think that when we do the Silex -> Flex migration we should have another look at the SymfonyConfigurationInterface for the following issue I ran into. To allow for Yaml configuration like:
being parsed into the When trying to add a user-configurable list I ran into this. For example
are parsed as
and
But I won't know the keys in the code, the work around is to embed the associative array in an array.
But we should review how much we are using this nested associative array functionality. It could also be removed to make configuration for Homarus more flexible. |
@whikloj 👍 to that. I bumped into it a while ago and was confused. |
I think this is the same issue @Natkeeran ran into when doing configuration for Homarus. |
Yeah, and I stuck my foot in my mouth when reviewing it ^_^ |
The three services in Crayfish are configured with
config/cfg.php
files. While this certainly works, I wonder if it wouldn't be better to use a Symfony interface with a defined set of configuration values (with sensible defaults), and then allow users to set their own configuration via a simple YAML file.If that's of interest, I can implement that; otherwise, feel free to close this issue.
The text was updated successfully, but these errors were encountered: