rector/composer.json

156 lines
6.2 KiB
JSON
Raw Normal View History

2017-07-15 17:01:21 +00:00
{
"name": "rector/rector",
"description": "Instant upgrade and refactoring of your PHP code",
"keywords": [
"instant upgrades",
"instant refactoring",
"ast",
"automated refactoring"
],
2019-05-25 17:36:12 +00:00
"homepage": "https://getrector.org",
2017-07-15 17:01:21 +00:00
"license": "MIT",
2019-05-25 17:36:12 +00:00
"authors": [
{
"name": "Tomas Votruba",
"email": "tomas.vot@gmail.com",
"homepage": "https://tomasvotruba.com"
},
{
"name": "Jan Mikes",
"email": "j.mikes@me.com",
"homepage": "https://janmikes.cz"
}
],
"bin": [
"bin/rector"
2019-05-25 17:36:12 +00:00
],
2017-07-15 17:01:21 +00:00
"require": {
"php": "^7.3|^8.0",
"ext-dom": "*",
2020-12-24 22:01:30 +00:00
"ext-json": "*",
"composer/semver": "^3.2",
"composer/xdebug-handler": "^1.4",
"danielstjules/stringy": "^3.1",
"doctrine/annotations": "^1.12",
"doctrine/inflector": "^2.0",
2021-01-29 16:14:06 +00:00
"jean85/pretty-package-versions": "^1.5.1|^2.0.1",
"nette/caching": "^3.1",
2021-03-18 11:21:20 +00:00
"nette/robot-loader": "^3.4",
"nette/utils": "^3.2",
"nikic/php-parser": "^4.10.4",
2021-03-19 10:30:21 +00:00
"phpstan/phpstan": "^0.12.82",
"phpstan/phpdoc-parser": "^0.5.1",
"phpstan/phpstan-phpunit": "^0.12.18",
"rector/rector-symfony": "dev-main",
"rector/rector-nette": "dev-main",
"rector/rector-laravel": "dev-main",
"rector/rector-cakephp": "dev-main",
"rector/rector-phpunit": "dev-main",
"sebastian/diff": "^4.0.4",
"symfony/console": "^4.4.8|^5.1",
"symfony/dependency-injection": "^5.1",
"symfony/finder": "^4.4.8|^5.1",
2020-10-11 10:40:45 +00:00
"symfony/http-kernel": "^4.4.8|^5.1",
"symfony/process": "^4.4.8|^5.1",
"symfony/uid": "^4.4.8|^5.1",
"symplify/astral": "^9.2.12",
"symplify/autowire-array-parameter": "^9.2.12",
"symplify/console-color-diff": "^9.2.12",
"symplify/package-builder": "^9.2.12",
"symplify/rule-doc-generator-contracts": "^9.2.12",
"symplify/set-config-resolver": "^9.2.12",
"symplify/simple-php-doc-parser": "^9.2.12",
"symplify/skipper": "^9.2.12",
"symplify/smart-file-system": "^9.2.12",
"symplify/symfony-php-config": "^9.2.12",
"webmozart/assert": "^1.10"
2017-07-15 17:01:21 +00:00
},
"require-dev": {
"symplify/rule-doc-generator": "^9.2.12",
"friendsofphp/php-cs-fixer": "^2.18.3",
[CI] add demo for build php 7.1 version (#4447) * Renamed option to --exclude-path * Exclude /**/tests/ by default * Inverted order of downgrade * Fixed verb * Use sed to replace string * Simplified message * Use PHP version with "." * Completed PHP versions to downgrade * Execute Rector with --target-php-version * Added quotes to array keys * Allow to print command to output * Execute script within workflow * If rector fails, already exit 1 * Ignore PHP constraint * Removed --dry-run and errors for testing * Don't print command * Run downgraded for ALL sets * Include downgrade sets for testing * Run all sets in a command each * Added the target PHP version in each downgrade set * Use a rector config file to pass exclude paths * Exclude everything under /tests/ * Removed --dry-run * Set unneeded transformations in false * Exclude /ci/ * Exclude /compiler/ * Exclude DoctrineProvider * Exclude classes for dependency-injection * Exclude classes for http-kernel * Exclude classes for symfony string * Use cut instead of aws For if the path has a space * Calculate package execution order * Downgrade packages on required order * Consider the set to check package dependents * Store packages_to_downgrade_by_set * Store package_dependents["$package|$set"] * Fixed converting from string to array * Fixed converting string to array * Fixed char * Simplified counter * Fixed string to array * Fixed var * Fixed getting dependents * Fixed checking if dependent packages downgraded * rector/rector has no dependents * Simplified downgraded_packages * Ignore dependent package on itself * If circular dependencies, make the process fail * Uncommented executing rector * Exclude /stubs * Calculate circular reference packages * Break circular references * Uncommented rector call * Do downgrade ContainerBuilder * Added expression-language as dep for PROD * [ci-review] Generate Rector & Nodes documentation * [ci-review] Apply coding standards * [ci-review] Rector Rectify * Obtain "rector/rector" from composer * Removed commented code * Don't do platform check for Composer v2 * Moved comment up * [ci-review] Rector Rectify * [ci-review] Rector Rectify * Must dump autload to remove platform_check.php * [ci-review] Rector Rectify * [ci-review] Rector Rectify * Copied file from master * Use new convention (70000) for PHP versions (7.0) * Fixed cs * Fixed PHPStan * Added "create-config" command - Initial commit * [ci-review] Rector Rectify * Moved rector config under custom folder * Use predefined rector configs instead of injecting --set * Created rector config files * Use array of rector configs, even if only 1 is used * Require once config file * Fixed exclude paths * Execute only last rector config (containing many sets) * Exclude file that makes process fail * Removed --dry-run * Use existing option name * Handle GROUP_RECTOR_CONFIGS in circular packages * Changing PHP_VERSION_ID does not work, so commented rule * Bug fixed => uncommented using rector * Renamed NoParticularNodeRule to ForbiddenNodeRule * [ci-review] Rector Rectify * Fixed PHP version constants * Added (failing) test * Fixed issue for nullable scalars * Can't run Rector with --set through CLI, removed * Added (failing) test * Fixed issue for __construct * Fixed constant name * Added (failing) test for self * Added another (failing) test * Fixed not adding "\" before "static", "self", etc * [ci-review] Rector Rectify * Skip downgrading CouchbaseBucketAdapter * Renamed var * Added (failing) test * Fixed interface and abstract class issue * [ci-review] Rector Rectify * Fixed PHPStan error * Create artifact of downgraded code * Added missing spaces for args * Use 4 spaces for consistency * Ignore build folder in rector-php71.zip * Switch to setup-php@v2 * Added (failing) test * Issue is on calling method, not on constructor * Implemented fix * Renamed test * Added further tests * [ci-review] Rector Rectify * Fixed PHPStan * Fixed PHPStan * Added (failing) test * Fixed issue on new Class('foo', ) * Execute tests * No need for quotes * Made the artifact contain the folder, not a .zip * Removed /compiler folder (it's been deleted?) * Do upload the artifact as a .zip (too slow otherwise) * Remove all tests, also from under vendor/ * Upgraded zip action version * Change Composer's PHP requirement to 7.1 * Try exclude tests under vendor/ * Renamed artifact * Try exclude tests under vendor/ * Updated test (to fail) * If the float has no ".", add ".0" at the end * Must remove deps before "composer require php" * Replaced call to phpstan * Cannot run PHPStan on 7.1, just run Rector * Change Composer's PHP requirement to 7.1 * Remove DEV dependencies * Require Symfony Polyfill libraries * Rector without DEV needs phpstan.neon removed * Run PHPStan * Added paths to analyze * Access PHPStan config from file * Fixed relative paths * Override the artifact with downgraded Composer too * Uncommented scanDirectories * Include tests/ in artifact * Exclude */tests/* * Ignore utils/phpstan-extensions * PHPUnit is installed in DEV, can't use it in PROD * "nette/application" is on DEV, may not exist on PROD * [ci-review] Rector Rectify * [ci-review] Rector Rectify * Improved comment after rectify * Fixed previous messed-up merge * Removed 1st slash * Downgrade all dependencies together * Replace the composer.json file * Can't have more than 1 path to downgrade * No need to change PHP requirement to 7.1 anymore * Remove DEV dependencies before replacing composer.json * Changed order of commands * No need for --ignore-platform-req=php * Add all Symfony polyfill libraries * Require Symfony polyfill libraries earlier on * Test removing `ignoreErrors` from PHPStan * Remove ignored errors which do not apply * Fixed the list of `excludes_analyse` * Removed commented code * Fixed PHPStan config * Only analyze the target PHP version if GROUP_RECTOR_CONFIGS * Simplified script: just analyze target PHP version * Renamed downgrade sets * Removed unneeded create-config command * Removed call to deleted class * Dropped ChangePhpVersionInPlatformCheckRector * Must remove phpstan-for-rector.neon from PROD * Do not execute --dry-run, it returns error * Publish downgraded code to remote repository * Removed commented code * Standardized script code * Initialize variables in script * No need to initialize vars * Remove the zip, do not copy to target repo * Remove .git before deploying to target repo * Copy files to rector-downgrade/ * Use branch "main" * Copy also hidden files * Remove docker publish image workflow * Trigger own tests workflow * Include "lowest" * Run PHPStan instead of PHPUnit * Run PHPStan in new temp directory * Execute in same item * "../" for --config doesn't work for PHPStan * Added bare run test * Added tests for PHP 7.2 * Added test * Run with php * Replaced namespace * Added PHPUnit test for PHP 7.1 * Use PHP 7.1-compatible version of "doctrine/orm" * Can't skip downgrading doctrine-annotation-generated * Removed commented items * Renamed test workflow * Added comments on code * Run all tests, not just 1 * Downgrade package from v3.1 to v3.0.7 * Run existing tests * Revert tests * [ci-review] Rector Rectify Co-authored-by: Leonardo Losoviz <leo@getpop.org> Co-authored-by: rector-bot <tomas@getrector.org>
2021-01-25 19:25:21 +00:00
"nette/application": "^3.0.7",
"nette/di": "^3.0",
"nette/forms": "^3.0",
"phpstan/phpstan-nette": "^0.12.16",
"phpunit/phpunit": "^9.5",
"rector/rector-generator": "^0.1.1",
"symplify/coding-standard": "^9.2.12",
"symplify/easy-ci": "^9.2.12",
"symplify/easy-coding-standard": "^9.2.12",
"symplify/easy-testing": "^9.2.12",
"symplify/phpstan-extensions": "^9.2.12",
2021-03-18 23:36:11 +00:00
"symplify/phpstan-rules": "^9.2",
2021-01-30 23:20:05 +00:00
"tracy/tracy": "^2.8"
2017-07-15 17:01:21 +00:00
},
"replace": {
2021-03-20 18:28:36 +00:00
"rector/rector-prefixed": "self.version"
},
2017-07-15 17:01:21 +00:00
"autoload": {
"psr-4": {
"Rector\\": ["packages", "rules"],
"Rector\\Core\\": "src",
"Rector\\Compiler\\": "utils/compiler/src"
2020-10-11 10:40:45 +00:00
}
2017-07-15 17:01:21 +00:00
},
"autoload-dev": {
2021-03-12 23:52:38 +00:00
"psr-4": {
"Rector\\Tests\\": ["packages-tests", "rules-tests"],
"Rector\\Core\\Tests\\": "tests",
"Rector\\RuleDocGenerator\\": "utils/rule-doc-generator/src",
"Rector\\PHPStanExtensions\\": "utils/phpstan-extensions/src",
"Rector\\PHPStanExtensions\\Tests\\": "utils/phpstan-extensions/tests",
"Rector\\Utils\\DoctrineAnnotationParserSyncer\\": "utils/doctrine-annotation-parser-syncer/src"
2021-03-12 23:52:38 +00:00
},
2020-10-11 10:40:45 +00:00
"classmap": [
"stubs/Annotations",
"rules-tests/Autodiscovery/Rector/FileNode/MoveInterfacesToContractNamespaceDirectoryRector/Expected",
"rules-tests/Autodiscovery/Rector/FileNode/MoveServicesBySuffixToDirectoryRector/Expected",
2021-03-14 13:22:25 +00:00
"rules-tests/CodingStyle/Rector/Namespace_/ImportFullyQualifiedNamesRector/Source",
"rules-tests/Renaming/Rector/Name/RenameClassRector/Source",
"rules-tests/Renaming/Rector/FileWithoutNamespace/PseudoNamespaceToNamespaceRector/Source",
"rules-tests/CodingStyle/Rector/Namespace_/ImportFullyQualifiedNamesRector/Source",
"rules-tests/Renaming/Rector/Name/RenameClassRector/Source"
2020-10-11 10:40:45 +00:00
],
"files": [
"stubs/Doctrine/Persistence/ObjectManager.php",
"stubs/Doctrine/Common/Persistence/ObjectManager.php",
"vendor/nette/forms/src/Forms/Controls/SubmitButton.php",
"rules-tests/Restoration/Rector/Use_/RestoreFullyQualifiedNameRector/Source/ShortClassOnly.php",
"rules-tests/DeadCode/Rector/MethodCall/RemoveDefaultArgumentValueRector/Source/UserDefined.php",
"rules-tests/Transform/Rector/FuncCall/FuncCallToMethodCallRector/Source/some_view_function.php",
"rules-tests/TypeDeclaration/Rector/FunctionLike/ReturnTypeDeclarationRector/Source/MyBar.php",
"rules-tests/TypeDeclaration/Rector/Property/CompleteVarDocTypePropertyRector/Source/EventDispatcher.php",
"tests/debug_functions.php"
2021-03-12 23:52:38 +00:00
]
2017-07-15 17:01:21 +00:00
},
"scripts": {
"complete-check": [
"@check-cs",
"@phpstan",
2020-03-28 23:32:14 +00:00
"@docs",
"phpunit"
],
"check-cs": [
"vendor/bin/ecs check --ansi",
"vendor/bin/ecs check-markdown README.md --ansi"
],
"fix-cs": [
"vendor/bin/ecs check --fix --ansi",
"vendor/bin/ecs check-markdown README.md --fix --ansi"
],
"phpstan": "vendor/bin/phpstan analyse --ansi --error-format symplify",
"phpstan-config": "vendor/bin/phpstan analyse config --ansi --error-format symplify",
2019-02-22 23:49:04 +00:00
"docs": [
"vendor/bin/rule-doc-generator generate packages rules --output-file docs/rector_rules_overview.md --ansi --categorize",
"vendor/bin/ecs check-markdown docs/rector_rules_overview.md --ansi --fix"
2019-10-30 09:57:00 +00:00
],
"rector": "bin/rector process --ansi"
2017-08-19 23:46:12 +00:00
},
"config": {
"platform-check": false,
2020-12-24 22:01:30 +00:00
"sort-packages": true
2021-03-01 01:28:35 +00:00
},
"minimum-stability": "dev",
"prefer-stable": true
2020-07-03 14:41:59 +00:00
}