symandy / makefile-maker-bundle
Generate Makefile for Symfony application
Installs: 2 646
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 0
Open Issues: 1
Type:symfony-bundle
Requires
- php: >=7.4
- symfony/maker-bundle: ^1.36
- symfony/process: ^5.4|^6.0
Requires (Dev)
- phpstan/phpstan: ^1.2
- phpunit/phpunit: ^9.5
- symfony/phpunit-bridge: ^6.0
README
Introduction
Symandy Makefile Maker is a Symfony bundle used to generate a Makefile containing Symfony commands shortcuts for a project
This bundle includes some basics commands (Symfony, Doctrine, Composer and more) but project commands can be added to this file.
Installation
composer require --dev symandy/makefile-maker-bundle
If you are not using Symfony Flex, add the following lines to config/bundles.php
<?php return [ ... Symandy\MakefileMakerBundle\SymandyMakefileMakerBundle::class => ['dev' => true, 'test' => true], ... ];
Configuration
You can dump the full configuration by running the following command
php bin/console config:dump-reference SymandyMakefileMakerBundle
You can add symandy_makefile_maker.yaml
file under config/packages
directory to add additional commands to your Makefile.
symandy_makefile_maker: groups: your_project: commands: hello: name: hello description: Say hello instructions: - executable: symfony_console name: app:hello arguments: [John] options: - { key: last-name, value: Doe }
This configuration will output the following Makefile:
SYMFONY_CONSOLE = /usr/local/bin/symfony console
...
hello: ## Say hello
@SYMFONY_CONSOLE app:hello John --last-name Doe
Full configuration can be dumped using:
php bin/console debug:config SymandyMakefileMakerBundle
Usage
You can now run this command by running:
make hello
instead of:
symfony console app:hello John --last-name Doe
Note
The only purpose of this bundle is to generate a Makefile for a Symfony project. It can be removed if the Makefile won't be updated during development using:
composer remove --dev symandy/makefile-maker-bundle