From 9070a95cbc13aba95aca61daf461e77a298328de Mon Sep 17 00:00:00 2001 From: Mark Scherer Date: Fri, 19 Jun 2026 17:21:26 +0200 Subject: [PATCH 1/2] Allow sebastian/diff 9.0 --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 69d31c5..7feb697 100644 --- a/composer.json +++ b/composer.json @@ -23,7 +23,7 @@ "homepage": "https://php-collective.github.io/dto/", "require": { "php": "^8.2", - "sebastian/diff": "^6.0 || ^7.0 || ^8.0", + "sebastian/diff": "^6.0 || ^7.0 || ^8.0 || ^9.0", "twig/twig": "^3.0" }, "require-dev": { From 44a13ee78ae19c6f8ffe5af4013c591ab203e48f Mon Sep 17 00:00:00 2001 From: Mark Scherer Date: Fri, 19 Jun 2026 17:23:40 +0200 Subject: [PATCH 2/2] Fix CI: drop stale phpstan ignore, apply phpcs native-format fixes --- src/Config/FieldBuilder.php | 4 ++-- src/Generator/Builder.php | 2 +- src/Generator/Generator.php | 1 - 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/Config/FieldBuilder.php b/src/Config/FieldBuilder.php index 1d15b8b..5c20945 100644 --- a/src/Config/FieldBuilder.php +++ b/src/Config/FieldBuilder.php @@ -358,7 +358,7 @@ public function maxLength(int $length): static /** * Set minimum numeric value validation. */ - public function min(int|float $value): static + public function min(float|int $value): static { $this->min = $value; @@ -368,7 +368,7 @@ public function min(int|float $value): static /** * Set maximum numeric value validation. */ - public function max(int|float $value): static + public function max(float|int $value): static { $this->max = $value; diff --git a/src/Generator/Builder.php b/src/Generator/Builder.php index adfcaf3..33659bd 100644 --- a/src/Generator/Builder.php +++ b/src/Generator/Builder.php @@ -382,7 +382,7 @@ protected function finder(): FinderInterface * * @return array */ - protected function normalizeTraits(string|array|null $traits): array + protected function normalizeTraits(array|string|null $traits): array { if ($traits === null || $traits === '' || $traits === []) { return []; diff --git a/src/Generator/Generator.php b/src/Generator/Generator.php index 5b4b101..8f4d787 100644 --- a/src/Generator/Generator.php +++ b/src/Generator/Generator.php @@ -84,7 +84,6 @@ public function generate(string $configPath, string $srcPath, array $options = [ // Output any warnings from field validation foreach ($this->builder->getWarnings() as $warning) { - /** @phpstan-ignore function.alreadyNarrowedType (runtime check for custom IoInterface implementations) */ if (method_exists($this->io, 'warning')) { $this->io->warning($warning); }