* Composer changer
* Implemented ChangePackage, ChangePackageVersion and RemovePackage with tests
* Refactored composer processor
* Refaktoring
* Added missing tests
* Added void return type to test
* Changed namespaces and fixed CI tests
* Apply rector rules
* Moved new line to processor from modifier
* Use array copies in tests
* Added descriptions to all construct parameters and inheritDoc to modify methods
* Rewritten ComposerModifierTest to use AbstractKernelTestCase and ComposerModifier as service
* Split MovePackage to 2 classes
* Sort packages if it is set in config
* Rectified
* Rename class ChangePackage to ReplacePackage
* Split class AddPackage to AddPackageToRequire and AddPackageToRequireDev
* Added Version checker and moved modifier classes to separated folder
* Changed array to ComposerJson in modify methods
* Rectifying
* Removed unnecessary docs
* Temporary added fork of composer-json-manipulator
* Removed unused code and replaced InvalidArgumentException to assert
* [DeadCode] [WIP] Fixes#3107 Add RemoveUnusedPublicMethodRector
* example
* add failing test
* basic
* use findCallsByClassMethod
* functional
* cs fix
* fix
* failing with place unused method later
* debug
* debug
* getting class name by method call
* checking method call name compare
* works
* check used outside class
* check used outside class
* check used outside class
* clean up
* move up method
* phpstan
* fixture for dependency injection
it got error:
```
The workflow is not valid. .github/workflows/weekly_code_coverage.yaml (Line: 34, Col: 51): Unrecognized named-value: 'secrets'. Located at position 1 within expression: secrets.GITHUB_TOKEN
```
The `secrets` seems only needed for automatic PR.
* composer: bump to symfony/dependency-injection 5.1, required as minimum by other deps anyway
* use service() over deprecated ref()
* skip empty files
* skip just created props
* Add failing test fixture for ExplicitBoolCompareRector
# Failing Test for ExplicitBoolCompareRector
Based on https://getrector.org/demo/3cb57eee-954d-4f12-9d0f-7ce703672f60
* Update and rename demo_file.php.inc to UnknownPropertyType.php.inc
* Closes#5100
* fixture
Co-authored-by: Jan Kuchař <honza@kucharovi.cz>
* Add failing test fixture for RemoveParentAndNameFromComponentConstructorRector
# Failing Test for RemoveParentAndNameFromComponentConstructorRector
Based on https://getrector.org/demo/12f10dc7-7ffb-4fe1-8004-7bf82e7aa9ce
There are multiple problems in this rule:
1) only $name is removed ($parent should be also removed)
2) $name (and if it would work also $parent) is removed also when there is some future use of it (e.g. assigning to private property $this->name = $name)
* Failing fixtures
* Closes#5052
* cs fix
* rename fixture
* rename fixture
* reduce complexity
* refactor
* use Assign
Co-authored-by: Michal Lulco <michal.lulco@gmail.com>
Co-authored-by: Michal Lulco <lulco@efabrica.sk>
* [DeadCode] Failing fixture for not removing method parameter used on RemoveUnusedPrivatePropertyRector
* Fixes#5088
* return type
* fixture rename
* use findFirstParentInstanceOf as it may inside another, eg: assign
* phpstan
* clean up
* clean up
* skip construct
* instanceof New_ check
* fix
* final touch
* identifier check
* reduce complexity
* use toString()
* final touch
* php 7.3 syntax
* Fixed typo in docs "lenght" to "length"
* Fixed typo in class constant "lenght" to "length"
* Changed "lenght" instead of "length", fixing bug in class_exists using incorrect classname