Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Add phpsyntax and phpcs test checks, test on PHP 8.3, Action Scheduler autoloading that triggers PHP Fatal Error #32

Merged
merged 8 commits into from
Dec 11, 2023

Conversation

anamarijapapic
Copy link
Member

@anamarijapapic anamarijapapic commented Dec 8, 2023

  • Added PHP syntax test to GitHub Action test workflow
    • Fixed Unexpected '->' (T_OBJECT_OPERATOR) in ./src/Init.php on line 135 PHP syntax error on PHP 7.4
  • Updated wordpress-plugin Composer dependencies
  • Updated WP core to 6.4.2 and updated WP plugins in dev/wp
  • Added PHPCS test to GitHub Action test workflow
    • Fixed/ignored PHPCS reported issues
  • Added test against PHP 8.3

Attempt to fix #31 Plugin could not be activated because it triggered a fatal error..
Tried to reproduce the error and it's likely caused by (example):

[11-Dec-2023 11:36:18 UTC] PHP Warning:  require(/var/www/html/wp-content/plugins/medusawp/vendor/composer/../woocommerce/action-scheduler/action-scheduler.php): Failed to open stream: No such file or directory in /var/www/html/wp-content/plugins/medusawp/vendor/composer/autoload_real.php on line 41
[11-Dec-2023 11:36:18 UTC] PHP Fatal error:  Uncaught Error: Failed opening required '/var/www/html/wp-content/plugins/medusawp/vendor/composer/../woocommerce/action-scheduler/action-scheduler.php' (include_path='.:/usr/local/lib/php') in /var/www/html/wp-content/plugins/medusawp/vendor/composer/autoload_real.php:41

- update wordpress-plugin Composer dependencies
- using nullsafe operator (?->) introduced in PHP 8, replaced with null coalescing operator (??)
- fixing/ignoring phpcs reported warnings/errors
Plugin could not be activated because it triggered a fatal error.

- woocommerce/action-scheduler supports Composer, no need to define it by using a package repository
This reverts commit 9f9acc9.
- else throws PHP Fatal error:  Uncaught Error: Failed opening required ...
@anamarijapapic anamarijapapic changed the title Fix: Add phpsyntax check Fix: Add phpsyntax and phpcs test checks, test on PHP 8.3, Action Scheduler autoloading that triggers PHP Fatal Error Dec 11, 2023
@anteprimorac anteprimorac merged commit f085405 into master Dec 11, 2023
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Plugin could not be activated because it triggered a fatal error.
2 participants