joomla-cms icon indicating copy to clipboard operation
joomla-cms copied to clipboard

[5.2] Refactor all instances of File::makesafe() to use framework

Open Hackwar opened this issue 1 year ago • 3 comments

Summary of Changes

We are in the process of migrating away from the CMS filesystem package to use the framework version of it. This PR converts all instances where File::makesafe() is used to use the framework version. In that process, all other calls to the CMS File class in that file were converted to properly handle possible exceptions from the framework equivalent. This intentionally did not add additional error handling. I expect that to be a separate effort in the future.

Testing Instructions

Codereview.

Link to documentations

Please select:

  • [ ] Documentation link for docs.joomla.org:

  • [X] No documentation changes for docs.joomla.org needed

  • [ ] Pull Request link for manual.joomla.org:

  • [X] No documentation changes for manual.joomla.org needed

Hackwar avatar Apr 24 '24 20:04 Hackwar

missing test instructions, you change the template and the media manager plugins and more at the same time.

HLeithner avatar Apr 25 '24 12:04 HLeithner

@Hackwar the tests are failing because of this PR

HLeithner avatar May 29 '24 17:05 HLeithner

I have tested this item :red_circle: unsuccessfully on f33810e19f7924eef18deaa63ad560245d7bc39f

OK System Tests (excluding installation step): I ran the system tests both before and after applying the PR. All specifications passed in both runs.

Code validation failed: should exceptions be caught without any action? That may be fine in LocalAdapter.php:859 when deleting a TMP file fails, but even there it's not good practice to comment why the exception is ignored? and why is the exception ignored in LocalAdapter.php:306?

Failed: Since no tests are defined. Isn't the code review meant for theory and needs to be checked in practice? If test cases are added, I would test again.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/43359.

muhme avatar Aug 24 '24 09:08 muhme

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

HLeithner avatar Sep 02 '24 08:09 HLeithner