Skip to content

Commit

Permalink
Merge pull request #44 from nutgram/fix-psalm-type
Browse files Browse the repository at this point in the history
Force object on generic
  • Loading branch information
sergix44 authored Feb 6, 2025
2 parents ff827df + 7e69724 commit 91ff196
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 6 deletions.
19 changes: 15 additions & 4 deletions .github/workflows/php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,29 @@ on:
branches: [ master ]

jobs:
build:
tests:
name: Test Suite - PHP ${{ matrix.php }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
operating-system: [ ubuntu-latest ]
php-versions: [ "8.1", "8.2", "8.3" ]
php: [ 8.1, 8.2, 8.3, 8.4 ]

steps:
- uses: actions/checkout@v2
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}

- name: Validate composer.json and composer.lock
run: composer validate

- name: Install dependencies
run: composer install --no-progress
run: composer install --no-progress --no-suggest

- name: Run test suite
run: vendor/bin/phpunit --no-coverage
4 changes: 2 additions & 2 deletions src/Hydrator.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ public function __construct(?ContainerInterface $container = null)
*
* @return T
*
* @template T
* @template T of object
*/
public function hydrate(string|object $object, array|object $data): object
{
Expand Down Expand Up @@ -174,7 +174,7 @@ public function hydrate(string|object $object, array|object $data): object
*
* @return T
*
* @template T
* @template T of object
*/
public function hydrateWithJson(string|object $object, string $json, ?int $flags = null): object
{
Expand Down

0 comments on commit 91ff196

Please sign in to comment.