Skip to content

Commit 4dcb217

Browse files
minor symfony#59402 [PropertyAccess] Move dependency definitions outside of Extension (HypeMC)
This PR was merged into the 7.3 branch. Discussion ---------- [PropertyAccess] Move dependency definitions outside of Extension | Q | A | ------------- | --- | Branch? | 7.3 | Bug fix? | no | New feature? | no | Deprecations? | no | Issues | - | License | MIT I see no reason why the dependencies should be defined in the extension. Commits ------- 750a3fb [PropertyAccess] Move dependency definitions outside of Extension
2 parents 9c0d47e + 750a3fb commit 4dcb217

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -143,9 +143,7 @@
143143
use Symfony\Component\PropertyInfo\PropertyInfoExtractorInterface;
144144
use Symfony\Component\PropertyInfo\PropertyInitializableExtractorInterface;
145145
use Symfony\Component\PropertyInfo\PropertyListExtractorInterface;
146-
use Symfony\Component\PropertyInfo\PropertyReadInfoExtractorInterface;
147146
use Symfony\Component\PropertyInfo\PropertyTypeExtractorInterface;
148-
use Symfony\Component\PropertyInfo\PropertyWriteInfoExtractorInterface;
149147
use Symfony\Component\RateLimiter\LimiterInterface;
150148
use Symfony\Component\RateLimiter\RateLimiterFactory;
151149
use Symfony\Component\RateLimiter\Storage\CacheStorage;
@@ -1810,8 +1808,6 @@ private function registerPropertyAccessConfiguration(array $config, ContainerBui
18101808
->getDefinition('property_accessor')
18111809
->replaceArgument(0, $magicMethods)
18121810
->replaceArgument(1, $throw)
1813-
->replaceArgument(3, new Reference(PropertyReadInfoExtractorInterface::class, ContainerInterface::NULL_ON_INVALID_REFERENCE))
1814-
->replaceArgument(4, new Reference(PropertyWriteInfoExtractorInterface::class, ContainerInterface::NULL_ON_INVALID_REFERENCE))
18151811
;
18161812
}
18171813

src/Symfony/Bundle/FrameworkBundle/Resources/config/property_access.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313

1414
use Symfony\Component\PropertyAccess\PropertyAccessor;
1515
use Symfony\Component\PropertyAccess\PropertyAccessorInterface;
16+
use Symfony\Component\PropertyInfo\PropertyReadInfoExtractorInterface;
17+
use Symfony\Component\PropertyInfo\PropertyWriteInfoExtractorInterface;
1618

1719
return static function (ContainerConfigurator $container) {
1820
$container->services()
@@ -21,8 +23,8 @@
2123
abstract_arg('magic methods allowed, set by the extension'),
2224
abstract_arg('throw exceptions, set by the extension'),
2325
service('cache.property_access')->ignoreOnInvalid(),
24-
abstract_arg('propertyReadInfoExtractor, set by the extension'),
25-
abstract_arg('propertyWriteInfoExtractor, set by the extension'),
26+
service(PropertyReadInfoExtractorInterface::class)->nullOnInvalid(),
27+
service(PropertyWriteInfoExtractorInterface::class)->nullOnInvalid(),
2628
])
2729

2830
->alias(PropertyAccessorInterface::class, 'property_accessor')

0 commit comments

Comments
 (0)