When running Omeka S with the Clean Url module version 3.17.7 on PHP 8.3.2, the following deprecation warning is logged:
User Deprecated: Creation of dynamic property CleanUrl\Router\Http\CleanRoute::$priority is deprecated in /var/www/html/vendor/laminas/laminas-router/src/SimpleRouteStack.php on line 285
This warning suggests that dynamic property creation is deprecated and potentially harmful for future PHP versions, impacting the module's compatibility and stability.
Steps to Reproduce
Install Omeka S version 4.0.4 with PHP 8.3.2.
Install and activate Clean Url module version 3.17.7.
Access a feature or page that triggers routing processes in the Clean Url module.
Check the PHP error log or Omeka S log for the deprecation warning.
Expected Behavior
The Clean Url module should not rely on deprecated features such as dynamic property creation, ensuring compatibility with current and future PHP versions without generating deprecation warnings.
Actual Behavior
A deprecation warning is logged due to the use of a dynamic property, indicating potential compatibility issues with future PHP versions.
Suggested Solution
A potential solution could be to explicitly declare the $priority property within the CleanRoute class or refactor the code to avoid relying on dynamic properties. This change would help ensure compatibility with PHP 8.3.2 and beyond, addressing the deprecation warning.
class CleanRoute implements RouteInterface {
protected $priority; // Explicitly declare the property
// The rest of the class implementation
}
Additional Context
This issue was identified during routine maintenance and testing of Omeka S with the latest PHP version. Addressing it would help maintain the stability and compatibility of the Clean Url module.
Environment
Issue Description
When running Omeka S with the Clean Url module version 3.17.7 on PHP 8.3.2, the following deprecation warning is logged:
This warning suggests that dynamic property creation is deprecated and potentially harmful for future PHP versions, impacting the module's compatibility and stability.
Steps to Reproduce
Expected Behavior
The Clean Url module should not rely on deprecated features such as dynamic property creation, ensuring compatibility with current and future PHP versions without generating deprecation warnings.
Actual Behavior
A deprecation warning is logged due to the use of a dynamic property, indicating potential compatibility issues with future PHP versions.
Suggested Solution
A potential solution could be to explicitly declare the
$priority
property within theCleanRoute
class or refactor the code to avoid relying on dynamic properties. This change would help ensure compatibility with PHP 8.3.2 and beyond, addressing the deprecation warning.Additional Context
This issue was identified during routine maintenance and testing of Omeka S with the latest PHP version. Addressing it would help maintain the stability and compatibility of the Clean Url module.