symplify / phpunit-upgrader
This package is abandoned and no longer maintained.
The author suggests using the rector/rector package instead.
Upgrade PHPUnit tests with smart helping hand
9.4.53
2021-09-06 18:46 UTC
Requires
- php: >=8.0
- nette/robot-loader: ^3.4
- nette/utils: ^3.2
- symfony/console: ^5.3|^6.0
- symfony/dependency-injection: ^5.3|^6.0
- symfony/http-kernel: ^5.3|^6.0
- symplify/console-color-diff: ^9.4.53
- symplify/package-builder: ^9.4.53
- symplify/smart-file-system: ^9.4.53
- symplify/symplify-kernel: ^9.4.53
Requires (Dev)
- phpunit/phpunit: ^9.5
Conflicts
- symplify/amnesia: <9.4.53
- symplify/astral: <9.4.53
- symplify/autowire-array-parameter: <9.4.53
- symplify/coding-standard: <9.4.53
- symplify/composer-json-manipulator: <9.4.53
- symplify/config-transformer: <9.4.53
- symplify/console-package-builder: <9.4.53
- symplify/easy-ci: <9.4.53
- symplify/easy-coding-standard: <9.4.53
- symplify/easy-hydrator: <9.4.53
- symplify/easy-testing: <9.4.53
- symplify/git-wrapper: <9.4.53
- symplify/markdown-diff: <9.4.53
- symplify/monorepo-builder: <9.4.53
- symplify/php-config-printer: <9.4.53
- symplify/phpstan-extensions: <9.4.53
- symplify/phpstan-rules: <9.4.53
- symplify/psr4-switcher: <9.4.53
- symplify/rule-doc-generator: <9.4.53
- symplify/rule-doc-generator-contracts: <9.4.53
- symplify/simple-php-doc-parser: <9.4.53
- symplify/skipper: <9.4.53
- symplify/symfony-php-config: <9.4.53
- symplify/symfony-static-dumper: <9.4.53
- symplify/vendor-patches: <9.4.53
This package is auto-updated.
Last update: 2021-09-06 20:55:14 UTC
README
Upgrade PHPUnit tests with smart helping hand.
Install
composer require symplify/phpunit-upgrader --dev
Usage
1. Change assertContains() on string calls to assertStringContainsString()
vendor/bin/phpunit-upgrader assert-contains /tests --error-report-file report.txt
Where report.txt is the output of PHPUnit run with fails:
1) Whatever::whatever TypeError: Argument 2 passed to PHPUnit\Framework\Assert::assertContains() must be iterable, string given, called in somePath.php on line 100
2. Add void to setUp() and tearDown() methods
vendor/bin/phpunit-upgrader voids /tests
Report Issues
In case you are experiencing a bug or want to request a new feature head over to the Symplify monorepo issue tracker
Contribute
The sources of this package are contained in the Symplify monorepo. We welcome contributions for this package on symplify/symplify.