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

Rescue master branch commits #10350

Closed
5 tasks done
maxime-rainville opened this issue Jun 6, 2022 · 10 comments
Closed
5 tasks done

Rescue master branch commits #10350

maxime-rainville opened this issue Jun 6, 2022 · 10 comments

Comments

@maxime-rainville
Copy link
Contributor

maxime-rainville commented Jun 6, 2022

There's still some potentially useful work in the master branches. Those were meant to be to bu sue for CMS 5, however they are horribly out of date. There might be some useful commits there that we want to fold back into the new major release branches.

Acceptance criteria

  • Commits that are unique to the master branches and are useful are cherry-picked tot he new major branches.
  • Commits don't make sense with work that got completed after they got merged into master get left behind.
  • Commits that wold introduce major upgrade pains are left behind.
  • Breaking changes are noted in the appropriate documentation
  • Create follow task to delete old master branches to give people a chance to rescue any commits they care about.

Depends on #10349

Notes

PRs

PRs for broken builds

@GuySartorelli
Copy link
Member

silverstripe/silverstripe-sqlite3#44 will need to be rescued once a new major release branch is created for that module.

This was referenced Aug 22, 2022
@kinglozzer
Copy link
Member

#8152 and #8456 seem relatively low risk to me - the only BC issues I can think of are:

  • Someone passing true, false, null or a number and expecting strings rather than scalars/null. I think it’s unlikely, and PHP’s loose typing makes it less likely to be an issue
  • Someone typehinting strings for method args

Both cases would be highlighted pretty clearly by errors when the templates run, and would be easy to fix. If anyone needs to preserve the current behaviour, they can quote any values they’ve got hardcoded in templates (it only applies to $Foo(123), not $Foo($SomethingReturningAnInteger))

#8148 is the more controversial one because it likely won’t error - it’ll either stop outputting data, or output data from the wrong “scope”. The problem with that one is that there’s no way to fix #4015 without causing that upgrade pain - so either we suck it up at some point or never fix it 😕

@emteknetnz
Copy link
Member

emteknetnz commented Aug 29, 2022

I'm happy to have all three merged.

Applications currently passing false or null from a template would be currently working by accident because there is broken logic in the controller i.e. if ($myTemplateVar) ... - string "false" is truthy. So the fact it breaks on upgrade is actually what's supposed to happen.

For the $Up.Title, it's very easy to provide clear upgrade instructions here, simply do a project string find and replace for possible template strings such $Up. (with a leading space) or ($Up. in template files.

@emteknetnz
Copy link
Member

All linked PRs have been merged

@GuySartorelli
Copy link
Member

Reopening - there is still the discussion about the potentially controversial PRs which have not yet been rescued.

@maxime-rainville
Copy link
Contributor Author

maxime-rainville commented Sep 7, 2022

I also don't think any of those changes are likely to cause a great deal of upgrade headaches. I'm sure it will trip somebody somewhere, but that seems reasonable.

On #8148, it's not clear to me the new behaviour is obviously better than the old one. I don't really have strong feeling either way. Looking at the matching #4015 issue, I see a mix of view there as well.

My instinct would be to

@GuySartorelli
Copy link
Member

GuySartorelli commented Sep 8, 2022

I agree with Steve that it's pretty easy to call out how to upgrade the scope change (and for a major release people are much more likely to actually look at the changelog to see what they may need to change), and the majority consensus seems to be that it's a worthwhile change - I'll rescue all three PRs.

@GuySartorelli
Copy link
Member

GuySartorelli commented Sep 14, 2022

Blocked pending alpha1 being tagged.

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

No branches or pull requests

4 participants