-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(symfony): remove useless pass for property info, remove cache (#166
) I remove the compiler pass for property info, i think it was useless. I also removed the cache for property info, we don't need it and it was causing DX issues when changing metadata of a class (as data was cached and not correctly reload) Last thing i used only our own services for property info, i don't want that other configuration messing up with our way of configuring those classes
- Loading branch information
Showing
5 changed files
with
43 additions
and
89 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
87 changes: 0 additions & 87 deletions
87
src/Symfony/Bundle/DependencyInjection/Compiler/PropertyInfoPass.php
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Symfony\Component\DependencyInjection\Loader\Configurator; | ||
|
||
use AutoMapper\Extractor\ReadWriteTypeExtractor; | ||
use Symfony\Component\PropertyInfo\Extractor\PhpStanExtractor; | ||
use Symfony\Component\PropertyInfo\Extractor\ReflectionExtractor; | ||
use Symfony\Component\PropertyInfo\PropertyInfoExtractor; | ||
|
||
return static function (ContainerConfigurator $container) { | ||
$container | ||
->services() | ||
->set('automapper.property_info.reflection_extractor', ReflectionExtractor::class) | ||
->args([ | ||
'$mutatorPrefixes' => null, | ||
'$accessorPrefixes' => null, | ||
'$arrayMutatorPrefixes' => null, | ||
'$enableConstructorExtraction' => true, | ||
'$accessFlags' => ReflectionExtractor::ALLOW_PUBLIC, | ||
]) | ||
->set('automapper.property_info.read_write_type_extractor', ReadWriteTypeExtractor::class) | ||
->set('automapper.property_info.phpstan_extractor', PhpStanExtractor::class) | ||
->set('automapper.property_info', PropertyInfoExtractor::class) | ||
->args([ | ||
[service('automapper.property_info.reflection_extractor')], | ||
[service('automapper.property_info.read_write_type_extractor'), service('automapper.property_info.phpstan_extractor'), service('automapper.property_info.reflection_extractor')], | ||
[service('automapper.property_info.reflection_extractor')], | ||
[service('automapper.property_info.reflection_extractor')], | ||
[service('automapper.property_info.reflection_extractor')], | ||
]) | ||
; | ||
}; |