Closed (fixed)
Project:
Drupal core
Version:
10.1.x-dev
Component:
base system
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
12 Jul 2023 at 20:23 UTC
Updated:
15 Feb 2024 at 10:11 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
andypostIt should wait for the first beta of 8.3 (in 1 week) but suppose following patch
Comment #3
andypostThe
ReflectionMethoddeprecations should be delayed until 8.4 so version check could be added. Before that it makes no sense to slowdown the methodComment #4
andypostprobably it could use separate issue to improve the message like
self::class ... is not implemented in ... static::classComment #5
neclimdul#2982949: Introduce CallableResolver to help standardise the DX and error handling for callbacks across various subsystems added the ReflectionMethod call to 11.x so its not even in php's audit. Neat!
> it makes no sense to slowdown the method
Since we bypassed the audit, should we raise that slowdown concern with the PHP mailing list? I expect with symfony, laminas, and nette in their list some form of "if you expect reflection to be fast you're doing it wrong" response which is probably accurate but maybe.
Sample implementation post deprecation for reference:
Don't we need static:: to get that sweet LSB to make it actually useful? Interesting that this passed testing...
Comment #6
andypostUsing Google's Bard the suggested change is
Comment #7
andypostBecause there's no coverage for the method( Sounds like needs separate issue
Comment #8
andypostOne more RFC landed https://wiki.php.net/rfc/saner-inc-dec-operators
Comment #9
smustgrave commentedSeems like a simple enough change.
Feel this conversation was just had about sections that never had testing, if they belong in follow ups or not.
Think with a change this small moving the testing to a follow up wouldn't be a problem.
Maybe we open a Meta for extended test coverage for items that must be included in D11. So pushing testing to follow ups don't just hang there.
May be a thread on slack conversation though.
Comment #10
andypostThis week the beta 1 will out and I bet we'll need to split assertion deprecation and new deprecations
Comment #11
catchThe issue summary appears to be talking about more changes than the patch. The changes in the patch look fine, but I don't understand the mismatch.
Comment #12
andypostFiled separate issue for assertions #3375693: Fix deprecated assert_options() function usage for PHP 8.3 as they are blocking linker now
Checking on beta1 and found that
Reflection method is not deprecated yet but I added a fix (#5 suggested a bit different from the RFC)
the new
createFromMethodName()method is addedsetValue()now throwsget_class()throws, so replaced withstatic::as implementation should live in called classComment #13
andypostComment #14
andypostasked about it https://github.com/php/php-src/pull/11703#discussion_r1268709319
Comment #16
andypostRandom failure
Comment #17
andypostthis message is not covered with test as no test failed in #3375693-5: Fix deprecated assert_options() function usage for PHP 8.3
Comment #18
smustgrave commentedIS seems to be updated so remarking.
Comment #19
andypostRemoved hunk for
ArgumentsResolverbecause misread RFC https://github.com/php/php-src/pull/11703#discussion_r1269355095Comment #20
andypostupdated IS a bit
Comment #22
andypostPathWorkspacesTestagainComment #24
andypostBack to RTBC
Comment #27
longwaveBackported to 10.1.x as a low risk bug fix to help keep the branches in sync.
Committed and pushed 4912be319e to 11.x and d12b95d2c8 to 10.1.x. Thanks!
Comment #28
longwaveComment #29
andypostTests revealed 2 more #3375693-16: Fix deprecated assert_options() function usage for PHP 8.3
Comment #31
andypostFiled follow-up #3391281: Fix deprecated ReflectionProperty::setValue() usage for PHP 8.3
Comment #32
kopeboyThere's a get_class deprecation in Core/Render as well, see #3421556: Calling get_class() without arguments is deprecated in Drupal\Core\Render\ElementInfoManager