box-project / box

📦🚀 Fast, zero config application bundler with PHARs.
https://box-project.github.io/box
MIT License
1.11k stars 101 forks source link

fix: Fix the autoloading of the excluded files #1323

Closed theofidry closed 4 months ago

theofidry commented 5 months ago

This fixes the integration of https://github.com/humbug/php-scoper/pull/864 within Box which was done in #1142.

The issue was that the relative file paths was passed instead of hashes. Note that we create the file hasher in a different way than in PHP-Scoper, since PHP-Scoper has to deal with the vendor directory from the source and the scoped one, and deals with absolute paths. In Box however, this is not the case, we directly get relative file paths (relative to the working directory)

theofidry commented 5 months ago

Waiting for feedback on https://github.com/phpstan/phpstan-src/pull/2905

theofidry commented 4 months ago

From my testing this looks to be fixing the issues. There is more issues related to the polyfill but that's a separate PHP-Scoper issue.