diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d96f1c1..7b9bf9e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,41 +6,41 @@ on: - cron: '0 0 * * *' jobs: - php81: - name: PHP 8.1 - runs-on: ubuntu-22.04 + php82: + name: PHP 8.2 + runs-on: ubuntu-24.04 steps: - name: checkout uses: actions/checkout@v4 - name: composer test - uses: docker://ghcr.io/chubbyphp/ci-php81:latest + uses: docker://ghcr.io/chubbyphp/ci-php82:latest env: COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }} STRYKER_DASHBOARD_API_KEY: ${{ secrets.STRYKER_DASHBOARD_API_KEY }} - php82: - name: PHP 8.2 - runs-on: ubuntu-22.04 + php83: + name: PHP 8.3 + runs-on: ubuntu-24.04 steps: - name: checkout uses: actions/checkout@v4 - name: composer test - uses: docker://ghcr.io/chubbyphp/ci-php82:latest + uses: docker://ghcr.io/chubbyphp/ci-php83:latest env: COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }} STRYKER_DASHBOARD_API_KEY: ${{ secrets.STRYKER_DASHBOARD_API_KEY }} - php83: - name: PHP 8.3 - runs-on: ubuntu-22.04 + php84: + name: PHP 8.4 + runs-on: ubuntu-24.04 steps: - name: checkout uses: actions/checkout@v4 - name: composer test - uses: docker://ghcr.io/chubbyphp/ci-php83:latest + uses: docker://ghcr.io/chubbyphp/ci-php84:latest env: COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }} STRYKER_DASHBOARD_API_KEY: ${{ secrets.STRYKER_DASHBOARD_API_KEY }} - name: sonarcloud.io - uses: sonarsource/sonarcloud-github-action@master + uses: sonarsource/sonarqube-scan-action@v4.1.0 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} diff --git a/README.md b/README.md index eee73bb..ae39637 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,7 @@ There is a laminas service manager adapter at [chubbyphp/chubbyphp-laminas-confi ## Requirements - * php: ^8.1 + * php: ^8.2 * [psr/container][2]: ^2.0.2 ## Installation @@ -36,7 +36,7 @@ There is a laminas service manager adapter at [chubbyphp/chubbyphp-laminas-confi Through [Composer](http://getcomposer.org) as [chubbyphp/chubbyphp-container][1]. ```sh -composer require chubbyphp/chubbyphp-container "^2.2" +composer require chubbyphp/chubbyphp-container "^2.3" ``` ## Usage diff --git a/composer.json b/composer.json index 8dbfd20..3805be4 100644 --- a/composer.json +++ b/composer.json @@ -14,17 +14,17 @@ } ], "require": { - "php": "^8.1", + "php": "^8.2", "psr/container": "^2.0.2" }, "require-dev": { "chubbyphp/chubbyphp-dev-helper": "dev-master", - "chubbyphp/chubbyphp-mock": "^1.7.0", - "infection/infection": "^0.27.8", + "chubbyphp/chubbyphp-mock": "^1.8", + "infection/infection": "^0.29.8", "php-coveralls/php-coveralls": "^2.7.0", - "phpstan/extension-installer": "^1.3.1", - "phpstan/phpstan": "^1.10.45", - "phpunit/phpunit": "^10.4.2" + "phpstan/extension-installer": "^1.4.3", + "phpstan/phpstan": "^2.0.3", + "phpunit/phpunit": "^11.5.0" }, "autoload": { "psr-4": { "Chubbyphp\\Container\\": "src/" } @@ -41,7 +41,7 @@ }, "extra": { "branch-alias": { - "dev-master": "2.2-dev" + "dev-master": "2.3-dev" } }, "scripts": { @@ -56,9 +56,9 @@ ], "test:cs": "mkdir -p build && PHP_CS_FIXER_IGNORE_ENV=1 vendor/bin/php-cs-fixer fix --dry-run --stop-on-violation --cache-file=build/phpcs.cache", "test:infection": "vendor/bin/infection --threads=$(nproc) --min-msi=100 --verbose --coverage=build/phpunit", - "test:integration": "vendor/bin/phpunit --testsuite=Integration --cache-result-file=build/phpunit/result.cache", + "test:integration": "vendor/bin/phpunit --testsuite=Integration --cache-directory=build/phpunit", "test:lint": "mkdir -p build && find src tests -name '*.php' -print0 | xargs -0 -n1 -P$(nproc) php -l | tee build/phplint.log", "test:static-analysis": "mkdir -p build && bash -c 'vendor/bin/phpstan analyse src --no-progress --level=8 --error-format=junit | tee build/phpstan.junit.xml; if [ ${PIPESTATUS[0]} -ne \"0\" ]; then exit 1; fi'", - "test:unit": "vendor/bin/phpunit --testsuite=Unit --coverage-text --coverage-clover=build/phpunit/clover.xml --coverage-html=build/phpunit/coverage-html --coverage-xml=build/phpunit/coverage-xml --log-junit=build/phpunit/junit.xml --cache-result-file=build/phpunit/result.cache" + "test:unit": "vendor/bin/phpunit --testsuite=Unit --coverage-text --coverage-clover=build/phpunit/clover.xml --coverage-html=build/phpunit/coverage-html --coverage-xml=build/phpunit/coverage-xml --log-junit=build/phpunit/junit.xml --cache-directory=build/phpunit" } } diff --git a/src/Exceptions/ContainerException.php b/src/Exceptions/ContainerException.php index 6d53153..2a8b70f 100644 --- a/src/Exceptions/ContainerException.php +++ b/src/Exceptions/ContainerException.php @@ -15,6 +15,6 @@ private function __construct(string $message, int $code, ?\Throwable $previous = public static function create(string $id, \Throwable $previous): self { - return new self(sprintf('Could not create service with id "%s"', $id), 1, $previous); + return new self(\sprintf('Could not create service with id "%s"', $id), 1, $previous); } } diff --git a/src/Exceptions/ExistsException.php b/src/Exceptions/ExistsException.php index b4c14a5..dda849b 100644 --- a/src/Exceptions/ExistsException.php +++ b/src/Exceptions/ExistsException.php @@ -18,6 +18,6 @@ private function __construct(string $message, int $code, ?\Throwable $previous = public static function create(string $id, string $type): self { - return new self(sprintf('Factory with id "%s" already exists as "%s"', $id, $type), 2); + return new self(\sprintf('Factory with id "%s" already exists as "%s"', $id, $type), 2); } } diff --git a/src/Exceptions/NotFoundException.php b/src/Exceptions/NotFoundException.php index 72079b5..28e771b 100644 --- a/src/Exceptions/NotFoundException.php +++ b/src/Exceptions/NotFoundException.php @@ -15,6 +15,6 @@ private function __construct(string $message, int $code, ?\Throwable $previous = public static function create(string $id): self { - return new self(sprintf('There is no service with id "%s"', $id), 3); + return new self(\sprintf('There is no service with id "%s"', $id), 3); } } diff --git a/tests/Unit/Exceptions/ExistsExceptionTest.php b/tests/Unit/Exceptions/ExistsExceptionTest.php index ee87c6a..2742f76 100644 --- a/tests/Unit/Exceptions/ExistsExceptionTest.php +++ b/tests/Unit/Exceptions/ExistsExceptionTest.php @@ -29,7 +29,7 @@ public function testCreate(string $type): void { $exception = ExistsException::create('id', $type); - self::assertSame(sprintf('Factory with id "id" already exists as "%s"', $type), $exception->getMessage()); + self::assertSame(\sprintf('Factory with id "id" already exists as "%s"', $type), $exception->getMessage()); self::assertSame(2, $exception->getCode()); }