From 9d08250ee144d5ad6d30a59213143fd8b480b7f0 Mon Sep 17 00:00:00 2001 From: Tomas Votruba Date: Thu, 20 Jun 2024 14:07:51 +0000 Subject: [PATCH] Updated Rector to commit f366a7e66228f35dc877e816b553c4f38332f801 https://github.com/rectorphp/rector-src/commit/f366a7e66228f35dc877e816b553c4f38332f801 [DX] add notifyWithPhpSetsNotSuitableForPHP80() (#5988) --- vendor/composer/autoload_classmap.php | 1 - vendor/composer/autoload_static.php | 1 - vendor/composer/installed.json | 46 +++++----- vendor/composer/installed.php | 2 +- .../src/GeneratedConfig.php | 2 +- vendor/rector/rector-doctrine/composer.json | 17 ++-- .../TableClassAttributeTransformer.php | 8 +- .../JoinColumnAttributeTransformer.php | 8 +- ...nitializeDefaultEntityCollectionRector.php | 88 ++----------------- ...octrineCollectionDocTypeInEntityRector.php | 4 +- ...edPropertyFromDoctrineCollectionRector.php | 47 ++-------- .../TypeAnalyzer/CollectionTypeFactory.php | 3 +- .../DoctrineCollectionTypeAnalyzer.php | 45 ---------- vendor/symfony/yaml/CHANGELOG.md | 10 +++ vendor/symfony/yaml/Command/LintCommand.php | 5 +- vendor/symfony/yaml/Dumper.php | 10 +-- vendor/symfony/yaml/Escaper.php | 2 +- .../symfony/yaml/Exception/ParseException.php | 30 +++---- vendor/symfony/yaml/Inline.php | 25 +++--- vendor/symfony/yaml/Parser.php | 11 +-- vendor/symfony/yaml/composer.json | 7 +- 21 files changed, 112 insertions(+), 260 deletions(-) delete mode 100644 vendor/rector/rector-doctrine/src/TypeAnalyzer/DoctrineCollectionTypeAnalyzer.php diff --git a/vendor/composer/autoload_classmap.php b/vendor/composer/autoload_classmap.php index 27b46ab9e215..4889929dd267 100644 --- a/vendor/composer/autoload_classmap.php +++ b/vendor/composer/autoload_classmap.php @@ -1380,7 +1380,6 @@ 'Rector\\Doctrine\\TypeAnalyzer\\CollectionTypeFactory' => $vendorDir . '/rector/rector-doctrine/src/TypeAnalyzer/CollectionTypeFactory.php', 'Rector\\Doctrine\\TypeAnalyzer\\CollectionTypeResolver' => $vendorDir . '/rector/rector-doctrine/src/TypeAnalyzer/CollectionTypeResolver.php', 'Rector\\Doctrine\\TypeAnalyzer\\CollectionVarTagValueNodeResolver' => $vendorDir . '/rector/rector-doctrine/src/TypeAnalyzer/CollectionVarTagValueNodeResolver.php', - 'Rector\\Doctrine\\TypeAnalyzer\\DoctrineCollectionTypeAnalyzer' => $vendorDir . '/rector/rector-doctrine/src/TypeAnalyzer/DoctrineCollectionTypeAnalyzer.php', 'Rector\\DowngradePhp72\\NodeAnalyzer\\BuiltInMethodAnalyzer' => $vendorDir . '/rector/rector-downgrade-php/rules/DowngradePhp72/NodeAnalyzer/BuiltInMethodAnalyzer.php', 'Rector\\DowngradePhp72\\NodeAnalyzer\\OverrideFromAnonymousClassMethodAnalyzer' => $vendorDir . '/rector/rector-downgrade-php/rules/DowngradePhp72/NodeAnalyzer/OverrideFromAnonymousClassMethodAnalyzer.php', 'Rector\\DowngradePhp72\\NodeAnalyzer\\RegexFuncAnalyzer' => $vendorDir . '/rector/rector-downgrade-php/rules/DowngradePhp72/NodeAnalyzer/RegexFuncAnalyzer.php', diff --git a/vendor/composer/autoload_static.php b/vendor/composer/autoload_static.php index 506d91364296..749275701412 100644 --- a/vendor/composer/autoload_static.php +++ b/vendor/composer/autoload_static.php @@ -1599,7 +1599,6 @@ class ComposerStaticInitc6bcdb63495c7f1cc77baa21ee134e8a 'Rector\\Doctrine\\TypeAnalyzer\\CollectionTypeFactory' => __DIR__ . '/..' . '/rector/rector-doctrine/src/TypeAnalyzer/CollectionTypeFactory.php', 'Rector\\Doctrine\\TypeAnalyzer\\CollectionTypeResolver' => __DIR__ . '/..' . '/rector/rector-doctrine/src/TypeAnalyzer/CollectionTypeResolver.php', 'Rector\\Doctrine\\TypeAnalyzer\\CollectionVarTagValueNodeResolver' => __DIR__ . '/..' . '/rector/rector-doctrine/src/TypeAnalyzer/CollectionVarTagValueNodeResolver.php', - 'Rector\\Doctrine\\TypeAnalyzer\\DoctrineCollectionTypeAnalyzer' => __DIR__ . '/..' . '/rector/rector-doctrine/src/TypeAnalyzer/DoctrineCollectionTypeAnalyzer.php', 'Rector\\DowngradePhp72\\NodeAnalyzer\\BuiltInMethodAnalyzer' => __DIR__ . '/..' . '/rector/rector-downgrade-php/rules/DowngradePhp72/NodeAnalyzer/BuiltInMethodAnalyzer.php', 'Rector\\DowngradePhp72\\NodeAnalyzer\\OverrideFromAnonymousClassMethodAnalyzer' => __DIR__ . '/..' . '/rector/rector-downgrade-php/rules/DowngradePhp72/NodeAnalyzer/OverrideFromAnonymousClassMethodAnalyzer.php', 'Rector\\DowngradePhp72\\NodeAnalyzer\\RegexFuncAnalyzer' => __DIR__ . '/..' . '/rector/rector-downgrade-php/rules/DowngradePhp72/NodeAnalyzer/RegexFuncAnalyzer.php', diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json index a6a72d53548c..678086e9ec2d 100644 --- a/vendor/composer/installed.json +++ b/vendor/composer/installed.json @@ -1680,37 +1680,38 @@ "source": { "type": "git", "url": "https:\/\/github.com\/rectorphp\/rector-doctrine.git", - "reference": "6eb8de836a52701d15ab3fd020052a1843fad992" + "reference": "c3c91df9134657245c63d956aa6afc5bbdba5d6f" }, "dist": { "type": "zip", - "url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-doctrine\/zipball\/6eb8de836a52701d15ab3fd020052a1843fad992", - "reference": "6eb8de836a52701d15ab3fd020052a1843fad992", + "url": "https:\/\/api.github.com\/repos\/rectorphp\/rector-doctrine\/zipball\/c3c91df9134657245c63d956aa6afc5bbdba5d6f", + "reference": "c3c91df9134657245c63d956aa6afc5bbdba5d6f", "shasum": "" }, "require": { "php": ">=8.2", - "symfony\/yaml": "^6.4" + "symfony\/yaml": "^7.1" }, "require-dev": { - "doctrine\/doctrine-bundle": "^2.11", - "doctrine\/orm": "^2.18", + "doctrine\/doctrine-bundle": "^2.12", + "doctrine\/orm": "^2.19", "phpstan\/extension-installer": "^1.3", - "phpstan\/phpstan": "^1.10.57", + "phpstan\/phpstan": "^1.11", "phpstan\/phpstan-webmozart-assert": "^1.2", "phpunit\/phpunit": "^10.5", - "rector\/rector-generator": "^0.7.10", + "rector\/rector-generator": "^0.7.12", "rector\/rector-src": "dev-main", - "symplify\/easy-coding-standard": "^12.1", + "rector\/type-perfect": "^0.1.6", + "symplify\/easy-coding-standard": "^12.3", "symplify\/phpstan-extensions": "^11.4", - "symplify\/phpstan-rules": "^11.4", + "symplify\/phpstan-rules": "^13.0", "symplify\/rule-doc-generator": "^12.1", "symplify\/vendor-patches": "^11.3", - "tomasvotruba\/class-leak": "^0.2.13", + "tomasvotruba\/class-leak": "^0.2.15", "tomasvotruba\/unused-public": "^0.3", "tracy\/tracy": "^2.10" }, - "time": "2024-05-30T08:28:26+00:00", + "time": "2024-06-20T14:04:02+00:00", "default-branch": true, "type": "rector-extension", "extra": { @@ -2540,31 +2541,30 @@ }, { "name": "symfony\/yaml", - "version": "v6.4.8", - "version_normalized": "6.4.8.0", + "version": "v7.1.1", + "version_normalized": "7.1.1.0", "source": { "type": "git", "url": "https:\/\/github.com\/symfony\/yaml.git", - "reference": "52903de178d542850f6f341ba92995d3d63e60c9" + "reference": "fa34c77015aa6720469db7003567b9f772492bf2" }, "dist": { "type": "zip", - "url": "https:\/\/api.github.com\/repos\/symfony\/yaml\/zipball\/52903de178d542850f6f341ba92995d3d63e60c9", - "reference": "52903de178d542850f6f341ba92995d3d63e60c9", + "url": "https:\/\/api.github.com\/repos\/symfony\/yaml\/zipball\/fa34c77015aa6720469db7003567b9f772492bf2", + "reference": "fa34c77015aa6720469db7003567b9f772492bf2", "shasum": "" }, "require": { - "php": ">=8.1", - "symfony\/deprecation-contracts": "^2.5|^3", + "php": ">=8.2", "symfony\/polyfill-ctype": "^1.8" }, "conflict": { - "symfony\/console": "<5.4" + "symfony\/console": "<6.4" }, "require-dev": { - "symfony\/console": "^5.4|^6.0|^7.0" + "symfony\/console": "^6.4|^7.0" }, - "time": "2024-05-31T14:49:08+00:00", + "time": "2024-05-31T14:57:53+00:00", "bin": [ "Resources\/bin\/yaml-lint" ], @@ -2595,7 +2595,7 @@ "description": "Loads and dumps YAML files", "homepage": "https:\/\/symfony.com", "support": { - "source": "https:\/\/github.com\/symfony\/yaml\/tree\/v6.4.8" + "source": "https:\/\/github.com\/symfony\/yaml\/tree\/v7.1.1" }, "funding": [ { diff --git a/vendor/composer/installed.php b/vendor/composer/installed.php index 9acbabdfbe3e..d796fb98380d 100644 --- a/vendor/composer/installed.php +++ b/vendor/composer/installed.php @@ -2,4 +2,4 @@ namespace RectorPrefix202406; -return array('root' => array('name' => 'rector/rector-src', 'pretty_version' => 'dev-main', 'version' => 'dev-main', 'reference' => null, 'type' => 'library', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), 'dev' => \false), 'versions' => array('clue/ndjson-react' => array('pretty_version' => 'v1.3.0', 'version' => '1.3.0.0', 'reference' => '392dc165fce93b5bb5c637b67e59619223c931b0', 'type' => 'library', 'install_path' => __DIR__ . '/../clue/ndjson-react', 'aliases' => array(), 'dev_requirement' => \false), 'composer/pcre' => array('pretty_version' => '3.1.4', 'version' => '3.1.4.0', 'reference' => '04229f163664973f68f38f6f73d917799168ef24', 'type' => 'library', 'install_path' => __DIR__ . '/./pcre', 'aliases' => array(), 'dev_requirement' => \false), 'composer/semver' => array('pretty_version' => '3.4.0', 'version' => '3.4.0.0', 'reference' => '35e8d0af4486141bc745f23a29cc2091eb624a32', 'type' => 'library', 'install_path' => __DIR__ . '/./semver', 'aliases' => array(), 'dev_requirement' => \false), 'composer/xdebug-handler' => array('pretty_version' => '3.0.5', 'version' => '3.0.5.0', 'reference' => '6c1925561632e83d60a44492e0b344cf48ab85ef', 'type' => 'library', 'install_path' => __DIR__ . '/./xdebug-handler', 'aliases' => array(), 'dev_requirement' => \false), 'doctrine/inflector' => array('pretty_version' => '2.0.10', 'version' => '2.0.10.0', 'reference' => '5817d0659c5b50c9b950feb9af7b9668e2c436bc', 'type' => 'library', 'install_path' => __DIR__ . '/../doctrine/inflector', 'aliases' => array(), 'dev_requirement' => \false), 'evenement/evenement' => array('pretty_version' => 'v3.0.2', 'version' => '3.0.2.0', 'reference' => '0a16b0d71ab13284339abb99d9d2bd813640efbc', 'type' => 'library', 'install_path' => __DIR__ . '/../evenement/evenement', 'aliases' => array(), 'dev_requirement' => \false), 'fidry/cpu-core-counter' => array('pretty_version' => '1.1.0', 'version' => '1.1.0.0', 'reference' => 'f92996c4d5c1a696a6a970e20f7c4216200fcc42', 'type' => 'library', 'install_path' => __DIR__ . '/../fidry/cpu-core-counter', 'aliases' => array(), 'dev_requirement' => \false), 'illuminate/container' => array('pretty_version' => 'v11.11.1', 'version' => '11.11.1.0', 'reference' => 'af979ecfd6dfa6583eae5dfe2e9a8840358f4ca7', 'type' => 'library', 'install_path' => __DIR__ . '/../illuminate/container', 'aliases' => array(), 'dev_requirement' => \false), 'illuminate/contracts' => array('pretty_version' => 'v11.11.1', 'version' => '11.11.1.0', 'reference' => '86c1331d0b06c59ca21723d8bfc9faaa19430b46', 'type' => 'library', 'install_path' => __DIR__ . '/../illuminate/contracts', 'aliases' => array(), 'dev_requirement' => \false), 'nette/utils' => array('pretty_version' => 'v4.0.4', 'version' => '4.0.4.0', 'reference' => 'd3ad0aa3b9f934602cb3e3902ebccf10be34d218', 'type' => 'library', 'install_path' => __DIR__ . '/../nette/utils', 'aliases' => array(), 'dev_requirement' => \false), 'nikic/php-parser' => array('pretty_version' => 'v4.19.1', 'version' => '4.19.1.0', 'reference' => '4e1b88d21c69391150ace211e9eaf05810858d0b', 'type' => 'library', 'install_path' => __DIR__ . '/../nikic/php-parser', 'aliases' => array(), 'dev_requirement' => \false), 'ondram/ci-detector' => array('pretty_version' => '4.2.0', 'version' => '4.2.0.0', 'reference' => '8b0223b5ed235fd377c75fdd1bfcad05c0f168b8', 'type' => 'library', 'install_path' => __DIR__ . '/../ondram/ci-detector', 'aliases' => array(), 'dev_requirement' => \false), 'phpstan/phpdoc-parser' => array('pretty_version' => '1.29.1', 'version' => '1.29.1.0', 'reference' => 'fcaefacf2d5c417e928405b71b400d4ce10daaf4', 'type' => 'library', 'install_path' => __DIR__ . '/../phpstan/phpdoc-parser', 'aliases' => array(), 'dev_requirement' => \false), 'phpstan/phpstan' => array('dev_requirement' => \false, 'replaced' => array(0 => '^1.11')), 'psr/container' => array('pretty_version' => '2.0.2', 'version' => '2.0.2.0', 'reference' => 'c71ecc56dfe541dbd90c5360474fbc405f8d5963', 'type' => 'library', 'install_path' => __DIR__ . '/../psr/container', 'aliases' => array(), 'dev_requirement' => \false), 'psr/container-implementation' => array('dev_requirement' => \false, 'provided' => array(0 => '1.1|2.0')), 'psr/log' => array('pretty_version' => '3.0.0', 'version' => '3.0.0.0', 'reference' => 'fe5ea303b0887d5caefd3d431c3e61ad47037001', 'type' => 'library', 'install_path' => __DIR__ . '/../psr/log', 'aliases' => array(), 'dev_requirement' => \false), 'psr/log-implementation' => array('dev_requirement' => \false, 'provided' => array(0 => '1.0|2.0|3.0')), 'psr/simple-cache' => array('pretty_version' => '3.0.0', 'version' => '3.0.0.0', 'reference' => '764e0b3939f5ca87cb904f570ef9be2d78a07865', 'type' => 'library', 'install_path' => __DIR__ . '/../psr/simple-cache', 'aliases' => array(), 'dev_requirement' => \false), 'react/cache' => array('pretty_version' => 'v1.2.0', 'version' => '1.2.0.0', 'reference' => 'd47c472b64aa5608225f47965a484b75c7817d5b', 'type' => 'library', 'install_path' => __DIR__ . '/../react/cache', 'aliases' => array(), 'dev_requirement' => \false), 'react/child-process' => array('pretty_version' => 'v0.6.5', 'version' => '0.6.5.0', 'reference' => 'e71eb1aa55f057c7a4a0d08d06b0b0a484bead43', 'type' => 'library', 'install_path' => __DIR__ . '/../react/child-process', 'aliases' => array(), 'dev_requirement' => \false), 'react/dns' => array('pretty_version' => 'v1.13.0', 'version' => '1.13.0.0', 'reference' => 'eb8ae001b5a455665c89c1df97f6fb682f8fb0f5', 'type' => 'library', 'install_path' => __DIR__ . '/../react/dns', 'aliases' => array(), 'dev_requirement' => \false), 'react/event-loop' => array('pretty_version' => 'v1.5.0', 'version' => '1.5.0.0', 'reference' => 'bbe0bd8c51ffc05ee43f1729087ed3bdf7d53354', 'type' => 'library', 'install_path' => __DIR__ . '/../react/event-loop', 'aliases' => array(), 'dev_requirement' => \false), 'react/promise' => array('pretty_version' => 'v3.2.0', 'version' => '3.2.0.0', 'reference' => '8a164643313c71354582dc850b42b33fa12a4b63', 'type' => 'library', 'install_path' => __DIR__ . '/../react/promise', 'aliases' => array(), 'dev_requirement' => \false), 'react/socket' => array('pretty_version' => 'v1.15.0', 'version' => '1.15.0.0', 'reference' => '216d3aec0b87f04a40ca04f481e6af01bdd1d038', 'type' => 'library', 'install_path' => __DIR__ . '/../react/socket', 'aliases' => array(), 'dev_requirement' => \false), 'react/stream' => array('pretty_version' => 'v1.4.0', 'version' => '1.4.0.0', 'reference' => '1e5b0acb8fe55143b5b426817155190eb6f5b18d', 'type' => 'library', 'install_path' => __DIR__ . '/../react/stream', 'aliases' => array(), 'dev_requirement' => \false), 'rector/extension-installer' => array('pretty_version' => '0.11.2', 'version' => '0.11.2.0', 'reference' => '05544e9b195863b8571ae2a3b903cbec7fa062e0', 'type' => 'composer-plugin', 'install_path' => __DIR__ . '/../rector/extension-installer', 'aliases' => array(), 'dev_requirement' => \false), 'rector/rector' => array('dev_requirement' => \false, 'replaced' => array(0 => 'dev-main')), 'rector/rector-doctrine' => array('pretty_version' => 'dev-main', 'version' => 'dev-main', 'reference' => '6eb8de836a52701d15ab3fd020052a1843fad992', 'type' => 'rector-extension', 'install_path' => __DIR__ . '/../rector/rector-doctrine', 'aliases' => array(0 => '9999999-dev'), 'dev_requirement' => \false), 'rector/rector-downgrade-php' => array('pretty_version' => 'dev-main', 'version' => 'dev-main', 'reference' => 'a16ded4032840457048afbd40bf31e1f66df1154', 'type' => 'rector-extension', 'install_path' => __DIR__ . '/../rector/rector-downgrade-php', 'aliases' => array(0 => '9999999-dev'), 'dev_requirement' => \false), 'rector/rector-phpunit' => array('pretty_version' => 'dev-main', 'version' => 'dev-main', 'reference' => '6816002a8c3f7b9b5773f8c59d00bdf29956f86c', 'type' => 'rector-extension', 'install_path' => __DIR__ . '/../rector/rector-phpunit', 'aliases' => array(0 => '0.11.x-dev'), 'dev_requirement' => \false), 'rector/rector-src' => array('pretty_version' => 'dev-main', 'version' => 'dev-main', 'reference' => null, 'type' => 'library', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), 'dev_requirement' => \false), 'rector/rector-symfony' => array('pretty_version' => 'dev-main', 'version' => 'dev-main', 'reference' => 'b4dfb48b3f76277d11885d7fcfb9874b5006b988', 'type' => 'rector-extension', 'install_path' => __DIR__ . '/../rector/rector-symfony', 'aliases' => array(0 => '9999999-dev'), 'dev_requirement' => \false), 'sebastian/diff' => array('pretty_version' => '5.1.1', 'version' => '5.1.1.0', 'reference' => 'c41e007b4b62af48218231d6c2275e4c9b975b2e', 'type' => 'library', 'install_path' => __DIR__ . '/../sebastian/diff', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/console' => array('pretty_version' => 'v6.4.8', 'version' => '6.4.8.0', 'reference' => 'be5854cee0e8c7b110f00d695d11debdfa1a2a91', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/console', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/deprecation-contracts' => array('pretty_version' => 'v3.5.0', 'version' => '3.5.0.0', 'reference' => '0e0d29ce1f20deffb4ab1b016a7257c4f1e789a1', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/deprecation-contracts', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/filesystem' => array('pretty_version' => 'v6.4.8', 'version' => '6.4.8.0', 'reference' => '4d37529150e7081c51b3c5d5718c55a04a9503f3', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/filesystem', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/finder' => array('pretty_version' => 'v6.4.8', 'version' => '6.4.8.0', 'reference' => '3ef977a43883215d560a2cecb82ec8e62131471c', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/finder', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/polyfill-ctype' => array('dev_requirement' => \false, 'replaced' => array(0 => '*')), 'symfony/polyfill-intl-grapheme' => array('dev_requirement' => \false, 'replaced' => array(0 => '*')), 'symfony/polyfill-mbstring' => array('pretty_version' => 'v1.30.0', 'version' => '1.30.0.0', 'reference' => 'fd22ab50000ef01661e2a31d850ebaa297f8e03c', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/polyfill-mbstring', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/process' => array('pretty_version' => 'v6.4.8', 'version' => '6.4.8.0', 'reference' => '8d92dd79149f29e89ee0f480254db595f6a6a2c5', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/process', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/service-contracts' => array('pretty_version' => 'v3.5.0', 'version' => '3.5.0.0', 'reference' => 'bd1d9e59a81d8fa4acdcea3f617c581f7475a80f', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/service-contracts', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/string' => array('dev_requirement' => \false, 'replaced' => array(0 => '*')), 'symfony/yaml' => array('pretty_version' => 'v6.4.8', 'version' => '6.4.8.0', 'reference' => '52903de178d542850f6f341ba92995d3d63e60c9', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/yaml', 'aliases' => array(), 'dev_requirement' => \false), 'symplify/easy-parallel' => array('pretty_version' => '11.2.2', 'version' => '11.2.2.0', 'reference' => '8586c18bb8efb31cd192a4e5cc94ae7813f72ed9', 'type' => 'library', 'install_path' => __DIR__ . '/../symplify/easy-parallel', 'aliases' => array(), 'dev_requirement' => \false), 'symplify/rule-doc-generator-contracts' => array('pretty_version' => '11.2.0', 'version' => '11.2.0.0', 'reference' => '479cfcfd46047f80624aba931d9789e50475b5c6', 'type' => 'library', 'install_path' => __DIR__ . '/../symplify/rule-doc-generator-contracts', 'aliases' => array(), 'dev_requirement' => \false), 'webmozart/assert' => array('pretty_version' => '1.11.0', 'version' => '1.11.0.0', 'reference' => '11cb2199493b2f8a3b53e7f19068fc6aac760991', 'type' => 'library', 'install_path' => __DIR__ . '/../webmozart/assert', 'aliases' => array(), 'dev_requirement' => \false))); +return array('root' => array('name' => 'rector/rector-src', 'pretty_version' => 'dev-main', 'version' => 'dev-main', 'reference' => null, 'type' => 'library', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), 'dev' => \false), 'versions' => array('clue/ndjson-react' => array('pretty_version' => 'v1.3.0', 'version' => '1.3.0.0', 'reference' => '392dc165fce93b5bb5c637b67e59619223c931b0', 'type' => 'library', 'install_path' => __DIR__ . '/../clue/ndjson-react', 'aliases' => array(), 'dev_requirement' => \false), 'composer/pcre' => array('pretty_version' => '3.1.4', 'version' => '3.1.4.0', 'reference' => '04229f163664973f68f38f6f73d917799168ef24', 'type' => 'library', 'install_path' => __DIR__ . '/./pcre', 'aliases' => array(), 'dev_requirement' => \false), 'composer/semver' => array('pretty_version' => '3.4.0', 'version' => '3.4.0.0', 'reference' => '35e8d0af4486141bc745f23a29cc2091eb624a32', 'type' => 'library', 'install_path' => __DIR__ . '/./semver', 'aliases' => array(), 'dev_requirement' => \false), 'composer/xdebug-handler' => array('pretty_version' => '3.0.5', 'version' => '3.0.5.0', 'reference' => '6c1925561632e83d60a44492e0b344cf48ab85ef', 'type' => 'library', 'install_path' => __DIR__ . '/./xdebug-handler', 'aliases' => array(), 'dev_requirement' => \false), 'doctrine/inflector' => array('pretty_version' => '2.0.10', 'version' => '2.0.10.0', 'reference' => '5817d0659c5b50c9b950feb9af7b9668e2c436bc', 'type' => 'library', 'install_path' => __DIR__ . '/../doctrine/inflector', 'aliases' => array(), 'dev_requirement' => \false), 'evenement/evenement' => array('pretty_version' => 'v3.0.2', 'version' => '3.0.2.0', 'reference' => '0a16b0d71ab13284339abb99d9d2bd813640efbc', 'type' => 'library', 'install_path' => __DIR__ . '/../evenement/evenement', 'aliases' => array(), 'dev_requirement' => \false), 'fidry/cpu-core-counter' => array('pretty_version' => '1.1.0', 'version' => '1.1.0.0', 'reference' => 'f92996c4d5c1a696a6a970e20f7c4216200fcc42', 'type' => 'library', 'install_path' => __DIR__ . '/../fidry/cpu-core-counter', 'aliases' => array(), 'dev_requirement' => \false), 'illuminate/container' => array('pretty_version' => 'v11.11.1', 'version' => '11.11.1.0', 'reference' => 'af979ecfd6dfa6583eae5dfe2e9a8840358f4ca7', 'type' => 'library', 'install_path' => __DIR__ . '/../illuminate/container', 'aliases' => array(), 'dev_requirement' => \false), 'illuminate/contracts' => array('pretty_version' => 'v11.11.1', 'version' => '11.11.1.0', 'reference' => '86c1331d0b06c59ca21723d8bfc9faaa19430b46', 'type' => 'library', 'install_path' => __DIR__ . '/../illuminate/contracts', 'aliases' => array(), 'dev_requirement' => \false), 'nette/utils' => array('pretty_version' => 'v4.0.4', 'version' => '4.0.4.0', 'reference' => 'd3ad0aa3b9f934602cb3e3902ebccf10be34d218', 'type' => 'library', 'install_path' => __DIR__ . '/../nette/utils', 'aliases' => array(), 'dev_requirement' => \false), 'nikic/php-parser' => array('pretty_version' => 'v4.19.1', 'version' => '4.19.1.0', 'reference' => '4e1b88d21c69391150ace211e9eaf05810858d0b', 'type' => 'library', 'install_path' => __DIR__ . '/../nikic/php-parser', 'aliases' => array(), 'dev_requirement' => \false), 'ondram/ci-detector' => array('pretty_version' => '4.2.0', 'version' => '4.2.0.0', 'reference' => '8b0223b5ed235fd377c75fdd1bfcad05c0f168b8', 'type' => 'library', 'install_path' => __DIR__ . '/../ondram/ci-detector', 'aliases' => array(), 'dev_requirement' => \false), 'phpstan/phpdoc-parser' => array('pretty_version' => '1.29.1', 'version' => '1.29.1.0', 'reference' => 'fcaefacf2d5c417e928405b71b400d4ce10daaf4', 'type' => 'library', 'install_path' => __DIR__ . '/../phpstan/phpdoc-parser', 'aliases' => array(), 'dev_requirement' => \false), 'phpstan/phpstan' => array('dev_requirement' => \false, 'replaced' => array(0 => '^1.11')), 'psr/container' => array('pretty_version' => '2.0.2', 'version' => '2.0.2.0', 'reference' => 'c71ecc56dfe541dbd90c5360474fbc405f8d5963', 'type' => 'library', 'install_path' => __DIR__ . '/../psr/container', 'aliases' => array(), 'dev_requirement' => \false), 'psr/container-implementation' => array('dev_requirement' => \false, 'provided' => array(0 => '1.1|2.0')), 'psr/log' => array('pretty_version' => '3.0.0', 'version' => '3.0.0.0', 'reference' => 'fe5ea303b0887d5caefd3d431c3e61ad47037001', 'type' => 'library', 'install_path' => __DIR__ . '/../psr/log', 'aliases' => array(), 'dev_requirement' => \false), 'psr/log-implementation' => array('dev_requirement' => \false, 'provided' => array(0 => '1.0|2.0|3.0')), 'psr/simple-cache' => array('pretty_version' => '3.0.0', 'version' => '3.0.0.0', 'reference' => '764e0b3939f5ca87cb904f570ef9be2d78a07865', 'type' => 'library', 'install_path' => __DIR__ . '/../psr/simple-cache', 'aliases' => array(), 'dev_requirement' => \false), 'react/cache' => array('pretty_version' => 'v1.2.0', 'version' => '1.2.0.0', 'reference' => 'd47c472b64aa5608225f47965a484b75c7817d5b', 'type' => 'library', 'install_path' => __DIR__ . '/../react/cache', 'aliases' => array(), 'dev_requirement' => \false), 'react/child-process' => array('pretty_version' => 'v0.6.5', 'version' => '0.6.5.0', 'reference' => 'e71eb1aa55f057c7a4a0d08d06b0b0a484bead43', 'type' => 'library', 'install_path' => __DIR__ . '/../react/child-process', 'aliases' => array(), 'dev_requirement' => \false), 'react/dns' => array('pretty_version' => 'v1.13.0', 'version' => '1.13.0.0', 'reference' => 'eb8ae001b5a455665c89c1df97f6fb682f8fb0f5', 'type' => 'library', 'install_path' => __DIR__ . '/../react/dns', 'aliases' => array(), 'dev_requirement' => \false), 'react/event-loop' => array('pretty_version' => 'v1.5.0', 'version' => '1.5.0.0', 'reference' => 'bbe0bd8c51ffc05ee43f1729087ed3bdf7d53354', 'type' => 'library', 'install_path' => __DIR__ . '/../react/event-loop', 'aliases' => array(), 'dev_requirement' => \false), 'react/promise' => array('pretty_version' => 'v3.2.0', 'version' => '3.2.0.0', 'reference' => '8a164643313c71354582dc850b42b33fa12a4b63', 'type' => 'library', 'install_path' => __DIR__ . '/../react/promise', 'aliases' => array(), 'dev_requirement' => \false), 'react/socket' => array('pretty_version' => 'v1.15.0', 'version' => '1.15.0.0', 'reference' => '216d3aec0b87f04a40ca04f481e6af01bdd1d038', 'type' => 'library', 'install_path' => __DIR__ . '/../react/socket', 'aliases' => array(), 'dev_requirement' => \false), 'react/stream' => array('pretty_version' => 'v1.4.0', 'version' => '1.4.0.0', 'reference' => '1e5b0acb8fe55143b5b426817155190eb6f5b18d', 'type' => 'library', 'install_path' => __DIR__ . '/../react/stream', 'aliases' => array(), 'dev_requirement' => \false), 'rector/extension-installer' => array('pretty_version' => '0.11.2', 'version' => '0.11.2.0', 'reference' => '05544e9b195863b8571ae2a3b903cbec7fa062e0', 'type' => 'composer-plugin', 'install_path' => __DIR__ . '/../rector/extension-installer', 'aliases' => array(), 'dev_requirement' => \false), 'rector/rector' => array('dev_requirement' => \false, 'replaced' => array(0 => 'dev-main')), 'rector/rector-doctrine' => array('pretty_version' => 'dev-main', 'version' => 'dev-main', 'reference' => 'c3c91df9134657245c63d956aa6afc5bbdba5d6f', 'type' => 'rector-extension', 'install_path' => __DIR__ . '/../rector/rector-doctrine', 'aliases' => array(0 => '9999999-dev'), 'dev_requirement' => \false), 'rector/rector-downgrade-php' => array('pretty_version' => 'dev-main', 'version' => 'dev-main', 'reference' => 'a16ded4032840457048afbd40bf31e1f66df1154', 'type' => 'rector-extension', 'install_path' => __DIR__ . '/../rector/rector-downgrade-php', 'aliases' => array(0 => '9999999-dev'), 'dev_requirement' => \false), 'rector/rector-phpunit' => array('pretty_version' => 'dev-main', 'version' => 'dev-main', 'reference' => '6816002a8c3f7b9b5773f8c59d00bdf29956f86c', 'type' => 'rector-extension', 'install_path' => __DIR__ . '/../rector/rector-phpunit', 'aliases' => array(0 => '0.11.x-dev'), 'dev_requirement' => \false), 'rector/rector-src' => array('pretty_version' => 'dev-main', 'version' => 'dev-main', 'reference' => null, 'type' => 'library', 'install_path' => __DIR__ . '/../../', 'aliases' => array(), 'dev_requirement' => \false), 'rector/rector-symfony' => array('pretty_version' => 'dev-main', 'version' => 'dev-main', 'reference' => 'b4dfb48b3f76277d11885d7fcfb9874b5006b988', 'type' => 'rector-extension', 'install_path' => __DIR__ . '/../rector/rector-symfony', 'aliases' => array(0 => '9999999-dev'), 'dev_requirement' => \false), 'sebastian/diff' => array('pretty_version' => '5.1.1', 'version' => '5.1.1.0', 'reference' => 'c41e007b4b62af48218231d6c2275e4c9b975b2e', 'type' => 'library', 'install_path' => __DIR__ . '/../sebastian/diff', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/console' => array('pretty_version' => 'v6.4.8', 'version' => '6.4.8.0', 'reference' => 'be5854cee0e8c7b110f00d695d11debdfa1a2a91', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/console', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/deprecation-contracts' => array('pretty_version' => 'v3.5.0', 'version' => '3.5.0.0', 'reference' => '0e0d29ce1f20deffb4ab1b016a7257c4f1e789a1', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/deprecation-contracts', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/filesystem' => array('pretty_version' => 'v6.4.8', 'version' => '6.4.8.0', 'reference' => '4d37529150e7081c51b3c5d5718c55a04a9503f3', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/filesystem', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/finder' => array('pretty_version' => 'v6.4.8', 'version' => '6.4.8.0', 'reference' => '3ef977a43883215d560a2cecb82ec8e62131471c', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/finder', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/polyfill-ctype' => array('dev_requirement' => \false, 'replaced' => array(0 => '*')), 'symfony/polyfill-intl-grapheme' => array('dev_requirement' => \false, 'replaced' => array(0 => '*')), 'symfony/polyfill-mbstring' => array('pretty_version' => 'v1.30.0', 'version' => '1.30.0.0', 'reference' => 'fd22ab50000ef01661e2a31d850ebaa297f8e03c', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/polyfill-mbstring', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/process' => array('pretty_version' => 'v6.4.8', 'version' => '6.4.8.0', 'reference' => '8d92dd79149f29e89ee0f480254db595f6a6a2c5', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/process', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/service-contracts' => array('pretty_version' => 'v3.5.0', 'version' => '3.5.0.0', 'reference' => 'bd1d9e59a81d8fa4acdcea3f617c581f7475a80f', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/service-contracts', 'aliases' => array(), 'dev_requirement' => \false), 'symfony/string' => array('dev_requirement' => \false, 'replaced' => array(0 => '*')), 'symfony/yaml' => array('pretty_version' => 'v7.1.1', 'version' => '7.1.1.0', 'reference' => 'fa34c77015aa6720469db7003567b9f772492bf2', 'type' => 'library', 'install_path' => __DIR__ . '/../symfony/yaml', 'aliases' => array(), 'dev_requirement' => \false), 'symplify/easy-parallel' => array('pretty_version' => '11.2.2', 'version' => '11.2.2.0', 'reference' => '8586c18bb8efb31cd192a4e5cc94ae7813f72ed9', 'type' => 'library', 'install_path' => __DIR__ . '/../symplify/easy-parallel', 'aliases' => array(), 'dev_requirement' => \false), 'symplify/rule-doc-generator-contracts' => array('pretty_version' => '11.2.0', 'version' => '11.2.0.0', 'reference' => '479cfcfd46047f80624aba931d9789e50475b5c6', 'type' => 'library', 'install_path' => __DIR__ . '/../symplify/rule-doc-generator-contracts', 'aliases' => array(), 'dev_requirement' => \false), 'webmozart/assert' => array('pretty_version' => '1.11.0', 'version' => '1.11.0.0', 'reference' => '11cb2199493b2f8a3b53e7f19068fc6aac760991', 'type' => 'library', 'install_path' => __DIR__ . '/../webmozart/assert', 'aliases' => array(), 'dev_requirement' => \false))); diff --git a/vendor/rector/extension-installer/src/GeneratedConfig.php b/vendor/rector/extension-installer/src/GeneratedConfig.php index 935a861ce38b..fd5b2ddd21d0 100644 --- a/vendor/rector/extension-installer/src/GeneratedConfig.php +++ b/vendor/rector/extension-installer/src/GeneratedConfig.php @@ -9,7 +9,7 @@ */ final class GeneratedConfig { - public const EXTENSIONS = array('rector/rector-doctrine' => array('install_path' => '/home/runner/work/rector-src/rector-src/rector-build/vendor/rector/rector-doctrine', 'relative_install_path' => '../../rector-doctrine', 'extra' => NULL, 'version' => 'dev-main 6eb8de8'), 'rector/rector-downgrade-php' => array('install_path' => '/home/runner/work/rector-src/rector-src/rector-build/vendor/rector/rector-downgrade-php', 'relative_install_path' => '../../rector-downgrade-php', 'extra' => NULL, 'version' => 'dev-main a16ded4'), 'rector/rector-phpunit' => array('install_path' => '/home/runner/work/rector-src/rector-src/rector-build/vendor/rector/rector-phpunit', 'relative_install_path' => '../../rector-phpunit', 'extra' => NULL, 'version' => 'dev-main 6816002'), 'rector/rector-symfony' => array('install_path' => '/home/runner/work/rector-src/rector-src/rector-build/vendor/rector/rector-symfony', 'relative_install_path' => '../../rector-symfony', 'extra' => NULL, 'version' => 'dev-main b4dfb48')); + public const EXTENSIONS = array('rector/rector-doctrine' => array('install_path' => '/home/runner/work/rector-src/rector-src/rector-build/vendor/rector/rector-doctrine', 'relative_install_path' => '../../rector-doctrine', 'extra' => NULL, 'version' => 'dev-main c3c91df'), 'rector/rector-downgrade-php' => array('install_path' => '/home/runner/work/rector-src/rector-src/rector-build/vendor/rector/rector-downgrade-php', 'relative_install_path' => '../../rector-downgrade-php', 'extra' => NULL, 'version' => 'dev-main a16ded4'), 'rector/rector-phpunit' => array('install_path' => '/home/runner/work/rector-src/rector-src/rector-build/vendor/rector/rector-phpunit', 'relative_install_path' => '../../rector-phpunit', 'extra' => NULL, 'version' => 'dev-main 6816002'), 'rector/rector-symfony' => array('install_path' => '/home/runner/work/rector-src/rector-src/rector-build/vendor/rector/rector-symfony', 'relative_install_path' => '../../rector-symfony', 'extra' => NULL, 'version' => 'dev-main b4dfb48')); private function __construct() { } diff --git a/vendor/rector/rector-doctrine/composer.json b/vendor/rector/rector-doctrine/composer.json index 9e4ccad8ecc3..8ee8d9349d96 100644 --- a/vendor/rector/rector-doctrine/composer.json +++ b/vendor/rector/rector-doctrine/composer.json @@ -5,23 +5,24 @@ "description": "Rector upgrades rules for Doctrine", "require": { "php": ">=8.2", - "symfony\/yaml": "^6.4" + "symfony\/yaml": "^7.1" }, "require-dev": { - "doctrine\/doctrine-bundle": "^2.11", - "doctrine\/orm": "^2.18", + "doctrine\/doctrine-bundle": "^2.12", + "doctrine\/orm": "^2.19", "phpstan\/extension-installer": "^1.3", - "phpstan\/phpstan": "^1.10.57", + "phpstan\/phpstan": "^1.11", "phpstan\/phpstan-webmozart-assert": "^1.2", "phpunit\/phpunit": "^10.5", - "rector\/rector-generator": "^0.7.10", + "rector\/rector-generator": "^0.7.12", "rector\/rector-src": "dev-main", - "symplify\/easy-coding-standard": "^12.1", + "rector\/type-perfect": "^0.1.6", + "symplify\/easy-coding-standard": "^12.3", "symplify\/phpstan-extensions": "^11.4", - "symplify\/phpstan-rules": "^11.4", + "symplify\/phpstan-rules": "^13.0", "symplify\/rule-doc-generator": "^12.1", "symplify\/vendor-patches": "^11.3", - "tomasvotruba\/class-leak": "^0.2.13", + "tomasvotruba\/class-leak": "^0.2.15", "tomasvotruba\/unused-public": "^0.3", "tracy\/tracy": "^2.10" }, diff --git a/vendor/rector/rector-doctrine/rules/CodeQuality/AttributeTransformer/ClassAttributeTransformer/TableClassAttributeTransformer.php b/vendor/rector/rector-doctrine/rules/CodeQuality/AttributeTransformer/ClassAttributeTransformer/TableClassAttributeTransformer.php index 30b64884521a..ba543359c82c 100644 --- a/vendor/rector/rector-doctrine/rules/CodeQuality/AttributeTransformer/ClassAttributeTransformer/TableClassAttributeTransformer.php +++ b/vendor/rector/rector-doctrine/rules/CodeQuality/AttributeTransformer/ClassAttributeTransformer/TableClassAttributeTransformer.php @@ -40,6 +40,10 @@ public function transform(EntityMapping $entityMapping, Class_ $class) : void $this->addIndexes($classMapping['indexes'] ?? [], $class, MappingClass::INDEX); $this->addIndexes($classMapping['uniqueConstraints'] ?? [], $class, MappingClass::UNIQUE_CONSTRAINT); } + public function getClassName() : string + { + return MappingClass::TABLE; + } /** * @param array> $mapping * @param MappingClass::* $attribute @@ -52,8 +56,4 @@ private function addIndexes(array $mapping, Class_ $class, string $attribute) : $class->attrGroups[] = AttributeFactory::createGroup($attribute, $args); } } - public function getClassName() : string - { - return MappingClass::TABLE; - } } diff --git a/vendor/rector/rector-doctrine/rules/CodeQuality/AttributeTransformer/PropertyAttributeTransformer/JoinColumnAttributeTransformer.php b/vendor/rector/rector-doctrine/rules/CodeQuality/AttributeTransformer/PropertyAttributeTransformer/JoinColumnAttributeTransformer.php index 32d5d506df62..f9a17748fec3 100644 --- a/vendor/rector/rector-doctrine/rules/CodeQuality/AttributeTransformer/PropertyAttributeTransformer/JoinColumnAttributeTransformer.php +++ b/vendor/rector/rector-doctrine/rules/CodeQuality/AttributeTransformer/PropertyAttributeTransformer/JoinColumnAttributeTransformer.php @@ -30,6 +30,10 @@ public function transform(EntityMapping $entityMapping, $property) : void $this->transformMapping($property, $entityMapping->matchManyToManyPropertyMapping($property)['joinTable'] ?? null); $this->transformMapping($property, $entityMapping->matchManyToOnePropertyMapping($property)); } + public function getClassName() : string + { + return MappingClass::JOIN_COLUMN; + } /** * @param array>|null $mapping * @param \PhpParser\Node\Stmt\Property|\PhpParser\Node\Param $property @@ -53,10 +57,6 @@ private function transformMapping($property, ?array $mapping) : void $property->attrGroups[] = $this->createJoinColumnAttrGroup($columnName, $joinColumn); } } - public function getClassName() : string - { - return MappingClass::JOIN_COLUMN; - } /** * @param int|string $columnName * @param mixed $joinColumn diff --git a/vendor/rector/rector-doctrine/rules/CodeQuality/Rector/Class_/InitializeDefaultEntityCollectionRector.php b/vendor/rector/rector-doctrine/rules/CodeQuality/Rector/Class_/InitializeDefaultEntityCollectionRector.php index c97c731c50ca..e7a060e3c275 100644 --- a/vendor/rector/rector-doctrine/rules/CodeQuality/Rector/Class_/InitializeDefaultEntityCollectionRector.php +++ b/vendor/rector/rector-doctrine/rules/CodeQuality/Rector/Class_/InitializeDefaultEntityCollectionRector.php @@ -5,54 +5,21 @@ use PhpParser\Node; use PhpParser\Node\Stmt\Class_; -use PhpParser\Node\Stmt\Expression; -use Rector\Doctrine\NodeAnalyzer\AttrinationFinder; -use Rector\Doctrine\NodeFactory\ArrayCollectionAssignFactory; -use Rector\NodeManipulator\ClassDependencyManipulator; use Rector\Rector\AbstractRector; -use Rector\TypeDeclaration\AlreadyAssignDetector\ConstructorAssignDetector; use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample; use Symplify\RuleDocGenerator\ValueObject\RuleDefinition; /** * @see https://www.doctrine-project.org/projects/doctrine-orm/en/2.6/reference/best-practices.html#initialize-collections-in-the-constructor * - * @see \Rector\Doctrine\Tests\CodeQuality\Rector\Class_\InitializeDefaultEntityCollectionRector\InitializeDefaultEntityCollectionRectorTest - * - * @deprecated This rule can create incomplete assign of object to an array. Use the @see \Rector\Doctrine\CodeQuality\Rector\Class_\ExplicitRelationCollectionRector instead. + * @deprecated This rule can create incomplete assign of object to an array. Use the + * @see \Rector\Doctrine\CodeQuality\Rector\Class_\ExplicitRelationCollectionRector instead */ final class InitializeDefaultEntityCollectionRector extends AbstractRector { /** - * @readonly - * @var \Rector\NodeManipulator\ClassDependencyManipulator - */ - private $classDependencyManipulator; - /** - * @readonly - * @var \Rector\Doctrine\NodeFactory\ArrayCollectionAssignFactory - */ - private $arrayCollectionAssignFactory; - /** - * @readonly - * @var \Rector\Doctrine\NodeAnalyzer\AttrinationFinder - */ - private $attrinationFinder; - /** - * @readonly - * @var \Rector\TypeDeclaration\AlreadyAssignDetector\ConstructorAssignDetector - */ - private $constructorAssignDetector; - /** - * @var string[] + * @var bool */ - private const TO_MANY_ANNOTATION_CLASSES = ['Doctrine\\ORM\\Mapping\\OneToMany', 'Doctrine\\ORM\\Mapping\\ManyToMany']; - public function __construct(ClassDependencyManipulator $classDependencyManipulator, ArrayCollectionAssignFactory $arrayCollectionAssignFactory, AttrinationFinder $attrinationFinder, ConstructorAssignDetector $constructorAssignDetector) - { - $this->classDependencyManipulator = $classDependencyManipulator; - $this->arrayCollectionAssignFactory = $arrayCollectionAssignFactory; - $this->attrinationFinder = $attrinationFinder; - $this->constructorAssignDetector = $constructorAssignDetector; - } + private $hasWarned = \false; public function getRuleDefinition() : RuleDefinition { return new RuleDefinition('Initialize collection property in Entity constructor', [new CodeSample(<<<'CODE_SAMPLE' @@ -102,49 +69,12 @@ public function getNodeTypes() : array */ public function refactor(Node $node) : ?Node { - if (!$this->attrinationFinder->hasByOne($node, 'Doctrine\\ORM\\Mapping\\Entity')) { + if ($this->hasWarned) { return null; } - $toManyPropertyNames = $this->resolveToManyPropertyNames($node); - if ($toManyPropertyNames === []) { - return null; - } - $assigns = $this->createAssignsOfArrayCollectionsForPropertyNames($toManyPropertyNames); - $this->classDependencyManipulator->addStmtsToConstructorIfNotThereYet($node, $assigns); - return $node; - } - /** - * @return string[] - */ - private function resolveToManyPropertyNames(Class_ $class) : array - { - $collectionPropertyNames = []; - foreach ($class->getProperties() as $property) { - if (\count($property->props) !== 1) { - continue; - } - if (!$this->attrinationFinder->hasByMany($property, self::TO_MANY_ANNOTATION_CLASSES)) { - continue; - } - /** @var string $propertyName */ - $propertyName = $this->getName($property); - if ($this->constructorAssignDetector->isPropertyAssigned($class, $propertyName)) { - continue; - } - $collectionPropertyNames[] = $propertyName; - } - return $collectionPropertyNames; - } - /** - * @param string[] $propertyNames - * @return Expression[] - */ - private function createAssignsOfArrayCollectionsForPropertyNames(array $propertyNames) : array - { - $assigns = []; - foreach ($propertyNames as $propertyName) { - $assigns[] = $this->arrayCollectionAssignFactory->createFromPropertyName($propertyName); - } - return $assigns; + \trigger_error(\sprintf('The "%s" rule was deprecated, as its functionality caused bugs. Without knowing the full dependency tree, its risky to change. Use "%s" instead', self::class, 'https://github.com/rectorphp/swiss-knife#4-finalize-classes-without-children')); + \sleep(3); + $this->hasWarned = \true; + return null; } } diff --git a/vendor/rector/rector-doctrine/rules/CodeQuality/Rector/Property/ImproveDoctrineCollectionDocTypeInEntityRector.php b/vendor/rector/rector-doctrine/rules/CodeQuality/Rector/Property/ImproveDoctrineCollectionDocTypeInEntityRector.php index f0a29a15ef22..9dc9da95106a 100644 --- a/vendor/rector/rector-doctrine/rules/CodeQuality/Rector/Property/ImproveDoctrineCollectionDocTypeInEntityRector.php +++ b/vendor/rector/rector-doctrine/rules/CodeQuality/Rector/Property/ImproveDoctrineCollectionDocTypeInEntityRector.php @@ -252,8 +252,8 @@ private function refactorAttribute(Expr $expr, PhpDocInfo $phpDocInfo, Property return null; } $fullyQualifiedObjectType = new FullyQualifiedObjectType($targetEntityClassName); - $newVarType = $this->collectionTypeFactory->createType($fullyQualifiedObjectType); - $this->phpDocTypeChanger->changeVarType($property, $phpDocInfo, $newVarType); + $genericObjectType = $this->collectionTypeFactory->createType($fullyQualifiedObjectType); + $this->phpDocTypeChanger->changeVarType($property, $phpDocInfo, $genericObjectType); return $property; } } diff --git a/vendor/rector/rector-doctrine/rules/CodeQuality/Rector/Property/TypedPropertyFromDoctrineCollectionRector.php b/vendor/rector/rector-doctrine/rules/CodeQuality/Rector/Property/TypedPropertyFromDoctrineCollectionRector.php index 575a76264ecb..4547dd3ea1d5 100644 --- a/vendor/rector/rector-doctrine/rules/CodeQuality/Rector/Property/TypedPropertyFromDoctrineCollectionRector.php +++ b/vendor/rector/rector-doctrine/rules/CodeQuality/Rector/Property/TypedPropertyFromDoctrineCollectionRector.php @@ -4,14 +4,8 @@ namespace Rector\Doctrine\CodeQuality\Rector\Property; use PhpParser\Node; -use PhpParser\Node\Name\FullyQualified; use PhpParser\Node\Stmt\Property; -use PHPStan\PhpDocParser\Ast\PhpDoc\VarTagValueNode; -use Rector\BetterPhpDocParser\PhpDocInfo\PhpDocInfo; -use Rector\BetterPhpDocParser\PhpDocInfo\PhpDocInfoFactory; -use Rector\Doctrine\TypeAnalyzer\DoctrineCollectionTypeAnalyzer; use Rector\Rector\AbstractRector; -use Rector\StaticTypeMapper\StaticTypeMapper; use Rector\ValueObject\PhpVersion; use Rector\VersionBonding\Contract\MinPhpVersionInterface; use Symplify\RuleDocGenerator\ValueObject\CodeSample\CodeSample; @@ -23,26 +17,9 @@ final class TypedPropertyFromDoctrineCollectionRector extends AbstractRector implements MinPhpVersionInterface { /** - * @readonly - * @var \Rector\Doctrine\TypeAnalyzer\DoctrineCollectionTypeAnalyzer + * @var bool */ - private $doctrineCollectionTypeAnalyzer; - /** - * @readonly - * @var \Rector\BetterPhpDocParser\PhpDocInfo\PhpDocInfoFactory - */ - private $phpDocInfoFactory; - /** - * @readonly - * @var \Rector\StaticTypeMapper\StaticTypeMapper - */ - private $staticTypeMapper; - public function __construct(DoctrineCollectionTypeAnalyzer $doctrineCollectionTypeAnalyzer, PhpDocInfoFactory $phpDocInfoFactory, StaticTypeMapper $staticTypeMapper) - { - $this->doctrineCollectionTypeAnalyzer = $doctrineCollectionTypeAnalyzer; - $this->phpDocInfoFactory = $phpDocInfoFactory; - $this->staticTypeMapper = $staticTypeMapper; - } + private $hasWarned = \false; public function getRuleDefinition() : RuleDefinition { return new RuleDefinition('Add typed property based on Doctrine collection', [new CodeSample(<<<'CODE_SAMPLE' @@ -91,23 +68,13 @@ public function getNodeTypes() : array */ public function refactor(Node $node) : ?Node { - if ($node->type !== null) { - return null; - } - $propertyPhpDocInfo = $this->phpDocInfoFactory->createFromNode($node); - if (!$propertyPhpDocInfo instanceof PhpDocInfo) { - return null; - } - $varTagValueNode = $propertyPhpDocInfo->getVarTagValueNode(); - if (!$varTagValueNode instanceof VarTagValueNode) { - return null; - } - $varTagType = $this->staticTypeMapper->mapPHPStanPhpDocTypeNodeToPHPStanType($varTagValueNode->type, $node); - if (!$this->doctrineCollectionTypeAnalyzer->detect($varTagType)) { + if ($this->hasWarned) { return null; } - $node->type = new FullyQualified('Doctrine\\Common\\Collections\\Collection'); - return $node; + \trigger_error(\sprintf('The "%s" rule was deprecated, as its functionality caused bugs. Without knowing the full dependency tree, its risky to change. Use "%s" instead', self::class, 'https://github.com/rectorphp/swiss-knife#4-finalize-classes-without-children')); + \sleep(3); + $this->hasWarned = \true; + return null; } public function provideMinPhpVersion() : int { diff --git a/vendor/rector/rector-doctrine/src/TypeAnalyzer/CollectionTypeFactory.php b/vendor/rector/rector-doctrine/src/TypeAnalyzer/CollectionTypeFactory.php index 48645eb1258c..1f9f999c0e83 100644 --- a/vendor/rector/rector-doctrine/src/TypeAnalyzer/CollectionTypeFactory.php +++ b/vendor/rector/rector-doctrine/src/TypeAnalyzer/CollectionTypeFactory.php @@ -5,11 +5,10 @@ use PHPStan\Type\Generic\GenericObjectType; use PHPStan\Type\IntegerType; -use PHPStan\Type\Type; use Rector\StaticTypeMapper\ValueObject\Type\FullyQualifiedObjectType; final class CollectionTypeFactory { - public function createType(FullyQualifiedObjectType $fullyQualifiedObjectType) : Type + public function createType(FullyQualifiedObjectType $fullyQualifiedObjectType) : GenericObjectType { $genericTypes = [new IntegerType(), $fullyQualifiedObjectType]; return new GenericObjectType('Doctrine\\Common\\Collections\\Collection', $genericTypes); diff --git a/vendor/rector/rector-doctrine/src/TypeAnalyzer/DoctrineCollectionTypeAnalyzer.php b/vendor/rector/rector-doctrine/src/TypeAnalyzer/DoctrineCollectionTypeAnalyzer.php deleted file mode 100644 index 4e037ef2f0fa..000000000000 --- a/vendor/rector/rector-doctrine/src/TypeAnalyzer/DoctrineCollectionTypeAnalyzer.php +++ /dev/null @@ -1,45 +0,0 @@ -getTypes() as $unionedType) { - if ($this->isCollectionObjectType($unionedType)) { - $hasDoctrineCollectionType = \true; - } - if ($unionedType instanceof ArrayType) { - $arrayType = $unionedType; - } - } - if (!$hasDoctrineCollectionType) { - return \false; - } - return $arrayType instanceof ArrayType; - } - private function isCollectionObjectType(Type $type) : bool - { - if (!$type instanceof TypeWithClassName) { - return \false; - } - $className = $type instanceof ShortenedObjectType ? $type->getFullyQualifiedName() : $type->getClassName(); - return $className === 'Doctrine\\Common\\Collections\\Collection'; - } -} diff --git a/vendor/symfony/yaml/CHANGELOG.md b/vendor/symfony/yaml/CHANGELOG.md index 0c2021f48b2e..74b0a7146661 100644 --- a/vendor/symfony/yaml/CHANGELOG.md +++ b/vendor/symfony/yaml/CHANGELOG.md @@ -1,6 +1,16 @@ CHANGELOG ========= +7.1 +--- + + * Add support for getting all the enum cases with `!php/enum Foo` + +7.0 +--- + + * Remove the `!php/const:` tag, use `!php/const` instead (without the colon) + 6.3 --- diff --git a/vendor/symfony/yaml/Command/LintCommand.php b/vendor/symfony/yaml/Command/LintCommand.php index 57f6eccc3d12..1dd859925260 100644 --- a/vendor/symfony/yaml/Command/LintCommand.php +++ b/vendor/symfony/yaml/Command/LintCommand.php @@ -59,10 +59,7 @@ public function __construct(?string $name = null, ?callable $directoryIteratorPr $this->directoryIteratorProvider = null === $directoryIteratorProvider ? null : \Closure::fromCallable($directoryIteratorProvider); $this->isReadableProvider = null === $isReadableProvider ? null : \Closure::fromCallable($isReadableProvider); } - /** - * @return void - */ - protected function configure() + protected function configure() : void { $this->addArgument('filename', InputArgument::IS_ARRAY, 'A file, a directory or "-" for reading from STDIN')->addOption('format', null, InputOption::VALUE_REQUIRED, \sprintf('The output format ("%s")', \implode('", "', $this->getAvailableFormatOptions())))->addOption('exclude', null, InputOption::VALUE_REQUIRED | InputOption::VALUE_IS_ARRAY, 'Path(s) to exclude')->addOption('parse-tags', null, InputOption::VALUE_NEGATABLE, 'Parse custom tags', null)->setHelp(<<%command.name% command lints a YAML file and outputs to STDOUT diff --git a/vendor/symfony/yaml/Dumper.php b/vendor/symfony/yaml/Dumper.php index 6307bc5293cd..99c4d471abbb 100644 --- a/vendor/symfony/yaml/Dumper.php +++ b/vendor/symfony/yaml/Dumper.php @@ -46,9 +46,9 @@ public function dump($input, int $inline = 0, int $indent = 0, int $flags = 0) : $prefix = $indent ? \str_repeat(' ', $indent) : ''; $dumpObjectAsInlineMap = \true; if (Yaml::DUMP_OBJECT_AS_MAP & $flags && ($input instanceof \ArrayObject || $input instanceof \stdClass)) { - $dumpObjectAsInlineMap = empty((array) $input); + $dumpObjectAsInlineMap = !(array) $input; } - if ($inline <= 0 || !\is_array($input) && !$input instanceof TaggedValue && $dumpObjectAsInlineMap || empty($input)) { + if ($inline <= 0 || !\is_array($input) && !$input instanceof TaggedValue && $dumpObjectAsInlineMap || !$input) { $output .= $prefix . Inline::dump($input, $flags); } elseif ($input instanceof TaggedValue) { $output .= $this->dumpTaggedValue($input, $inline, $indent, $flags, $prefix); @@ -100,9 +100,9 @@ public function dump($input, int $inline = 0, int $indent = 0, int $flags = 0) : } $dumpObjectAsInlineMap = \true; if (Yaml::DUMP_OBJECT_AS_MAP & $flags && ($value instanceof \ArrayObject || $value instanceof \stdClass)) { - $dumpObjectAsInlineMap = empty((array) $value); + $dumpObjectAsInlineMap = !(array) $value; } - $willBeInlined = $inline - 1 <= 0 || !\is_array($value) && $dumpObjectAsInlineMap || empty($value); + $willBeInlined = $inline - 1 <= 0 || !\is_array($value) && $dumpObjectAsInlineMap || !$value; $output .= \sprintf('%s%s%s%s', $prefix, $dumpAsMap ? Inline::dump($key, $flags) . ':' : '-', $willBeInlined ? ' ' : "\n", $this->dump($value, $inline - 1, $willBeInlined ? 0 : $indent + $this->indentation, $flags)) . ($willBeInlined ? "\n" : ''); } } @@ -132,7 +132,7 @@ private function getBlockIndentationIndicator(string $value) : string // http://www.yaml.org/spec/1.2/spec.html#id2793979 foreach ($lines as $line) { if ('' !== \trim($line, ' ')) { - return ' ' === \substr($line, 0, 1) ? (string) $this->indentation : ''; + return \strncmp($line, ' ', \strlen(' ')) === 0 ? (string) $this->indentation : ''; } } return ''; diff --git a/vendor/symfony/yaml/Escaper.php b/vendor/symfony/yaml/Escaper.php index b82c2b3606f9..2e1fdfbe464e 100644 --- a/vendor/symfony/yaml/Escaper.php +++ b/vendor/symfony/yaml/Escaper.php @@ -60,7 +60,7 @@ public static function requiresSingleQuoting(string $value) : bool } // Determines if the PHP value contains any single characters that would // cause it to require single quoting in YAML. - return 0 < \preg_match('/[ \\s \' " \\: \\{ \\} \\[ \\] , & \\* \\# \\?] | \\A[ \\- ? | < > = ! % @ ` \\p{Zs}]/xu', $value); + return 0 < \preg_match('/[\\s\'"\\:\\{\\}\\[\\],&\\*\\#\\?] | \\A[\\-?|<>=!%@`\\p{Zs}]/xu', $value); } /** * Escapes and surrounds a PHP value with single quotes. diff --git a/vendor/symfony/yaml/Exception/ParseException.php b/vendor/symfony/yaml/Exception/ParseException.php index 0870464fd5a9..5c8ac22c93c6 100644 --- a/vendor/symfony/yaml/Exception/ParseException.php +++ b/vendor/symfony/yaml/Exception/ParseException.php @@ -18,33 +18,33 @@ class ParseException extends RuntimeException { /** - * @var string|null + * @var string */ - private $parsedFile; + private $rawMessage; /** * @var int */ - private $parsedLine; + private $parsedLine = -1; /** * @var string|null */ private $snippet; /** - * @var string + * @var string|null */ - private $rawMessage; + private $parsedFile; /** - * @param string $message The error message + * @param string $rawMessage The error message * @param int $parsedLine The line where the error occurred * @param string|null $snippet The snippet of code near the problem * @param string|null $parsedFile The file name where the error occurred */ - public function __construct(string $message, int $parsedLine = -1, ?string $snippet = null, ?string $parsedFile = null, ?\Throwable $previous = null) + public function __construct(string $rawMessage, int $parsedLine = -1, ?string $snippet = null, ?string $parsedFile = null, ?\Throwable $previous = null) { - $this->parsedFile = $parsedFile; + $this->rawMessage = $rawMessage; $this->parsedLine = $parsedLine; $this->snippet = $snippet; - $this->rawMessage = $message; + $this->parsedFile = $parsedFile; $this->updateRepr(); parent::__construct($this->message, 0, $previous); } @@ -57,10 +57,8 @@ public function getSnippet() : string } /** * Sets the snippet of code near the error. - * - * @return void */ - public function setSnippet(string $snippet) + public function setSnippet(string $snippet) : void { $this->snippet = $snippet; $this->updateRepr(); @@ -76,10 +74,8 @@ public function getParsedFile() : string } /** * Sets the filename where the error occurred. - * - * @return void */ - public function setParsedFile(string $parsedFile) + public function setParsedFile(string $parsedFile) : void { $this->parsedFile = $parsedFile; $this->updateRepr(); @@ -93,10 +89,8 @@ public function getParsedLine() : int } /** * Sets the line where the error occurred. - * - * @return void */ - public function setParsedLine(int $parsedLine) + public function setParsedLine(int $parsedLine) : void { $this->parsedLine = $parsedLine; $this->updateRepr(); diff --git a/vendor/symfony/yaml/Inline.php b/vendor/symfony/yaml/Inline.php index 11a0d9f6fce6..a3eddfa1d5e1 100644 --- a/vendor/symfony/yaml/Inline.php +++ b/vendor/symfony/yaml/Inline.php @@ -125,7 +125,7 @@ public static function dump($value, int $flags = 0) : string } })()); case $value instanceof \UnitEnum: - return \sprintf('!php/const %s::%s', \get_class($value), $value->name); + return \sprintf('!php/enum %s::%s', \get_class($value), $value->name); case \is_object($value): if ($value instanceof TaggedValue) { return '!' . $value->getTag() . ' ' . self::dump($value->getValue(), $flags); @@ -582,22 +582,27 @@ private static function evaluateScalar(string $scalar, int $flags, array &$refer throw new ParseException('Missing value for tag "!php/enum".', self::$parsedLineNumber + 1, $scalar, self::$parsedFilename); } $i = 0; - $enum = self::parseScalar(\substr($scalar, 10), 0, null, $i, \false); - if ($useValue = \substr_compare($enum, '->value', -\strlen('->value')) === 0) { - $enum = \substr($enum, 0, -7); - } - if (!\defined($enum)) { + $enumName = self::parseScalar(\substr($scalar, 10), 0, null, $i, \false); + $useName = \strpos($enumName, '::') !== \false; + $enum = $useName ? \strstr($enumName, '::', \true) : $enumName; + if (!\class_exists($enum)) { throw new ParseException(\sprintf('The enum "%s" is not defined.', $enum), self::$parsedLineNumber + 1, $scalar, self::$parsedFilename); } - $value = \constant($enum); - if (!$value instanceof \UnitEnum) { - throw new ParseException(\sprintf('The string "%s" is not the name of a valid enum.', $enum), self::$parsedLineNumber + 1, $scalar, self::$parsedFilename); + if (!$useName) { + return $enum::cases(); + } + if ($useValue = \substr_compare($enumName, '->value', -\strlen('->value')) === 0) { + $enumName = \substr($enumName, 0, -7); + } + if (!\defined($enumName)) { + throw new ParseException(\sprintf('The string "%s" is not the name of a valid enum.', $enumName), self::$parsedLineNumber + 1, $scalar, self::$parsedFilename); } + $value = \constant($enumName); if (!$useValue) { return $value; } if (!$value instanceof \BackedEnum) { - throw new ParseException(\sprintf('The enum "%s" defines no value next to its name.', $enum), self::$parsedLineNumber + 1, $scalar, self::$parsedFilename); + throw new ParseException(\sprintf('The enum "%s" defines no value next to its name.', $enumName), self::$parsedLineNumber + 1, $scalar, self::$parsedFilename); } return $value->value; } diff --git a/vendor/symfony/yaml/Parser.php b/vendor/symfony/yaml/Parser.php index 276a6c887e1e..30ae90d94001 100644 --- a/vendor/symfony/yaml/Parser.php +++ b/vendor/symfony/yaml/Parser.php @@ -199,10 +199,7 @@ private function doParse(string $value, int $flags) $this->refs[$isRef] = \end($data); \array_pop($this->refsBeingParsed); } - } elseif (self::preg_match('#^(?P(?:![^\\s]++\\s++)?(?:' . Inline::REGEX_QUOTED_STRING . '|(?:!?!php/const:)?[^ \'"\\[\\{!].*?)) *\\:(( |\\t)++(?P.+))?$#u', \rtrim($this->currentLine), $values) && (\strpos($values['key'], ' #') === \false || \in_array($values['key'][0], ['"', "'"]))) { - if (\strncmp($values['key'], '!php/const:', \strlen('!php/const:')) === 0) { - trigger_deprecation('symfony/yaml', '6.2', 'YAML syntax for key "%s" is deprecated and replaced by "!php/const %s".', $values['key'], \substr($values['key'], 11)); - } + } elseif (self::preg_match('#^(?P(?:![^\\s]++\\s++)?(?:' . Inline::REGEX_QUOTED_STRING . '|[^ \'"\\[\\{!].*?)) *\\:(( |\\t)++(?P.+))?$#u', \rtrim($this->currentLine), $values) && (\strpos($values['key'], ' #') === \false || \in_array($values['key'][0], ['"', "'"]))) { if ($context && 'sequence' == $context) { throw new ParseException('You cannot define a mapping item when in a sequence.', $this->currentLineNb + 1, $this->currentLine, $this->filename); } @@ -384,7 +381,7 @@ private function doParse(string $value, int $flags) if ('---' === $this->currentLine) { throw new ParseException('Multiple documents are not supported.', $this->currentLineNb + 1, $this->currentLine, $this->filename); } - if ($deprecatedUsage = isset($this->currentLine[1]) && '?' === $this->currentLine[0] && ' ' === $this->currentLine[1]) { + if (isset($this->currentLine[1]) && '?' === $this->currentLine[0] && ' ' === $this->currentLine[1]) { throw new ParseException('Complex mappings are not supported.', $this->getRealCurrentLineNb() + 1, $this->currentLine); } // 1-liner optionally followed by newline(s) @@ -409,7 +406,7 @@ private function doParse(string $value, int $flags) continue; } // If the indentation is not consistent at offset 0, it is to be considered as a ParseError - if (0 === $this->offset && !$deprecatedUsage && isset($line[0]) && ' ' === $line[0]) { + if (0 === $this->offset && isset($line[0]) && ' ' === $line[0]) { throw new ParseException('Unable to parse.', $this->getRealCurrentLineNb() + 1, $this->currentLine, $this->filename); } if (\strpos($line, ': ') !== \false) { @@ -455,7 +452,7 @@ private function doParse(string $value, int $flags) } $data = $object; } - return empty($data) ? null : $data; + return $data ?: null; } /** * @return mixed diff --git a/vendor/symfony/yaml/composer.json b/vendor/symfony/yaml/composer.json index 94fa4cc810aa..5a7c4279d31e 100644 --- a/vendor/symfony/yaml/composer.json +++ b/vendor/symfony/yaml/composer.json @@ -16,15 +16,14 @@ } ], "require": { - "php": ">=8.1", - "symfony\/deprecation-contracts": "^2.5|^3", + "php": ">=8.2", "symfony\/polyfill-ctype": "^1.8" }, "require-dev": { - "symfony\/console": "^5.4|^6.0|^7.0" + "symfony\/console": "^6.4|^7.0" }, "conflict": { - "symfony\/console": "<5.4" + "symfony\/console": "<6.4" }, "autoload": { "psr-4": {