Skip to content

Commit

Permalink
php 8.4 and phpunit 11
Browse files Browse the repository at this point in the history
  • Loading branch information
dominikzogg committed Dec 16, 2024
1 parent c3fb993 commit 75ca94f
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 28 deletions.
26 changes: 13 additions & 13 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@ 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

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
Expand Down
18 changes: 9 additions & 9 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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/" }
Expand All @@ -41,7 +41,7 @@
},
"extra": {
"branch-alias": {
"dev-master": "2.2-dev"
"dev-master": "2.3-dev"
}
},
"scripts": {
Expand All @@ -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"
}
}
2 changes: 1 addition & 1 deletion src/Exceptions/ContainerException.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
2 changes: 1 addition & 1 deletion src/Exceptions/ExistsException.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
2 changes: 1 addition & 1 deletion src/Exceptions/NotFoundException.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
2 changes: 1 addition & 1 deletion tests/Unit/Exceptions/ExistsExceptionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}

Expand Down

0 comments on commit 75ca94f

Please sign in to comment.