Skip to content

Implement a lint rule that ensures that functions/classes with no "gutenberg_" prefix are properly guarded #44151

@anton-vlasenko

Description

@anton-vlasenko

What problem does this address?

Currently, it's possible to define a PHP function (class) with any prefix.
This repeatedly resulted in fatal errors due to duplicate function names between Core and Gutenberg.

What is your proposed solution?

A new lint rule should be implemented.
It should check that PHP functions/classes with no (G|g)utenberg_ prefix are properly guarded with function_exists() or class_exists().

Metadata

Metadata

Labels

[Type] Code QualityIssues or PRs that relate to code quality

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions