? ? Pending

User tests: Successful: Unsuccessful:

avatar zero-24
zero-24
21 Nov 2021

Pull Request for Issue #36041

Summary of Changes

Take the changes from #36041 and apply it to J3.10 to fix that php8.1 issues
Thanks and all the credits go to @nikosdion

Testing Instructions

  • Install this package on PHP your current php version
  • Install this package on PHP 8.1
  • check the test instructions here: #36041 as its a backport to 3.10

Actual result BEFORE applying this Pull Request

issues with php 8.1

Expected result AFTER applying this Pull Request

The known issues with php 8.1 are gone

Documentation Changes Required

none

cc @richard67 would be great when you could take a look on your php 8.1 setup

avatar zero-24 zero-24 - open - 21 Nov 2021
avatar zero-24 zero-24 - change - 21 Nov 2021
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 21 Nov 2021
Category Administration com_categories Libraries
avatar zero-24 zero-24 - change - 21 Nov 2021
The description was changed
avatar zero-24 zero-24 - edited - 21 Nov 2021
avatar zero-24 zero-24 - change - 21 Nov 2021
Labels Added: ?
avatar zero-24 zero-24 - change - 21 Nov 2021
The description was changed
avatar zero-24 zero-24 - edited - 21 Nov 2021
avatar richard67
richard67 - comment - 21 Nov 2021

All unit tests were failing in Appveyor and Drone, except of the one for PHP 8, so there could be something wrong. I've restarted Appveyor and Drone to see if it was an unrelated issue.

avatar zero-24
zero-24 - comment - 22 Nov 2021

All unit tests were failing in Appveyor and Drone, except of the one for PHP 8, so there could be something wrong. I've restarted Appveyor and Drone to see if it was an unrelated issue.

when you check the datails for the php8 test it also fails but seems to be still an allowed failer and there for is marked as "passed".

avatar richard67
richard67 - comment - 22 Nov 2021

I see … then there is really something wrong.

avatar zero-24
zero-24 - comment - 22 Nov 2021

To me it looks like an issue with the tests given that i can not reproduce any issues with the changed code.

avatar HLeithner
HLeithner - comment - 22 Nov 2021

The issue is that the cache now works for all instances of the class if it has the same cache key (dbtype, dbname, tablename).
Since the table is already loaded in an earlier test, the cache is already filled. The question is what's in the cache and is it wrong for the next test call.

@wilsonge can you have a look?

avatar richard67 richard67 - test_item - 22 Nov 2021 - Tested successfully
avatar richard67
richard67 - comment - 22 Nov 2021

I have tested this item successfully on 7f330e2

Tested in the same way as for #36041 plus checked that without the PR, creating a new article fails on PHP 8.1-dev with an exception without this PR applied, while it succeeds with this PR applied.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/36083.

avatar wilsonge
wilsonge - comment - 22 Nov 2021

I’ll take a quick look but if it’s not a fairly quick fix my priorities need to be on the two J4 upgrade issues (media dir + classloader) before RC’s this weekend I’m afraid

avatar zero-24
zero-24 - comment - 24 Nov 2021

@HLeithner @rdeutz @wilsonge Looks like the test has issues when I do this the tests passes: dee42a6

Before that the key is: mock__925f07b0:mock__925f07b0:#__extensions (src) which I dont understand where they are comming from. Any Ideas?

Could it be that somewhere the $this->_db has not been setup correctly in the tests?

avatar richard67
richard67 - comment - 24 Nov 2021

@zero-24 Regarding the title of this PR, I assume you mean compat(ibility) and not combat (which is a military term you know from the German word „Kombattant“), right?

avatar zero-24 zero-24 - change - 24 Nov 2021
Title
[3.10] Backport php8.1 combat fixes
[3.10] Backport php8.1 compatibility fixes
avatar zero-24 zero-24 - edited - 24 Nov 2021
avatar zero-24
zero-24 - comment - 24 Nov 2021

Updated

avatar joomla-cms-bot joomla-cms-bot - change - 26 Nov 2021
Category Administration com_categories Libraries Administration com_categories Libraries Unit Tests
avatar zero-24 zero-24 - change - 26 Nov 2021
Labels Added: ?
avatar zero-24
zero-24 - comment - 26 Nov 2021

@HLeithner @nibra can you please have a look here and hit merge once you agree on the test changes that forces the TestCaseDatebase here to use sqlite so this test can pass?

avatar nikosdion
nikosdion - comment - 26 Nov 2021

@nibra Should we work on the installer issues for PHP 8.1? I may have some limited time over the weekend.

avatar zero-24
zero-24 - comment - 26 Nov 2021

@nikosdion what installer issues are you working on?

The test issues here where something different because the mocked database was not fully setup.

avatar nikosdion
nikosdion - comment - 26 Nov 2021

@zero-24 I haven't started working on it yet. I was told by @richard67 that he had trouble installing Joomla on PHP 8.1. I am gonna give it a go and see if I can fix anything to fix. Fair enough?

avatar zero-24
zero-24 - comment - 26 Nov 2021

Sure. I only want to make sure there is no double work going on as here we had issues with the installer unittests that where issues with the tests but you are talking about the installer of the CMS thats a different thing and should be checked when there are any issues.

avatar zero-24
zero-24 - comment - 26 Nov 2021

@nikosdion just for the record and to not waste your time. I have just installed 3.10 (with this patch here) as well as a current nighly build of J4 (that already include your patches) on PHP 8.1-dev (provided by devilbox) without any issues.

avatar zero-24
zero-24 - comment - 26 Nov 2021

Will merge here now based on the tests done by @richard67 as well as the now passing unittests and the tests done on J4 for the 1:1 changes taken down to J3 with this PR.

Thanks ?

avatar zero-24 zero-24 - change - 26 Nov 2021
Status Pending Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2021-11-26 22:11:15
Closed_By zero-24
avatar zero-24 zero-24 - close - 26 Nov 2021
avatar zero-24 zero-24 - merge - 26 Nov 2021
avatar nibra
nibra - comment - 26 Nov 2021

@nikosdion This seems to have been taken care of. I'd love to work with you on code another time!

avatar nikosdion
nikosdion - comment - 27 Nov 2021

@zero-24 @nibra Thank you, lads! Have a great weekend :)

avatar richard67
richard67 - comment - 27 Nov 2021

@nikosdion just for the record and to not waste your time. I have just installed 3.10 (with this patch here) as well as a current nighly build of J4 (that already include your patches) on PHP 8.1-dev (provided by devilbox) without any issues.

@zero-24 I had issues only when display errors was switched on in PHP settings or by switching on debug system in backend.

avatar richard67
richard67 - comment - 27 Nov 2021

@zero-24 P.S.: See this comment and those after that about the issues I had: #36041 (comment) and how they were circumvented by switching off error reporting.

avatar nikosdion
nikosdion - comment - 27 Nov 2021

@richard67 Gotcha. Yeah, most of these cannot be fixed right now. We need to add a bunch of PHP 8 annotations and even then we will have some deprecated notices we cannot get rid of. I had already said that in my comment on #36041, I am repeating here for the sake of completeness. No need to reply :)

avatar zero-24
zero-24 - comment - 27 Nov 2021

Hmm interesting i did not got any like that. But i have not checked the error reporting setting yet. Under xampp it IIRC was on i'm not sure how it is under devilbox. If anything they are non-blocking issues for now and can go with the next release as the normal install works without issues for now.

avatar richard67
richard67 - comment - 27 Nov 2021

@zero-24 I haven't checked yet if I have the same issues with 3.10-dev. So or so they are not blocking. I just wanted to make sure you are aware of them.

Add a Comment

Login with GitHub to post a comment