Skip to content

chore: Safe-guard composer-bin-plugin#899

Open
kesselb wants to merge 1 commit intomasterfrom
composer-bin-error
Open

chore: Safe-guard composer-bin-plugin#899
kesselb wants to merge 1 commit intomasterfrom
composer-bin-error

Conversation

@kesselb
Copy link
Contributor

@kesselb kesselb commented Feb 14, 2026

Running composer install --no-dev fails with Command "bin" is not defined because the plugin is in require-dev. A script named "bin" avoids the failure.

@kesselb kesselb self-assigned this Feb 14, 2026
@kesselb kesselb requested review from Altahrim and susnux February 14, 2026 19:45
composer.json Outdated
Comment on lines 21 to 23
"bin": "echo 'bin not installed'",
"post-install-cmd": [
"@composer bin all install --ansi"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the proper fix is

Suggested change
"bin": "echo 'bin not installed'",
"post-install-cmd": [
"@composer bin all install --ansi"
"post-install-cmd": [
"[ $COMPOSER_DEV_MODE -eq 0 ] || composer bin all install --ansi",

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair, we have that in our documentation.

The bin-script is suggested by the plugin: https://github.com/bamarni/composer-bin-plugin?tab=readme-ov-file#auto-installation

Our documentation for composer-bin-plugin seems outdated. With forward-command enabled, there should be no need to have the post-installation-cmd and post-update-cmd script in composer.json (unless one uses mozart).

Running composer install --no-dev fails with Command "bin" is not
defined because the plugin is in require-dev. A script named "bin"
avoids the failure.

Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants