Skip to content

Commit

Permalink
Merge pull request #182 from tr33m4n/fix/failing-codeception-tests
Browse files Browse the repository at this point in the history
Fix failing release tests due to PHPStan error
  • Loading branch information
tr33m4n authored Nov 27, 2024
2 parents 0561f3e + ed57a23 commit afe45be
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 9 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
php: [ 7.4, 8.0, 8.1, 8.2 ]
php: [ 7.4, 8.0, 8.1, 8.2, 8.3 ]
fail-fast: false
steps:
- name: Checkout
Expand All @@ -34,18 +34,18 @@ jobs:
- name: Init composer dependencies
run: composer update
- name: Install dependencies (Codeception v4)
run: composer update codeception/codeception:^4.0 codeception/module-webdriver codeception/module-phpbrowser -W
run: composer update codeception/codeception:^4.0 codeception/module-webdriver codeception/module-phpbrowser codeception/module-asserts -W
- name: Setup Firefox
uses: browser-actions/setup-firefox@latest
- name: Run test suite (Codeception v4)
env:
PERCY_TOKEN: ${{ secrets.PERCY_TOKEN }}
run: composer run test
- name: Install dependencies (Codeception v5)
run: composer update codeception/codeception:^5.0 codeception/module-webdriver codeception/module-phpbrowser -W
if: matrix.php == '8.0' || matrix.php == '8.1' || matrix.php == '8.2'
run: composer update codeception/codeception:^5.0 codeception/module-webdriver codeception/module-phpbrowser codeception/module-asserts -W
if: matrix.php == '8.0' || matrix.php == '8.1' || matrix.php == '8.2' || matrix.php == '8.3'
- name: Run test suite (Codeception v5)
env:
PERCY_TOKEN: ${{ secrets.PERCY_TOKEN }}
run: composer run test
if: matrix.php == '8.0' || matrix.php == '8.1' || matrix.php == '8.2'
if: matrix.php == '8.0' || matrix.php == '8.1' || matrix.php == '8.2' || matrix.php == '8.3'
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@
},
"require-dev": {
"adamwojs/php-cs-fixer-phpdoc-force-fqcn": "^2.0",
"codeception/module-asserts": "^2.0",
"codeception/module-phpbrowser": "^2.0",
"codeception/module-asserts": "^2.0||^3.0",
"codeception/module-phpbrowser": "^2.0||^3.0",
"friendsofphp/php-cs-fixer": "^3.59",
"phpstan/phpstan": "^1.11",
"rector/rector": "^1.1",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@
"node": ">=14"
},
"dependencies": {
"@percy/cli": "^1.30.1"
"@percy/cli": "^1.30.2"
}
}
5 changes: 4 additions & 1 deletion src/Codeception/Module/Percy/Serializer.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ public function serialize($data): string
*/
public function unserialize(string $data): array
{
return (array) json_decode($data, true, 512, JSON_THROW_ON_ERROR);
/** @var array<string, mixed> $result */
$result = (array) json_decode($data, true, 512, JSON_THROW_ON_ERROR);

return $result;
}
}

0 comments on commit afe45be

Please sign in to comment.