Skip to content
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

[4.1] Update deleted files list in script.php for upcoming 4.1.3 release and add missing form validation rule from 3.10 #37714

Conversation

richard67
Copy link
Member

@richard67 richard67 commented May 1, 2022

Pull Request for Issue # .

Summary of Changes

This pull request (PR) updates the lists of files and folders to be deleted on update by script.php for the upcoming 4.1.3 release - details see below - and adds file "libraries/src/Form/Rule/CssIdentifierSubstringRule.php" from the 3.10-dev branch.

The "CssIdentifierSubstringRule.php" file has been added due to a security patch with commit 44b7b89 .

In Joomla 4.x this file is not really needed because the same security fix uses the "CssIdentifierRule" from this file https://github.com/joomla/joomla-cms/blob/4.1-dev/libraries/src/Form/Rule/CssIdentifierRule.php , which is more strict.

But it makes sense to keep that file, and so I add it with this PR. It can be used by 3rd party developers to validate form fields for parts of CSS identifiers like we had them in past (J3) in the core with the "CSS class suffix" fields, while the "CssIdentifierRule" only make sense for validating complete CSS identifiers.

In detail following changes are made on the lists of files and folders to be deleted on update by script.php:

There have not been detected any files or folders to be added to the lists in script.php by my tool.

Testing Instructions

Code review should be enough.

Actual result BEFORE applying this Pull Request

File "libraries/src/Form/Rule/CssIdentifierSubstringRule.php" doesn't exist.

In file "administrator/components/com_admin/script.php":

  • File "/administrator/components/com_users/src/Field/PrimaryauthprovidersField.php" is at the end of the "$folders" array in section "// From 4.1.1 to 4.1.2".
  • File "libraries/vendor/webmozart/assert/.php_cs" - mind the missing leading "/" - is at the end of the "$files" array in section "// From 4.1.2 to 4.1.3".

Expected result AFTER applying this Pull Request

File "libraries/src/Form/Rule/CssIdentifierSubstringRule.php" exists. It is equal to https://github.com/joomla/joomla-cms/blob/3.10-dev/libraries/src/Form/Rule/CssIdentifierSubstringRule.php except of the changed copyright format at the top and the leading backslash of the "defined" statement.

In file "administrator/components/com_admin/script.php":

  • File "/administrator/components/com_users/src/Field/PrimaryauthprovidersField.php" is at the end of the "$files" array in section "// From 4.1.1 to 4.1.2".
  • The missing leading "/" has been added to file "/libraries/vendor/webmozart/assert/.php_cs" in section "// From 4.1.2 to 4.1.3".

Documentation Changes Required

None.

- Fetch commit joomla@44b7b89
- Adapt copyright format and "\defined" to Joomla 4 style
@richard67 richard67 changed the title [4.1] [WiP] Update deleted files list in script.php for upcoming 4.1.3 release [4.1] [WiP] Update deleted files list in script.php for upcoming 4.1.3 release and add missing form validation rule from 3.10 May 1, 2022
@richard67 richard67 changed the title [4.1] [WiP] Update deleted files list in script.php for upcoming 4.1.3 release and add missing form validation rule from 3.10 [4.1] Update deleted files list in script.php for upcoming 4.1.3 release and add missing form validation rule from 3.10 May 1, 2022
@richard67 richard67 marked this pull request as ready for review May 1, 2022 13:55
@richard67 richard67 added this to the Joomla 4.1.3 milestone May 1, 2022
@bembelimen bembelimen merged commit 9f512a9 into joomla:4.1-dev May 1, 2022
@bembelimen
Copy link
Contributor

thx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants