PHP 8.2 deprecated the creation of dynamic (undeclared) class properties.

The getAdminCache() method in PathProcessor.php lazily sets $this->adminCache,
but the property is never declared in the class definition, triggering:

Deprecated function: Creation of dynamic property
Drupal\subpathauto\PathProcessor::$adminCache is deprecated in
Drupal\subpathauto\PathProcessor->getAdminCache() (line 396)

Comments

omar_emailat created an issue. See original summary.

omar_emailat’s picture

StatusFileSize
new439 bytes
mably’s picture

Hi @omar_emailat, thanks for your patch.

Could you provide an MR please?

omar_emailat’s picture

This issue was submitted to the wrong project by mistake. The affected module is subpathauto, not pathauto. The
PathProcessor::$adminCache dynamic property deprecation originates in subpathauto's PathProcessor class.

I have created the correct issue here: PHP 8.2 deprecation

Please close this issue. Apologies for the noise.

omar_emailat’s picture

Status: Active » Closed (cannot reproduce)

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.