From 6480feae8d6c3ad416d9c52ba234acba77cfcfc6 Mon Sep 17 00:00:00 2001 From: Mathieu Santostefano Date: Tue, 30 Jul 2024 14:53:49 +0200 Subject: [PATCH 1/2] fix(maker): Fix icon argument usage in UiElementMaker --- src/Maker/UiElementMaker.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Maker/UiElementMaker.php b/src/Maker/UiElementMaker.php index 30c4cffd..ff8c814b 100644 --- a/src/Maker/UiElementMaker.php +++ b/src/Maker/UiElementMaker.php @@ -39,7 +39,7 @@ public function configureCommand(Command $command, InputConfiguration $inputConf { $command ->addArgument('code', InputArgument::OPTIONAL, 'The code of the UI Element (e.g. my_ui_element)') - ->addArgument('icon', InputArgument::OPTIONAL, 'The semantic icon code for the UI Element (e.g. map pin)') + ->addArgument('icon', InputArgument::OPTIONAL, 'The semantic icon code for the UI Element (e.g. map pin)', 'square') ->addArgument('code_prefix', InputArgument::OPTIONAL, 'The code prefix for the UI Element (e.g. app)', 'app') ->setDescription('Creates a new UI Element FormType and templates') ; @@ -48,6 +48,7 @@ public function configureCommand(Command $command, InputConfiguration $inputConf public function generate(InputInterface $input, ConsoleStyle $io, Generator $generator): void { $code = $input->getArgument('code'); + $icon = $input->getArgument('icon'); $codePrefix = $input->getArgument('code_prefix'); Assert::string($code); $name = Str::asCamelCase($code); @@ -61,7 +62,7 @@ public function generate(InputInterface $input, ConsoleStyle $io, Generator $gen __DIR__ . '/../Resources/skeleton/UiElementFormType.tpl.php', [ 'code' => \sprintf('%s.%s', $codePrefix, $code), - 'icon' => 'map pin', + 'icon' => $icon, 'tags' => json_encode([]), ] ); From c4ce8a65a6594ecc5cb5458b7359bc4d57da4291 Mon Sep 17 00:00:00 2001 From: Mathieu Santostefano Date: Tue, 30 Jul 2024 15:03:05 +0200 Subject: [PATCH 2/2] ci(quality): Fix coding style --- composer.json | 2 +- phpstan.neon | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index 8f7adf09..c8f439ea 100644 --- a/composer.json +++ b/composer.json @@ -29,7 +29,7 @@ "assets:install %PUBLIC_DIR%": "symfony-cmd" }, "phpcs": "PHP_CS_FIXER_IGNORE_ENV=1 php-cs-fixer fix --using-cache=no", - "phpstan": "phpstan analyse -c phpstan.neon src/", + "phpstan": "phpstan analyse -c phpstan.neon", "phpmd": "phpmd --exclude Migrations/* src/ ansi phpmd.xml", "phpunit": "phpunit", "phpspec": "phpspec run" diff --git a/phpstan.neon b/phpstan.neon index fd292f38..c19c15ea 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -1,7 +1,7 @@ parameters: level: 8 paths: - - %rootDir%/src/ + - src/ excludePaths: # Makes PHPStan crash