diff --git a/rules/Visibility/Rector/Property/ChangePropertyVisibilityRector.php b/rules/Visibility/Rector/Property/ChangePropertyVisibilityRector.php deleted file mode 100644 index 549563f7f82..00000000000 --- a/rules/Visibility/Rector/Property/ChangePropertyVisibilityRector.php +++ /dev/null @@ -1,89 +0,0 @@ -> - */ - private $propertyToVisibilityByClass = []; - public function getRuleDefinition() : \Symplify\RuleDocGenerator\ValueObject\RuleDefinition - { - return new \Symplify\RuleDocGenerator\ValueObject\RuleDefinition('Change visibility of property from parent class.', [new \Symplify\RuleDocGenerator\ValueObject\CodeSample\ConfiguredCodeSample(<<<'CODE_SAMPLE' -class FrameworkClass -{ - protected $someProperty; -} - -class MyClass extends FrameworkClass -{ - public $someProperty; -} -CODE_SAMPLE -, <<<'CODE_SAMPLE' -class FrameworkClass -{ - protected $someProperty; -} - -class MyClass extends FrameworkClass -{ - protected $someProperty; -} -CODE_SAMPLE -, [self::PROPERTY_TO_VISIBILITY_BY_CLASS => ['FrameworkClass' => ['someProperty' => \Rector\Core\ValueObject\Visibility::PROTECTED]]])]); - } - /** - * @return array> - */ - public function getNodeTypes() : array - { - return [\PhpParser\Node\Stmt\Property::class]; - } - /** - * @param Property $node - */ - public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node - { - $classLike = $node->getAttribute(\Rector\NodeTypeResolver\Node\AttributeKey::CLASS_NODE); - if (!$classLike instanceof \PhpParser\Node\Stmt\ClassLike) { - return null; - } - foreach ($this->propertyToVisibilityByClass as $type => $propertyToVisibility) { - if (!$this->isObjectType($classLike, new \PHPStan\Type\ObjectType($type))) { - continue; - } - foreach ($propertyToVisibility as $property => $visibility) { - if (!$this->isName($node, $property)) { - continue; - } - $this->visibilityManipulator->changeNodeVisibility($node, $visibility); - return $node; - } - } - return null; - } - public function configure(array $configuration) : void - { - $this->propertyToVisibilityByClass = $configuration[self::PROPERTY_TO_VISIBILITY_BY_CLASS] ?? []; - } -} diff --git a/src/Application/VersionResolver.php b/src/Application/VersionResolver.php index 6241ea1397a..5f8511e5ab2 100644 --- a/src/Application/VersionResolver.php +++ b/src/Application/VersionResolver.php @@ -16,11 +16,11 @@ final class VersionResolver /** * @var string */ - public const PACKAGE_VERSION = 'ba2888f66784a9898ccd53feae4facadc6302f13'; + public const PACKAGE_VERSION = 'e06a3c5213b9faf2992e9df5aa8490607de8c6b6'; /** * @var string */ - public const RELEASE_DATE = '2021-07-02 23:15:46'; + public const RELEASE_DATE = '2021-07-02 23:31:50'; public static function resolvePackageVersion() : string { $process = new \RectorPrefix20210702\Symfony\Component\Process\Process(['git', 'log', '--pretty="%H"', '-n1', 'HEAD'], __DIR__); diff --git a/vendor/autoload.php b/vendor/autoload.php index e016129023c..495c841eec9 100644 --- a/vendor/autoload.php +++ b/vendor/autoload.php @@ -4,4 +4,4 @@ require_once __DIR__ . '/composer/autoload_real.php'; -return ComposerAutoloaderInit3fdfa6bca686bb37b70e1d60bcfc21a8::getLoader(); +return ComposerAutoloaderInit972662b421f57f3ae62f5a2e27c071e3::getLoader(); diff --git a/vendor/composer/autoload_classmap.php b/vendor/composer/autoload_classmap.php index 471ceab9134..6f74843fc8e 100644 --- a/vendor/composer/autoload_classmap.php +++ b/vendor/composer/autoload_classmap.php @@ -3196,7 +3196,6 @@ return array( 'Rector\\VendorLocker\\VendorLockResolver' => $baseDir . '/packages/VendorLocker/VendorLockResolver.php', 'Rector\\Visibility\\Rector\\ClassConst\\ChangeConstantVisibilityRector' => $baseDir . '/rules/Visibility/Rector/ClassConst/ChangeConstantVisibilityRector.php', 'Rector\\Visibility\\Rector\\ClassMethod\\ChangeMethodVisibilityRector' => $baseDir . '/rules/Visibility/Rector/ClassMethod/ChangeMethodVisibilityRector.php', - 'Rector\\Visibility\\Rector\\Property\\ChangePropertyVisibilityRector' => $baseDir . '/rules/Visibility/Rector/Property/ChangePropertyVisibilityRector.php', 'Rector\\Visibility\\ValueObject\\ChangeConstantVisibility' => $baseDir . '/rules/Visibility/ValueObject/ChangeConstantVisibility.php', 'Rector\\Visibility\\ValueObject\\ChangeMethodVisibility' => $baseDir . '/rules/Visibility/ValueObject/ChangeMethodVisibility.php', 'ReturnTypeWillChange' => $vendorDir . '/symfony/polyfill-php81/Resources/stubs/ReturnTypeWillChange.php', diff --git a/vendor/composer/autoload_real.php b/vendor/composer/autoload_real.php index eceb8de32fc..b0f68f9742b 100644 --- a/vendor/composer/autoload_real.php +++ b/vendor/composer/autoload_real.php @@ -2,7 +2,7 @@ // autoload_real.php @generated by Composer -class ComposerAutoloaderInit3fdfa6bca686bb37b70e1d60bcfc21a8 +class ComposerAutoloaderInit972662b421f57f3ae62f5a2e27c071e3 { private static $loader; @@ -22,15 +22,15 @@ class ComposerAutoloaderInit3fdfa6bca686bb37b70e1d60bcfc21a8 return self::$loader; } - spl_autoload_register(array('ComposerAutoloaderInit3fdfa6bca686bb37b70e1d60bcfc21a8', 'loadClassLoader'), true, true); + spl_autoload_register(array('ComposerAutoloaderInit972662b421f57f3ae62f5a2e27c071e3', 'loadClassLoader'), true, true); self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__))); - spl_autoload_unregister(array('ComposerAutoloaderInit3fdfa6bca686bb37b70e1d60bcfc21a8', 'loadClassLoader')); + spl_autoload_unregister(array('ComposerAutoloaderInit972662b421f57f3ae62f5a2e27c071e3', 'loadClassLoader')); $useStaticLoader = PHP_VERSION_ID >= 50600 && !defined('HHVM_VERSION') && (!function_exists('zend_loader_file_encoded') || !zend_loader_file_encoded()); if ($useStaticLoader) { require __DIR__ . '/autoload_static.php'; - call_user_func(\Composer\Autoload\ComposerStaticInit3fdfa6bca686bb37b70e1d60bcfc21a8::getInitializer($loader)); + call_user_func(\Composer\Autoload\ComposerStaticInit972662b421f57f3ae62f5a2e27c071e3::getInitializer($loader)); } else { $classMap = require __DIR__ . '/autoload_classmap.php'; if ($classMap) { @@ -42,19 +42,19 @@ class ComposerAutoloaderInit3fdfa6bca686bb37b70e1d60bcfc21a8 $loader->register(true); if ($useStaticLoader) { - $includeFiles = Composer\Autoload\ComposerStaticInit3fdfa6bca686bb37b70e1d60bcfc21a8::$files; + $includeFiles = Composer\Autoload\ComposerStaticInit972662b421f57f3ae62f5a2e27c071e3::$files; } else { $includeFiles = require __DIR__ . '/autoload_files.php'; } foreach ($includeFiles as $fileIdentifier => $file) { - composerRequire3fdfa6bca686bb37b70e1d60bcfc21a8($fileIdentifier, $file); + composerRequire972662b421f57f3ae62f5a2e27c071e3($fileIdentifier, $file); } return $loader; } } -function composerRequire3fdfa6bca686bb37b70e1d60bcfc21a8($fileIdentifier, $file) +function composerRequire972662b421f57f3ae62f5a2e27c071e3($fileIdentifier, $file) { if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { require $file; diff --git a/vendor/composer/autoload_static.php b/vendor/composer/autoload_static.php index 8176561dbba..15abae8e7af 100644 --- a/vendor/composer/autoload_static.php +++ b/vendor/composer/autoload_static.php @@ -4,7 +4,7 @@ namespace Composer\Autoload; -class ComposerStaticInit3fdfa6bca686bb37b70e1d60bcfc21a8 +class ComposerStaticInit972662b421f57f3ae62f5a2e27c071e3 { public static $files = array ( 'a4a119a56e50fbb293281d9a48007e0e' => __DIR__ . '/..' . '/symfony/polyfill-php80/bootstrap.php', @@ -3551,7 +3551,6 @@ class ComposerStaticInit3fdfa6bca686bb37b70e1d60bcfc21a8 'Rector\\VendorLocker\\VendorLockResolver' => __DIR__ . '/../..' . '/packages/VendorLocker/VendorLockResolver.php', 'Rector\\Visibility\\Rector\\ClassConst\\ChangeConstantVisibilityRector' => __DIR__ . '/../..' . '/rules/Visibility/Rector/ClassConst/ChangeConstantVisibilityRector.php', 'Rector\\Visibility\\Rector\\ClassMethod\\ChangeMethodVisibilityRector' => __DIR__ . '/../..' . '/rules/Visibility/Rector/ClassMethod/ChangeMethodVisibilityRector.php', - 'Rector\\Visibility\\Rector\\Property\\ChangePropertyVisibilityRector' => __DIR__ . '/../..' . '/rules/Visibility/Rector/Property/ChangePropertyVisibilityRector.php', 'Rector\\Visibility\\ValueObject\\ChangeConstantVisibility' => __DIR__ . '/../..' . '/rules/Visibility/ValueObject/ChangeConstantVisibility.php', 'Rector\\Visibility\\ValueObject\\ChangeMethodVisibility' => __DIR__ . '/../..' . '/rules/Visibility/ValueObject/ChangeMethodVisibility.php', 'ReturnTypeWillChange' => __DIR__ . '/..' . '/symfony/polyfill-php81/Resources/stubs/ReturnTypeWillChange.php', @@ -3846,9 +3845,9 @@ class ComposerStaticInit3fdfa6bca686bb37b70e1d60bcfc21a8 public static function getInitializer(ClassLoader $loader) { return \Closure::bind(function () use ($loader) { - $loader->prefixLengthsPsr4 = ComposerStaticInit3fdfa6bca686bb37b70e1d60bcfc21a8::$prefixLengthsPsr4; - $loader->prefixDirsPsr4 = ComposerStaticInit3fdfa6bca686bb37b70e1d60bcfc21a8::$prefixDirsPsr4; - $loader->classMap = ComposerStaticInit3fdfa6bca686bb37b70e1d60bcfc21a8::$classMap; + $loader->prefixLengthsPsr4 = ComposerStaticInit972662b421f57f3ae62f5a2e27c071e3::$prefixLengthsPsr4; + $loader->prefixDirsPsr4 = ComposerStaticInit972662b421f57f3ae62f5a2e27c071e3::$prefixDirsPsr4; + $loader->classMap = ComposerStaticInit972662b421f57f3ae62f5a2e27c071e3::$classMap; }, null, ClassLoader::class); } diff --git a/vendor/scoper-autoload.php b/vendor/scoper-autoload.php index cc33a4b382d..433e2e295f1 100644 --- a/vendor/scoper-autoload.php +++ b/vendor/scoper-autoload.php @@ -9,8 +9,8 @@ $loader = require_once __DIR__.'/autoload.php'; if (!class_exists('AutoloadIncluder', false) && !interface_exists('AutoloadIncluder', false) && !trait_exists('AutoloadIncluder', false)) { spl_autoload_call('RectorPrefix20210702\AutoloadIncluder'); } -if (!class_exists('ComposerAutoloaderInit3fdfa6bca686bb37b70e1d60bcfc21a8', false) && !interface_exists('ComposerAutoloaderInit3fdfa6bca686bb37b70e1d60bcfc21a8', false) && !trait_exists('ComposerAutoloaderInit3fdfa6bca686bb37b70e1d60bcfc21a8', false)) { - spl_autoload_call('RectorPrefix20210702\ComposerAutoloaderInit3fdfa6bca686bb37b70e1d60bcfc21a8'); +if (!class_exists('ComposerAutoloaderInit972662b421f57f3ae62f5a2e27c071e3', false) && !interface_exists('ComposerAutoloaderInit972662b421f57f3ae62f5a2e27c071e3', false) && !trait_exists('ComposerAutoloaderInit972662b421f57f3ae62f5a2e27c071e3', false)) { + spl_autoload_call('RectorPrefix20210702\ComposerAutoloaderInit972662b421f57f3ae62f5a2e27c071e3'); } if (!class_exists('Doctrine\Inflector\Inflector', false) && !interface_exists('Doctrine\Inflector\Inflector', false) && !trait_exists('Doctrine\Inflector\Inflector', false)) { spl_autoload_call('RectorPrefix20210702\Doctrine\Inflector\Inflector'); @@ -3308,9 +3308,9 @@ if (!function_exists('print_node')) { return \RectorPrefix20210702\print_node(...func_get_args()); } } -if (!function_exists('composerRequire3fdfa6bca686bb37b70e1d60bcfc21a8')) { - function composerRequire3fdfa6bca686bb37b70e1d60bcfc21a8() { - return \RectorPrefix20210702\composerRequire3fdfa6bca686bb37b70e1d60bcfc21a8(...func_get_args()); +if (!function_exists('composerRequire972662b421f57f3ae62f5a2e27c071e3')) { + function composerRequire972662b421f57f3ae62f5a2e27c071e3() { + return \RectorPrefix20210702\composerRequire972662b421f57f3ae62f5a2e27c071e3(...func_get_args()); } } if (!function_exists('parseArgs')) {