https://github.com/rectorphp/custom-phpspec-to-phpunit
From PHPSpec and Prophecy to PHPUnit - use at own risk
https://github.com/rectorphp/custom-phpspec-to-phpunit
Last synced: 7 months ago
JSON representation
From PHPSpec and Prophecy to PHPUnit - use at own risk
- Host: GitHub
- URL: https://github.com/rectorphp/custom-phpspec-to-phpunit
- Owner: rectorphp
- License: mit
- Created: 2023-09-28T12:12:57.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2025-04-15T08:17:35.000Z (9 months ago)
- Last Synced: 2025-05-31T00:52:01.898Z (8 months ago)
- Language: PHP
- Homepage: https://tomasvotruba.com/blog/2019/03/21/how-to-instantly-migrate-phpspec-to-phpunit
- Size: 6.37 MB
- Stars: 5
- Watchers: 2
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Rector Rules for PhpSpec to PHPUnit migration
* [Rules Overview](/docs/rector_rules_overview.md)
## Install
* runs on PHP 7.4+
```bash
composer require rector/custom-phpspec-to-phpunit --dev
```
## Usage
1. Register set
```php
$rectorConfig->sets([
\Rector\PhpSpecToPHPUnit\Set\MigrationSetList::PHPSPEC_TO_PHPUNIT,
]);
```
2. Run on specific spec directory
```bash
vendor/bin/rector process spec
```
This package handles 99 % of changes. Explore these resources to handle edge-cases manually:
* https://johannespichler.com/writing-custom-phpspec-matchers/