PropertyAccessorCreationBooleanToFlagsRector

Changes first argument of PropertyAccessor::__construct() to flags from boolean

 class SomeClass
 {
     public function run()
     {
-        $propertyAccessor = new PropertyAccessor(true);
+        $propertyAccessor = new PropertyAccessor(PropertyAccessor::MAGIC_CALL | PropertyAccessor::MAGIC_GET | PropertyAccessor::MAGIC_SET);
     }
 }

Configure your rector.php:

<?php

use Rector\Config\RectorConfig;
use Rector\Symfony\Symfony52\Rector\New_\PropertyAccessorCreationBooleanToFlagsRector;

return RectorConfig::configure()
    ->withRules([
        PropertyAccessorCreationBooleanToFlagsRector::class,
    ]);
SETS:  symfony/* 5.2