Giter VIP home page Giter VIP logo

Comments (8)

sebastianbergmann avatar sebastianbergmann commented on July 17, 2024

@theofidry Before I dig into this, is there anything that would be obvious to you that might explain this? Thanks!

from phpunit.

mfn avatar mfn commented on July 17, 2024

Maybe this from the release https://github.com/humbug/php-scoper/releases/tag/0.18.12

Upgrade to PHP-Parser v5 (humbug/php-scoper#1025)

https://github.com/nikic/PHP-Parser?tab=readme-ov-file#php-parser says:

Documentation for version 5.x (current; for running on PHP >= 7.4; for parsing PHP 7.0 to PHP 8.3, with limited support for parsing PHP 5.x).

So you can't run this on PHP < 7.4 I guess? 🤔

from phpunit.

sebastianbergmann avatar sebastianbergmann commented on July 17, 2024

@mfn PHP-Scoper requires a newer version of PHP, yes. But that does not have to mean that the modified code no longer works with PHP 7.2.

from phpunit.

theofidry avatar theofidry commented on July 17, 2024

Aside from the PHP-Parser upgrade I don't see anything that could cause this :/ Do you have the offending code by any chance? I can take a look at it

from phpunit.

sebastianbergmann avatar sebastianbergmann commented on July 17, 2024
$ git clone [email protected]:sebastianbergmann/phpunit.git
$ cd phpunit
$ git checkout 8.5
$ ant phar-snapshot
$ php-72 build/artifacts/phpunit-snapshot.phar

Parse error: syntax error in phar:///usr/local/src/phpunit/build/artifacts/phpunit-snapshot.phar/phpunit/Framework/MockObject/Generator.php on line 736
$ phar extract -f /usr/local/src/phpunit/build/artifacts/phpunit-snapshot.phar
$ php-72 -l phpunit/Framework/MockObject/Generator.php

Parse error: syntax error in phpunit/Framework/MockObject/Generator.php on line 736
Errors parsing phpunit/Framework/MockObject/Generator.php

Attached is the result of ant phar-snapshot for the current state of the 8.5 branch.

phpunit-snapshot.phar.tar.gz

from phpunit.

theofidry avatar theofidry commented on July 17, 2024

Ok I got a small reproducer within the PHP-Scoper test suite, will look more into it

from phpunit.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.