? Pending

User tests: Successful: Unsuccessful:

avatar wilsonge
wilsonge
22 Mar 2020

Summary of Changes

Moves the libraries autoloader into the cache directory. It's been suggested as it's a more transient file and can safely be deleted - like other files in the cache. In the future we can even consider fully storing it in the cache.

It's also now documented in the README.md for those who might be cloning from github for the first time.

Testing Instructions

Check autoloader file is present in administrator/cache/autoload_psr4.php

Documentation Changes Required

Yes - once the page is created.

avatar wilsonge wilsonge - open - 22 Mar 2020
avatar wilsonge wilsonge - change - 22 Mar 2020
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 22 Mar 2020
Category Repository Libraries
avatar zero-24
zero-24 - comment - 22 Mar 2020

In the future we can even consider fully storing it in the cache.

What do you mean by that?

avatar richard67
richard67 - comment - 22 Mar 2020

We shouldn’t forget to update the Patchtester accordingly when this is merged, because Patchtester after recent changes deletes the auto loader file when applying or reverting patches.

avatar zero-24
zero-24 - comment - 22 Mar 2020

maybe we should better provide an API to that so we can all it from the "clear cache" page and the installer / updater too?

avatar wilsonge wilsonge - change - 22 Mar 2020
Labels Added: ?
avatar Fedik
Fedik - comment - 22 Mar 2020

Finally someone made it ?

Only minor issue here, if the cache driver not a "file" (eg APC, memcache) then a "clear cache" button will not delete this file, and it still need to be deleted manually. Maybe good idea to note it also.

avatar wilsonge
wilsonge - comment - 22 Mar 2020

What do you mean by that?

Nik suggested as it’s just a nested object we loop through and set into JavaScript JSON we can store it as a regular piece of cache potentially. Not going there quite yet but this is a logical step either way. We don’t want people randomly deleting files in library - but files in cache are just fine

avatar zero-24
zero-24 - comment - 22 Mar 2020

This is the reason i proposed an helper / api to delete it so we can run it on any cache driver :-)

avatar zero-24
zero-24 - comment - 22 Mar 2020

Hmm i dont get the JaceScript idea yet but i'm happy to try and learn something new when ready :-)

avatar wilsonge
wilsonge - comment - 22 Mar 2020

Forget JavaScript I mean json. I’m gonna go sleep before I write anything more on GitHub today!

avatar dgrammatiko
dgrammatiko - comment - 23 Mar 2020

This is the reason i proposed an helper / api to delete it so we can run it on any cache driver

There is an Event (new one in J4) onAfterInstall (or something like that). You can hook up the clean procedure there

avatar wilsonge
wilsonge - comment - 23 Mar 2020

We're already hooking on that https://github.com/joomla/joomla-cms/blob/4.0-dev/plugins/extension/namespacemap/namespacemap.php#L57 But it doesn't solve the issue of direct pulls from git (especially when we namespace existing extensions like we do at the moment - obviously as time goes on it will happen less - but it's still a thing for our local Joomla git work - in a real site there are no issues)

avatar infograf768 infograf768 - change - 23 Mar 2020
Title
Move the autoload file into the cache. Document in README
[4.0] Move the autoload file into the cache. Document in README
avatar infograf768 infograf768 - edited - 23 Mar 2020
avatar wilsonge
wilsonge - comment - 23 Mar 2020

This is the reason i proposed an helper / api to delete it so we can run it on any cache driver :-)

This would be good too :) At the same time though it needs to be a long lived cache item (as we'll invalidate the cache entry when extensions change)

avatar wilsonge wilsonge - change - 28 Mar 2020
Status Pending Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2020-03-28 19:27:25
Closed_By wilsonge
avatar wilsonge wilsonge - close - 28 Mar 2020
avatar wilsonge wilsonge - merge - 28 Mar 2020
avatar wilsonge
wilsonge - comment - 28 Mar 2020

Merging as a step 1. @zero-24 if you can make it use the cache api i'd definitely be interested.

avatar zero-24
zero-24 - comment - 28 Mar 2020

I was not talking about cache just that would be an API / helper for that ;)

avatar richard67
richard67 - comment - 28 Mar 2020

We shouldn’t forget to update the Patchtester accordingly when this is merged, because Patchtester after recent changes deletes the auto loader file when applying or reverting patches.

I've made a PR for the Patchtester for that.

Add a Comment

Login with GitHub to post a comment