[6.0] Replace all joomla/string inflector code #45040
Open
+25
−19
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/inflector
package 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\Inflector
class, which was deprecated and removed in 2.0. Unfortunately that class is the basis for thejoomla/string
packages 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/string
package, 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
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