This patch makes several changes to PHAR creation to resolve the following issues:
Generated local configuration files were receiving the autogenerated namespace as a prefix to the configuration.
This is likely a bug in Box and/or PHP-Scoper, but it's possible to work around it (I chose implode() with a list of lines, as any nowdoc or heredoc triggered the injection for me).
Configuration files reference provider classes.
This led to problems when scoping as those classes then could not be found.
I have added php-scoper whitelist entries for the specified classes to ensure that configuration can be used and not lead to errors.
Once php-scoper configuration was introduced, I started seeing warnings thrown around polyfill classes we use.
I have updated the php-scoper configuration to whitelist global classes.
In my local testing, all operations that previously did not work under the PHAR now work.
This patch makes several changes to PHAR creation to resolve the following issues:
Generated local configuration files were receiving the autogenerated namespace as a prefix to the configuration. This is likely a bug in Box and/or PHP-Scoper, but it's possible to work around it (I chose
implode()
with a list of lines, as any nowdoc or heredoc triggered the injection for me).Configuration files reference provider classes. This led to problems when scoping as those classes then could not be found. I have added php-scoper whitelist entries for the specified classes to ensure that configuration can be used and not lead to errors.
Once php-scoper configuration was introduced, I started seeing warnings thrown around polyfill classes we use. I have updated the php-scoper configuration to whitelist global classes.
In my local testing, all operations that previously did not work under the PHAR now work.
Fixes #81 Fixes #82