Skip to content
Open
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: 11 additions & 7 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
matrix:
include:
- operating-system: "ubuntu-latest"
php-version: "8.4"
php-version: "8.5"

steps:
- name: "Checkout"
Expand Down Expand Up @@ -68,7 +68,7 @@ jobs:
matrix:
include:
- operating-system: "ubuntu-latest"
php-version: "8.4"
php-version: "8.5"

steps:
- name: "Checkout"
Expand Down Expand Up @@ -101,20 +101,24 @@ jobs:
strategy:
matrix:
operating-system: [ "ubuntu-latest" ]
php-version: [ "7.4", "8.0", "8.1", "8.2", "8.3", "8.4" ]
php-version: [ "7.4", "8.0", "8.1", "8.2", "8.3", "8.4", "8.5" ]
composer-flags: [ "" ]
experimental: [ false ]
include:
- operating-system: "ubuntu-latest"
php-version: "7.4"
composer-flags: "--prefer-lowest --prefer-stable"
experimental: false
- operating-system: "ubuntu-latest"
php-version: "8.6"
composer-flags: "--ignore-platform-req=php+"
experimental: true
- operating-system: "macos-latest"
php-version: "8.4"
php-version: "8.5"
composer-flags: ""
experimental: false
- operating-system: "windows-latest"
php-version: "8.4"
php-version: "8.5"
composer-flags: ""
experimental: false

Expand Down Expand Up @@ -166,7 +170,7 @@ jobs:
matrix:
include:
- operating-system: "ubuntu-latest"
php-version: "8.4"
php-version: "8.5"

steps:
- name: "Coveralls"
Expand All @@ -186,7 +190,7 @@ jobs:
matrix:
include:
- operating-system: "ubuntu-latest"
php-version: "8.4"
php-version: "8.5"

steps:
- name: "Checkout"
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

## [Unreleased](https://github.com/orisai/exceptions/compare/1.1.5...v1.x)

### Added

- Support for PHP 8.5 and 8.6

## [1.1.5](https://github.com/orisai/exceptions/compare/1.1.4...1.1.5) - 2024-12-29

### Changed
Expand Down
8 changes: 7 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
}
],
"require": {
"php": "7.4 - 8.4",
"php": "7.4 - 8.6",
"ext-mbstring": "*",
"symfony/polyfill-php80": "^1.18.1"
},
Expand All @@ -42,6 +42,12 @@
"Tests\\Orisai\\Exceptions\\": "tests"
}
},
"repositories": [
{
"type": "vcs",
"url": "https://github.com/mentax/coding-standard-php"
}
],
"minimum-stability": "dev",
"prefer-stable": true,
"config": {
Expand Down
6 changes: 5 additions & 1 deletion src/ConfigurableException.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
use function preg_replace;
use function str_repeat;
use const PHP_EOL;
use const PHP_VERSION_ID;

trait ConfigurableException
{
Expand Down Expand Up @@ -41,7 +42,7 @@
*/
public function withMessage($message): self
{
$this->message = (string) $message;

Check warning on line 45 in src/ConfigurableException.php

View workflow job for this annotation

GitHub Actions / Test for mutants (ubuntu-latest, 8.5)

Escaped Mutant for Mutator "CastString": @@ @@ */ public function withMessage($message): self { - $this->message = (string) $message; + $this->message = $message; if (static::$addSuppressedToMessage) { $this->isAnySuppressedInMessage = false; foreach ($this->suppressed as $key => $item) {

if (static::$addSuppressedToMessage) {
$this->isAnySuppressedInMessage = false;
Expand All @@ -62,7 +63,10 @@
$reflection = new ReflectionClass(Exception::class);
// phpcs:enable
$property = $reflection->getProperty('previous');
$property->setAccessible(true);
if (PHP_VERSION_ID < 80_100) {

Check warning on line 66 in src/ConfigurableException.php

View workflow job for this annotation

GitHub Actions / Test for mutants (ubuntu-latest, 8.5)

Escaped Mutant for Mutator "LessThanNegotiation": @@ @@ $reflection = new ReflectionClass(Exception::class); // phpcs:enable $property = $reflection->getProperty('previous'); - if (PHP_VERSION_ID < 80100) { + if (PHP_VERSION_ID >= 80100) { $property->setAccessible(true); } $property->setValue($this, $throwable);

Check warning on line 66 in src/ConfigurableException.php

View workflow job for this annotation

GitHub Actions / Test for mutants (ubuntu-latest, 8.5)

Escaped Mutant for Mutator "LessThan": @@ @@ $reflection = new ReflectionClass(Exception::class); // phpcs:enable $property = $reflection->getProperty('previous'); - if (PHP_VERSION_ID < 80100) { + if (PHP_VERSION_ID <= 80100) { $property->setAccessible(true); } $property->setValue($this, $throwable);
$property->setAccessible(true);
}

$property->setValue($this, $throwable);

return $this;
Expand Down
Loading