From 0d6f3bea9b97e372563409bf9cddfd70c92d324f Mon Sep 17 00:00:00 2001 From: Massimiliano Arione Date: Sat, 28 Sep 2024 18:43:28 +0200 Subject: [PATCH] =?UTF-8?q?=E2=AC=86=EF=B8=8F=20=20update=20phpunit?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build.yaml | 8 ++++---- .php-cs-fixer.php | 4 ++-- README.md | 12 ++++-------- composer.json | 4 ++-- phpunit.xml.dist | 19 ++++++++++--------- tests/PUGXShortidDoctrineBundleTest.php | 4 ++-- 6 files changed, 24 insertions(+), 27 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index f25a3af..4a3d13a 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -6,7 +6,7 @@ on: jobs: check: - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 steps: - name: Checkout uses: actions/checkout@v3 @@ -23,7 +23,7 @@ jobs: - name: Fix CS uses: docker://oskarstark/php-cs-fixer-ga tests: - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 strategy: fail-fast: false matrix: @@ -33,12 +33,12 @@ jobs: - description: 'No Symfony specified' php: '8.2' - description: 'Lowest deps' - php: '8.0' + php: '8.1' composer_option: '--prefer-lowest' env: SYMFONY_DEPRECATIONS_HELPER: max[self]=0 - description: 'Symfony 5.4' - php: '8.0' + php: '8.1' symfony: 5.4.* - description: 'Symfony 6.4' php: '8.2' diff --git a/.php-cs-fixer.php b/.php-cs-fixer.php index 6a1af8b..a207ca6 100644 --- a/.php-cs-fixer.php +++ b/.php-cs-fixer.php @@ -10,8 +10,8 @@ ->setRules([ '@Symfony' => true, '@Symfony:risky' => true, - '@PHP80Migration:risky' => true, - '@PHPUnit75Migration:risky' => true, + '@PHP81Migration' => true, + '@PHPUnit100Migration:risky' => true, 'ordered_imports' => true, 'declare_strict_types' => false, 'native_function_invocation' => ['include' => ['@all']], diff --git a/README.md b/README.md index 964bebd..9a12419 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,4 @@ -ShortId Doctrine Type Bundle -============================ +# ShortId Doctrine Type Bundle [![Total Downloads](https://poser.pugx.org/pugx/shortid-doctrine-bundle/downloads.png)](https://packagist.org/packages/pugx/shortid-doctrine-bundle) [![Build Status](https://github.com/PUGX/shortid-doctrine-bundle/workflows/Build/badge.svg)](https://github.com/PUGX/shortid-doctrine-bundle/actions) @@ -9,17 +8,14 @@ ShortId Doctrine Type Bundle This bundle is for using [ShortId Doctrine Type](https://github.com/pugx/shortid-doctrine) with Symfony. -Documentation -------------- +## Documentation [Read the documentation](docs/index.md) -License -------- +## License This bundle is released under the MIT license. See the [complete license text](Resources/meta/LICENSE). -About ------ +## About PUGXShortidDoctrineBundle is a [PUGX](https://github.com/PUGX) initiative. diff --git a/composer.json b/composer.json index acd5205..40dd389 100644 --- a/composer.json +++ b/composer.json @@ -21,14 +21,14 @@ } ], "require": { - "php": "^8.0", + "php": "^8.1", "pugx/shortid-doctrine": "^1.0", "symfony/config": "^5.4 || ^6.0 || ^7.0", "symfony/dependency-injection": "^5.4 || ^6.0 || ^7.0", "symfony/http-kernel": "^5.4 || ^6.0 || ^7.0" }, "require-dev": { - "phpunit/phpunit": "^9.6" + "phpunit/phpunit": "^10.5 || ^11.3" }, "config": { "bin-dir": "bin", diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 69dc5ef..814797c 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -1,15 +1,16 @@ - - + - tests + ./tests - - - - src - - + + + ./src + + diff --git a/tests/PUGXShortidDoctrineBundleTest.php b/tests/PUGXShortidDoctrineBundleTest.php index 777f148..40a8319 100644 --- a/tests/PUGXShortidDoctrineBundleTest.php +++ b/tests/PUGXShortidDoctrineBundleTest.php @@ -15,9 +15,9 @@ public function testBoot(): void $container = $this->createMock(ContainerBuilder::class); $container->method('hasParameter')->willReturn(true); $container - ->expects(self::exactly(3)) + ->expects($this->exactly(3)) ->method('getParameter') - ->willReturnOnConsecutiveCalls(7, $alphabet) + ->willReturnOnConsecutiveCalls(7, false, $alphabet) ; $bundle = new PUGXShortidDoctrineBundle(); $bundle->setContainer($container);