Skip to content

Zend: applied fixers to improve test robustness (1/8) - #23308

Merged
Girgias merged 1 commit into
php:masterfrom
NickSdot:test/hardening/zend-1
Aug 22, 2026
Merged

Zend: applied fixers to improve test robustness (1/8)#23308
Girgias merged 1 commit into
php:masterfrom
NickSdot:test/hardening/zend-1

Conversation

@NickSdot

@NickSdot NickSdot commented Aug 16, 2026

Copy link
Copy Markdown
Contributor

Asserts error class; extracted from: #22799.

Files with style-only changed were manually reverted.
Split in eight PRs to make reviews easier to digest.

@NickSdot
NickSdot force-pushed the test/hardening/zend-1 branch from 80be938 to c24d54d Compare August 16, 2026 10:37
@NickSdot NickSdot changed the title Zend: applied fixers to improve test robustness (1/7) Aug 16, 2026
@NickSdot
NickSdot force-pushed the test/hardening/zend-1 branch from c24d54d to 1a0544e Compare August 16, 2026 12:00
@@ -31,7 +31,7 @@ $ref = new \ReflectionFunction(#[A1] function () { });
try {
$ref->getAttributes()[0]->newInstance();
} catch (\ArgumentCountError $e) {
var_dump('ERROR 1', $e->getMessage());
echo 'ERROR 1: ', $e::class, ': ', $e->getMessage(), "\n";

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
echo 'ERROR 1: ', $e::class, ': ', $e->getMessage(), "\n";
echo $e::class, ': ', $e->getMessage(), "\n";

I don't think it's necessary. In this whole file.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with you and personally would prefer to remove such things everywhere. Unfortunately others were against removing descriptive pre-/suffixes; without consensus I cannot address it. Maybe we can make this a follow up when 8.6 is out and we have time to discuss it...

@@ -57,15 +57,15 @@ $ref = new \ReflectionFunction(function () { });
try {
$ref->getAttributes(A1::class, 3);
} catch (\Error $e) {
var_dump('ERROR 1', $e->getMessage());
echo 'ERROR 1: ', $e::class, ': ', $e->getMessage(), "\n";

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
echo 'ERROR 1: ', $e::class, ': ', $e->getMessage(), "\n";
echo $e::class, ': ', $e->getMessage(), "\n";

The same in this file

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And a few next files.

@NickSdot
NickSdot force-pushed the test/hardening/zend-1 branch from 1a0544e to b71541f Compare August 19, 2026 14:08
@NickSdot
NickSdot force-pushed the test/hardening/zend-1 branch from b71541f to 4b527e3 Compare August 21, 2026 18:25
@Girgias
Girgias merged commit bd044a2 into php:master Aug 22, 2026
17 of 18 checks passed
@NickSdot
NickSdot deleted the test/hardening/zend-1 branch August 22, 2026 13:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants