Feature PR-5.0-dev b/c break PR-5.1-dev Pending

User tests: Successful: Unsuccessful:

avatar Hackwar
Hackwar
13 Mar 2023

Summary of Changes

This PR extends the CMS File class from the framework Filesystem File class. This removes all duplicate code from the CMS class, using the framework methods where possible. This means that now this class throws exceptions and that all FTP remnants are removed.
Looking at the remaining code, we should consider moving some of this into the framework as well. We probably should deprecate canFlushFileCache() as well.
I've changed this a bit agressively, no remaining method stubs with deprecation notices, no hints at the removed FTP code, but I hope that this is still okay.

Testing Instructions

Everything should work like before... I think this should rather be done by codereview.

Link to documentations

Please select:

  • Documentation link for docs.joomla.org:

  • No documentation changes for docs.joomla.org needed

  • Pull Request link for manual.joomla.org:

  • No documentation changes for manual.joomla.org needed

avatar joomla-cms-bot joomla-cms-bot - change - 13 Mar 2023
Category Libraries
avatar Hackwar Hackwar - open - 13 Mar 2023
avatar Hackwar Hackwar - change - 13 Mar 2023
Status New Pending
avatar HLeithner
HLeithner - comment - 13 Mar 2023

same as Folder, can't be done this way.

Also we don't use underscore for class names, in this case we use PascalCase

avatar Hackwar Hackwar - change - 14 Mar 2023
Labels Added: PR-5.0-dev
avatar laoneo
laoneo - comment - 14 Mar 2023

Is there some code which needs to stay in the CSM File class? From a quick glance most of it can be moved to the framework package. Then I would even go a step further and deprecate the whole class.

avatar Hackwar
Hackwar - comment - 14 Mar 2023

I'm working on a deprecation PR for the whole filesystem package in the CMS library for 4.4. Will take me some time. Most likely I will have to re-do these PRs here then again.

avatar laoneo
laoneo - comment - 14 Mar 2023

I tried it already #37518. It is a hell lot of work to change the core.

avatar Hackwar
Hackwar - comment - 14 Mar 2023

Yes, I know. But we have to do it at some point and 4.4 is the point.

avatar Hackwar
Hackwar - comment - 14 Mar 2023

The comments in your PR are also something that we have to fix in the framework package then.

avatar Hackwar
Hackwar - comment - 3 Apr 2023

I did some further cleanup and copied code over to the framework Filesystem package. This means that for this to be able to be merged, joomla-framework/filesystem#54 and joomla-framework/filesystem#55 need to be merged first. This leaves the upload() method as the last one which we need to replace to really completely remove this class in 6.0.

avatar Hackwar Hackwar - change - 8 Apr 2023
Labels Added: ? b/c break
avatar Hackwar Hackwar - change - 18 Apr 2023
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2023-04-18 12:06:41
Closed_By Hackwar
avatar Hackwar Hackwar - close - 18 Apr 2023
avatar Hackwar Hackwar - change - 18 Apr 2023
Status Closed New
Closed_Date 2023-04-18 12:06:41
Closed_By Hackwar
avatar Hackwar Hackwar - change - 18 Apr 2023
Status New Pending
avatar Hackwar Hackwar - reopen - 18 Apr 2023
avatar HLeithner
HLeithner - comment - 30 Sep 2023

This pull request has been automatically rebased to 5.1-dev.

avatar Hackwar Hackwar - change - 13 Nov 2023
Labels Added: Feature
Removed: ?
avatar Hackwar Hackwar - change - 25 Dec 2023
Labels Added: PR-5.1-dev
avatar Hackwar Hackwar - change - 2 Jan 2024
Title
[5.0] Extending Joomla\CMS\Filesystem\File from Joomla\Filesystem\File
[5.1] Extending Joomla\CMS\Filesystem\File from Joomla\Filesystem\File
avatar Hackwar Hackwar - edited - 2 Jan 2024
avatar Hackwar Hackwar - change - 25 Feb 2024
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2024-02-25 09:14:36
Closed_By Hackwar
avatar Hackwar
Hackwar - comment - 25 Feb 2024

I doubt this will ever be merged, so I'm closing this.

avatar Hackwar Hackwar - close - 25 Feb 2024

Add a Comment

Login with GitHub to post a comment