[4.4] Converting File class from CMS to framework package#40257
[4.4] Converting File class from CMS to framework package#40257laoneo merged 3 commits intojoomla:4.4-devfrom
Conversation
|
This needs some proper testing as the system tests are crashing on various places. Really I would split this pr file by file and add proper testing instructions, just to be sure we do not break something. |
|
The used code in the File classes are identical. |
|
Why are then the system tests failing on various places? |
|
I reverted one file which had also calls to File::getExt(). That makes this all pass again. |
|
Thanks! |
|
Since this PR is merged some of my extensions can not be updated anymore using the Joomla installer. ReasonJoomla\CMS\Filesystem\File::delete() just ignores files which should be deleted but do not exist. Joomla\Filesystem\File::delete() on the other hand throws an error. Therefore update scripts which delete some files already in the preflight suddenly do not work anymore. They stop in the middle of the updating process and outputting "Joomla\Filesystem\File::delete(): Failed deleting inaccessible file ". @Hackwar @laoneo Do you think, should we update Joomla\Filesystem\File::delete() to ignore non existing files instead of throwing an error? From my point of view it is not necessary to throw an error if you try to delete a file which is not existent. |



Summary of Changes
This PR changes the
Joomla\CMS\Filesystem\Fileclass over toJoomla\Filesystem\Filewhere possible without any further changes. The remaining 12 files using the CMS class are using methods which aren't in the framework class or are in there differently.Testing Instructions
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