Skip to content

Commit

Permalink
Updated README
Browse files Browse the repository at this point in the history
  • Loading branch information
magicsunday committed Feb 28, 2021
1 parent f117271 commit 3f24542
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,18 +56,13 @@ use \Symfony\Component\PropertyInfo\PropertyInfoExtractor;
use \Symfony\Component\PropertyAccess\PropertyAccessor;
```

A common extractor setup:
```php
// A common extractor setup
$listExtractors = [ new ReflectionExtractor() ];
$typeExtractors = [ new PhpDocExtractor() ];
$propertyInfoExtractor = new PropertyInfoExtractor($listExtractors, $typeExtractors);
```

To extract PHP 7.4 typed properties you should use the `ReflectionExtractor` inside the type extractor list too:
```php
$typeExtractors = [ new ReflectionExtractor(), new PhpDocExtractor() ];
```

Create an instance of the property accessor:
```php
$propertyAccessor = PropertyAccess::createPropertyAccessor();
Expand Down

0 comments on commit 3f24542

Please sign in to comment.