From a692ee2e1b8a5b7d2dc91d952c1e48275a9cdbee Mon Sep 17 00:00:00 2001 From: Ly Date: Sun, 11 Feb 2024 14:48:51 +0100 Subject: [PATCH] Update stuff --- .php-cs-fixer.dist.php | 72 ++++++++++++++------------------- composer.json | 70 +++++++++++++++----------------- docker/build/php-fpm/Dockerfile | 2 +- docker/dev/php/Dockerfile | 2 +- 4 files changed, 66 insertions(+), 80 deletions(-) diff --git a/.php-cs-fixer.dist.php b/.php-cs-fixer.dist.php index 2b9f681..188b59a 100644 --- a/.php-cs-fixer.dist.php +++ b/.php-cs-fixer.dist.php @@ -17,49 +17,39 @@ return (new PhpCsFixer\Config()) ->setRules([ - '@PSR2' => true, - 'array_syntax' => ['syntax' => 'short'], - 'no_superfluous_phpdoc_tags' => false, - 'ternary_to_null_coalescing' => true, - 'no_useless_else' => true, - 'no_useless_return' => true, + '@Symfony' => true, + 'blank_line_before_statement' => [ + 'statements' => [ + 'declare', + 'return', + 'throw', + 'try', + 'if', + 'for', + 'while', + 'foreach', + ], + ], + 'cast_spaces' => ['space' => 'none'], + 'constant_case' => ['case' => 'lower'], 'method_argument_space' => ['on_multiline' => 'ensure_fully_multiline'], + 'phpdoc_align' => false, 'single_line_throw' => false, - 'yoda_style' => true, - 'trailing_comma_in_multiline' => ['elements' => ['arrays']], - 'array_indentation' => true, - 'no_unused_imports' => true, - 'ordered_imports' => ['sort_algorithm' => 'alpha'], - 'single_line_after_imports' => true, - 'single_import_per_statement' => true, - 'blank_line_after_opening_tag' => true, - 'compact_nullable_typehint' => true, - 'clean_namespace' => true, - 'cast_spaces' => ['space' => 'single'], - 'constant_case' => ['case' => 'lower'], - 'full_opening_tag' => true, - 'indentation_type' => true, - 'lowercase_cast' => true, - 'native_function_casing' => true, - 'no_alternative_syntax' => true, - 'new_with_braces' => true, - 'no_empty_statement' => true, - 'no_blank_lines_after_phpdoc' => true, - 'no_closing_tag' => true, - 'no_short_bool_cast' => true, - 'no_trailing_whitespace' => true, - 'no_unset_cast' => true, - 'phpdoc_align' => ['align' => 'left'], - 'phpdoc_indent' => true, - 'phpdoc_annotation_without_dot' => true, - 'phpdoc_trim' => true, - 'single_blank_line_at_eof' => true, - 'short_scalar_cast' => true, - 'single_class_element_per_statement' => true, - 'return_type_declaration' => ['space_before' => 'none'], - 'visibility_required' => true, - 'PedroTroller/line_break_between_method_arguments' => ['max-args' => false, 'max-length' => 1, 'automatic-argument-merge' => false], - 'blank_line_before_statement' => true, + 'phpdoc_to_comment' => false, + 'phpdoc_types_order' => false, + 'phpdoc_scalar' => false, + 'phpdoc_types' => false, + 'increment_style' => false, + 'ordered_class_elements' => true, + 'nullable_type_declaration_for_default_null_value' => false, + 'nullable_type_declaration' => ['syntax' => 'union'], + 'ordered_types' => ['sort_algorithm' => 'none', 'null_adjustment' => 'always_last'], + 'PedroTroller/line_break_between_method_arguments' => [ + 'max-args' => false, + 'max-length' => 1, + 'automatic-argument-merge' => false, + 'inline-attributes' => true, + ], ]) ->setFinder($finder) ->registerCustomFixers(new PedroTroller\CS\Fixer\Fixers()) diff --git a/composer.json b/composer.json index e8a605c..4f2453d 100644 --- a/composer.json +++ b/composer.json @@ -4,47 +4,43 @@ "minimum-stability": "dev", "prefer-stable": true, "require": { - "php": "^8.1", + "php": "^8.3", "ext-ctype": "*", "ext-iconv": "*", "ext-simplexml": "*", "ext-mbstring": "*", - "composer/package-versions-deprecated": "1.11.99.4", - "doctrine/annotations": "^1.0", "doctrine/doctrine-bundle": "^2.5", "doctrine/doctrine-migrations-bundle": "^3.2", "doctrine/orm": "^2.10", "easycorp/easyadmin-bundle": "^4.0", - "phpdocumentor/reflection-docblock": "^5.3", - "sensio/framework-extra-bundle": "^6.2", - "symfony/asset": "5.4.*", - "symfony/console": "5.4.*", - "symfony/dotenv": "5.4.*", - "symfony/expression-language": "5.4.*", + "symfony/asset": "7.0.*", + "symfony/console": "7.0.*", + "symfony/dotenv": "7.0.*", + "symfony/expression-language": "7.0.*", "symfony/flex": "^1.17", - "symfony/form": "5.4.*", - "symfony/framework-bundle": "5.4.*", - "symfony/http-client": "5.4.*", - "symfony/intl": "5.4.*", - "symfony/mailer": "5.4.*", - "symfony/mime": "5.4.*", + "symfony/form": "7.0.*", + "symfony/framework-bundle": "7.0.*", + "symfony/http-client": "7.0.*", + "symfony/intl": "7.0.*", + "symfony/mailer": "7.0.*", + "symfony/mime": "7.0.*", "symfony/monolog-bundle": "^3.1", - "symfony/notifier": "5.4.*", - "symfony/process": "5.4.*", - "symfony/property-access": "5.4.*", - "symfony/property-info": "5.4.*", - "symfony/proxy-manager-bridge": "5.4.*", - "symfony/runtime": "5.4.*", - "symfony/security-bundle": "5.4.*", - "symfony/serializer": "5.4.*", - "symfony/string": "5.4.*", - "symfony/translation": "5.4.*", - "symfony/twig-bundle": "5.4.*", - "symfony/validator": "5.4.*", - "symfony/web-link": "5.4.*", - "symfony/yaml": "5.4.*", - "twig/extra-bundle": "^2.12|^3.0", - "twig/twig": "^2.12|^3.0" + "symfony/notifier": "7.0.*", + "symfony/process": "7.0.*", + "symfony/property-access": "7.0.*", + "symfony/property-info": "7.0.*", + "symfony/proxy-manager-bridge": "7.0.*", + "symfony/runtime": "7.0.*", + "symfony/security-bundle": "7.0.*", + "symfony/serializer": "7.0.*", + "symfony/string": "7.0.*", + "symfony/translation": "7.0.*", + "symfony/twig-bundle": "7.0.*", + "symfony/validator": "7.0.*", + "symfony/web-link": "7.0.*", + "symfony/yaml": "7.0.*", + "twig/extra-bundle": "^3.0", + "twig/twig": "^3.0" }, "require-dev": { "friendsofphp/php-cs-fixer": "^3", @@ -52,13 +48,13 @@ "phpstan/phpstan": "^1.2", "phpunit/phpunit": "^9.5", "psalm/plugin-symfony": "^2.5.1", - "symfony/browser-kit": "5.4.*", - "symfony/css-selector": "5.4.*", - "symfony/debug-bundle": "5.4.*", + "symfony/browser-kit": "7.0.*", + "symfony/css-selector": "7.0.*", + "symfony/debug-bundle": "7.0.*", "symfony/maker-bundle": "^1.0", "symfony/phpunit-bridge": "^5.3", - "symfony/stopwatch": "5.4.*", - "symfony/web-profiler-bundle": "5.4.*", + "symfony/stopwatch": "7.0.*", + "symfony/web-profiler-bundle": "7.0.*", "vimeo/psalm": "^4.13.1", "weirdan/doctrine-psalm-plugin": "^1.1.0" }, @@ -114,7 +110,7 @@ "extra": { "symfony": { "allow-contrib": false, - "require": "5.4.*" + "require": "7.0.*" } } } diff --git a/docker/build/php-fpm/Dockerfile b/docker/build/php-fpm/Dockerfile index 2c3eff7..7b15d06 100644 --- a/docker/build/php-fpm/Dockerfile +++ b/docker/build/php-fpm/Dockerfile @@ -1,4 +1,4 @@ -FROM php:8.1-fpm-alpine3.15 +FROM php:8.3-fpm-alpine # dependencies RUN apk update diff --git a/docker/dev/php/Dockerfile b/docker/dev/php/Dockerfile index dab2342..05f5842 100644 --- a/docker/dev/php/Dockerfile +++ b/docker/dev/php/Dockerfile @@ -1,4 +1,4 @@ -FROM php:8.1.1-fpm-alpine3.15 +FROM php:8.3-fpm-alpine # dependencies RUN apk update