Type-safe string comparison in site/templates#13309
Type-safe string comparison in site/templates#13309wilsonge merged 2 commits intojoomla:stagingfrom frankmayer:type-safe-string-comparisons-in-site-templates
Conversation
|
I really appreciate your work here cleaning up the Joomla code. But it produces a lot of merge conflicts in other pull requests and long running projects like the Joomla 4 template. I think we need here a strategy how to deal with that situation. |
|
Every pull request has the potential to cause merge conflicts with any other active project, no matter the strategy (unless the strategy is to not accept PRs like these) it's just going to cause someone a headache. |
|
@mbabker I know that every merge has a potential of a conflict. I'm also not asking to stop that (despite the fact that there are automated tools which can do that), but it should be done with some concept. It can't be that I have to check and fix for conflicts every day in my PR's. |
|
@laoneo I know... I've been dealing with the conflicts, too, as I try to lighten up the big PR's that I made initially, so they can get reviewed easier and finally merged. Do you have some concept in mind? However, that being said, there is still a lot more to be cleaned up and optimized. |
|
just an idea, |
|
I would rather do them for Joomla 4 and leave 3 as it is. Then we can think of doing automated in one shot. |
|
After that we can make then our CS rules more strictly across the whole project. |
|
A lot of the changes that I have done are semi-automated and with lots of manual double-checking. It doesn't work fully automated. Neither the changes themselves nor the conflict resolutions. I think that those changes should already be done the earliest possible currently Joomla 3.x and not wait for version 4. It is better to have a cleaner start into Joomla 4 than to release Joomla 4 and then change all this stuff... |
|
In general, you want to try and not have too many code style/structure changes between branches, it makes branch merging much more painful when you have those differences on top of regular patches. It's in part why Symfony turns down PRs for using PHP 5.5 structures in code that existed in Symfony 2.x (newer code can use things like short array syntax and the ::class constant). Now if we do the same thing as we did with 2.5 and 3.0 and never merge things forward (basically maintaining both branches as separate things at that point), it becomes a moot point. |
…lates # Conflicts: # templates/beez3/html/com_contact/contact/default_user_custom_fields.php
|
BTW, conflicts resolved for this one... :D |
Summary of Changes
The changes in this PR should be fairly easy to review. They are only type safe string comparisons. This PR is done, so the batch PR #12233 can become a little lighter and easier to review. In hope that this will get merged quickly so further work can be done without conflicting with other PRs. ;)
Testing Instructions
None, should not change behavior
Documentation Changes Required
None.