From 2b2f13eccf531843bdc8dff5ef6ead8e67bf91e8 Mon Sep 17 00:00:00 2001 From: "David T. Sadler" Date: Thu, 3 Sep 2026 16:32:10 +0100 Subject: Update PHP to 8.5 --- .php-cs-fixer.dist.php | 40 +++++++++++++++++++++++++++++++--------- shell.nix | 13 ++++++++----- 2 files changed, 39 insertions(+), 14 deletions(-) diff --git a/.php-cs-fixer.dist.php b/.php-cs-fixer.dist.php index 6e89bee..45421de 100644 --- a/.php-cs-fixer.dist.php +++ b/.php-cs-fixer.dist.php @@ -1,18 +1,40 @@ in(__DIR__); +use PhpCsFixer\Config; +use PhpCsFixer\Finder; -return (new PhpCsFixer\Config()) +$finder = Finder::create() + ->in([ + __DIR__ . '/src', + __DIR__ . '/tests', + __DIR__ . '/public', + ]) + ->name('*.php') + ->ignoreDotFiles(true) + ->ignoreVCS(true); + +return (new Config()) ->setRules([ '@PSR12' => true, -# 'strict_param' => true, + 'declare_strict_types' => true, 'array_syntax' => ['syntax' => 'short'], -# 'declare_strict_types' => true, + 'single_quote' => true, + 'ordered_imports' => ['sort_algorithm' => 'alpha'], + 'no_unused_imports' => true, + 'trailing_comma_in_multiline' => [ + 'elements' => ['arrays', 'arguments', 'parameters'], + ], + 'no_superfluous_phpdoc_tags' => [ + 'remove_inheritdoc' => true, + 'allow_mixed' => true, + ], + 'strict_param' => true, + 'method_argument_space' => [ + 'on_multiline' => 'ensure_fully_multiline', + ], + 'type_declaration_spaces' => true, ]) + ->setRiskyAllowed(true) ->setFinder($finder); diff --git a/shell.nix b/shell.nix index a57f451..dda417d 100644 --- a/shell.nix +++ b/shell.nix @@ -1,13 +1,16 @@ let nixpkgs = fetchTarball "https://github.com/NixOS/nixpkgs/tarball/nixos-unstable"; - pkgs = import nixpkgs { config = {}; overlays = []; }; + pkgs = import nixpkgs { + config = { }; + overlays = [ ]; + }; in pkgs.mkShellNoCC { packages = with pkgs; [ - php84 - php84Packages.composer - php84Packages.php-cs-fixer - php84Packages.php-codesniffer + php85 + php85Packages.composer + php85Packages.php-cs-fixer + php85Packages.php-codesniffer ]; } -- cgit v1.2.3-13-gbd6f