Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 16 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,27 @@ jobs:
matrix:
include:
- php-version: '7.4'
- php-version: '8.0'
- php-version: '8.1'
- php-version: '8.2'
- php-version: '8.3'
- php-version: '8.4'
phpunit-flags: --display-deprecations --fail-on-deprecation
- php-version: '8.5'
phpunit-flags: --display-deprecations --fail-on-deprecation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5

- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
extensions: none
extensions: none, ctype, curl, dom, json, mbstring, tokenizer, xml, xmlwriter
ini-values: display_errors=On, display_startup_errors=On, error_reporting=-1, zend.assertions=1

- run: php --version
- run: composer update

- if: matrix.php-version != '7.4' && matrix.php-version != '8.0' # These run PHPUnit 9, which does not have the option
run: vendor/bin/phpunit --check-php-configuration

- run: vendor/bin/phpunit tests --no-configuration ${{ matrix.phpunit-flags }}
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"php": "^5.6 || ^7.0 || ^8.0"
},
"require-dev": {
"symfony/phpunit-bridge": "^5.1"
"phpunit/phpunit": "^9.6.24 || ^10.5.52 || ^11.5.33"
},
"config": {
"optimize-autoloader": true,
Expand Down
6 changes: 3 additions & 3 deletions src/AccessibleObject.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public function __call($name, array $arguments)
}

$method = $this->reflection->getMethod($name);
$method->setAccessible(true);
PHP_VERSION_ID < 80100 && $method->setAccessible(true);

return $method->invokeArgs($this->object, $arguments);
}
Expand All @@ -59,7 +59,7 @@ public function __get($name)
}

$property = $this->reflection->getProperty($name);
$property->setAccessible(true);
PHP_VERSION_ID < 80100 && $property->setAccessible(true);

return $property->getValue($this->object);
}
Expand All @@ -71,7 +71,7 @@ public function __set($name, $value)
}

$property = $this->reflection->getProperty($name);
$property->setAccessible(true);
PHP_VERSION_ID < 80100 && $property->setAccessible(true);

$property->setValue($this->object, $value);
}
Expand Down