-
-
Notifications
You must be signed in to change notification settings - Fork 109
Open
Description
Bug report
| Question | Answer |
|---|---|
| Box version | Box version 3.8.4@120b0a3 2019-12-13 17:22:43 UTC |
| PHP version | 7.4.5 |
| Composer version | 1.10.6 |
| Platform with version | Ubuntu |
| Github Repo | https://gist.github.com/morozov/746307479bc41c6db34eebeebdee8565 |
If an application that uses composer/package-versions-deprecated is packaged using Box, the resulting package will contain an invalid root package version. Please see the full reproduction script below.
box.json.dist
{
"output": "example.phar"
}Output
$ git clone [email protected]:746307479bc41c6db34eebeebdee8565.git
Cloning into '746307479bc41c6db34eebeebdee8565'...
remote: Enumerating objects: 7, done.
remote: Counting objects: 100% (7/7), done.
remote: Compressing objects: 100% (5/5), done.
remote: Total 7 (delta 0), reused 7 (delta 0), pack-reused 0
Receiving objects: 100% (7/7), done.
$ cd 746307479bc41c6db34eebeebdee8565
$ composer install
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Package operations: 1 install, 0 updates, 0 removals
- Installing composer/package-versions-deprecated (1.8.0): Loading from cache
Generating autoload files
composer/package-versions-deprecated: Generating version class...
composer/package-versions-deprecated: ...done generating version class
1 package you are using is looking for funding.
Use the `composer fund` command to find out more!
$ box compile
____
/ __ )____ _ __
/ __ / __ \| |/_/
/ /_/ / /_/ /> <
/_____/\____/_/|_|
Box version 3.8.4@120b0a3 2019-12-13 17:22:43 UTC
// Loading the configuration file
// "/home/morozov/746307479bc41c6db34eebeebdee8565/box.json.dist".
🔨 Building the PHAR "/home/morozov/746307479bc41c6db34eebeebdee8565/example.phar"
? No compactor to register
? Adding main file: /home/morozov/746307479bc41c6db34eebeebdee8565/example.php
? Adding requirements checker
? Adding binary files
> No file found
? Auto-discover files? Yes
? Exclude dev files? Yes
? Adding files
> 8 file(s)
? Generating new stub
- Using shebang line: #!/usr/bin/env php
- Using banner:
> Generated by Humbug Box 3.8.4@120b0a3.
>
> @link https://github.com/humbug/box
? Dumping the Composer autoloader
? Removing the Composer dump artefacts
? No compression
? Setting file permissions to 0755
* Done.
💡 1 recommendation found:
- The "output" setting can be omitted since is set to its default value
No warning found.
// PHAR: 42 files (101.79KB)
// You can inspect the generated PHAR with the "info" command.
// Memory usage: 8.39MB (peak: 8.58MB), time: <1sec
$ php example.phar
No version set (parsed as 1.0.0)@
$ php example.php
dev-master@36878bf86275404814177973f78705e07522dbd1