From 9c04d9decdd0db9cf40568d6033349a3bb575441 Mon Sep 17 00:00:00 2001 From: COil Date: Thu, 21 Nov 2024 18:27:00 +0100 Subject: [PATCH] feat: twig-cs-fixer --- .gitignore | 4 + Makefile | 10 +- castor.php | 24 +- composer.json | 3 +- composer.lock | 279 +++++++++++++----- symfony.lock | 9 + templates/App/Controller/FormAction.html.twig | 2 +- .../App/Controller/StimulusAction.html.twig | 2 +- templates/_form.html.twig | 4 +- templates/base.html.twig | 4 +- vendor-bin/php-cs-fixer/composer.lock | 48 +-- 11 files changed, 282 insertions(+), 107 deletions(-) diff --git a/.gitignore b/.gitignore index b0de3ae..f1694b8 100644 --- a/.gitignore +++ b/.gitignore @@ -30,3 +30,7 @@ .phpunit.result.cache .phpunit.cache ###< phpunit/phpunit ### + +###> vincentlanglet/twig-cs-fixer ### +/.twig-cs-fixer.cache +###< vincentlanglet/twig-cs-fixer ### diff --git a/Makefile b/Makefile index 82acfa1..0fa4da5 100644 --- a/Makefile +++ b/Makefile @@ -71,14 +71,20 @@ lint-container: ## Lint the Symfony DI container lint-twig: ## Lint Twig files @bin/console lint:twig templates/ +lint-twig-cs-fixer: ## Lint Twig files with Twig CS Fixer + @vendor/bin/twig-cs-fixer lint ./templates + +fix-twig-cs-fixer: ## Fix Twig files with Twig CS Fixer + @vendor/bin/twig-cs-fixer lint --fix ./templates + lint-yaml: ## Lint YAML files @bin/console lint:yaml --parse-tags config/ fix: ## Run all fixers -fix: fix-php +fix: fix-php fix-twig-cs-fixer lint: ## Run all linters -lint: stan lint-php lint-container lint-twig lint-yaml +lint: stan lint-php lint-container lint-twig lint-twig-cs-fixer lint-yaml ci: ## Run CI locally ci: coverage warmup lint diff --git a/castor.php b/castor.php index fb7bc5d..1fe8410 100644 --- a/castor.php +++ b/castor.php @@ -184,9 +184,10 @@ function fix_all(): int { title('fix:all'); $ec1 = fix_php(); + $ec2 = fix_twig_cs_fixer(); io()->newLine(); - return success($ec1); + return success($ec1 + $ec2); } #[AsTask(name: 'container', namespace: 'lint', description: 'Lint the Symfony DI container', aliases: ['lint-container'])] function lint_container(): int @@ -204,6 +205,22 @@ function lint_twig(): int return exit_code('bin/console lint:twig templates/'); } +#[AsTask(name: 'twig-cs-fixer', namespace: 'lint', description: 'Lint Twig files', aliases: ['lint-twig-cs-fixer'])] +function lint_twig_cs_fixer(): int +{ + title('lint:twig-cs-fixer'); + + return exit_code('vendor/bin/twig-cs-fixer lint --fix ./templates'); +} + +#[AsTask(name: 'fix-twig-cs-fixer', namespace: 'fix', description: 'Fix Twig files', aliases: ['fix-twig-cs-fixer'])] +function fix_twig_cs_fixer(): int +{ + title('fix:twig-cs-fixer'); + + return exit_code('vendor/bin/twig-cs-fixer lint --fix ./templates'); +} + #[AsTask(name: 'yaml', namespace: 'lint', description: 'Lint Yaml files', aliases: ['lint-yaml'])] function lint_yaml(): int { @@ -220,9 +237,10 @@ function lint_all(): int $ec2 = lint_php(); $ec3 = lint_container(); $ec4 = lint_twig(); - $ec5 = lint_yaml(); + $ec5 = lint_twig_cs_fixer(); + $ec6 = lint_yaml(); - return success($ec1 + $ec2 + $ec3 + $ec4 + $ec5); + return success($ec1 + $ec2 + $ec3 + $ec4 + $ec5 + $ec6); // if you want to speed up the process, you can run these commands in parallel // parallel( diff --git a/composer.json b/composer.json index 9134ea5..ccc38c2 100644 --- a/composer.json +++ b/composer.json @@ -59,7 +59,8 @@ "symfony/maker-bundle": "^1.61", "symfony/requirements-checker": "^2.0", "symfony/stopwatch": "~7.2.0", - "symfony/web-profiler-bundle": "~7.2.0" + "symfony/web-profiler-bundle": "~7.2.0", + "vincentlanglet/twig-cs-fixer": "^3.3" }, "replace": { "symfony/polyfill-ctype": "*", diff --git a/composer.lock b/composer.lock index 9ce6387..9e2198e 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "7806fc97730ded16b7b7cb9fce553964", + "content-hash": "3dd63621065a4fa80a5c15ce23ae1de0", "packages": [ { "name": "composer/semver", @@ -861,7 +861,7 @@ }, { "name": "symfony/asset", - "version": "v7.2.0-RC1", + "version": "v7.2.0", "source": { "type": "git", "url": "https://github.com/symfony/asset.git", @@ -910,7 +910,7 @@ "description": "Manages URL generation and versioning of web assets such as CSS stylesheets, JavaScript files and image files", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/asset/tree/v7.2.0-RC1" + "source": "https://github.com/symfony/asset/tree/v7.2.0" }, "funding": [ { @@ -1183,7 +1183,7 @@ }, { "name": "symfony/config", - "version": "v7.2.0-RC1", + "version": "v7.2.0", "source": { "type": "git", "url": "https://github.com/symfony/config.git", @@ -1238,7 +1238,7 @@ "description": "Helps you find, load, combine, autofill and validate configuration values of any kind", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/config/tree/v7.2.0-RC1" + "source": "https://github.com/symfony/config/tree/v7.2.0" }, "funding": [ { @@ -1258,7 +1258,7 @@ }, { "name": "symfony/console", - "version": "v7.2.0-RC1", + "version": "v7.2.0", "source": { "type": "git", "url": "https://github.com/symfony/console.git", @@ -1331,7 +1331,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v7.2.0-RC1" + "source": "https://github.com/symfony/console/tree/v7.2.0" }, "funding": [ { @@ -1351,16 +1351,16 @@ }, { "name": "symfony/dependency-injection", - "version": "v7.2.0-RC1", + "version": "v7.2.0", "source": { "type": "git", "url": "https://github.com/symfony/dependency-injection.git", - "reference": "5f5dbbaf5193a4fa46b9b699beca14dc9818a53a" + "reference": "a475747af1a1c98272a5471abc35f3da81197c5d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/5f5dbbaf5193a4fa46b9b699beca14dc9818a53a", - "reference": "5f5dbbaf5193a4fa46b9b699beca14dc9818a53a", + "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/a475747af1a1c98272a5471abc35f3da81197c5d", + "reference": "a475747af1a1c98272a5471abc35f3da81197c5d", "shasum": "" }, "require": { @@ -1411,7 +1411,7 @@ "description": "Allows you to standardize and centralize the way objects are constructed in your application", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/dependency-injection/tree/v7.2.0-RC1" + "source": "https://github.com/symfony/dependency-injection/tree/v7.2.0" }, "funding": [ { @@ -1427,7 +1427,7 @@ "type": "tidelift" } ], - "time": "2024-11-09T09:29:03+00:00" + "time": "2024-11-25T15:45:00+00:00" }, { "name": "symfony/deprecation-contracts", @@ -1498,16 +1498,16 @@ }, { "name": "symfony/dotenv", - "version": "v7.2.0-RC1", + "version": "v7.2.0", "source": { "type": "git", "url": "https://github.com/symfony/dotenv.git", - "reference": "07b2c58767aadc8ed96b26fadc513a0d00ccd084" + "reference": "28347a897771d0c28e99b75166dd2689099f3045" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/dotenv/zipball/07b2c58767aadc8ed96b26fadc513a0d00ccd084", - "reference": "07b2c58767aadc8ed96b26fadc513a0d00ccd084", + "url": "https://api.github.com/repos/symfony/dotenv/zipball/28347a897771d0c28e99b75166dd2689099f3045", + "reference": "28347a897771d0c28e99b75166dd2689099f3045", "shasum": "" }, "require": { @@ -1552,7 +1552,7 @@ "environment" ], "support": { - "source": "https://github.com/symfony/dotenv/tree/v7.2.0-RC1" + "source": "https://github.com/symfony/dotenv/tree/v7.2.0" }, "funding": [ { @@ -1568,11 +1568,11 @@ "type": "tidelift" } ], - "time": "2024-09-28T12:51:41+00:00" + "time": "2024-11-27T11:18:42+00:00" }, { "name": "symfony/error-handler", - "version": "v7.2.0-RC1", + "version": "v7.2.0", "source": { "type": "git", "url": "https://github.com/symfony/error-handler.git", @@ -1627,7 +1627,7 @@ "description": "Provides tools to manage errors and ease debugging PHP code", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/error-handler/tree/v7.2.0-RC1" + "source": "https://github.com/symfony/error-handler/tree/v7.2.0" }, "funding": [ { @@ -1647,7 +1647,7 @@ }, { "name": "symfony/event-dispatcher", - "version": "v7.2.0-RC1", + "version": "v7.2.0", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", @@ -1707,7 +1707,7 @@ "description": "Provides tools that allow your application components to communicate with each other by dispatching events and listening to them", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/event-dispatcher/tree/v7.2.0-RC1" + "source": "https://github.com/symfony/event-dispatcher/tree/v7.2.0" }, "funding": [ { @@ -1869,7 +1869,7 @@ }, { "name": "symfony/finder", - "version": "v7.2.0-RC1", + "version": "v7.2.0", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", @@ -1913,7 +1913,7 @@ "description": "Finds files and directories via an intuitive fluent interface", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/finder/tree/v7.2.0-RC1" + "source": "https://github.com/symfony/finder/tree/v7.2.0" }, "funding": [ { @@ -2001,16 +2001,16 @@ }, { "name": "symfony/form", - "version": "v7.2.0-RC1", + "version": "v7.2.0", "source": { "type": "git", "url": "https://github.com/symfony/form.git", - "reference": "73c00ef4ced12b43647a37c184f05650c636a539" + "reference": "264cff30f52f12149aff92bbc23e78160a45c2f3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/form/zipball/73c00ef4ced12b43647a37c184f05650c636a539", - "reference": "73c00ef4ced12b43647a37c184f05650c636a539", + "url": "https://api.github.com/repos/symfony/form/zipball/264cff30f52f12149aff92bbc23e78160a45c2f3", + "reference": "264cff30f52f12149aff92bbc23e78160a45c2f3", "shasum": "" }, "require": { @@ -2078,7 +2078,7 @@ "description": "Allows to easily create, process and reuse HTML forms", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/form/tree/v7.2.0-RC1" + "source": "https://github.com/symfony/form/tree/v7.2.0" }, "funding": [ { @@ -2094,20 +2094,20 @@ "type": "tidelift" } ], - "time": "2024-10-23T06:56:12+00:00" + "time": "2024-11-27T11:55:00+00:00" }, { "name": "symfony/framework-bundle", - "version": "v7.2.0-RC1", + "version": "v7.2.0", "source": { "type": "git", "url": "https://github.com/symfony/framework-bundle.git", - "reference": "2b2f30eecc548d1fc74d72f05e5a63b00e72c461" + "reference": "a8d0da4110fe643ab3cde7c938a03e222fe787c6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/framework-bundle/zipball/2b2f30eecc548d1fc74d72f05e5a63b00e72c461", - "reference": "2b2f30eecc548d1fc74d72f05e5a63b00e72c461", + "url": "https://api.github.com/repos/symfony/framework-bundle/zipball/a8d0da4110fe643ab3cde7c938a03e222fe787c6", + "reference": "a8d0da4110fe643ab3cde7c938a03e222fe787c6", "shasum": "" }, "require": { @@ -2193,7 +2193,7 @@ "symfony/string": "^6.4|^7.0", "symfony/translation": "^6.4|^7.0", "symfony/twig-bundle": "^6.4|^7.0", - "symfony/type-info": "^7.2", + "symfony/type-info": "^7.1", "symfony/uid": "^6.4|^7.0", "symfony/validator": "^6.4|^7.0", "symfony/web-link": "^6.4|^7.0", @@ -2228,7 +2228,7 @@ "description": "Provides a tight integration between Symfony components and the Symfony full-stack framework", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/framework-bundle/tree/v7.2.0-RC1" + "source": "https://github.com/symfony/framework-bundle/tree/v7.2.0" }, "funding": [ { @@ -2244,7 +2244,7 @@ "type": "tidelift" } ], - "time": "2024-11-13T14:27:59+00:00" + "time": "2024-11-20T16:27:35+00:00" }, { "name": "symfony/http-client", @@ -2421,16 +2421,16 @@ }, { "name": "symfony/http-foundation", - "version": "v7.2.0-RC1", + "version": "v7.2.0", "source": { "type": "git", "url": "https://github.com/symfony/http-foundation.git", - "reference": "b77b5a8295ea945ae6f4f91adc5204a2405cc579" + "reference": "e88a66c3997859532bc2ddd6dd8f35aba2711744" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/b77b5a8295ea945ae6f4f91adc5204a2405cc579", - "reference": "b77b5a8295ea945ae6f4f91adc5204a2405cc579", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/e88a66c3997859532bc2ddd6dd8f35aba2711744", + "reference": "e88a66c3997859532bc2ddd6dd8f35aba2711744", "shasum": "" }, "require": { @@ -2479,7 +2479,7 @@ "description": "Defines an object-oriented layer for the HTTP specification", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-foundation/tree/v7.2.0-RC1" + "source": "https://github.com/symfony/http-foundation/tree/v7.2.0" }, "funding": [ { @@ -2495,7 +2495,7 @@ "type": "tidelift" } ], - "time": "2024-11-09T09:29:03+00:00" + "time": "2024-11-13T18:58:46+00:00" }, { "name": "symfony/http-kernel", @@ -2699,7 +2699,7 @@ }, { "name": "symfony/monolog-bridge", - "version": "v7.2.0-RC1", + "version": "v7.2.0", "source": { "type": "git", "url": "https://github.com/symfony/monolog-bridge.git", @@ -2757,7 +2757,7 @@ "description": "Provides integration for Monolog with various Symfony components", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/monolog-bridge/tree/v7.2.0-RC1" + "source": "https://github.com/symfony/monolog-bridge/tree/v7.2.0" }, "funding": [ { @@ -3472,28 +3472,27 @@ }, { "name": "symfony/property-info", - "version": "v7.2.0-RC1", + "version": "v7.2.0", "source": { "type": "git", "url": "https://github.com/symfony/property-info.git", - "reference": "c33697d80ef5efa8aa8e6a43e36a8a22fec44d3f" + "reference": "b00580d9d7c9654e1df95df85105d0da67418b3f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/property-info/zipball/c33697d80ef5efa8aa8e6a43e36a8a22fec44d3f", - "reference": "c33697d80ef5efa8aa8e6a43e36a8a22fec44d3f", + "url": "https://api.github.com/repos/symfony/property-info/zipball/b00580d9d7c9654e1df95df85105d0da67418b3f", + "reference": "b00580d9d7c9654e1df95df85105d0da67418b3f", "shasum": "" }, "require": { "php": ">=8.2", "symfony/string": "^6.4|^7.0", - "symfony/type-info": "^7.2" + "symfony/type-info": "^7.1" }, "conflict": { "phpdocumentor/reflection-docblock": "<5.2", "phpdocumentor/type-resolver": "<1.5.1", - "symfony/dependency-injection": "<6.4", - "symfony/serializer": "<6.4" + "symfony/dependency-injection": "<6.4" }, "require-dev": { "phpdocumentor/reflection-docblock": "^5.2", @@ -3536,7 +3535,7 @@ "validator" ], "support": { - "source": "https://github.com/symfony/property-info/tree/v7.2.0-RC1" + "source": "https://github.com/symfony/property-info/tree/v7.2.0" }, "funding": [ { @@ -3552,7 +3551,7 @@ "type": "tidelift" } ], - "time": "2024-11-13T14:30:29+00:00" + "time": "2024-11-27T09:50:52+00:00" }, { "name": "symfony/routing", @@ -3637,7 +3636,7 @@ }, { "name": "symfony/runtime", - "version": "v7.2.0-RC1", + "version": "v7.2.0", "source": { "type": "git", "url": "https://github.com/symfony/runtime.git", @@ -3696,7 +3695,7 @@ "runtime" ], "support": { - "source": "https://github.com/symfony/runtime/tree/v7.2.0-RC1" + "source": "https://github.com/symfony/runtime/tree/v7.2.0" }, "funding": [ { @@ -4300,7 +4299,7 @@ }, { "name": "symfony/twig-bundle", - "version": "v7.2.0-RC1", + "version": "v7.2.0", "source": { "type": "git", "url": "https://github.com/symfony/twig-bundle.git", @@ -4364,7 +4363,7 @@ "description": "Provides a tight integration of Twig into the Symfony full-stack framework", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/twig-bundle/tree/v7.2.0-RC1" + "source": "https://github.com/symfony/twig-bundle/tree/v7.2.0" }, "funding": [ { @@ -4508,8 +4507,8 @@ "type": "symfony-bundle", "extra": { "thanks": { - "name": "symfony/ux", - "url": "https://github.com/symfony/ux" + "url": "https://github.com/symfony/ux", + "name": "symfony/ux" } }, "autoload": { @@ -4818,7 +4817,7 @@ }, { "name": "symfony/web-link", - "version": "v7.2.0-RC1", + "version": "v7.2.0", "source": { "type": "git", "url": "https://github.com/symfony/web-link.git", @@ -4881,7 +4880,7 @@ "push" ], "support": { - "source": "https://github.com/symfony/web-link/tree/v7.2.0-RC1" + "source": "https://github.com/symfony/web-link/tree/v7.2.0" }, "funding": [ { @@ -8086,7 +8085,7 @@ }, { "name": "symfony/css-selector", - "version": "v7.2.0-RC1", + "version": "v7.2.0", "source": { "type": "git", "url": "https://github.com/symfony/css-selector.git", @@ -8131,7 +8130,7 @@ "description": "Converts CSS selectors to XPath expressions", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/css-selector/tree/v7.2.0-RC1" + "source": "https://github.com/symfony/css-selector/tree/v7.2.0" }, "funding": [ { @@ -8151,16 +8150,16 @@ }, { "name": "symfony/dom-crawler", - "version": "v7.2.0-RC1", + "version": "v7.2.0", "source": { "type": "git", "url": "https://github.com/symfony/dom-crawler.git", - "reference": "3e838f9095f53f2b98287a361c1cdb68bbd3aa7b" + "reference": "b176e1f1f550ef44c94eb971bf92488de08f7c6b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/dom-crawler/zipball/3e838f9095f53f2b98287a361c1cdb68bbd3aa7b", - "reference": "3e838f9095f53f2b98287a361c1cdb68bbd3aa7b", + "url": "https://api.github.com/repos/symfony/dom-crawler/zipball/b176e1f1f550ef44c94eb971bf92488de08f7c6b", + "reference": "b176e1f1f550ef44c94eb971bf92488de08f7c6b", "shasum": "" }, "require": { @@ -8198,7 +8197,7 @@ "description": "Eases DOM navigation for HTML and XML documents", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/dom-crawler/tree/v7.2.0-RC1" + "source": "https://github.com/symfony/dom-crawler/tree/v7.2.0" }, "funding": [ { @@ -8214,7 +8213,7 @@ "type": "tidelift" } ], - "time": "2024-10-25T15:15:23+00:00" + "time": "2024-11-13T16:15:23+00:00" }, { "name": "symfony/maker-bundle", @@ -8623,6 +8622,144 @@ } ], "time": "2024-03-03T12:36:25+00:00" + }, + { + "name": "vincentlanglet/twig-cs-fixer", + "version": "3.3.1", + "source": { + "type": "git", + "url": "https://github.com/VincentLanglet/Twig-CS-Fixer.git", + "reference": "595fe48a3bf43282d21e6930e433d22014f9ecbd" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/VincentLanglet/Twig-CS-Fixer/zipball/595fe48a3bf43282d21e6930e433d22014f9ecbd", + "reference": "595fe48a3bf43282d21e6930e433d22014f9ecbd", + "shasum": "" + }, + "require": { + "composer-runtime-api": "^2.0.0", + "ext-ctype": "*", + "ext-json": "*", + "php": ">=8.0", + "symfony/console": "^5.4.9 || ^6.4 || ^7.0", + "symfony/filesystem": "^5.4 || ^6.4 || ^7.0", + "symfony/finder": "^5.4 || ^6.4 || ^7.0", + "symfony/string": "^5.4.42 || ^6.4.10 || ~7.0.10 || ^7.1.3", + "twig/twig": "^3.4", + "webmozart/assert": "^1.10" + }, + "require-dev": { + "composer/semver": "^3.2.0", + "dereuromark/composer-prefer-lowest": "^0.1.10", + "ergebnis/composer-normalize": "^2.29", + "friendsofphp/php-cs-fixer": "^3.13.0", + "infection/infection": "^0.26.16 || ^0.27.0", + "phpstan/phpstan": "^1.9.1", + "phpstan/phpstan-phpunit": "^1.2.2", + "phpstan/phpstan-strict-rules": "^1.4.4", + "phpstan/phpstan-symfony": "^1.2.16", + "phpstan/phpstan-webmozart-assert": "^1.2.2", + "phpunit/phpunit": "^9.5.26 || ^10.0.9", + "psalm/plugin-phpunit": "^0.18.4", + "psalm/plugin-symfony": "^5.0.0", + "rector/rector": "^1.0.0", + "shipmonk/composer-dependency-analyser": "^1.6", + "symfony/process": "^5.4 || ^6.4 || ^7.0", + "symfony/twig-bridge": "^5.4 || ^6.4 || ^7.0", + "symfony/ux-twig-component": "^2.2.0", + "twig/cache-extra": "^3.2", + "vimeo/psalm": "^5.2.0" + }, + "bin": [ + "bin/twig-cs-fixer" + ], + "type": "coding-standard", + "autoload": { + "psr-4": { + "TwigCsFixer\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Vincent Langlet" + } + ], + "description": "A tool to automatically fix Twig code style", + "homepage": "https://github.com/VincentLanglet/Twig-CS-Fixer", + "support": { + "issues": "https://github.com/VincentLanglet/Twig-CS-Fixer/issues", + "source": "https://github.com/VincentLanglet/Twig-CS-Fixer/tree/3.3.1" + }, + "funding": [ + { + "url": "https://github.com/VincentLanglet", + "type": "github" + } + ], + "time": "2024-11-06T16:21:28+00:00" + }, + { + "name": "webmozart/assert", + "version": "1.11.0", + "source": { + "type": "git", + "url": "https://github.com/webmozarts/assert.git", + "reference": "11cb2199493b2f8a3b53e7f19068fc6aac760991" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/webmozarts/assert/zipball/11cb2199493b2f8a3b53e7f19068fc6aac760991", + "reference": "11cb2199493b2f8a3b53e7f19068fc6aac760991", + "shasum": "" + }, + "require": { + "ext-ctype": "*", + "php": "^7.2 || ^8.0" + }, + "conflict": { + "phpstan/phpstan": "<0.12.20", + "vimeo/psalm": "<4.6.1 || 4.6.2" + }, + "require-dev": { + "phpunit/phpunit": "^8.5.13" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.10-dev" + } + }, + "autoload": { + "psr-4": { + "Webmozart\\Assert\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" + } + ], + "description": "Assertions to validate method input/output with nice error messages.", + "keywords": [ + "assert", + "check", + "validate" + ], + "support": { + "issues": "https://github.com/webmozarts/assert/issues", + "source": "https://github.com/webmozarts/assert/tree/1.11.0" + }, + "time": "2022-06-03T18:03:27+00:00" } ], "aliases": [], diff --git a/symfony.lock b/symfony.lock index 6f659c9..fc0e389 100644 --- a/symfony.lock +++ b/symfony.lock @@ -195,5 +195,14 @@ }, "twig/extra-bundle": { "version": "v3.5.1" + }, + "vincentlanglet/twig-cs-fixer": { + "version": "3.3", + "recipe": { + "repo": "github.com/symfony/recipes-contrib", + "branch": "main", + "version": "0.6", + "ref": "e4da12a48e8138479bd24a675321bcfd84950266" + } } } diff --git a/templates/App/Controller/FormAction.html.twig b/templates/App/Controller/FormAction.html.twig index 6601f31..0e7f94e 100644 --- a/templates/App/Controller/FormAction.html.twig +++ b/templates/App/Controller/FormAction.html.twig @@ -64,7 +64,7 @@
 Enter your information 🖋  - {{ form(form, {'attr': {'novalidate': 'novalidate'}}) }} + {{ form(form, {attr: {novalidate: 'novalidate'}}) }}
{% endif %} {% endblock %} diff --git a/templates/App/Controller/StimulusAction.html.twig b/templates/App/Controller/StimulusAction.html.twig index 8493028..265da87 100644 --- a/templates/App/Controller/StimulusAction.html.twig +++ b/templates/App/Controller/StimulusAction.html.twig @@ -64,7 +64,7 @@
-
+
\ No newline at end of file + {{ form(form, {attr: {novalidate: 'novalidate'}}) }} +
diff --git a/templates/base.html.twig b/templates/base.html.twig index 347d899..c38d701 100644 --- a/templates/base.html.twig +++ b/templates/base.html.twig @@ -24,7 +24,7 @@
- {# {{ brand }}{{ brand_html|raw }}#} + {# {{ brand }}{{ brand_html|raw }} #} {{ brand_html|raw }}
@@ -53,7 +53,7 @@