Bug report
| Question |
Answer |
| Box version |
3.13.0 |
| PHP version |
7.4 |
| Platform with version |
Ubuntu |
| Github Repo |
- |
I'd like to use auto-discovery to build my phar and use the PHP compactor, but there's a single PHP file that needs to be added without any compaction. It seems like this isn't possible.
The file I'm trying to exclude from compaction is src/Foo/Bar/FooBar.php
box.json.dist
{
"compactors": [
"KevinGH\\Box\\Compactor\\Json",
"KevinGH\\Box\\Compactor\\Php"
],
"directories": [
"app",
"config"
],
"directories-bin": [
"src/Foo/Bar"
],
"main": "bin/something",
"output": "something",
"git-version": "package_version",
"compression": "GZ",
"force-autodiscovery": true
}
The note in configuration.md leads me to believe that this is caused by the binary file getting added a second time in non-binary mode:
Warning: binary files are added before regular files. As a result if a file is found in both regular files and binary files, the regular file will take precedence
Is there some way to exclude this file during auto-discovery so that it stays binary / uncompacted, or is it simply not possible to add binary files using auto-discovery?
Bug report
I'd like to use auto-discovery to build my phar and use the PHP compactor, but there's a single PHP file that needs to be added without any compaction. It seems like this isn't possible.
The file I'm trying to exclude from compaction is
src/Foo/Bar/FooBar.phpbox.json.dist
{ "compactors": [ "KevinGH\\Box\\Compactor\\Json", "KevinGH\\Box\\Compactor\\Php" ], "directories": [ "app", "config" ], "directories-bin": [ "src/Foo/Bar" ], "main": "bin/something", "output": "something", "git-version": "package_version", "compression": "GZ", "force-autodiscovery": true }The note in configuration.md leads me to believe that this is caused by the binary file getting added a second time in non-binary mode:
Is there some way to exclude this file during auto-discovery so that it stays binary / uncompacted, or is it simply not possible to add binary files using auto-discovery?