Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[FrameworkBundle] Add path argument to dump a specific option in debug:config#18940

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
fabpot merged 1 commit intosymfony:masterfromchalasr:debugconfig_path_arg
Jun 13, 2016

Conversation

@chalasr
Copy link
Member

@chalasrchalasr commentedJun 1, 2016
edited
Loading

QA
Branch?master
Bug fix?no
New feature?yes
BC breaks?no
Deprecations?no
Tests pass?yes
Fixed ticketsn/a
LicenseMIT
Doc PRn/a

This adds the ability to dump a specific bundle config option from thedebug:config command.

For instancedebug:config StofDoctrineExtensionsBundle uploadable gives:

I hesitated to just look for a. in thename argument rather than adding apath argument that doesn't include the bundle alias (that is took from the first argument of the command), let me know what you think about that.

Handle failure on undefined path, Add testsPHPDoc fixRemove useless assertion
@chalasrchalasrforce-pushed thedebugconfig_path_arg branch from8115a4b to05ae01bCompareJune 1, 2016 20:18
*/
privatefunctiongetConfigForPath(array$config =array(),$path,$alias)
{
$steps =explode('.',$path);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

What about using aPropertyAccessor instead?

Copy link
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

It would be nice but dot notation seems to be supported for objects only.

$array = array('foo' => array('bar' => 'value'));$value = PropertyAccessor::getValue($arr, 'foo.bar');

GIves

Cannot read property "foo" from an array. Maybe you intended to write the property path as "[foo]" instead.

It needs to bePropertyAccessor::getValue($array, '[foo][bar]').
Is there a real gain to parse the propertyPath then wrap each level in[level] for finally use the property accessor?

@fabpot
Copy link
Member

Thank you@chalasr.

@fabpotfabpot merged commit05ae01b intosymfony:masterJun 13, 2016
fabpot added a commit that referenced this pull requestJun 13, 2016
…in debug:config (chalasr)This PR was merged into the 3.2-dev branch.Discussion----------[Console] Add path argument to dump a specific option in debug:config| Q             | A| ------------- | ---| Branch?       | master| Bug fix?      | no| New feature?  | yes| BC breaks?    | no| Deprecations? | no| Tests pass?   | yes| Fixed tickets | n/a| License       | MIT| Doc PR        | n/aThis adds the ability to dump a specific bundle config option from the `debug:config` command.For instance `debug:config StofDoctrineExtensionsBundle uploadable` gives:![](http://image.prntscr.com/image/b78953dbe34c4efd817bb6f831ddd0ba.png)I hesitated to just look for a `.` in the `name` argument rather than adding a `path` argument that doesn't include the bundle alias (that is took from the first argument of the command), let me know what you think about that.Commits-------05ae01b [Console] Add path argument to dump a specific option in debug:config
@chalasrchalasr deleted the debugconfig_path_arg branchJune 13, 2016 12:39
@fabpotfabpot mentioned this pull requestOct 27, 2016
@chalasrchalasr changed the title[Console] Add path argument to dump a specific option in debug:config[FrameworkBundle] Add path argument to dump a specific option in debug:configNov 24, 2016
nicolas-grekas added a commit that referenced this pull requestNov 25, 2016
…t in debug:config (chalasr)This PR was merged into the 3.2 branch.Discussion----------[FrameworkBundle] Add missing example for 'path' argument in debug:config| Q             | A| ------------- | ---| Branch?       | 3.2| Bug fix?      | no| New feature?  | no| BC breaks?    | no| Deprecations? | no| Tests pass?   | yes| Fixed tickets | n/a| License       | MIT| Doc PR        | n/aThe argument has been introduced in#18940 .Commits-------c6b7aeb Add missing example for 'path' argument in debug:config
fabpot added a commit that referenced this pull requestJan 10, 2017
…ig reference sub-path (ogizanagi)This PR was merged into the 3.3-dev branch.Discussion----------[Config][FrameworkBundle] Allow to dump extension config reference sub-path| Q             | A| ------------- | ---| Branch?       | master| Bug fix?      | no| New feature?  | yes| BC breaks?    | no| Deprecations? | no| Tests pass?   | yes| Fixed tickets | N/A| License       | MIT| Doc PR        | N/ASame as#18940 but for the `config:dump-reference` command:<img width="975" alt="screenshot 2016-11-29 a 19 09 04" src="https://cloud.githubusercontent.com/assets/2211145/20722577/6c9f9b98-b667-11e6-9683-9a304ff80895.PNG">Only available for yaml, because it's the most common format when developing an end-application, and dumping a sub xml document causes some issues and raises more questions with the current `XmlReferenceDumper` implementation (namespaces, root name, ...).Commits-------869bb15 [Config][FrameworkBundle] Allow to dump extension config reference sub path
symfony-splitter pushed a commit to symfony/framework-bundle that referenced this pull requestJan 10, 2017
…ig reference sub-path (ogizanagi)This PR was merged into the 3.3-dev branch.Discussion----------[Config][FrameworkBundle] Allow to dump extension config reference sub-path| Q             | A| ------------- | ---| Branch?       | master| Bug fix?      | no| New feature?  | yes| BC breaks?    | no| Deprecations? | no| Tests pass?   | yes| Fixed tickets | N/A| License       | MIT| Doc PR        | N/ASame assymfony/symfony#18940 but for the `config:dump-reference` command:<img width="975" alt="screenshot 2016-11-29 a 19 09 04" src="https://cloud.githubusercontent.com/assets/2211145/20722577/6c9f9b98-b667-11e6-9683-9a304ff80895.PNG">Only available for yaml, because it's the most common format when developing an end-application, and dumping a sub xml document causes some issues and raises more questions with the current `XmlReferenceDumper` implementation (namespaces, root name, ...).Commits-------869bb1530b [Config][FrameworkBundle] Allow to dump extension config reference sub path
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

4 participants

@chalasr@fabpot@xabbuh@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp