Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Commands fail with "An option shortcut cannot be empty." #20393

Open
masmrlar opened this issue Jan 31, 2024 · 6 comments
Open

Commands fail with "An option shortcut cannot be empty." #20393

masmrlar opened this issue Jan 31, 2024 · 6 comments

Comments

@masmrlar
Copy link
Contributor

Several commands contain invalid option configuration code resulting into exceptions starting with symfony/console 5.4.35

Example:

Symfony code triggering the error:
https://github.com/symfony/console/blame/dbdf6adcb88d5f83790e1efb57ef4074309d3931/Input/InputOption.php#L85C53-L85C88

@Thijzer
Copy link
Contributor

Thijzer commented Feb 8, 2024

This issue is manifesting in Akeneo editions that depend on Symfony 5.4.* now..

bin/console listings are failing and you can't use the Akeneo Commands where InputOptions are used.

I found this related issue
#19430

@cypx
Copy link

cypx commented Feb 20, 2024

Same here. As a workaround I lock Symfony Console version intocomposer.json

       "symfony/console": "5.4.34"

@ETEML17
Copy link

ETEML17 commented Feb 22, 2024

Hello @cypx, in which composer.json do you modify or add this line please ?

@cypx
Copy link

cypx commented Feb 22, 2024

@ETEML17 this one https://github.com/akeneo/pim-community-standard/blob/v7.0.50/composer.json, it's the one you found at the root of your composer project when you do manual installation ( https://docs.akeneo.com/7.0/install_pim/manual/installation_ce.html )
You could add the line to the require-dev object.

{
    "name": "akeneo/pim-community-standard",
    "description": "The \"Akeneo Community Standard Edition\" distribution",
    "license": "OSL-3.0",
    "type": "project",
    "authors": [
        {
            "name": "Akeneo",
            "homepage": "http://www.akeneo.com"
        }
    ],
    "autoload": {
        "psr-0": {
            "": "src/"
        },
        "psr-4": {
            "Pim\\Upgrade\\": "upgrades/"
        },
        "exclude-from-classmap": [
            "vendor/akeneo/pim-community-dev/src/Kernel.php"
        ]
    },
    "require": {
        "akeneo/pim-community-dev": "^7.0.0"
    },
    "require-dev": {
        "symfony/console": "5.4.34",
        "symfony/debug-bundle": "^5.4.0",
        "symfony/web-profiler-bundle": "^5.4.0"
    },
    "scripts": {
        "post-update-cmd": [
            "vendor/akeneo/pim-community-dev/std-build/install-required-files.sh"
        ],
        "post-install-cmd": [
            "vendor/akeneo/pim-community-dev/std-build/install-required-files.sh"
        ],
        "post-create-project-cmd": [
            "vendor/akeneo/pim-community-dev/std-build/install-required-files.sh"
        ]
    },
    "minimum-stability": "stable",
    "config": {
        "allow-plugins": {
            "symfony/flex": true
        }
    },
    "extra": {
        "symfony": {
            "require": "5.4.*"
        }
    }
}

@masmrlar
Copy link
Contributor Author

Hi @ETEML17 - in your projects composer.json

Just run composer require "symfony/console:5.4.34"

@ETEML17
Copy link

ETEML17 commented Feb 22, 2024

Thanks for your help @cypx and @masmrlar , for my need i added a task in my playbook with composer require "symfony/console:5.4.34" and it solved the issue :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants