Skip to content

Type-safe string comparison in site/templates#13309

Merged
wilsonge merged 2 commits intojoomla:stagingfrom
frankmayer:type-safe-string-comparisons-in-site-templates
Dec 21, 2016
Merged

Type-safe string comparison in site/templates#13309
wilsonge merged 2 commits intojoomla:stagingfrom
frankmayer:type-safe-string-comparisons-in-site-templates

Conversation

@frankmayer
Copy link
Copy Markdown
Contributor

Summary of Changes

  • Type-safe string comparison in site/templates

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.

@laoneo
Copy link
Copy Markdown
Member

laoneo commented Dec 21, 2016

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.

@mbabker
Copy link
Copy Markdown
Contributor

mbabker commented Dec 21, 2016

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.

@laoneo
Copy link
Copy Markdown
Member

laoneo commented Dec 21, 2016

@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.

@frankmayer
Copy link
Copy Markdown
Contributor Author

@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?
One scenario that comes to mind, is to get all those big change-PR's merged as soon as possible, and then give people the green light to resolve their conflicts in one go. Or the other way around...

However, that being said, there is still a lot more to be cleaned up and optimized.

@andrepereiradasilva
Copy link
Copy Markdown
Contributor

just an idea,
mantainers could mark a day of the week to merge this type of PR (but would still depend on them being tested/reviewed), then instead of fixing conflicts everyday, you just need to do it one day per week (if aplicable).
When i say week it could be 10 days or any other period.

@laoneo
Copy link
Copy Markdown
Member

laoneo commented Dec 21, 2016

I would rather do them for Joomla 4 and leave 3 as it is. Then we can think of doing automated in one shot.

@laoneo
Copy link
Copy Markdown
Member

laoneo commented Dec 21, 2016

After that we can make then our CS rules more strictly across the whole project.

@frankmayer
Copy link
Copy Markdown
Contributor Author

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...
And surely either being in 3.x or in later in 4, conflicts will always be a pain, when such drastic changes are introduced. There will always be long running PR's that will need conflict resolution.

@mbabker
Copy link
Copy Markdown
Contributor

mbabker commented Dec 21, 2016

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
@frankmayer
Copy link
Copy Markdown
Contributor Author

BTW, conflicts resolved for this one... :D

@wilsonge wilsonge merged commit 7e710f8 into joomla:staging Dec 21, 2016
@wilsonge wilsonge added this to the Joomla 3.7.0 milestone Dec 21, 2016
@frankmayer frankmayer deleted the type-safe-string-comparisons-in-site-templates branch December 25, 2016 21:40
@frankmayer frankmayer mentioned this pull request Jan 6, 2017
4 tasks
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.

6 participants