0

I know it's possible to include simple CLI scripts into Composer's scripts/scripts-descriptions list.
It's also possible to point static methods or functions to be executed as Composer scripts.

I know, under the hood, it uses the Symfony Console library.

Thus, is there any chance it's possible to include custom Symfony Console scripts into the main list of scripts a project uses, besides writing WET code and repeating all scripts and descriptions into composer.json?

Note: this is not a Symfony question, it's a Composer question - which indeed uses Symfony Console, but it's not related to the framework as a whole. It's custom Command subclasses which I want to add to composer.json without repetitive descriptions and commands.

8
  • Does this answer your question? Symfony 4 Composer scripts Commented Oct 18, 2022 at 6:47
  • Nice try! But not really. That seems to be Symfony-specific, I'm looking for a pure solution, based only in Composer (and it's usage of Symfony Console, but not through the Symfony framework as a whole). Commented Oct 18, 2022 at 19:59
  • Please add all clarification to your question by editing it. Which kind of scripts do you refer to then? Commented Oct 19, 2022 at 5:35
  • I wrote a couple of scripts with Symfony Console. Then, I want to see them mixed with what composer list shows and runs, just like scripts defined under the scripts key in composer.json. Thus... Symfony Console commands integrated into composer package scripts. First I mentioned the composer scripts, then usage of Symfony Console. I thought the association was clear enough. Commented Oct 20, 2022 at 1:07
  • Please add all clarification to your question by editing it. Don't use the comment section for that Commented Oct 20, 2022 at 6:19

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.