Skip to content

Installing using composer-bin-plugin not working after 4.2 #931

@icanhazstring

Description

@icanhazstring

Bug report

Question Answer
Box version ^4.3.0
PHP version 8.1
Platform with version e.g. Ubuntu/Windows/MacOS
Github Repo -

Using composer bin-plugin with humbug/box starting from version 4.3 (4.2 worked).
Running it with the latest .phar build seems to be working.

Executing vendor/bin/box compile throws the following exception:

exception trace
PHP Fatal error:  Uncaught Error: Call to undefined method KevinGH\Box\Configuration\Configuration::setComposerBin() in /Users/user/Projects/my-project/vendor-bin/box/vendor/humbug/box/src/Console/Command/Compile.php:209
Stack trace:
#0 /Users/user/Projects/my-project/vendor-bin/box/vendor/fidry/console/src/Command/SymfonyCommand.php(93): KevinGH\Box\Console\Command\Compile->execute(Object(Fidry\Console\Input\IO))
#1 /Users/user/Projects/my-project/vendor-bin/box/vendor/symfony/console/Command/Command.php(312): Fidry\Console\Command\SymfonyCommand->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#2 /Users/user/Projects/my-project/vendor-bin/box/vendor/symfony/console/Application.php(1022): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#3 /Users/user/Projects/my-project/vendor-bin/box/vendor/symfony/console/Application.php(314): Symfony\Component\Console\Application->doRunCommand(Object(Fidry\Console\Command\SymfonyCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#4 /Users/user/Projects/my-project/vendor-bin/box/vendor/symfony/console/Application.php(168): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#5 /Users/user/Projects/my-project/vendor-bin/box/vendor/fidry/console/src/Application/ApplicationRunner.php(66): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#6 /Users/user/Projects/my-project/vendor-bin/box/vendor/humbug/box/bin/box(60): Fidry\Console\Application\ApplicationRunner->run(Object(Fidry\Console\Input\IO))
#7 /Users/user/Projects/my-project/vendor/bin/box(120): include('/Users/andreas....')
#8 {main}
 thrown in /Users/user/Projects/my-project/vendor-bin/box/vendor/humbug/box/src/Console/Command/Compile.php on line 209

Fatal error: Uncaught Error: Call to undefined method KevinGH\Box\Configuration\Configuration::setComposerBin() in /Users/user/Projects/my-project/vendor-bin/box/vendor/humbug/box/src/Console/Command/Compile.php:209
Stack trace:
#0 /Users/user/Projects/my-project/vendor-bin/box/vendor/fidry/console/src/Command/SymfonyCommand.php(93): KevinGH\Box\Console\Command\Compile->execute(Object(Fidry\Console\Input\IO))
#1 /Users/user/Projects/my-project/vendor-bin/box/vendor/symfony/console/Command/Command.php(312): Fidry\Console\Command\SymfonyCommand->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#2 /Users/user/Projects/my-project/vendor-bin/box/vendor/symfony/console/Application.php(1022): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#3 /Users/user/Projects/my-project/vendor-bin/box/vendor/symfony/console/Application.php(314): Symfony\Component\Console\Application->doRunCommand(Object(Fidry\Console\Command\SymfonyCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#4 /Users/user/Projects/my-project/vendor-bin/box/vendor/symfony/console/Application.php(168): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#5 /Users/user/Projects/my-project/vendor-bin/box/vendor/fidry/console/src/Application/ApplicationRunner.php(66): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#6 /Users/user/Projects/my-project/vendor-bin/box/vendor/humbug/box/bin/box(60): Fidry\Console\Application\ApplicationRunner->run(Object(Fidry\Console\Input\IO))
#7 /Users/user/Projects/my-project/vendor/bin/box(120): include('/Users/user....')
#8 {main}
 thrown in /Users/user/Projects/my-project/vendor-bin/box/vendor/humbug/box/src/Console/Command/Compile.php on line 209

box.json.dist
{
   "base-path": null,
   "output": "build/my-project.phar",
   "files": [
       "config/container.php",
       "config/services.yaml"
   ]
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions