Open ethanclevenger91 opened 4 months ago
@ethanclevenger91 Thanks for creating the issue! @MathieuLamiot What do you think about this one?
Hello, this is a known issue that we can't really fix: the issue comes from one of our dependency, not our code directly. ActionScheduler does not use namespace.
@piotrbak for more internal details: https://wp-media.slack.com/archives/C43T1AYMQ/p1720021115437999?thread_ts=1720021115.437999&cid=C43T1AYMQ
Would it make sense to move that dependency into its own directory then so that it isn't subject to the autoloader rules defined here?
Pinging @Tabrisrp for a second look
Re-opening following QA getting the following error when updating to the new version, because of the path change:
[12-Aug-2024 13:11:38 UTC] PHP Fatal error: Uncaught Error: Class 'ActionScheduler_Lock' not found in /var/www/rocketlabsqa.ovh/htdocs/wp-content/plugins/wp-rocket/inc/Dependencies/ActionScheduler/classes/abstracts/ActionScheduler.php:29
Stack trace:
#0 /var/www/rocketlabsqa.ovh/htdocs/wp-content/plugins/wp-rocket/inc/Dependencies/ActionScheduler/classes/ActionScheduler_QueueRunner.php(106): ActionScheduler::lock()
#1 /var/www/rocketlabsqa.ovh/htdocs/wp-includes/class-wp-hook.php(324): ActionScheduler_QueueRunner->maybe_dispatch_async_request()
#2 /var/www/rocketlabsqa.ovh/htdocs/wp-includes/class-wp-hook.php(348): WP_Hook->apply_filters()
#3 /var/www/rocketlabsqa.ovh/htdocs/wp-includes/plugin.php(517): WP_Hook->do_action()
#4 /var/www/rocketlabsqa.ovh/htdocs/wp-includes/load.php(1280): do_action()
#5 [internal function]: shutdown_action_hook()
#6 {main}
thrown in /var/www/rocketlabsqa.ovh/htdocs/wp-content/plugins/wp-rocket/inc/Dependencies/ActionScheduler/classes/abstracts/ActionScheduler.php on line 29
Steps:
This is likely happening because action scheduler actions are still running while we update, and one of the calls is trying to access the old path.
To be confirmed: is the update done with the WordPress update system, or through a branch switch on git?
It'll not be part of the 3.16.4. There are fatal errors related to this change when actions are running during the update. Slack convo: https://wp-media.slack.com/archives/CUT7FLHF1/p1723464013473519
Describe the bug Composer is yelling about a variety of classes not conforming to PSR-4 autoloading standards:
I don't believe this has any actual impact on functionality, since I'm assuming that the plugin is not dependent on my autoloader to make sure all required files are loaded.
To Reproduce Steps to reproduce the behavior:
composer require wp-media/wp-rocket
Expected behavior No warnings.
Additional context Current versions:
wp-media/wp-rocket:v3.16.2.1
Acceptance Criteria (for WP Media team use only) Clear instructions for developers, to be added before the grooming