Context
While bumping goaop/framework to the stable goaop/parser-reflection ^4.0 release (goaop/framework#587), the experimental PHP 8.6 CI job surfaced a new engine-level deprecation:
1) Go\Proxy\Part\InterceptedFunctionGeneratorTest::testGenerate@strcoll with data ('strcoll', 'function strcoll(string $stri...): int')
Failed asserting that two strings are identical.
--- Expected
+++ Actual
@@ @@
-'function strcoll(string $string1, string $string2): int'
+'#[\Deprecated(message: 'use Collator::compare() instead', since: '8.6')]
+function strcoll(string $string1, string $string2): int'
(full run: https://github.com/goaop/framework/actions/runs/32814791246/job/97700803191)
PHP 8.6 attaches #[\Deprecated] to a number of previously-undeprecated internal functions (strcoll() is the one caught here; there were 27 deprecation notices total in that run). This library added isDeprecated() / #[\Deprecated] support for user-defined functions in 4.0 (see the feat: fill PHP 8.1-8.4 function-like reflection gaps and #[Deprecated] support change), but internal functions like strcoll() have no PHP source for the AST parser to read — ReflectionFunction falls back to native reflection for them, so isDeprecated() should already report true on 8.6 without any code change here.
Ask
This is a tracking issue for PHP 8.6 support, not a confirmed bug:
Filed against parser-reflection since this repo owns the reflection/deprecation-attribute logic and already tracks PHP 8.6 experimental support (#201); the concrete failure was observed downstream in goaop/framework's proxy-generator tests.
Context
While bumping
goaop/frameworkto the stablegoaop/parser-reflection^4.0release (goaop/framework#587), the experimental PHP 8.6 CI job surfaced a new engine-level deprecation:(full run: https://github.com/goaop/framework/actions/runs/32814791246/job/97700803191)
PHP 8.6 attaches
#[\Deprecated]to a number of previously-undeprecated internal functions (strcoll()is the one caught here; there were 27 deprecation notices total in that run). This library addedisDeprecated()/#[\Deprecated]support for user-defined functions in 4.0 (see thefeat: fill PHP 8.1-8.4 function-like reflection gaps and #[Deprecated] supportchange), but internal functions likestrcoll()have no PHP source for the AST parser to read —ReflectionFunctionfalls back to native reflection for them, soisDeprecated()should already reporttrueon 8.6 without any code change here.Ask
This is a tracking issue for PHP 8.6 support, not a confirmed bug:
Go\ParserReflection\ReflectionFunction::isDeprecated()(andgetAttributes()) correctly reflect the native fallback's#[\Deprecated]status for internal functions likestrcoll()under PHP 8.6.#[\Deprecated]coverage, sinceparser-reflection's own CI (.github/workflows/phpunit.yml) also runs PHP 8.6 as an experimental job.Filed against
parser-reflectionsince this repo owns the reflection/deprecation-attribute logic and already tracks PHP 8.6 experimental support (#201); the concrete failure was observed downstream ingoaop/framework's proxy-generator tests.