szepeviktor / rector-phar

rector/rector-prefixed packaged as a PHAR file
https://github.com/rectorphp/rector-prefixed/releases
MIT License
0 stars 0 forks source link

getcwd is not PHAR-friendly #1

Open szepeviktor opened 3 years ago

szepeviktor commented 3 years ago

@tomasvotruba Could you help? https://github.com/rectorphp/rector/blob/master/bin/rector.php#L33

$ ./rector-phar-0.9.1.phar

PHP Fatal error:  Uncaught Error: Class 'Rector\Core\Console\Style\SymfonyStyleFactory' not found in phar:///home/viktor/.phive/phars/szepeviktor/rector-phar-0.9.1.phar/bin/rector.php:32
Stack trace:
#0 phar:///home/viktor/.phive/phars/szepeviktor/rector-phar-0.9.1.phar/bin/rector(4): require_once()
#1 /home/viktor/.phive/phars/szepeviktor/rector-phar-0.9.1.phar(14): require('phar:///home/vi...')
#2 {main}
  thrown in phar:///home/viktor/.phive/phars/szepeviktor/rector-phar-0.9.1.phar/bin/rector.php on line 32
Fatal error: Uncaught Error: Class 'Rector\Core\Console\Style\SymfonyStyleFactory' not found in phar:///home/viktor/.phive/phars/szepeviktor/rector-phar-0.9.1.phar/bin/rector.php:32
Stack trace:
#0 phar:///home/viktor/.phive/phars/szepeviktor/rector-phar-0.9.1.phar/bin/rector(4): require_once()
#1 /home/viktor/.phive/phars/szepeviktor/rector-phar-0.9.1.phar(14): require('phar:///home/vi...')
#2 {main}
  thrown in phar:///home/viktor/.phive/phars/szepeviktor/rector-phar-0.9.1.phar/bin/rector.php on line 32
TomasVotruba commented 3 years ago

Not really, this was the reason we moved away from phar :) it was buggy in so many places See https://getrector.org/blog/2020/12/28/rector-09-released#debuggable-rector-prefixed