Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot scope PHPUnit with PHP 7.4 #357

Closed
sebastianbergmann opened this issue Dec 6, 2019 · 2 comments · Fixed by #358
Closed

Cannot scope PHPUnit with PHP 7.4 #357

sebastianbergmann opened this issue Dec 6, 2019 · 2 comments · Fixed by #358

Comments

@sebastianbergmann
Copy link
Contributor

This is the command used in PHPUnit's build process to invoke php-scoper:

./tools/php-scoper add-prefix --no-ansi --force --config build/config/php-scoper.php --no-interaction --stop-on-failure --output-dir build/tmp/phar-scoped --prefix PHPUnit build/tmp/phar

With PHP 7.4, which is my system's default version, I get

    ____  __  ______     _____                           
   / __ \/ / / / __ \   / ___/_________  ____  ___  _____
  / /_/ / /_/ / /_/ /   \__ \/ ___/ __ \/ __ \/ _ \/ ___/
 / ____/ __  / ____/   ___/ / /__/ /_/ / /_/ /  __/ /    
/_/   /_/ /_/_/       /____/\___/\____/ .___/\___/_/     
                                     /_/

PHP Scoper version 0.12.4 2019-06-26 11:39:30 UTC

   0/666 [░░░░░░░░░░░░░░░░░░░░░░░░░░░░]   0%
  66/666 [▓▓░░░░░░░░░░░░░░░░░░░░░░░░░░]   9%
 132/666 [▓▓▓▓▓░░░░░░░░░░░░░░░░░░░░░░░]  19%
 666/666 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%

 // Memory usage: 13.13MB (peak: 15.74MB), time: 0.47s                                                                  


In AddPrefixCommand.php line 103:
                                                                                                       
  Could not parse the file "/usr/local/src/phpunit/build/tmp/phar/php-code-coverage/Report/Text.php".  
                                                                                                       

In String_.php line 51:
                                                                               
  Invalid characters passed for attempted conversion, these have been ignored  
                                                                               

add-prefix [-d|--working-dir WORKING-DIR] [-p|--prefix PREFIX] [-o|--output-dir OUTPUT-DIR] [-f|--force] [-s|--stop-on-failure] [-c|--config CONFIG] [--no-config] [--] [<paths>...]

When I fall back to PHP 7.3 then I get

    ____  __  ______     _____                           
   / __ \/ / / / __ \   / ___/_________  ____  ___  _____
  / /_/ / /_/ / /_/ /   \__ \/ ___/ __ \/ __ \/ _ \/ ___/
 / ____/ __  / ____/   ___/ / /__/ /_/ / /_/ /  __/ /    
/_/   /_/ /_/_/       /____/\___/\____/ .___/\___/_/     
                                     /_/

PHP Scoper version 0.12.4 2019-06-26 11:39:30 UTC

   0/666 [░░░░░░░░░░░░░░░░░░░░░░░░░░░░]   0%
  66/666 [▓▓░░░░░░░░░░░░░░░░░░░░░░░░░░]   9%
 132/666 [▓▓▓▓▓░░░░░░░░░░░░░░░░░░░░░░░]  19%
 198/666 [▓▓▓▓▓▓▓▓░░░░░░░░░░░░░░░░░░░░]  29%
 264/666 [▓▓▓▓▓▓▓▓▓▓▓░░░░░░░░░░░░░░░░░]  39%
 330/666 [▓▓▓▓▓▓▓▓▓▓▓▓▓░░░░░░░░░░░░░░░]  49%
 396/666 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░░░░░░░░░░░░]  59%
 462/666 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░░░░░░░░░]  69%
 528/666 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░░░░░░]  79%
 594/666 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░░░░]  89%
 660/666 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓░]  99%
 666/666 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%

 [OK] Successfully prefixed 666 files.                                                                                  

 // Memory usage: 16.39MB (peak: 24.30MB), time: 1.96s                                                                  
@theofidry
Copy link
Member

Unfortunately cannot debug this one until I'm able to install PHP 7.4 locally which doesn't appear to be trivial...

@theofidry
Copy link
Member

0.13.0 has been released with PHP 7.4 support

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants