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
Add a plugin with a nag message to update PHP #11498
Conversation
; Note : All ini files need to be saved as UTF-8 | ||
|
||
PLG_SYSTEM_PHPVERSIONCHECK="System - PHP Version Check" | ||
PLG_SYSTEM_PHPVERSIONCHECK_SECURITY_ONLY="Your PHP version, %1$s, is only receiving security fixes at this time. This means your PHP version will soon no longer be supported. We recommend planning to upgrade to a newer PHP version before it reaches end of support on %2$s. Please contact your host for upgrade instructions." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i am concerned that non technical users dont know what php is. in the other message you say "by the PHP project."
Can you change this message to
"s only receiving security fixes at this time from the PHP project."
i am concerned that non technical users dont know what php is. |
It would be beneficial if this explained the benefits of upgrading the php version and how easy it usually is |
Well without turning this into a full screen notification, hard to really explain it. Totally valid concern, but not easy to deal with. Unlike other projects who encourage users to not need to be technical, I think it's borderline irresponsible to not at least know what platform(s) your site is running on. |
I live in the real world not the technical world. ;) If you dont explain the benefits or how easy it usually is to upgrade we will lose users who just assume their hosting doesnt support joomla. I am not against this concept just the implementation |
Suggestions welcome. I'm just trying to keep this from becoming a full screen notification. |
==>
|
For reference our previous message was
|
; Note : All ini files need to be saved as UTF-8 | ||
|
||
PLG_SYSTEM_PHPVERSIONCHECK="System - PHP Version Check" | ||
PLG_SYSTEM_PHPVERSIONCHECK_SECURITY_ONLY="Your PHP version, %1$s, is only receiving security fixes at this time from the PHP project. This means your PHP version will soon no longer be supported. We recommend planning to upgrade to a newer PHP version before it reaches end of support on %2$s. Please contact your host for upgrade instructions." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you add this sentence to this string as well
Joomla will be faster and more secure if you upgrade to a newer PHP version (PHP 7.x is recommended).
The new language files needs to be added to the install.xml ;) |
And the update sql ;P |
What update SQL? |
That it get enabled on update. The update sql in com_admin :) |
Ignore that i have just not saw it. Sorry |
Should this message be shown to super users/administrators only perhaps? We may assume they know what PHP is. |
Even that's an overly broad assumption. |
I don't think that's a valid assumption at all.
|
In that case just show it to everyone and they can google what PHP is. |
I hope that was a joke
|
Right now it shows on the backend to everyone similarly to the 2.5 EOS plugin. |
i don't have any server to test this since my servers php version are all 7.x ... ok. that it's probably good news |
Should be tagged to New Feature I guess. This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/11498. |
I have tested this item This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/11498. |
+1 on Michael's approach (or you will all bitterly regret being stubborn in a year or so, as always).
|
Just have balls and commit this without watering it down - listen to those of us that have to deal with the idiots on PHP 5.3 on a daily basis... It should be in your face, in red and bold, on every page and un-dismissable. |
this plugin / message is needed for reasons already discussed, nobody said not to add this
Only a suggestion if this is to be displayed in non-control panel pages
|
Ok, i see you all prefer the error aproach. since this is the current practice (2.5 EOL, joomla update notification, extension updates notification) is consistent, so fine by me. @mbabker i have just one question, what happens when php 7.1 is released/used. |
@@ -135,6 +135,7 @@ private function getPhpSupport() | |||
|
|||
// Check the PHP version's support status using the minor version | |||
$activePhpVersion = PHP_MAJOR_VERSION . '.' . PHP_MINOR_VERSION; | |||
$activePhpVersion = '5.3'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nope?
The checks default to the PHP version being supported so messages aren't rendered for unknown versions. When a PHP version isn't found in the array, then it takes no action (we don't have data on the PHP version so we err on the side of caution and do nothing), specifically this line. |
It's a plugin, disable it if you're tired of Joomla nagging. At least I'm giving you that option and not hardcoding it directly into |
ok thanks, will test faking the php versions. |
I have tested this item This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/11498. |
yes, after googling they will find a web page with instructions to disable the plugin, Too annoying messages are usually turned off and then forgotten but i looked at the code you have already limitted the display to control panel,
in fact i think it is great now !!, i ll test |
Which I think is the wrong move but politics seems to dictate that we can't be excessively annoying in telling users they should be responsible and update their stuff. |
* | ||
* @since __DEPLOY_VERSION__ | ||
*/ | ||
private function displayMessage() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks strange that a display*
method returns a boolean, I'd call it getDisplayStatus()
maybe
Otherwise: Great idea 100
I have tested this item This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/11498. |
1 similar comment
I have tested this item This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/11498. |
I have tested this item This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/11498. |
The only thing that last commit does is change the method name per @elkuku suggestion. Shouldn't need re-testing. |
I have tested this item This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/11498. |
Merged to 3.7.x with e4894d2 Thanks Michael! |
Doing the job of the lazy bot and removing the rtc flag |
Summary of Changes
Far too many people run Joomla on outdated PHP versions (per the stats only 37% of Joomla! 3.5+ installs are on a currently supported PHP version). To help alleviate this, I propose a nag message to tell people to upgrade.
This plugin checks three conditions: whether the PHP version is still fully supported, whether it has entered security support only, or whether it is unsupported by the PHP project. I don't particularly care whether the user is running a PHP version custom compiled by some Linux distro that claims they are still supporting it; if PHP isn't supporting the branch anymore they need to update.
Testing Instructions
Apply the pull request; discover, install, and enable the plugin. For PHP 5.3 thru 5.5 you should get a red error message telling you the PHP version is unsupported and you should upgrade yesterday. PHP 5.6 and 7.0 won't emit anything because neither has reached a security only state, however if you want to test that aspect of things go into the plugin and change the date for when security support ends in the data array to a date before today (today being whatever day you test this).
Documentation Changes Required
None. No new API is introduced.
Maintenance Efforts Added
As the support dates for PHP branches change (new versions added, dates postponed), the data array in this plugin will need to be updated. Generally this is a once a year requirement when a new version is added only.
Joomla, Stop Nagging Me!!!
Upgrade, plain and simple. Oh, not an option? As long as you understand you are running unsupported software, you can disable the plugin and stop being nagged. But you should still upgrade yesterday.