Open
Description
A few notes from conversations with ondrej;
script idea:
"dump-autoload": [
"@composer config autoloader-suffix @prefix", <- `@composer` points to whatever Composer binary Box uses
<- `@prefix` points to the PHP-Scoper prefix; would throw na error if none found
"@composer config autoloader-suffix @{prefix}CheckSum", <- Example where you use `@prefix` concatenated with another string
"@composer config platform.php --unset",
"@composer dump-autoload --classmap-authoritative", <- just rolling your own dump-autoload
"@box-dump-autoload", <- using the Box default dump-autoload
],
PHPStan changes the composer.json
in multiple places:
- https://github.com/phpstan/phpstan-src/blob/dbb8c4bd12cc0863dc85a5ac3435478a67cb9006/compiler/src/Console/PrepareCommand.php#L61-L78
- And then I manipulate autoloader-suffix in phar.yml
20:21
But that’s only to produce a reproducible PHAR file, to compare checksums and to decide whether the PHAR should be commited to phpstan/phpstan or not
20:21
For example if only tests change, PHAR checksum doesn’t change.
20:22
In reality the PHAR would always change because of different scoper prefix but I compile another PHAR which is reproducible and to compare the checksums.
20:22
So I’m not sure if something in Box’s side would make my job easier, probably not