2017-07-15 19:01:21 +02:00
|
|
|
{
|
|
|
|
"name": "rector/rector",
|
2018-12-08 23:13:44 +01:00
|
|
|
"description": "Instant upgrade and refactoring of your PHP code",
|
2021-01-29 17:24:20 +01:00
|
|
|
"keywords": [
|
|
|
|
"instant upgrades",
|
|
|
|
"instant refactoring",
|
|
|
|
"ast",
|
|
|
|
"automated refactoring"
|
|
|
|
],
|
2019-05-25 19:36:12 +02:00
|
|
|
"homepage": "https://getrector.org",
|
2017-07-15 19:01:21 +02:00
|
|
|
"license": "MIT",
|
2019-05-25 19:36:12 +02:00
|
|
|
"authors": [
|
2021-01-12 22:50:42 +01:00
|
|
|
{
|
|
|
|
"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 19:36:12 +02:00
|
|
|
],
|
2017-07-15 19:01:21 +02:00
|
|
|
"require": {
|
2020-12-09 23:25:53 +01:00
|
|
|
"php": "^7.3|^8.0",
|
2020-12-12 14:53:10 +01:00
|
|
|
"ext-dom": "*",
|
2020-12-24 23:01:30 +01:00
|
|
|
"ext-json": "*",
|
2020-12-29 01:32:48 +01:00
|
|
|
"composer/semver": "^3.2",
|
2021-01-12 22:50:42 +01:00
|
|
|
"composer/xdebug-handler": "^1.4",
|
2021-03-17 20:59:18 +01:00
|
|
|
"danielstjules/stringy": "^3.1",
|
2021-03-12 20:13:27 +01:00
|
|
|
"doctrine/annotations": "^1.12",
|
2020-12-09 16:41:23 +01:00
|
|
|
"doctrine/inflector": "^2.0",
|
2021-01-29 17:14:06 +01:00
|
|
|
"jean85/pretty-package-versions": "^1.5.1|^2.0.1",
|
2021-03-18 02:11:54 +01:00
|
|
|
"nette/caching": "^3.1",
|
2021-03-18 12:21:20 +01:00
|
|
|
"nette/robot-loader": "^3.4",
|
2020-12-12 15:58:47 +01:00
|
|
|
"nette/utils": "^3.2",
|
2020-12-20 22:05:48 +01:00
|
|
|
"nikic/php-parser": "^4.10.4",
|
2021-03-19 11:30:21 +01:00
|
|
|
"phpstan/phpstan": "^0.12.82",
|
2021-03-19 15:33:58 +01:00
|
|
|
"phpstan/phpdoc-parser": "^0.5.1",
|
2021-03-12 20:13:27 +01:00
|
|
|
"phpstan/phpstan-phpunit": "^0.12.18",
|
2021-03-18 23:03:54 +01:00
|
|
|
"rector/rector-symfony": "dev-main",
|
2021-03-19 01:33:30 +01:00
|
|
|
"rector/rector-nette": "dev-main",
|
2021-03-19 02:09:51 +01:00
|
|
|
"rector/rector-laravel": "dev-main",
|
2021-03-19 10:52:08 +01:00
|
|
|
"rector/rector-phpunit": "dev-main",
|
2021-02-01 18:05:25 +01:00
|
|
|
"sebastian/diff": "^4.0.4",
|
2020-10-01 21:45:29 +02:00
|
|
|
"symfony/console": "^4.4.8|^5.1",
|
2021-01-08 15:04:35 +01:00
|
|
|
"symfony/dependency-injection": "^5.1",
|
2020-10-01 21:45:29 +02:00
|
|
|
"symfony/finder": "^4.4.8|^5.1",
|
2020-10-11 12:40:45 +02:00
|
|
|
"symfony/http-kernel": "^4.4.8|^5.1",
|
2021-01-20 15:12:17 +01:00
|
|
|
"symfony/process": "^4.4.8|^5.1",
|
2021-03-03 18:15:12 +01:00
|
|
|
"symfony/uid": "^4.4.8|^5.1",
|
2021-03-19 15:33:58 +01:00
|
|
|
"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",
|
2021-03-12 20:13:27 +01:00
|
|
|
"webmozart/assert": "^1.10"
|
2017-07-15 19:01:21 +02:00
|
|
|
},
|
|
|
|
"require-dev": {
|
2021-03-19 15:33:58 +01:00
|
|
|
"symplify/rule-doc-generator": "^9.2.12",
|
2021-03-12 20:13:27 +01:00
|
|
|
"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 20:25:21 +01:00
|
|
|
"nette/application": "^3.0.7",
|
2020-10-14 06:24:29 +02:00
|
|
|
"nette/di": "^3.0",
|
2020-08-03 10:51:44 +02:00
|
|
|
"nette/forms": "^3.0",
|
2021-03-12 20:13:27 +01:00
|
|
|
"phpstan/phpstan-nette": "^0.12.16",
|
2020-12-12 15:58:47 +01:00
|
|
|
"phpunit/phpunit": "^9.5",
|
2021-03-12 20:13:27 +01:00
|
|
|
"rector/rector-generator": "^0.1.1",
|
2021-03-19 15:33:58 +01:00
|
|
|
"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-19 00:36:11 +01:00
|
|
|
"symplify/phpstan-rules": "^9.2",
|
2021-01-31 00:20:05 +01:00
|
|
|
"tracy/tracy": "^2.8"
|
2017-07-15 19:01:21 +02:00
|
|
|
},
|
2020-06-22 20:18:58 +02:00
|
|
|
"replace": {
|
2021-03-18 23:03:54 +01:00
|
|
|
"rector/rector-prefixed": "self.version",
|
|
|
|
"rector/rector": "self.version"
|
2020-06-22 20:18:58 +02:00
|
|
|
},
|
2017-07-15 19:01:21 +02:00
|
|
|
"autoload": {
|
|
|
|
"psr-4": {
|
2021-03-12 23:20:25 +01:00
|
|
|
"Rector\\": ["packages", "rules"],
|
2021-03-12 02:21:29 +01:00
|
|
|
"Rector\\Core\\": "src",
|
2021-03-12 23:20:25 +01:00
|
|
|
"Rector\\Compiler\\": "utils/compiler/src"
|
2020-10-11 12:40:45 +02:00
|
|
|
}
|
2017-07-15 19:01:21 +02:00
|
|
|
},
|
|
|
|
"autoload-dev": {
|
2021-03-13 00:52:38 +01: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",
|
2021-03-15 23:44:28 +01:00
|
|
|
"Rector\\Utils\\DoctrineAnnotationParserSyncer\\": "utils/doctrine-annotation-parser-syncer/src"
|
2021-03-13 00:52:38 +01:00
|
|
|
},
|
2020-10-11 12:40:45 +02:00
|
|
|
"classmap": [
|
2021-03-18 02:10:01 +01:00
|
|
|
"stubs/Annotations",
|
2021-03-12 23:20:25 +01:00
|
|
|
"rules-tests/Autodiscovery/Rector/FileNode/MoveInterfacesToContractNamespaceDirectoryRector/Expected",
|
|
|
|
"rules-tests/Autodiscovery/Rector/FileNode/MoveServicesBySuffixToDirectoryRector/Expected",
|
|
|
|
"rules-tests/CakePHP/Rector/FileWithoutNamespace/ImplicitShortClassNameUseStatementRector/Source",
|
|
|
|
"rules-tests/CakePHP/Rector/Namespace_/AppUsesStaticCallToUseStatementRector/Source",
|
2021-03-14 14:22:25 +01:00
|
|
|
"rules-tests/CodingStyle/Rector/Namespace_/ImportFullyQualifiedNamesRector/Source",
|
2021-03-14 14:11:24 +01:00
|
|
|
"rules-tests/Renaming/Rector/Name/RenameClassRector/Source",
|
2021-03-19 21:29:10 +01:00
|
|
|
"rules-tests/Renaming/Rector/FileWithoutNamespace/PseudoNamespaceToNamespaceRector/Source",
|
|
|
|
"rules-tests/CodingStyle/Rector/Namespace_/ImportFullyQualifiedNamesRector/Source",
|
|
|
|
"rules-tests/Renaming/Rector/Name/RenameClassRector/Source"
|
2020-10-11 12:40:45 +02:00
|
|
|
],
|
|
|
|
"files": [
|
2021-03-18 02:10:01 +01:00
|
|
|
"stubs/Doctrine/Persistence/ObjectManager.php",
|
|
|
|
"stubs/Doctrine/Common/Persistence/ObjectManager.php",
|
2021-02-28 08:47:48 +01:00
|
|
|
"vendor/nette/forms/src/Forms/Controls/SubmitButton.php",
|
2021-03-12 23:20:25 +01:00
|
|
|
"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",
|
2020-10-14 06:24:29 +02:00
|
|
|
"tests/debug_functions.php"
|
2021-03-13 00:52:38 +01:00
|
|
|
]
|
2017-07-15 19:01:21 +02:00
|
|
|
},
|
|
|
|
"scripts": {
|
2019-03-16 16:49:22 +01:00
|
|
|
"complete-check": [
|
|
|
|
"@check-cs",
|
|
|
|
"@phpstan",
|
2020-03-29 00:32:14 +01:00
|
|
|
"@docs",
|
2020-07-29 21:57:05 +02:00
|
|
|
"phpunit"
|
2019-03-16 16:49:22 +01:00
|
|
|
],
|
2020-09-09 23:58:12 +02:00
|
|
|
"check-cs": [
|
|
|
|
"vendor/bin/ecs check --ansi",
|
2020-10-26 00:22:53 +01:00
|
|
|
"vendor/bin/ecs check-markdown README.md --ansi"
|
2020-09-09 23:58:12 +02:00
|
|
|
],
|
2020-09-09 23:05:38 +07:00
|
|
|
"fix-cs": [
|
|
|
|
"vendor/bin/ecs check --fix --ansi",
|
2020-10-26 00:22:53 +01:00
|
|
|
"vendor/bin/ecs check-markdown README.md --fix --ansi"
|
2020-09-09 23:05:38 +07:00
|
|
|
],
|
2020-10-11 16:17:43 +02:00
|
|
|
"phpstan": "vendor/bin/phpstan analyse --ansi --error-format symplify",
|
|
|
|
"phpstan-config": "vendor/bin/phpstan analyse config --ansi --error-format symplify",
|
2019-02-23 00:49:04 +01:00
|
|
|
"docs": [
|
2020-11-25 22:34:34 +01:00
|
|
|
"vendor/bin/rule-doc-generator generate packages rules --output-file docs/rector_rules_overview.md --ansi --categorize",
|
2021-03-15 23:44:28 +01:00
|
|
|
"vendor/bin/ecs check-markdown docs/rector_rules_overview.md --ansi --fix"
|
2019-10-30 10:57:00 +01:00
|
|
|
],
|
2021-03-12 02:21:29 +01:00
|
|
|
"rector": "bin/rector process --ansi"
|
2017-08-20 01:46:12 +02:00
|
|
|
},
|
|
|
|
"config": {
|
2021-03-13 20:50:21 +01:00
|
|
|
"platform-check": false,
|
2020-12-24 23:01:30 +01:00
|
|
|
"sort-packages": true
|
2021-03-01 02:28:35 +01:00
|
|
|
},
|
|
|
|
"minimum-stability": "dev",
|
|
|
|
"prefer-stable": true
|
2020-07-03 16:41:59 +02:00
|
|
|
}
|