Skip to content

Commit

Permalink
minor #36120 [FrameworkBundle][PropertyAccess] Use injection for info…
Browse files Browse the repository at this point in the history
… extractors (HeahDude)

This PR was merged into the 5.1-dev branch.

Discussion
----------

[FrameworkBundle][PropertyAccess] Use injection for info extractors

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| Deprecations? | no
| Tickets       | ~
| License       | MIT
| Doc PR        | ~

Follows #30704.

Commits
-------

693d4c0 [FrameworkBundle][PropertyAccess] Use injection for info extractors
  • Loading branch information
fabpot committed Mar 18, 2020
2 parents 6902a56 + 693d4c0 commit e383b41
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
Expand Up @@ -108,7 +108,9 @@
use Symfony\Component\PropertyInfo\PropertyInfoExtractorInterface;
use Symfony\Component\PropertyInfo\PropertyInitializableExtractorInterface;
use Symfony\Component\PropertyInfo\PropertyListExtractorInterface;
use Symfony\Component\PropertyInfo\PropertyReadInfoExtractorInterface;
use Symfony\Component\PropertyInfo\PropertyTypeExtractorInterface;
use Symfony\Component\PropertyInfo\PropertyWriteInfoExtractorInterface;
use Symfony\Component\Routing\Loader\AnnotationDirectoryLoader;
use Symfony\Component\Routing\Loader\AnnotationFileLoader;
use Symfony\Component\Security\Core\Security;
Expand Down Expand Up @@ -1381,6 +1383,8 @@ private function registerPropertyAccessConfiguration(array $config, ContainerBui
->replaceArgument(0, $config['magic_call'])
->replaceArgument(1, $config['throw_exception_on_invalid_index'])
->replaceArgument(3, $config['throw_exception_on_invalid_property_path'])
->replaceArgument(4, new Reference(PropertyReadInfoExtractorInterface::class, ContainerInterface::NULL_ON_INVALID_REFERENCE))
->replaceArgument(5, new Reference(PropertyWriteInfoExtractorInterface::class, ContainerInterface::NULL_ON_INVALID_REFERENCE))
;
}

Expand Down
Expand Up @@ -33,5 +33,8 @@
<tag name="property_info.access_extractor" priority="-1000" />
<tag name="property_info.initializable_extractor" priority="-1000" />
</service>

<service id="Symfony\Component\PropertyInfo\PropertyReadInfoExtractorInterface" alias="property_info.reflection_extractor" />
<service id="Symfony\Component\PropertyInfo\PropertyWriteInfoExtractorInterface" alias="property_info.reflection_extractor" />
</services>
</container>

0 comments on commit e383b41

Please sign in to comment.