From e43842d48a5499852fcafc848db2ed79bef910c5 Mon Sep 17 00:00:00 2001 From: Alexander Lisachenko Date: Wed, 19 Aug 2026 05:32:20 +0000 Subject: [PATCH] test(tests): drop the E_DEPRECATED suppression from the .phpt files MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Every .phpt carried a third --INI-- line, error_reporting=E_ALL & ~E_DEPRECATED. It existed only because z-engine's development line declared implicitly nullable parameters (ZEngine\Type\OpLine::__construct()); PHPUnit's .phpt runner forces display_errors=1, so that deprecation was prepended to the captured output of every test and failed each --EXPECT-- block. The stable releases now required (~8.4.2 || ~8.5.0) declare those parameters ?Type, so the line suppresses nothing. Removing it also stops the suite from hiding a genuine deprecation should one ever appear. ffi.enable=1 and opcache.jit=off stay — those are load-bearing. Suite verified at 19/19 on PHP 8.4.19 with z-engine 8.4.2 and on PHP 8.5.9 with z-engine 8.5.0, both before the change (with error_reporting=E_ALL forced over each file's own --INI--) and after it. Docs updated to describe two mandatory --INI-- lines: CLAUDE.md ("Running tests", the anatomy example, the rules bullet) and .claude/agents/phpt-author.md (template and rules). No source, composer.json or CI change — ci.yml never referenced the line. Closes #21 Co-Authored-By: Claude Claude-Session: https://claude.ai/code/session_013foRd1XwLwqjUSkSWeWrMe --- .claude/agents/phpt-author.md | 14 +++---- CLAUDE.md | 38 ++++++++++--------- tests/Functional/testCanAddMatrices.phpt | 1 - .../Functional/testCanCastMatrixToArray.phpt | 1 - tests/Functional/testCanCastMatrixToBool.phpt | 1 - ...CastMatrixToNumberUsingEngineFallback.phpt | 1 - .../Functional/testCanCastMatrixToString.phpt | 1 - .../testCanDivideMatrixByNumber.phpt | 1 - .../testCanMultiplyCompatibleMatrices.phpt | 1 - .../testCanMultiplyMatrixByNumber.phpt | 1 - .../testCanMultiplyNumberByMatrix.phpt | 1 - .../Functional/testCanPowMatrixByNumber.phpt | 1 - tests/Functional/testCanSubtractMatrices.phpt | 1 - ...nMultiplicationOfIncompatibleMatrices.phpt | 1 - ...testFailsOnAddingIncompatibleMatrices.phpt | 1 - tests/Functional/testFailsOnEmptyMatrix.phpt | 1 - tests/Functional/testFailsOnRaggedMatrix.phpt | 1 - ...ailsOnSubtractingIncompatibleMatrices.phpt | 1 - .../testKeepsDefaultDebugOutput.phpt | 1 - ...VisibilityForClassScopedGetObjectVars.phpt | 1 - ...epsPropertyVisibilityForGetObjectVars.phpt | 1 - 21 files changed, 28 insertions(+), 43 deletions(-) diff --git a/.claude/agents/phpt-author.md b/.claude/agents/phpt-author.md index 4b19ca5..380d51a 100644 --- a/.claude/agents/phpt-author.md +++ b/.claude/agents/phpt-author.md @@ -23,7 +23,6 @@ One-line description of the behaviour, in the present tense --INI-- ffi.enable=1 opcache.jit=off -error_reporting=E_ALL & ~E_DEPRECATED --FILE--