Skip to content

chore(tests): drop the E_DEPRECATED suppression from the .phpt files — stable z-engine raises none #38

Closed

Description

@lisachenko

All 121 .phpt files carry a third --INI-- line:

error_reporting=E_ALL & ~E_DEPRECATED

It guards against a dependency deprecation being prepended to captured output (PHPUnit's .phpt runner forces display_errors=1, so one deprecation would fail every --EXPECT-- block). The offender was z-engine's development line declaring implicitly nullable parameters; the stable releases now required (~8.4.2 || ~8.5.0, #37) declare them ?Type.

Verified by forcing error_reporting=E_ALL over every test's own --INI-- block on PHP 8.4.19 with z-engine 8.4.2: 121/121 pass. The same check on PHP 8.5.9 / z-engine 8.5.0 should be repeated before the change lands.

Work: remove the line from all 121 files and update AGENTS.md/README.md wherever the three mandatory --INI-- lines are documented. Purely mechanical; no source change.

Activity

  1. lisachenko commented on Aug 19, 2026

    @lisachenko
    OwnerAuthor

    Correction to this issue as filed — the PHP 8.5 check it asked for has now been run, and it does not pass.

    PHP z-engine error_reporting=E_ALL forced
    8.4.19 8.4.2 121/121 pass
    8.5.9 8.5.0 109/121 pass, 12 fail

    The suppression is still load-bearing on PHP 8.5, but not for the reason it was written. z-engine raises nothing — this package does: SplObjectStorage::contains() in PreforkTaskDirectory is deprecated in 8.5, and the notice lands in the captured output of 12 tests. Filed separately as #39.

    So the premise here ("stable z-engine raises none") is right and the conclusion ("therefore the line can go") is premature. Correct order: fix #39 first, then drop the line from all 121 files — at which point the suite starts catching this class of problem instead of hiding it, which is the actual argument for removing it.


    Generated by Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions