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

Support for Silverstripe 5. Add property/return type definitions. Rename master/slave #152

Merged
merged 12 commits into from
Feb 26, 2023

Conversation

chrispenny
Copy link
Collaborator

@chrispenny chrispenny commented Feb 14, 2023

New major & PHP 8.1

This is going to be a new major, and now is our chance to be more declarative with property and return type requirements.

If developers have extended our base classes, then yes, there might be a lot of breaking changes for them - but it should be as simple as updating signatures. There have not been any programmatic logic changes.

Github actions

Travis is no longer free for open source. Switching to Silverstripe's Github action workflow.

Workflow (might not be visible to all) is running behat and PHPUnit tests:
https://github.com/silverstripeltd/silverstripe-display-logic/actions/

Screen Shot 2023-02-15 at 3 31 03 PM

Behat

Some major changes in the new behat modules, so I bit of effort went into upgrading these.

Master / slave

I think it's reasonably well accepted that we should stop using this wording.

  • master renamed to dispatcher
  • slave renamed to responder

This would be another breaking change for developers who have extended our base classes.

Edit: And in fact, UncleCheese had already raised a PR to address this in version 2 (#148).

Testing

My testing has been limited to forms within the CMS.

@chrispenny chrispenny force-pushed the pulls/silverstripe-5 branch 14 times, most recently from f783751 to b3fcf67 Compare February 15, 2023 01:21
@chrispenny chrispenny marked this pull request as ready for review February 15, 2023 01:22
@chrispenny chrispenny marked this pull request as draft February 15, 2023 01:28
@chrispenny chrispenny marked this pull request as ready for review February 15, 2023 01:54
@chrispenny
Copy link
Collaborator Author

Just noticed that this PR was a thing:
#148

I might reconsider my names.

@chrispenny chrispenny marked this pull request as ready for review February 15, 2023 02:32
@michalkleiner
Copy link
Collaborator

Thanks for the work on this, @chrispenny! Will take it for a spin this week.

Re: the names, how about dispatcher/subscriber? Or dispatcher/listener? I'm not a big fan of 'primary' as it doesn't say what, and 'subordinate' from the other PR sounds too military for me :-D

@michalkleiner
Copy link
Collaborator

It would be also great to do the Travis to Github Actions change in a separate PR to be able to see the status here directly. I can possibly pick that up myself.

@chrispenny
Copy link
Collaborator Author

@michalkleiner sorry, I forgot to update the description. Yup, I ended up going with dispatcher and responder after seeing the work that UncleCheese had started in #148.

I can give you access to the fork if you'd like to be able to see the actions (and can't already).
https://github.com/silverstripeltd/silverstripe-display-logic/actions

@chrispenny
Copy link
Collaborator Author

@michalkleiner the other option is that if I close this PR, move the branch into this repo, and reopen, then the actions will display in the PR.

I'm confident that they're functioning where they are though - we've had to go through this pain a fair few times as we switch off travis.

.nvmrc Outdated Show resolved Hide resolved
src/Criteria.php Outdated Show resolved Hide resolved
@chrispenny
Copy link
Collaborator Author

Thanks for picking up all of those errors, @michalkleiner!

I've upgraded our build process, our test suite is green again, and my CMS tests are working :D

@chrispenny
Copy link
Collaborator Author

If there is no more feedback to come, I'll look to merge/tag this next week.

@chrispenny chrispenny merged commit 4e99cef into unclecheese:master Feb 26, 2023
@chrispenny chrispenny deleted the pulls/silverstripe-5 branch February 26, 2023 18:14
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.

2 participants