[6.0] Replace all joomla/string inflector code#45040
Merged
softforge merged 9 commits intojoomla:6.0-devfrom Aug 11, 2025
Merged
[6.0] Replace all joomla/string inflector code#45040softforge merged 9 commits intojoomla:6.0-devfrom
softforge merged 9 commits intojoomla:6.0-devfrom
Conversation
voronkovich
reviewed
Feb 28, 2025
Contributor
voronkovich
left a comment
There was a problem hiding this comment.
Why don't we define an inflector as a service? If Joomla has a DI container, why don't we use it?
Member
Author
|
Be my guest. Right now I'm just going to unify the code to use the same stuff everywhere. |
Contributor
|
Not really sure what/how to test here as the test instructions are VERY incomplete but after reading the code in administrator\components\com_tags\tmpl\tags\default.php I did some tests to ensure that the value of $section is the same before and after the PR |
Contributor
|
Thank you for the work on this, the code reviews and help going through this. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary of Changes
The
doctrine/inflectorpackage is currently stuck on version 1.4.4, which right now is 4 years old. The current version 2.0.10 is mostly compatible - except for theDoctrine\Common\Inflector\Inflectorclass, which was deprecated and removed in 2.0. Unfortunately that class is the basis for thejoomla/stringpackages inflector class. Since that base class is deprecated, this code removes all usages of the Joomla inflector package from our core code and instead uses the Doctrine package directly. The next step would be to update the package to the latest version, but that would break ourjoomla/stringpackage, at least in our current situation. Fixing the string package to work with the newer code is left for someone else to work on...The improvement here is, that it removes the usage of deprecated code and makes phpstan happy.
Testing Instructions
In each case it should all behave like before.
Or alternatively do a 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