-
Notifications
You must be signed in to change notification settings - Fork 428
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
Fails on PHP 8.0 #803
Comments
@BadScooter1980 Could you provide more information and a backtrace of the error you are receiving. TGMPA uses WP Core under the hood, so it will need to be determined whether this is an issue with WP Core or with TGMPA. |
@jrfnl Thanks for your reply. I'm not really sure what is causing this but have just setup another test on PHP 8.0 and upon attempting to install recommended plugins, I get the following message; `Install Required Plugins Installing Plugin Advanced Custom Fields PRO (1/5) Learn more about troubleshooting WordPress.` It seems to always install the first one, but fails thereafter. No email is being sent either. Works fine on 7.4 and below. |
Turning on debug gives me the following;
|
@BadScooter1980 Thank you for that additional info. That's helpful. Would you mind testing with the |
@jrfnl No problem. Sure, we can I find it? |
@jrfnl I can confirm, TGM is not working with PHP 8. I get the same error like @BadScooter1980 I think this is a critical error, because a lot of themes on Envato use TGM, because TGM is recommended by Envato to use it. What will happen now? @jrfnl Will there be an official release after a very long time? |
@jrfnl and @BadScooter1980 Good news. I have tested the "develop" version and it seems the install and activation process is working fine. I have installed two plugins with TGM and it works like before. @jrfnl But what that means for a new release of TGM? TGM 2.6.1 is official recommended by Envato. But there will come more and more trouble in the future, if more users using PHP8. |
Where can I get the developer version? |
@BadScooter1980 go to https://github.com/TGMPA/TGM-Plugin-Activation and click on the green button "Code" to download the develop version. Make sure on the left side selection "develop" is selected. |
@CreativeDive Perfect! Got it, and works fine on 8. :) |
@CreativeDive I used it and it worked just fine. But when it comes to theme updates in WordPress, these issues are giving. http://prntscr.com/1qa53m4 |
@asim59 I can't confirm this. Tested and it works fine. |
@asim59 The error shown in your screenshot are not code errors, nor PHP warnings or anything. They are (incorrect) warnings from the ThemeCheck plugin. Please ask them to exclude TGMPA. |
Where the development version should be placed ? |
I'm still getting this error, is this fixed? |
@ivandurst It looks like the issue is only fixed in the development branch, and the stable release of the plugin has been neglected. Also, it's worth noting that WordPress is currently working on adding a basic plugin dependencies system to core, and a feature plugin is available for testing right now. For simple use-cases, this may suffice as an alternative. https://make.wordpress.org/core/2022/10/12/call-for-testing-plugin-dependencies/ EDIT: fixed typo, I meant to say the stable release of TGM Plugin Activation has been neglected. |
Yes, it seems this will be added to the core of WordPress in the near future. This could be a good and native alternative. |
It seems this https://make.wordpress.org/core/2022/10/12/call-for-testing-plugin-dependencies/ will support plugins that are available on wordpress.org only. Therefore currently this is no alternative way for me. |
Downloading and updating to the latest version of the class-tgm-plugin-activation.php file works. However, this file is misleading since the |
could you explain when will it be fixed? |
This was opened two years ago it looks like. If you go to their website and download the file from there, it will work for php 8. Not sure why it hasn't been updated here. The main things I noticed were that it was a lot of comments/annotations that were changed. I didn't look too closely at all the changes though. |
use latest /class-tgm-plugin-activation.php to solved. php8 function |
If you manage TGM with composer, here's the setup:
|
Has anybody else noticed this gives a critical error on PHP 8.0?
It allows the first plugin to be installed (irregardless of if it is local or on a repository) and then gives a critical error.
Rolling back to PHP 7.4 it works just fine.
The text was updated successfully, but these errors were encountered: