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

[3] Remove error suppressor to provide better compatibility with JoomlaTools #35507

Closed
wants to merge 2 commits into from
Closed

Conversation

PhilETaylor
Copy link
Contributor

Pull Request for Issue #35487

Summary of Changes

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"

Testing Instructions

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.

Actual result BEFORE applying this Pull Request

"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

Expected result AFTER applying this Pull Request

No errors on loading home page

Documentation Changes Required

joomla/coding-standards#274

Co-authored-by: Tobias Zulauf <zero-24@users.noreply.github.com>
@wilsonge
Copy link
Contributor

wilsonge commented Sep 8, 2021

Presumably this would also have fixed #10862

@PhilETaylor

This comment was marked as abuse.

@skurvish
Copy link

skurvish commented Sep 8, 2021

I have tested the code change on my system that exhibited this issue and it resolves the issue.

@richard67
Copy link
Member

@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

@PhilETaylor

This comment was marked as abuse.

@richard67
Copy link
Member

@PhilETaylor Does it need to re-open the issue #35487 ?

@PhilETaylor

This comment was marked as abuse.

@PhilETaylor

This comment was marked as abuse.

@wilsonge
Copy link
Contributor

wilsonge commented Sep 21, 2021

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.

@PhilETaylor

This comment was marked as abuse.

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.

6 participants