Skip to content

Regression: ReflectionFunction::isDeprecated() true on 8.2 profile — Zend false (re-#9760, ext/reflection/php_reflection.c) #16359

Closed

Description

@PurHur

Category

stdlib · php-src-strict · version-gate regression

Problem

On the PHP 8.2 reference profile, ReflectionFunction::isDeprecated() must return false even when a #[\Deprecated] attribute is present (PHP 8.4 reflection API). This compiler returns true.

Repro Zend 8.2+ VM (2026-07-05)
#[\Deprecated] function f(){}; (new ReflectionFunction('f'))->isDeprecated() false true

php-src reference

PHP implementation target

Repro

./script/docker-exec.sh -- bash -lc 'php test/repro/maintainer_gap_reflection_function_isdeprecated_profile.php'
./script/docker-exec.sh -- bash -lc 'php bin/vm.php test/repro/maintainer_gap_reflection_function_isdeprecated_profile.php'

Done when

  • isDeprecated() false on 8.2 reference profile; true only on 8.4+ profile when attribute present
  • Compliance guard under test/compliance/cases/reflection/
  • php-src-strict

Activity

  1. added
    bugSomething isn't working
    enhancementNew feature or request
    phase-4:stdlibPhase 4 – stdlib for web apps
    area:vmVirtual machine
    implementation-readySpec complete: repro, php-src ref, done-when — safe for workers to claim
    on Jul 5, 2026
  2. PurHur commented on Jul 5, 2026

    @PurHur
    OwnerAuthor

    claim: cursor-agent-lane-a — starting this run

  3. PurHur commented on Jul 5, 2026

    @PurHur
    OwnerAuthor

    claim released: repro green on master — reflection_function_is_deprecated_profile.phpt prints no; VM method_exists($rf, 'isDeprecated') false on 8.2 profile matching compliance guard. Pivoting to #16365.

  4. PurHur commented on Jul 6, 2026

    @PurHur
    OwnerAuthor

    claim: PHP Compiler STD Lib — starting this run

  5. PurHur commented on Jul 6, 2026

    @PurHur
    OwnerAuthor

    Merged via #16770.

    Fix: Always register ReflectionFunction::isDeprecated(); on 8.2 reference profile return false (php-src PHP_VERSION_ID >= 80400 guard). On PHP_COMPILER_PROFILE=8.4, #[\Deprecated] functions report true.

    Verification:

    php test/repro/maintainer_gap_reflection_function_isdeprecated_profile.php  # ok
    php bin/vm.php test/repro/maintainer_gap_reflection_function_isdeprecated_profile.php  # ok
    php bin/vm.php test/compliance/cases/language/reflection_function_is_deprecated_profile.phpt  # yes/false/false
    php bin/compile.php -l test/repro/maintainer_gap_reflection_function_isdeprecated_profile.php  # exit 0
    
  6. PurHur commented on Jul 10, 2026

    @PurHur
    OwnerAuthor

    claim: cursor-agent-lane-a — starting this run (reopen: repro still fails on master)

  7. PurHur commented on Jul 10, 2026

    @PurHur
    OwnerAuthor

    claim released: repro green on reference profile (unset PHP_COMPILER_PROFILE); earlier failure was harness PHP_COMPILER_PROFILE=8.4 — pivoting.

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

    area:vmVirtual machinebugSomething isn't workingenhancementNew feature or requestimplementation-readySpec complete: repro, php-src ref, done-when — safe for workers to claimphase-4:stdlibPhase 4 – stdlib for web appsstdlib

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions