Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[Config] Support dots in node names #22268

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

Closed
bburnichon opened this issue Apr 4, 2017 · 6 comments
Closed

[Config] Support dots in node names #22268

bburnichon opened this issue Apr 4, 2017 · 6 comments

Comments

@bburnichon
Copy link
Contributor

bburnichon commented Apr 4, 2017

Q A
Bug report? no
Feature request? yes
BC Break report? no
RFC? no
Symfony version master

I don't see any reason why developers would not use a config name with dots in it.

I am currently refactoring a legacy application using this kind of configuration nodes. I want to use the power of the Config component to improve validation.

I currently cannot do this and I could not find any reason why this is prevented.

@sstok
Copy link
Contributor

sstok commented Apr 4, 2017

The dot notation is used to inform at which position the configuration is set. I even believe in YAML you can use framework.secret: 'thisissecret' and it will be transformed to an array structure.

So changing this would be a big BC break.

@bburnichon
Copy link
Contributor Author

I don't want to change anything about how symfony framework is using configuration. In my case, its the standalone Config component that changes (only to enlarge authorized values in keys)

@bburnichon
Copy link
Contributor Author

@sstok Actually via introducing the ability to change path separator in #22253 it can be seen that prototyped array can already have dots in configuration path... We should be consistent, always prevent it, or never, but not sometimes allowing it, sometimes not.

@bburnichon
Copy link
Contributor Author

What is the prefered way of targetting my issue?

  1. Remove limitation of node names (which I consider as a bug and could be solved in all currently active branches and was my first intention)
  2. Add path separator selector proposed in [Config] allow changing the path separator #22253 (and would land in 3.4 as a new feature. Maybe use / as default path separator in 4.0)
  3. Another way

ping @sstok @fabpot @nicolas-grekas @stof

@bburnichon
Copy link
Contributor Author

Is something missing on this issue? How can I help? @fabpot @nicolas-grekas @stof

@bburnichon
Copy link
Contributor Author

I don't have any feedback on this since April! feature freeze is coming. Can you please review? @ogizanagi @fabpot

nicolas-grekas added a commit that referenced this issue Jan 21, 2018
This PR was merged into the 4.1-dev branch.

Discussion
----------

[Config] allow changing the path separator

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #22268
| License       | MIT
| Doc PR        |

In bundles configuration, no dots are allowed in key names, but as a standalone config, there is no such limitation that should be enforced.

By using current `NodeBuilder` it should be possible to change path separator used (for example: `/`)

Commits
-------

15e05e1 Add feature allowing change of Path Separator
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants