diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 98d0624..0c8737c 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -2,12 +2,21 @@ on: push name: Test jobs: test: - name: PHP Linter + name: Test runs-on: ubuntu-latest + strategy: + matrix: + php: [ '7.4', '8.0', '8.1', '8.2' ] steps: - uses: actions/checkout@master + - name: Setup PHP + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php }} + coverage: none + - name: Run PHP Lint run: "find src/ -name '*.php' | xargs -n1 php -l" diff --git a/composer.json b/composer.json index 1ef8d6f..cdda3a8 100644 --- a/composer.json +++ b/composer.json @@ -14,10 +14,10 @@ "sort-packages": true }, "require": { - "php": ">=7.1" + "php": "^7.4||^8.0" }, "require-dev": { - "phpunit/phpunit": "~7.0" + "phpunit/phpunit": "~8.0" }, "autoload": { "psr-4": { diff --git a/src/ForbidsSerialization.php b/src/ForbidsSerialization.php index e7bf8d7..36dfdbd 100644 --- a/src/ForbidsSerialization.php +++ b/src/ForbidsSerialization.php @@ -59,7 +59,7 @@ final public function __wakeup() * * @throws SerializationForbiddenException always. */ - final public function __serialize() + final public function __serialize(): array { throw new SerializationForbiddenException(get_class($this)); } @@ -75,7 +75,7 @@ final public function __serialize() * * @throws SerializationForbiddenException always. */ - final public function __unserialize() + final public function __unserialize(array $data): void { throw new SerializationForbiddenException(get_class($this)); }