Skip to content

Missed post-install-cmd/post-update-cmd section in composer.json? #842

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

Closed
atamansv opened this issue Aug 8, 2018 · 5 comments
Closed

Missed post-install-cmd/post-update-cmd section in composer.json? #842

atamansv opened this issue Aug 8, 2018 · 5 comments

Comments

@atamansv
Copy link
Contributor

atamansv commented Aug 8, 2018

It seems that lack the section post-install-cmd/post-update-cmd under scripts in composer.json
Now:

    "scripts": {
        "auto-scripts": {
            "cache:clear": "symfony-cmd",
            "assets:install --symlink --relative %PUBLIC_DIR%": "symfony-cmd",
            "security-checker security:check": "script"
        }
    }

Referring to symfony/website-skeleton it shold be:

    "scripts": {
        "auto-scripts": {
            "cache:clear": "symfony-cmd",
            "assets:install --symlink --relative %PUBLIC_DIR%": "symfony-cmd",
            "security-checker security:check": "script"
        },
        "post-install-cmd": [
            "@auto-scripts"
        ],
        "post-update-cmd": [
            "@auto-scripts"
        ]
    }

Or they were supposed to be started manually via composer run-script auto-scripts?

@yceruto
Copy link
Member

yceruto commented Aug 8, 2018

It was probably forgotten in #617 (372ddae#diff-b5d0ee8c97c7abd7e3fa29b9a27d1780) do you like to fix that?

@yceruto
Copy link
Member

yceruto commented Aug 8, 2018

Although, for Flex apps it should work as is https://github.com/symfony/recipes#composer-scripts-configurator (typo composer-scripts -> auto-scripts according to https://github.com/symfony/flex/blob/fabf04baa532b8068558d1e54a9358ef26814449/src/Flex.php#L706) though composer doc doesn't mention anything about this auto-scripts event. So I guess it's currently being ignored.

@yceruto
Copy link
Member

yceruto commented Aug 8, 2018

Probably that's why the actual symfony/skeleton defines these scripts https://github.com/symfony/skeleton/blob/d086c3e874742a6039a6291e08d86fac8e681893/composer.json#L46-L51

yceruto added a commit to yceruto/recipes that referenced this issue Aug 8, 2018
@atamansv
Copy link
Contributor Author

atamansv commented Aug 9, 2018

Completely confused
http://fabien.potencier.org/symfony4-workflow-automation.html#composer-scripts
This article describes both variant, not quite clear what should be used

@atamansv
Copy link
Contributor Author

atamansv commented Aug 9, 2018

I tryed rename auto-scripts to composer-scripts without post-install-cmd/post-update-cmd section section and it did not work.
For now scripts executed only with clearly specifed additional section.
Besides it seems less magic when clearly specifed, in my opinion

javiereguiluz added a commit that referenced this issue Aug 10, 2018
This PR was merged into the master branch.

Discussion
----------

Adding missed post-install-cmd script section

Adding missed post-install-cmd/post-update-cmd under script section in composer.json
Fixes #842

Commits
-------

92625a2 Adding missed post-install-cmd script section
markovlatkovic pushed a commit to markovlatkovic/recipes that referenced this issue May 24, 2024
markovlatkovic pushed a commit to markovlatkovic/recipes that referenced this issue May 24, 2024
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

2 participants