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

Skip to content

[DependencyInjection] fix handling of empty DI extension configs #27710

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

Merged
merged 1 commit into from
Jun 29, 2018

Conversation

xabbuh
Copy link
Member

@xabbuh xabbuh commented Jun 25, 2018

Q A
Branch? 4.1
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets #27707
License MIT
Doc PR

@xabbuh xabbuh added this to the 4.1 milestone Jun 25, 2018
@xabbuh xabbuh changed the title fix handling of not processable config [SecurityBundle] fix handling of not processable config Jun 25, 2018
@xabbuh
Copy link
Member Author

xabbuh commented Jun 25, 2018

This will fix the issue reported in #27707. However, I am not sure if it is really a good idea to process all the Configuration classes that we can reach through extensions. It could trigger the same wrong behaviour in other packages too.

@ro0NL
Copy link
Contributor

ro0NL commented Jun 25, 2018

lets skip those extensions / apply array_filter here:

if (!$extension instanceof ConfigurationExtensionInterface || !$config = $container->getExtensionConfig($name)) {
// this extension has no semantic configuration or was not called
continue;

it only validates env placeholders which are not present in empty configs anyway.

@xabbuh xabbuh changed the title [SecurityBundle] fix handling of not processable config [SecurityBundle] fix handling of empty DI extension configs Jun 26, 2018
@xabbuh
Copy link
Member Author

xabbuh commented Jun 26, 2018

@ro0NL done

@chalasr chalasr changed the title [SecurityBundle] fix handling of empty DI extension configs [DependencyInjection] fix handling of empty DI extension configs Jun 26, 2018
Copy link
Member

@chalasr chalasr left a comment

Choose a reason for hiding this comment

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

would be even better with a test

@nicolas-grekas
Copy link
Member

Thank you @xabbuh.

@nicolas-grekas nicolas-grekas merged commit 05d4bcb into symfony:4.1 Jun 29, 2018
nicolas-grekas added a commit that referenced this pull request Jun 29, 2018
…onfigs (xabbuh)

This PR was merged into the 4.1 branch.

Discussion
----------

[DependencyInjection] fix handling of empty DI extension configs

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

Commits
-------

05d4bcb fix handling of empty DI extension configs
@xabbuh xabbuh deleted the issue-27707 branch June 29, 2018 19:44
xabbuh added a commit to xabbuh/symfony that referenced this pull request Jul 10, 2018
fabpot added a commit that referenced this pull request Jul 12, 2018
This PR was merged into the 4.1 branch.

Discussion
----------

[DependencyInjection] add missing test for #27710

| Q             | A
| ------------- | ---
| Branch?       | 4.1
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #27710 (review)
| License       | MIT
| Doc PR        |

Commits
-------

a265caf [DependencyInjection] add missing test for #27710
fabpot added a commit that referenced this pull request Jul 16, 2018
* 4.1:
  fixed typo
  [FrameworkBundle] fixed brackets position in method calls
  Add placeholder support in bootstrap 4 file fields
  [Form] Improve rendering of `file` field in bootstrap 4
  [Form] Fix PHPDoc for FormConfigBuilder $dataClass argument
  [Security] Update user phpdoc on tokens
  [WebProfilerBundle] Fixed icon alignment issue using Bootstrap 4.1.2
  suppress side effects in 'get' or 'has' methods of NamespacedAttributeBag
  [HttpFoundation] reset callback on StreamedResponse when setNotModified() is called
  [HttpFoundation] Fixed phpdoc for get method of HeaderBag
  fix typo in ContainerBuilder docblock
  [Form/Profiler] Massively reducing memory footprint of form profiling pages by removing redundant 'form' variable from view variables.
  [Console] correctly return parameter's default value on "--"
  [DependencyInjection] add missing test for #27710
  [EventDispatcher] Clear orphaned events on TraceableEventDispatcher::reset
  Fix serialization of abstract items with groups across multiple entities
@fabpot fabpot mentioned this pull request Jul 23, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants