? Pending

User tests: Successful: Unsuccessful:

avatar PhilETaylor
PhilETaylor
28 Mar 2021

This is part 2 of #32592 and directed at Joomla 3

Summary of Changes

When PHP is configured to use modern Opcache, PHP will attempt to hold the compiled version cached in memory.

There are many ways to configure opcache invalidations, including never revisiting the source PHP to compile it again ever (if opcache.validate_timestamps is disabled for example)

To fully ensure that files that Joomla writes to the hard disk are taken into account by a server with a correct configured (or badly configured) opcache, we need to invalidate files from the opcache after writing a new version to the disk.

Joomla has previously used opcache_reset to do this, but its clear this is not good enough.

Testing Instructions

Hard to test unless you really know what you are doing and can reconfigure all your PHP stack to include opcaching. Also some of the edge cases this fixes will only become clear if you are an extension developer mass distributing extensions.

Install some extensions - nothing should break.

Actual result BEFORE applying this Pull Request

You can install extensions

Expected result AFTER applying this Pull Request

You can install extensions and opcache for each file is invalidated

Documentation Changes Required

none

// cc @nikosdion

avatar PhilETaylor PhilETaylor - open - 28 Mar 2021
avatar PhilETaylor PhilETaylor - change - 28 Mar 2021
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 28 Mar 2021
Category Libraries
avatar richard67
richard67 - comment - 29 Mar 2021

@PhilETaylor Unit tests failing:

There was 1 error:
1) JFilesystemPatcherTest::testApply with data set "Test delete" ('Index: lao\n==================...ames.\n', 'C:\projects\joomla-cms\tests\...atcher', 0, array('The Way that can be told of i...ames.\n'), array(null), 1, false)
Undefined index: extension
C:\projects\joomla-cms\tests\unit\core\helper.php:55
C:\projects\joomla-cms\libraries\src\Filesystem\File.php:196
C:\projects\joomla-cms\libraries\src\Filesystem\File.php:272
C:\projects\joomla-cms\libraries\src\Filesystem\Patcher.php:187
C:\projects\joomla-cms\tests\unit\suites\libraries\joomla\filesystem\JFilesystemPatcherTest.php:935
FAILURES!

See https://ci.appveyor.com/project/release-joomla/joomla-cms/builds/38443204/job/es3oo3tjn6285q8v?fullLog=true .

avatar PhilETaylor PhilETaylor - change - 29 Mar 2021
Labels Added: ?
avatar PhilETaylor
PhilETaylor - comment - 29 Mar 2021

Screenshot 2021-03-29 at 15 53 51

Would it even be Monday without another drive by thumbs down from @SharkyKZ without any further comment on why he is upset this time.

avatar richard67
richard67 - comment - 29 Mar 2021

@PhilETaylor Did his thumb down come before or after the isset check was added? If before, then it maybe was that.

avatar PhilETaylor
PhilETaylor - comment - 29 Mar 2021

It's just one of many PRs like that ... I'm not the only one complaining about it either, he has been doing it everywhere - it's so unhelpful

avatar joomla-cms-bot joomla-cms-bot - change - 1 Apr 2021
Closed_By SharkyKZ joomla-cms-bot
avatar joomla-cms-bot joomla-cms-bot - close - 1 Apr 2021
avatar SharkyKZ SharkyKZ - change - 1 Apr 2021
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2021-04-01 15:29:31
Closed_By SharkyKZ
avatar joomla-cms-bot
joomla-cms-bot - comment - 1 Apr 2021

Set to "closed" on behalf of @SharkyKZ by The JTracker Application at issues.joomla.org/joomla-cms/32918

avatar bembelimen bembelimen - change - 1 Apr 2021
Status Closed New
Closed_Date 2021-04-01 15:29:31
Closed_By joomla-cms-bot
avatar bembelimen bembelimen - change - 1 Apr 2021
Status New Pending
avatar bembelimen bembelimen - reopen - 1 Apr 2021
avatar richard67
richard67 - comment - 2 Apr 2021

For further discussion I've decided to comment in the J4 PR #32915 .

avatar PhilETaylor
PhilETaylor - comment - 2 Apr 2021

method updated here now too

avatar PhilETaylor PhilETaylor - change - 27 Apr 2021
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2021-04-27 16:42:20
Closed_By PhilETaylor
avatar PhilETaylor
PhilETaylor - comment - 27 Apr 2021

Abandoning this for Joomla 3.

The Joomla 4 version of this has received much more attention, refinement and testing and comment and fine tuning.

Joomla announced that Joomla 3.9.24 was the last version of Joomla 3 to be released (despite 3.9.25 and 3.9.26 already here, and a milestone for 3.9.27 already starting to gather issues), there is no point fixing this in Joomla 3 - but lets get it right for Joomla 4.

avatar PhilETaylor PhilETaylor - close - 27 Apr 2021

Add a Comment

Login with GitHub to post a comment