rector: Fail to execute rector through docker
Question
Iām trying to install and run rector on a symfony4.4 project but failing to get anything out of it š Here is the output of the command execution :
$ docker run -v $(pwd):/project rector/rector:latest process src --set symfony-constructor-injection
Rector 0.8.x-dev@463dccb
0/642 [āāāāāāāāāāāāāāāāāāāāāāāāāāāā] 0%
32/642 [āāāāāāāāāāāāāāāāāāāāāāāāāāāā] 4%
64/642 [āāāāāāāāāāāāāāāāāāāāāāāāāāāā] 9%
96/642 [āāāāāāāāāāāāāāāāāāāāāāāāāāāā] 14%
128/642 [āāāāāāāāāāāāāāāāāāāāāāāāāāāā] 19%
160/642 [āāāāāāāāāāāāāāāāāāāāāāāāāāāā] 24%
192/642 [āāāāāāāāāāāāāāāāāāāāāāāāāāāā] 29%
224/642 [āāāāāāāāāāāāāāāāāāāāāāāāāāāā] 34%
320/642 [āāāāāāāāāāāāāāāāāāāāāāāāāāāā] 49%
384/642 [āāāāāāāāāāāāāāāāāāāāāāāāāāāā] 59%
512/642 [āāāāāāāāāāāāāāāāāāāāāāāāāāāā] 79%
608/642 [āāāāāāāāāāāāāāāāāāāāāāāāāāāā] 94%
642/642 [āāāāāāāāāāāāāāāāāāāāāāāāāāāā] 100%
[ERROR] Could not process
"src/Testing/PHPUnit/AbstractFileSystemRectorTestCase.php" file, due
to:
"Analyze error: "Class PHPUnit\Framework\TestCase not found and could
not be autoloaded.". Include your files in "parameters >
autoload_paths".
See https://github.com/rectorphp/rector#extra-autoloading".
[ERROR] Could not process
"src/Testing/PHPUnit/AbstractGenericRectorTestCase.php" file, due to:
"Analyze error: "Class PHPUnit\Framework\TestCase not found and could
not be autoloaded.". Include your files in "parameters >
autoload_paths".
See https://github.com/rectorphp/rector#extra-autoloading".
[ERROR] Could not process "src/Testing/PHPUnit/AbstractNodeVisitorTestCase.php"
file, due to:
"Analyze error: "Class PHPUnit\Framework\TestCase not found and could
not be autoloaded.". Include your files in "parameters >
autoload_paths".
See https://github.com/rectorphp/rector#extra-autoloading".
[ERROR] Could not process "src/Testing/PHPUnit/AbstractRectorTestCase.php"
file, due to:
"Analyze error: "Class PHPUnit\Framework\TestCase not found and could
not be autoloaded.". Include your files in "parameters >
autoload_paths".
See https://github.com/rectorphp/rector#extra-autoloading".
[ERROR] Could not process
"src/Testing/PHPUnit/AbstractRunnableRectorTestCase.php" file, due to:
"Analyze error: "Class PHPUnit\Framework\TestCase not found and could
not be autoloaded.". Include your files in "parameters >
autoload_paths".
See https://github.com/rectorphp/rector#extra-autoloading".
Any hint/help appreciated! Note: we do not have phpunit installed for this project.
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 1
- Comments: 20 (9 by maintainers)
thanks a lot @holtkamp , it works indeed!
@kbsali
Same error, I have to run inside container bash shell: