Closed (fixed)
Project:
Drupal core
Version:
10.1.x-dev
Component:
field system
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
17 Aug 2022 at 08:57 UTC
Updated:
24 Jul 2023 at 18:34 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
gawalin commentedComment #3
gawalin commentedComment #4
cilefen commentedComment #5
dhirendra.mishra commentedHere is the patch for it.
Comment #6
gawalin commented#5 patch is applied successfully.
Thanks!
Comment #7
smustgrave commentedThis issue is being reviewed by the kind folks in Slack, #need-reveiw-queue. We are working to keep the size of Needs Review queue [2700+ issues] to around 200, following Review a patch or merge require as a guide.
For something like this should it be deprecated first? Concern being if any modules are using these they will immediately break without time to fix.
And since this currently doesn't seem to be breaking core maybe these could be deprecated in 10.1 and replaced in 11?
Comment #8
smustgrave commentedI stand corrected. @quietone pointed out to me on slack https://www.drupal.org/about/core/policies/core-change-policies/drupal-d... 'we don't deprecate test classes', so I was mistaken.
Queued up patch #5 for D10 and 9.5 and can mark pending those.
Comment #9
smustgrave commentedComment #10
smustgrave commentedRerolled for D10
Comment #12
smustgrave commentedNo idea why the reroll didn't rename properly but did it by hand for 10.1.x
Comment #13
needs-review-queue-bot commentedThe Needs Review Queue Bot tested this issue. It either no longer applies to Drupal core, or fails the Drupal core commit checks. Therefore, this issue status is now "Needs work".
Apart from a re-roll or rebase, this issue may need more work to address feedback in the issue or MR comments. To progress an issue, incorporate this feedback as part of the process of updating the issue. This helps other contributors to know what is outstanding.
Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.
Comment #14
cpierce42Reviewed and tested. Patch #5 works make D9 more compatible with php 8.1
Comment #17
catchA bit confused that this hasn't bitten us yet, maybe PHP isn't actually enforcing it, but also just test code and an easy change.
Committed/pushed to 11.x and cherry-picked to 10.1.x, thanks!
Comment #18
neclimdulWe haven't run into it because its not a problem to use String as a namespace:
https://3v4l.org/RDj7e
PHPUnit actually uses a String namespace:
https://github.com/sebastianbergmann/phpunit/tree/main/src/Framework/Con...
Comment #19
neclimdulActually, the answer is in the docs:
"The following words cannot be used to name a class, interface or trait. Prior to PHP 8.0, they are also prohibited from being used in namespaces."
https://www.php.net/manual/en/reserved.other-reserved-words.php