Closed (won't fix)
Project:
Drupal core
Version:
11.x-dev
Component:
other
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
28 Sep 2023 at 09:26 UTC
Updated:
10 Apr 2026 at 14:37 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #3
mondrakeThis detects more than we need :(
I think this is not usable until https://github.com/ekino/phpstan-banned-code/issues/60 is solved upstream... using
exitandechois legit in some of Drupal code and the error thrown can't be disabled.Comment #4
mondrakeActually with just 1 ignoreErrors entry added to
phpstan.neon.distwe can make it do exactly what we need for now.Comment #5
smustgrave commentedSeemed to have a CC failure. Tagging for framework manager to make the call too.
Comment #6
mondrakeActually, the failure is what I would like to be reviewed and commented…
See #2972100-23: Remove usage of uniqid
Comment #7
borisson_If we want to use this, we should probably do a dependency evaluation as well?
I think this is a good solution to ensure that we no longer use some of those unwanted functions, but I'm not sure that this phpstan plugin is the right solution, it looks like it contains some rules we don't want to (or can't) use in core itself.
Comment #8
mondrakethat's why I'd suggest to ignore those that we do not need.
Actually, mglaman/phpstan-drupal is implemented exactly with this model - it has some opinionated rules that we are just ignoring,
Comment #9
mondrakeComment #10
smustgrave commentedI for one kinda like the idea of being able to prevent certain functions from coming back. But not sure the process for adding a package takes. Would think if we pursue that all functions should be allowed and we 1 by 1 remove any we want.
Comment #11
needs-review-queue-bot commentedThe Needs Review Queue Bot tested this issue. It no longer applies to Drupal core. Therefore, this issue status is now "Needs work".
This does not mean that the patch needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.
Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.
Comment #12
mondrakeLet's be realistic.