mirror of
https://github.com/rectorphp/rector.git
synced 2024-05-28 23:10:51 +00:00
Updated Rector to commit a2422d7937
a2422d7937
[Transform] Remove AddInterfaceByParentRector as never used (#1934)
This commit is contained in:
parent
37e1aabdcf
commit
7572ce6925
|
@ -1,4 +1,4 @@
|
|||
# 506 Rules Overview
|
||||
# 505 Rules Overview
|
||||
|
||||
<br>
|
||||
|
||||
|
@ -86,7 +86,7 @@
|
|||
|
||||
- [Strict](#strict) (5)
|
||||
|
||||
- [Transform](#transform) (36)
|
||||
- [Transform](#transform) (35)
|
||||
|
||||
- [TypeDeclaration](#typedeclaration) (23)
|
||||
|
||||
|
@ -9893,40 +9893,6 @@ return static function (ContainerConfigurator $containerConfigurator): void {
|
|||
|
||||
<br>
|
||||
|
||||
### AddInterfaceByParentRector
|
||||
|
||||
Add interface by parent
|
||||
|
||||
:wrench: **configure it!**
|
||||
|
||||
- class: [`Rector\Transform\Rector\Class_\AddInterfaceByParentRector`](../rules/Transform/Rector/Class_/AddInterfaceByParentRector.php)
|
||||
|
||||
```php
|
||||
use Rector\Transform\Rector\Class_\AddInterfaceByParentRector;
|
||||
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||
|
||||
return static function (ContainerConfigurator $containerConfigurator): void {
|
||||
$services = $containerConfigurator->services();
|
||||
|
||||
$services->set(AddInterfaceByParentRector::class)
|
||||
->configure([
|
||||
'SomeParent' => 'SomeInterface',
|
||||
]);
|
||||
};
|
||||
```
|
||||
|
||||
↓
|
||||
|
||||
```diff
|
||||
-class SomeClass extends SomeParent
|
||||
+class SomeClass extends SomeParent implements SomeInterface
|
||||
{
|
||||
|
||||
}
|
||||
```
|
||||
|
||||
<br>
|
||||
|
||||
### AddInterfaceByTraitRector
|
||||
|
||||
Add interface by used trait
|
||||
|
|
|
@ -1,95 +0,0 @@
|
|||
<?php
|
||||
|
||||
declare (strict_types=1);
|
||||
namespace Rector\Transform\Rector\Class_;
|
||||
|
||||
use PhpParser\Node;
|
||||
use PhpParser\Node\Name\FullyQualified;
|
||||
use PhpParser\Node\Stmt\Class_;
|
||||
use PHPStan\Analyser\Scope;
|
||||
use PHPStan\Reflection\ClassReflection;
|
||||
use Rector\Core\Contract\Rector\ConfigurableRectorInterface;
|
||||
use Rector\Core\Rector\AbstractRector;
|
||||
use Rector\NodeTypeResolver\Node\AttributeKey;
|
||||
use Symplify\RuleDocGenerator\ValueObject\CodeSample\ConfiguredCodeSample;
|
||||
use Symplify\RuleDocGenerator\ValueObject\RuleDefinition;
|
||||
use RectorPrefix20220315\Webmozart\Assert\Assert;
|
||||
/**
|
||||
* @see \Rector\Tests\Transform\Rector\Class_\AddInterfaceByParentRector\AddInterfaceByParentRectorTest
|
||||
*/
|
||||
final class AddInterfaceByParentRector extends \Rector\Core\Rector\AbstractRector implements \Rector\Core\Contract\Rector\ConfigurableRectorInterface
|
||||
{
|
||||
/**
|
||||
* @var array<string, string>
|
||||
*/
|
||||
private $interfaceByParent = [];
|
||||
public function getRuleDefinition() : \Symplify\RuleDocGenerator\ValueObject\RuleDefinition
|
||||
{
|
||||
return new \Symplify\RuleDocGenerator\ValueObject\RuleDefinition('Add interface by parent', [new \Symplify\RuleDocGenerator\ValueObject\CodeSample\ConfiguredCodeSample(<<<'CODE_SAMPLE'
|
||||
class SomeClass extends SomeParent
|
||||
{
|
||||
|
||||
}
|
||||
CODE_SAMPLE
|
||||
, <<<'CODE_SAMPLE'
|
||||
class SomeClass extends SomeParent implements SomeInterface
|
||||
{
|
||||
|
||||
}
|
||||
CODE_SAMPLE
|
||||
, ['SomeParent' => 'SomeInterface'])]);
|
||||
}
|
||||
/**
|
||||
* @return array<class-string<Node>>
|
||||
*/
|
||||
public function getNodeTypes() : array
|
||||
{
|
||||
return [\PhpParser\Node\Stmt\Class_::class];
|
||||
}
|
||||
/**
|
||||
* @param Class_ $node
|
||||
*/
|
||||
public function refactor(\PhpParser\Node $node) : ?\PhpParser\Node
|
||||
{
|
||||
$parentClassReflection = $this->resolveParentClassReflection($node);
|
||||
if (!$parentClassReflection instanceof \PHPStan\Reflection\ClassReflection) {
|
||||
return null;
|
||||
}
|
||||
$hasChanged = \false;
|
||||
foreach ($this->interfaceByParent as $parentName => $interfaceName) {
|
||||
if ($parentName !== $parentClassReflection->getName()) {
|
||||
continue;
|
||||
}
|
||||
foreach ($node->implements as $implement) {
|
||||
if ($this->isName($implement, $interfaceName)) {
|
||||
continue 2;
|
||||
}
|
||||
}
|
||||
$node->implements[] = new \PhpParser\Node\Name\FullyQualified($interfaceName);
|
||||
$hasChanged = \true;
|
||||
}
|
||||
if (!$hasChanged) {
|
||||
return null;
|
||||
}
|
||||
return $node;
|
||||
}
|
||||
/**
|
||||
* @param mixed[] $configuration
|
||||
*/
|
||||
public function configure(array $configuration) : void
|
||||
{
|
||||
\RectorPrefix20220315\Webmozart\Assert\Assert::allString(\array_keys($configuration));
|
||||
\RectorPrefix20220315\Webmozart\Assert\Assert::allString($configuration);
|
||||
$this->interfaceByParent = $configuration;
|
||||
}
|
||||
private function resolveParentClassReflection(\PhpParser\Node\Stmt\Class_ $class) : ?\PHPStan\Reflection\ClassReflection
|
||||
{
|
||||
/** @var Scope $scope */
|
||||
$scope = $class->getAttribute(\Rector\NodeTypeResolver\Node\AttributeKey::SCOPE);
|
||||
$classReflection = $scope->getClassReflection();
|
||||
if (!$classReflection instanceof \PHPStan\Reflection\ClassReflection) {
|
||||
return null;
|
||||
}
|
||||
return $classReflection->getParentClass();
|
||||
}
|
||||
}
|
|
@ -16,11 +16,11 @@ final class VersionResolver
|
|||
/**
|
||||
* @var string
|
||||
*/
|
||||
public const PACKAGE_VERSION = '117af55f967fd43958ee20cfdc48c60b57ae0dea';
|
||||
public const PACKAGE_VERSION = 'a2422d7937a9859a403b52691f99617716e6e15a';
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public const RELEASE_DATE = '2022-03-15 13:59:11';
|
||||
public const RELEASE_DATE = '2022-03-15 16:56:36';
|
||||
public static function resolvePackageVersion() : string
|
||||
{
|
||||
$process = new \RectorPrefix20220315\Symfony\Component\Process\Process(['git', 'log', '--pretty="%H"', '-n1', 'HEAD'], __DIR__);
|
||||
|
|
2
vendor/autoload.php
vendored
2
vendor/autoload.php
vendored
|
@ -4,4 +4,4 @@
|
|||
|
||||
require_once __DIR__ . '/composer/autoload_real.php';
|
||||
|
||||
return ComposerAutoloaderInit0c16672f7d25618a5ba45fa1f6006853::getLoader();
|
||||
return ComposerAutoloaderInit96ed9ef4a156196dbc4f621b2af8883d::getLoader();
|
||||
|
|
1
vendor/composer/autoload_classmap.php
vendored
1
vendor/composer/autoload_classmap.php
vendored
|
@ -3001,7 +3001,6 @@ return array(
|
|||
'Rector\\Transform\\Rector\\ClassMethod\\ReturnTypeWillChangeRector' => $baseDir . '/rules/Transform/Rector/ClassMethod/ReturnTypeWillChangeRector.php',
|
||||
'Rector\\Transform\\Rector\\ClassMethod\\WrapReturnRector' => $baseDir . '/rules/Transform/Rector/ClassMethod/WrapReturnRector.php',
|
||||
'Rector\\Transform\\Rector\\Class_\\AddAllowDynamicPropertiesAttributeRector' => $baseDir . '/rules/Transform/Rector/Class_/AddAllowDynamicPropertiesAttributeRector.php',
|
||||
'Rector\\Transform\\Rector\\Class_\\AddInterfaceByParentRector' => $baseDir . '/rules/Transform/Rector/Class_/AddInterfaceByParentRector.php',
|
||||
'Rector\\Transform\\Rector\\Class_\\AddInterfaceByTraitRector' => $baseDir . '/rules/Transform/Rector/Class_/AddInterfaceByTraitRector.php',
|
||||
'Rector\\Transform\\Rector\\Class_\\ChangeSingletonToServiceRector' => $baseDir . '/rules/Transform/Rector/Class_/ChangeSingletonToServiceRector.php',
|
||||
'Rector\\Transform\\Rector\\Class_\\MergeInterfacesRector' => $baseDir . '/rules/Transform/Rector/Class_/MergeInterfacesRector.php',
|
||||
|
|
14
vendor/composer/autoload_real.php
vendored
14
vendor/composer/autoload_real.php
vendored
|
@ -2,7 +2,7 @@
|
|||
|
||||
// autoload_real.php @generated by Composer
|
||||
|
||||
class ComposerAutoloaderInit0c16672f7d25618a5ba45fa1f6006853
|
||||
class ComposerAutoloaderInit96ed9ef4a156196dbc4f621b2af8883d
|
||||
{
|
||||
private static $loader;
|
||||
|
||||
|
@ -22,15 +22,15 @@ class ComposerAutoloaderInit0c16672f7d25618a5ba45fa1f6006853
|
|||
return self::$loader;
|
||||
}
|
||||
|
||||
spl_autoload_register(array('ComposerAutoloaderInit0c16672f7d25618a5ba45fa1f6006853', 'loadClassLoader'), true, true);
|
||||
spl_autoload_register(array('ComposerAutoloaderInit96ed9ef4a156196dbc4f621b2af8883d', 'loadClassLoader'), true, true);
|
||||
self::$loader = $loader = new \Composer\Autoload\ClassLoader(\dirname(\dirname(__FILE__)));
|
||||
spl_autoload_unregister(array('ComposerAutoloaderInit0c16672f7d25618a5ba45fa1f6006853', 'loadClassLoader'));
|
||||
spl_autoload_unregister(array('ComposerAutoloaderInit96ed9ef4a156196dbc4f621b2af8883d', '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\ComposerStaticInit0c16672f7d25618a5ba45fa1f6006853::getInitializer($loader));
|
||||
call_user_func(\Composer\Autoload\ComposerStaticInit96ed9ef4a156196dbc4f621b2af8883d::getInitializer($loader));
|
||||
} else {
|
||||
$classMap = require __DIR__ . '/autoload_classmap.php';
|
||||
if ($classMap) {
|
||||
|
@ -42,12 +42,12 @@ class ComposerAutoloaderInit0c16672f7d25618a5ba45fa1f6006853
|
|||
$loader->register(true);
|
||||
|
||||
if ($useStaticLoader) {
|
||||
$includeFiles = Composer\Autoload\ComposerStaticInit0c16672f7d25618a5ba45fa1f6006853::$files;
|
||||
$includeFiles = Composer\Autoload\ComposerStaticInit96ed9ef4a156196dbc4f621b2af8883d::$files;
|
||||
} else {
|
||||
$includeFiles = require __DIR__ . '/autoload_files.php';
|
||||
}
|
||||
foreach ($includeFiles as $fileIdentifier => $file) {
|
||||
composerRequire0c16672f7d25618a5ba45fa1f6006853($fileIdentifier, $file);
|
||||
composerRequire96ed9ef4a156196dbc4f621b2af8883d($fileIdentifier, $file);
|
||||
}
|
||||
|
||||
return $loader;
|
||||
|
@ -59,7 +59,7 @@ class ComposerAutoloaderInit0c16672f7d25618a5ba45fa1f6006853
|
|||
* @param string $file
|
||||
* @return void
|
||||
*/
|
||||
function composerRequire0c16672f7d25618a5ba45fa1f6006853($fileIdentifier, $file)
|
||||
function composerRequire96ed9ef4a156196dbc4f621b2af8883d($fileIdentifier, $file)
|
||||
{
|
||||
if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
|
||||
$GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
|
||||
|
|
9
vendor/composer/autoload_static.php
vendored
9
vendor/composer/autoload_static.php
vendored
|
@ -4,7 +4,7 @@
|
|||
|
||||
namespace Composer\Autoload;
|
||||
|
||||
class ComposerStaticInit0c16672f7d25618a5ba45fa1f6006853
|
||||
class ComposerStaticInit96ed9ef4a156196dbc4f621b2af8883d
|
||||
{
|
||||
public static $files = array (
|
||||
'320cde22f66dd4f5d3fd621d3e88b98f' => __DIR__ . '/..' . '/symfony/polyfill-ctype/bootstrap.php',
|
||||
|
@ -3375,7 +3375,6 @@ class ComposerStaticInit0c16672f7d25618a5ba45fa1f6006853
|
|||
'Rector\\Transform\\Rector\\ClassMethod\\ReturnTypeWillChangeRector' => __DIR__ . '/../..' . '/rules/Transform/Rector/ClassMethod/ReturnTypeWillChangeRector.php',
|
||||
'Rector\\Transform\\Rector\\ClassMethod\\WrapReturnRector' => __DIR__ . '/../..' . '/rules/Transform/Rector/ClassMethod/WrapReturnRector.php',
|
||||
'Rector\\Transform\\Rector\\Class_\\AddAllowDynamicPropertiesAttributeRector' => __DIR__ . '/../..' . '/rules/Transform/Rector/Class_/AddAllowDynamicPropertiesAttributeRector.php',
|
||||
'Rector\\Transform\\Rector\\Class_\\AddInterfaceByParentRector' => __DIR__ . '/../..' . '/rules/Transform/Rector/Class_/AddInterfaceByParentRector.php',
|
||||
'Rector\\Transform\\Rector\\Class_\\AddInterfaceByTraitRector' => __DIR__ . '/../..' . '/rules/Transform/Rector/Class_/AddInterfaceByTraitRector.php',
|
||||
'Rector\\Transform\\Rector\\Class_\\ChangeSingletonToServiceRector' => __DIR__ . '/../..' . '/rules/Transform/Rector/Class_/ChangeSingletonToServiceRector.php',
|
||||
'Rector\\Transform\\Rector\\Class_\\MergeInterfacesRector' => __DIR__ . '/../..' . '/rules/Transform/Rector/Class_/MergeInterfacesRector.php',
|
||||
|
@ -3842,9 +3841,9 @@ class ComposerStaticInit0c16672f7d25618a5ba45fa1f6006853
|
|||
public static function getInitializer(ClassLoader $loader)
|
||||
{
|
||||
return \Closure::bind(function () use ($loader) {
|
||||
$loader->prefixLengthsPsr4 = ComposerStaticInit0c16672f7d25618a5ba45fa1f6006853::$prefixLengthsPsr4;
|
||||
$loader->prefixDirsPsr4 = ComposerStaticInit0c16672f7d25618a5ba45fa1f6006853::$prefixDirsPsr4;
|
||||
$loader->classMap = ComposerStaticInit0c16672f7d25618a5ba45fa1f6006853::$classMap;
|
||||
$loader->prefixLengthsPsr4 = ComposerStaticInit96ed9ef4a156196dbc4f621b2af8883d::$prefixLengthsPsr4;
|
||||
$loader->prefixDirsPsr4 = ComposerStaticInit96ed9ef4a156196dbc4f621b2af8883d::$prefixDirsPsr4;
|
||||
$loader->classMap = ComposerStaticInit96ed9ef4a156196dbc4f621b2af8883d::$classMap;
|
||||
|
||||
}, null, ClassLoader::class);
|
||||
}
|
||||
|
|
10
vendor/composer/installed.json
vendored
10
vendor/composer/installed.json
vendored
|
@ -2690,12 +2690,12 @@
|
|||
"source": {
|
||||
"type": "git",
|
||||
"url": "https:\/\/github.com\/rectorphp\/rector-symfony.git",
|
||||
"reference": "504967432047b632438de54518618a1dadefd164"
|
||||
"reference": "fcd5c8ee77db079f4dcfc84b5322af24ff9703fe"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-symfony\/zipball\/504967432047b632438de54518618a1dadefd164",
|
||||
"reference": "504967432047b632438de54518618a1dadefd164",
|
||||
"url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-symfony\/zipball\/fcd5c8ee77db079f4dcfc84b5322af24ff9703fe",
|
||||
"reference": "fcd5c8ee77db079f4dcfc84b5322af24ff9703fe",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -2723,7 +2723,7 @@
|
|||
"symplify\/rule-doc-generator": "^10.0",
|
||||
"symplify\/vendor-patches": "^10.0"
|
||||
},
|
||||
"time": "2022-03-14T16:25:42+00:00",
|
||||
"time": "2022-03-15T15:56:48+00:00",
|
||||
"default-branch": true,
|
||||
"type": "rector-extension",
|
||||
"extra": {
|
||||
|
@ -2750,7 +2750,7 @@
|
|||
"description": "Rector upgrades rules for Symfony Framework",
|
||||
"support": {
|
||||
"issues": "https:\/\/github.com\/rectorphp\/rector-symfony\/issues",
|
||||
"source": "https:\/\/github.com\/rectorphp\/rector-symfony\/tree\/0.11.50"
|
||||
"source": "https:\/\/github.com\/rectorphp\/rector-symfony\/tree\/main"
|
||||
},
|
||||
"install-path": "..\/rector\/rector-symfony"
|
||||
},
|
||||
|
|
2
vendor/composer/installed.php
vendored
2
vendor/composer/installed.php
vendored
File diff suppressed because one or more lines are too long
|
@ -9,7 +9,7 @@ namespace Rector\RectorInstaller;
|
|||
*/
|
||||
final class GeneratedConfig
|
||||
{
|
||||
public const EXTENSIONS = array('rector/rector-cakephp' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-cakephp', 'relative_install_path' => '../../rector-cakephp', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main d1fa93d'), 'rector/rector-doctrine' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-doctrine', 'relative_install_path' => '../../rector-doctrine', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main 96ff8cb'), 'rector/rector-generator' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-generator', 'relative_install_path' => '../../rector-generator', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main 68d30fe'), 'rector/rector-laravel' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-laravel', 'relative_install_path' => '../../rector-laravel', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main 6bee428'), 'rector/rector-nette' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-nette', 'relative_install_path' => '../../rector-nette', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main 0aaf0a6'), 'rector/rector-phpoffice' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-phpoffice', 'relative_install_path' => '../../rector-phpoffice', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main f23c4bf'), 'rector/rector-phpunit' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-phpunit', 'relative_install_path' => '../../rector-phpunit', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main 5952218'), 'rector/rector-symfony' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-symfony', 'relative_install_path' => '../../rector-symfony', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main 5049674'), 'ssch/typo3-rector' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/ssch/typo3-rector', 'relative_install_path' => '../../../ssch/typo3-rector', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main b88a7c1'));
|
||||
public const EXTENSIONS = array('rector/rector-cakephp' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-cakephp', 'relative_install_path' => '../../rector-cakephp', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main d1fa93d'), 'rector/rector-doctrine' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-doctrine', 'relative_install_path' => '../../rector-doctrine', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main 96ff8cb'), 'rector/rector-generator' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-generator', 'relative_install_path' => '../../rector-generator', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main 68d30fe'), 'rector/rector-laravel' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-laravel', 'relative_install_path' => '../../rector-laravel', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main 6bee428'), 'rector/rector-nette' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-nette', 'relative_install_path' => '../../rector-nette', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main 0aaf0a6'), 'rector/rector-phpoffice' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-phpoffice', 'relative_install_path' => '../../rector-phpoffice', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main f23c4bf'), 'rector/rector-phpunit' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-phpunit', 'relative_install_path' => '../../rector-phpunit', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main 5952218'), 'rector/rector-symfony' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/rector/rector-symfony', 'relative_install_path' => '../../rector-symfony', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main fcd5c8e'), 'ssch/typo3-rector' => array('install_path' => '/home/runner/work/rector-src/rector-src/vendor/ssch/typo3-rector', 'relative_install_path' => '../../../ssch/typo3-rector', 'extra' => array('includes' => array(0 => 'config/config.php')), 'version' => 'dev-main b88a7c1'));
|
||||
private function __construct()
|
||||
{
|
||||
}
|
||||
|
|
17
vendor/rector/rector-symfony/config/sets/jms/annotations-to-attributes.php
vendored
Normal file
17
vendor/rector/rector-symfony/config/sets/jms/annotations-to-attributes.php
vendored
Normal file
|
@ -0,0 +1,17 @@
|
|||
<?php
|
||||
|
||||
declare (strict_types=1);
|
||||
namespace RectorPrefix20220315;
|
||||
|
||||
use Rector\Php80\Rector\Class_\AnnotationToAttributeRector;
|
||||
use Rector\Php80\ValueObject\AnnotationToAttribute;
|
||||
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||
/**
|
||||
* @see https://github.com/schmittjoh/serializer/pull/1320
|
||||
* @see https://github.com/schmittjoh/serializer/pull/1332
|
||||
* @see https://github.com/schmittjoh/serializer/pull/1337
|
||||
*/
|
||||
return static function (\Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator $containerConfigurator) : void {
|
||||
$services = $containerConfigurator->services();
|
||||
$services->set(\Rector\Php80\Rector\Class_\AnnotationToAttributeRector::class)->configure([new \Rector\Php80\ValueObject\AnnotationToAttribute('JMS\\Serializer\\Annotation\\Accessor'), new \Rector\Php80\ValueObject\AnnotationToAttribute('JMS\\Serializer\\Annotation\\AccessorOrder'), new \Rector\Php80\ValueObject\AnnotationToAttribute('JMS\\Serializer\\Annotation\\AccessType'), new \Rector\Php80\ValueObject\AnnotationToAttribute('JMS\\Serializer\\Annotation\\Discriminator'), new \Rector\Php80\ValueObject\AnnotationToAttribute('JMS\\Serializer\\Annotation\\Exclude'), new \Rector\Php80\ValueObject\AnnotationToAttribute('JMS\\Serializer\\Annotation\\ExclusionPolicy'), new \Rector\Php80\ValueObject\AnnotationToAttribute('JMS\\Serializer\\Annotation\\Expose'), new \Rector\Php80\ValueObject\AnnotationToAttribute('JMS\\Serializer\\Annotation\\Groups'), new \Rector\Php80\ValueObject\AnnotationToAttribute('JMS\\Serializer\\Annotation\\Inline'), new \Rector\Php80\ValueObject\AnnotationToAttribute('JMS\\Serializer\\Annotation\\MaxDepth'), new \Rector\Php80\ValueObject\AnnotationToAttribute('JMS\\Serializer\\Annotation\\PostDeserialize'), new \Rector\Php80\ValueObject\AnnotationToAttribute('JMS\\Serializer\\Annotation\\PostSerialize'), new \Rector\Php80\ValueObject\AnnotationToAttribute('JMS\\Serializer\\Annotation\\PreSerialize'), new \Rector\Php80\ValueObject\AnnotationToAttribute('JMS\\Serializer\\Annotation\\ReadOnly'), new \Rector\Php80\ValueObject\AnnotationToAttribute('JMS\\Serializer\\Annotation\\ReadOnlyProperty'), new \Rector\Php80\ValueObject\AnnotationToAttribute('JMS\\Serializer\\Annotation\\SerializedName'), new \Rector\Php80\ValueObject\AnnotationToAttribute('JMS\\Serializer\\Annotation\\Since'), new \Rector\Php80\ValueObject\AnnotationToAttribute('JMS\\Serializer\\Annotation\\SkipWhenEmpty'), new \Rector\Php80\ValueObject\AnnotationToAttribute('JMS\\Serializer\\Annotation\\Type'), new \Rector\Php80\ValueObject\AnnotationToAttribute('JMS\\Serializer\\Annotation\\Until'), new \Rector\Php80\ValueObject\AnnotationToAttribute('JMS\\Serializer\\Annotation\\VirtualProperty'), new \Rector\Php80\ValueObject\AnnotationToAttribute('JMS\\Serializer\\Annotation\\XmlAttributeMap'), new \Rector\Php80\ValueObject\AnnotationToAttribute('JMS\\Serializer\\Annotation\\XmlAttribute'), new \Rector\Php80\ValueObject\AnnotationToAttribute('JMS\\Serializer\\Annotation\\XmlDiscriminator'), new \Rector\Php80\ValueObject\AnnotationToAttribute('JMS\\Serializer\\Annotation\\XmlElement'), new \Rector\Php80\ValueObject\AnnotationToAttribute('JMS\\Serializer\\Annotation\\XmlKeyValuePairs'), new \Rector\Php80\ValueObject\AnnotationToAttribute('JMS\\Serializer\\Annotation\\XmlList'), new \Rector\Php80\ValueObject\AnnotationToAttribute('JMS\\Serializer\\Annotation\\XmlMap'), new \Rector\Php80\ValueObject\AnnotationToAttribute('JMS\\Serializer\\Annotation\\XmlNamespace'), new \Rector\Php80\ValueObject\AnnotationToAttribute('JMS\\Serializer\\Annotation\\XmlRoot'), new \Rector\Php80\ValueObject\AnnotationToAttribute('JMS\\Serializer\\Annotation\\XmlValue')]);
|
||||
};
|
|
@ -10,4 +10,8 @@ final class JMSSetList implements \Rector\Set\Contract\SetListInterface
|
|||
* @var string
|
||||
*/
|
||||
public const REMOVE_JMS_INJECT = __DIR__ . '/../../config/sets/jms/remove-jms-inject.php';
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public const ANNOTATIONS_TO_ATTRIBUTES = __DIR__ . '/../../config/sets/jms/annotations-to-attributes.php';
|
||||
}
|
||||
|
|
10
vendor/scoper-autoload.php
vendored
10
vendor/scoper-autoload.php
vendored
|
@ -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('RectorPrefix20220315\AutoloadIncluder');
|
||||
}
|
||||
if (!class_exists('ComposerAutoloaderInit0c16672f7d25618a5ba45fa1f6006853', false) && !interface_exists('ComposerAutoloaderInit0c16672f7d25618a5ba45fa1f6006853', false) && !trait_exists('ComposerAutoloaderInit0c16672f7d25618a5ba45fa1f6006853', false)) {
|
||||
spl_autoload_call('RectorPrefix20220315\ComposerAutoloaderInit0c16672f7d25618a5ba45fa1f6006853');
|
||||
if (!class_exists('ComposerAutoloaderInit96ed9ef4a156196dbc4f621b2af8883d', false) && !interface_exists('ComposerAutoloaderInit96ed9ef4a156196dbc4f621b2af8883d', false) && !trait_exists('ComposerAutoloaderInit96ed9ef4a156196dbc4f621b2af8883d', false)) {
|
||||
spl_autoload_call('RectorPrefix20220315\ComposerAutoloaderInit96ed9ef4a156196dbc4f621b2af8883d');
|
||||
}
|
||||
if (!class_exists('Helmich\TypoScriptParser\Parser\AST\Statement', false) && !interface_exists('Helmich\TypoScriptParser\Parser\AST\Statement', false) && !trait_exists('Helmich\TypoScriptParser\Parser\AST\Statement', false)) {
|
||||
spl_autoload_call('RectorPrefix20220315\Helmich\TypoScriptParser\Parser\AST\Statement');
|
||||
|
@ -59,9 +59,9 @@ if (!function_exists('print_node')) {
|
|||
return \RectorPrefix20220315\print_node(...func_get_args());
|
||||
}
|
||||
}
|
||||
if (!function_exists('composerRequire0c16672f7d25618a5ba45fa1f6006853')) {
|
||||
function composerRequire0c16672f7d25618a5ba45fa1f6006853() {
|
||||
return \RectorPrefix20220315\composerRequire0c16672f7d25618a5ba45fa1f6006853(...func_get_args());
|
||||
if (!function_exists('composerRequire96ed9ef4a156196dbc4f621b2af8883d')) {
|
||||
function composerRequire96ed9ef4a156196dbc4f621b2af8883d() {
|
||||
return \RectorPrefix20220315\composerRequire96ed9ef4a156196dbc4f621b2af8883d(...func_get_args());
|
||||
}
|
||||
}
|
||||
if (!function_exists('scanPath')) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user