From 8379786b76908836cb363ffc36627ef89cdb5086 Mon Sep 17 00:00:00 2001 From: Kevin Bond Date: Thu, 1 Dec 2022 11:30:08 -0500 Subject: [PATCH] ci: fix --- .github/workflows/ci.yml | 2 +- .php-cs-fixer.dist.php | 9 +++++++++ src/Assert/AssertionFailed.php | 2 +- tests/Assertion/ArraySubsetAssertionTest.php | 2 -- 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1010aba..d32e7d8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,7 +12,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - php: [7.2, 7.4, 8.0, 8.1] + php: [7.2, 7.4, 8.0, 8.1, 8.2] steps: - uses: zenstruck/.github@php-test-symfony with: diff --git a/.php-cs-fixer.dist.php b/.php-cs-fixer.dist.php index dd0c7f6..220db3d 100644 --- a/.php-cs-fixer.dist.php +++ b/.php-cs-fixer.dist.php @@ -43,6 +43,15 @@ // temporary fix for union types (ref: https://github.com/FriendsOfPHP/PHP-CS-Fixer/issues/5495) 'binary_operator_spaces' => ['operators' => ['|' => null]], + 'phpdoc_separation' => ['groups' => [ + ['test', 'dataProvider'], + ['template', 'implements', 'extends'], + ['phpstan-type', 'phpstan-import-type'], + ['deprecated', 'link', 'see', 'since'], + ['author', 'copyright', 'license', 'source'], + ['category', 'package', 'subpackage'], + ['property', 'property-read', 'property-write'], + ]], ]) ->setRiskyAllowed(true) ->setFinder($finder) diff --git a/src/Assert/AssertionFailed.php b/src/Assert/AssertionFailed.php index 0fa0929..0ab1cef 100644 --- a/src/Assert/AssertionFailed.php +++ b/src/Assert/AssertionFailed.php @@ -71,7 +71,7 @@ private static function normalizeContextValue($value): string return '(array:empty)'; } - if (\is_array($value)) { // @phpstan-ignore-line + if (\is_array($value)) { return array_is_list($value) ? '(array:list)' : '(array:assoc)'; } diff --git a/tests/Assertion/ArraySubsetAssertionTest.php b/tests/Assertion/ArraySubsetAssertionTest.php index 1038e5b..55a9f32 100644 --- a/tests/Assertion/ArraySubsetAssertionTest.php +++ b/tests/Assertion/ArraySubsetAssertionTest.php @@ -13,7 +13,6 @@ class ArraySubsetAssertionTest extends TestCase { /** * @dataProvider arraySubsetProvider - * * @test * * @param string|iterable $needle @@ -73,7 +72,6 @@ public function arraySubsetProvider(): iterable /** * @dataProvider arrayNotSubsetProvider - * * @test */ public function it_asserts_not_array_subset(array $needle, array $haystack): void