-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[5.1] Extending Joomla\CMS\Filesystem\File from Joomla\Filesystem\File #40093
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
Conversation
|
same as Folder, can't be done this way. Also we don't use underscore for class names, in this case we use PascalCase |
|
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. |
|
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. |
|
I tried it already #37518. It is a hell lot of work to change the core. |
|
Yes, I know. But we have to do it at some point and 4.4 is the point. |
|
The comments in your PR are also something that we have to fix in the framework package then. |
….0-filesystem-file # Conflicts: # libraries/src/Filesystem/File.php
…nto 5.0-filesystem-file # Conflicts: # libraries/src/Filesystem/File.php
|
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. |
|
This pull request has been automatically rebased to 5.1-dev. |
|
I doubt this will ever be merged, so I'm closing this. |
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