Skip to content

Commit

Permalink
Merge pull request #1 from prezly/feature/php-8-compatibility
Browse files Browse the repository at this point in the history
[DEV-11711] Feature - PHP 8.2 compatibility
  • Loading branch information
marko-ogg authored Oct 5, 2023
2 parents 83b72fa + 788bff0 commit 21bbfab
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 5 deletions.
11 changes: 10 additions & 1 deletion .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
4 changes: 2 additions & 2 deletions src/ForbidsSerialization.php
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}
Expand All @@ -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));
}
Expand Down

0 comments on commit 21bbfab

Please sign in to comment.