Skip to content

Commit

Permalink
Use PHP_OS_FAMILY instead PHP_OS
Browse files Browse the repository at this point in the history
  • Loading branch information
thekid committed Mar 23, 2024
1 parent 79910e1 commit 16c6698
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@

## 2.0.0 / 2024-03-23

* Changed `test.verify.Runtime` to use *PHP_OS_FAMILY* constant instead
of *PHP_OS*. The former has been available since PHP 7.2
(@thekid)
* Made this library compatible with XP 12:
- Dropped support for PHP < 7.4
- Adopted nullable type syntax, array unpacking
Expand Down
2 changes: 1 addition & 1 deletion src/main/php/test/verify/Runtime.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public function __construct(?string $os= null, ?string $php= null, array $extens
* @return iterable
*/
public function assertions(Context $context) {
null === $this->os || yield new Assertion(PHP_OS, new Matches('/'.$this->os.'/i'));
null === $this->os || yield new Assertion(PHP_OS_FAMILY, new Matches('/'.$this->os.'/i'));
null === $this->php || yield new Assertion(PHP_VERSION, new RequiredVersion('PHP', $this->php));

foreach ($this->extensions as $extension) {
Expand Down

0 comments on commit 16c6698

Please sign in to comment.