Skip to content

[Question] Possible to use flex without adding recipes? #181

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
kbond opened this issue Oct 12, 2017 · 6 comments
Closed

[Question] Possible to use flex without adding recipes? #181

kbond opened this issue Oct 12, 2017 · 6 comments

Comments

@kbond
Copy link
Member

kbond commented Oct 12, 2017

I like the ability to use composer require and the auto-script feature but would like to disable the auto-installation of recipes. I see I can disable contrib recipes but what about official recipes?

@fabpot
Copy link
Member

fabpot commented Oct 12, 2017

No, it's not possible. The auto-scripts feature is a Composer feature. For composer require, I suppose you like aliases? Or is it something else?

@kbond
Copy link
Member Author

kbond commented Oct 12, 2017

I see. I really like the "expand command" feature:

    "scripts": {
        "auto-scripts": {
            "make cache-warmup": "script",
            "assets:install --symlink --relative %PUBLIC_DIR%": "symfony-cmd"
        },
        "post-install-cmd": [
            "@auto-scripts"
        ],
        "post-update-cmd": [
            "@auto-scripts"
        ]
    },

(

private function expandCmd(string $type, string $cmd)
{
switch ($type) {
case 'symfony-cmd':
return $this->expandSymfonyCmd($cmd);
case 'php-script':
return $this->expandPhpScript($cmd);
case 'script':
return $cmd;
default:
throw new \InvalidArgumentException(sprintf('Command type "%s" is not valid.', $type));
}
)

@fabpot
Copy link
Member

fabpot commented Oct 12, 2017

This snippet is really just regular Composer, except for the way we describe auto-scripts where we can tell Flex that this is a script or a Symfony command. Nothing big though. Anyway, being able to disable recipes would mean disabling the main purpose of Flex. So, probably not something I willing to do.

@kbond
Copy link
Member Author

kbond commented Oct 12, 2017

Ok, no biggie, thanks!

@teohhanhui
Copy link

teohhanhui commented Nov 5, 2018

@fabpot Would you reconsider your stance on adding a way to disable recipes, now that Symfony Flex is presented also as a way to speed up composer resolving of Symfony packages? #378

So I think it'd also be very useful for projects that are not (yet?) using the Symfony Flex directory structure.

@prisis
Copy link

prisis commented Nov 7, 2018

hope is fine if i can show a alternative to flex without the recipes part https://github.com/narrowspark/automatic it has the same features like flex

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