Closed luanfreitasdev closed 11 months ago
The issue probably stems from using it as a dependency: https://github.com/box-project/box/blob/7feeb4e0497f30ff1281637e3f79b1f179b74ebf/doc/faq.md#building-a-phar-with-box-as-a-dependency
Thank you @theofidry! Works
Bug report
Above version 4.0 this error occurs
composer.json
Run:
box.json.dist
```json { } ```Output
```bash $ command Box version 4.6.0@95b0d8e // Loading the configuration file "/Users/luan.freitas/Documents/laradumps/global/phar-generator/box.json". 🔨 Building the PHAR "/Users/luan.freitas/Documents/laradumps/global/phar-generator/laradumps.phar" ? Checking Composer compatibility > Supported version detected ? Registering compactors + KevinGH\Box\Compactor\PhpScoper ? Adding main file: /Users/luan.freitas/Documents/laradumps/global/phar-generator/index.php ? Skip requirements checker ? Adding binary files > No file found ? Auto-discover files? Yes ? Exclude dev files? Yes ? Adding files > 4076 file(s) ? Generating new stub - No shebang line - Using banner: > Generated by Humbug Box 4.6.0@95b0d8e. > > @link https://github.com/humbug/box ? Dumping the Composer autoloader In ComposerOrchestrator.php line 162: Could not dump the autoloader. In ComposerOrchestrator.php line 165: The command "'/opt/homebrew/bin/composer' 'dump-autoload' '--classmap-authoritative' '--no-dev' '--ansi'" failed. Exit Code: 1(General error) Working directory: /private/var/folders/34/fszzk_0s12g5_mwkw_gx1_pw0000gp/T/box/Box21151 Output: ================ Generating optimized autoload files (authoritative) Error Output: ================ In ClassMapGenerator.php line 129: Could not scan for classes inside "/private/var/folders/34/fszzk_0s12g5_mwkw_gx1_pw0000gp/T/box/Box21151/vendor/humbug/php-scoper/vendor-hotfix/" which does not appear to be a file nor a folder dump-autoload [-o|--optimize] [-a|--classmap-authoritative] [--apcu] [--apcu-prefix APCU-PREFIX] [--dry-run] [--dev] [--no-dev] [--ignore-platform-req IGNORE-PLATFORM-REQ] [--ignore-platform-reqs] [--strict-psr] compile [--debug] [--no-parallel] [--no-restart] [--dev] [--no-config] [--with-docker] [--composer-bin COMPOSER-BIN] [--allow-composer-check-failure] [-c|--config CONFIG] [-d|--working-dir WORKING-DIR] Script clear && vendor/bin/box compile --no-parallel handling the build event returned with error code 1 ```