User tests: Successful: Unsuccessful:
Pull Request for Issue #35487
Removal of a single error suppressor, in a file thats already deprecated without replacement, to ensure PHP 8 compatibility with the JoomlaTools framework when PHP8 and debug is used
... and "because its better"
Install Joomla 3 and set up caching with Cache Lite, on a PHP 8 server that runs XDebug and DocMan from https://www.joomlatools.com (I know a very specific and very niche set up)
Attempt to access site.
"500 error include_once(Cache/Lite.php): Failed to open stream: No such file or directory"
Enable error reporting/debug mode and then you get a JoomlaTools framework Exception:
KExceptionError | Warning [500]
include_once(Cache/Lite.php): Failed to open stream: No such file or directory
.../libraries/src/Cache/Storage/CacheliteStorage.php:347
No errors on loading home page
Status | New | ⇒ | Pending |
Category | ⇒ | Libraries |
Labels |
Added:
?
|
I doubt it, #10862 is talking about "require_once" which creates a fatal error (even in PHP 8) whereas the code that is in Joomla 3.10.x today is an "include_once" which will never create a fatal error, only a warning, unless you have XDebug installed and JoomlaTools Framework installed (which is responsible for raising a warning into a KExceptionError
Exception.
related noise: #35487
I have tested the code change on my system that exhibited this issue and it resolves the issue.
@PhilETaylor Appveyor is failing for PHP versions 7.* with following message
Command executed with exception: PHP Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; Cache_Lite has a deprecated constructor in C:\projects\joomla-cms\libraries\vendor\pear\cache_lite\Cache\Lite.php on line 29
e.g. here: https://ci.appveyor.com/project/release-joomla/joomla-cms/build/job/hqwu27rij3ckij0h
Awesome isn't it... when people dont listen to my expertise but demand something to be changed for their own sake, who propose a solution but dont test it...
The problem is that Cache_Lite is abandoned and unmaintained and has been for years. The last version was released on 2019-11-19.
I think the best solution is to abandon this PR.
As I said before
What is the point in fixing a single error suppression in a single feature that is hardly used by anyone (cache lite) and that is already deprecated and removed from Joomla 4, and that requires at least 4 specific things (PHP8, JoomlaTools, XDebug AND removal of cache_lite from previously working server) in order to trigger...
This is not really fixing anything except a very very very edge case. There are bigger issues to resolve.
Status | Pending | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2021-09-11 12:48:25 |
Closed_By | ⇒ | PhilETaylor |
@PhilETaylor Does it need to re-open the issue #35487 ?
No just ignore it.. its such an edge case and removing this one error suppressor in the whole of the 700+ that Joomla uses is literally not important.
Of course thats just IMHO... Im not a maintainer...
I mean 2019 is only two years. I can't see the appveyor issue anymore. But the constructor thing basically means cache lite isn't ever working on PHP 8 right? If so then we can also add a prereq that ensures isSupported returns false for php 8 on top of this change (which looks good to me).
I mean I like the change anyhow just for removing the error supressor if nothing else.
Presumably this would also have fixed #10862