rector: Rector prefixed 0.8.56: Class 'Rector\Core\Console\Style\SymfonyStyleFactory' not found
Bug Report
Subject | Details |
---|---|
Rector version | 0.8.56 |
Installed as | prefixed Rector PHAR |
While trying to run a Rector with vendor/bin/rector
there’s an error happening:
❯ vendor/bin/rector
PHP Fatal error: Uncaught Error: Class 'Rector\Core\Console\Style\SymfonyStyleFactory' not found in /Users/[...]/vendor/rector/rector-prefixed/bin/rector:39
Stack trace:
#0 {main}
thrown in /Users/[...]/vendor/rector/rector-prefixed/bin/rector on line 39
Fatal error: Uncaught Error: Class 'Rector\Core\Console\Style\SymfonyStyleFactory' not found in /Users/[...]/vendor/rector/rector-prefixed/bin/rector:39
Stack trace:
#0 {main}
thrown in /Users/[...]vendor/rector/rector-prefixed/bin/rector on line 39
Minimal PHP Code Causing Issue
Expected Behaviour
Rector running properly.
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 5
- Comments: 21 (18 by maintainers)
Commits related to this issue
- Temporarily disable Rector. See https://github.com/rectorphp/rector/issues/4736#issuecomment-757973923 — committed to Aerendir/component-array-writer by Aerendir 3 years ago
- Temporarily disable Rector. See https://github.com/rectorphp/rector/issues/4736#issuecomment-757973923 — committed to Aerendir/component-array-writer by Aerendir 3 years ago
- Updated Rector to commit ed7426f02db446090399165a884ea7082e160d50 https://github.com/rectorphp/rector-src/commit/ed7426f02db446090399165a884ea7082e160d50 [Logging] Add RectorOutput logging service (#... — committed to rectorphp/rector by TomasVotruba a year ago
A suggested workaround : use the previous version 0.8.52 wich is based on a phar.
If you current environment contains version 0.8.56, first of all remove it : composer remove rector/rector-prefixed.
Then install the previous version : composer require rector/rector-prefixed 0.8.52
Note : the command init does not work in this version. You will have to copy the rector.php.dist by hand in your main directory.
Phive is packaged phar, that’s what we droppped in 0.9 - Why? See https://getrector.org/blog/2020/12/28/rector-09-released#debuggable-rector-prefixed
This is prefixed Rector now: https://github.com/rectorphp/rector-prefixed
We go for the future of downgraded and prefixed version. Thank’s to that Rector will be able to run on PHP 5.6 in composer and without Docker.
Neither barmani or global installation is supported. If paths will be resolved, the different
vendor
directory name or double nesting or package conflicts will appear. We’ve experienced that in various private projects, before the prefixed Rector was available.Now prefixed version is way to go here.
Still seeing this problem on 0.9.5