-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
[5.1] Migrating Joomla\CMS\Filesystem\Folder::exists() to is_dir() #40131
Conversation
It would be helpful for extension developers when you can write a couple of words in the pr description why you have used |
Done. |
…sdir # Conflicts: # administrator/components/com_admin/script.php # plugins/editors/tinymce/src/PluginTraits/DisplayTrait.php
I fixed the merge conflict but I'm not 100% sure if it make sense, since now we call |
The nice thing is, that we are not changing third party code, but just our core code. After this change, third party code will still behave the same. 😉 |
The Codestyle error reported here is unrelated to this PR. |
I have tested this item ✅ successfully on 58f6055 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/40131. |
Thx |
Summary of Changes
We are migrating away from the
Joomla\CMS\Filesystem
classes to the framework Filesystem classes. This PR replaces all occurences ofJoomla\CMS\Filesystem\Folder::exists()
withis_dir()
. The former method does not exist in the framework class, mainly because it is an unnecessary wrapper for the later. Where necessary, an import forJoomla\Filesystem\Path
has been added and unnecessary ones removed. All the existing imports toJoomla\CMS\Filesystem\Path
are changed to the framework package in another PR.Joomla\Filesystem\Path::clean()
should be used when the given path can not be 100% assumed to be safe, for example when the path is coming from some outside input. That method will make sure that a path will have the systems directory separator and not contain double slashes or double backslashes.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