Skip to content

Remove spread support from Features::include() #39

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

dlh01
Copy link
Member

@dlh01 dlh01 commented May 8, 2025

Summary

Inspired by the comment from @renatonascalves here: #34 (comment)

Also, by an internal discussion about how to break large features into smaller feature classes while still communicating their relationship to one another.

The Features and Group vocabulary already exists to describe multiple features. Allowing an arbitrary number of individual feature classes to be passed seems to me to discourage using that vocabulary.

I also updated a couple lines in the CHANGELOG to be more consistent with previous entries and removed a couple that didn't seem relevant for package users.

Notes for reviewers

None.

@dlh01 dlh01 force-pushed the feature/spread branch from 6641b75 to 835774e Compare May 8, 2025 08:51
Copy link
Contributor

@renatonascalves renatonascalves left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this makes it clear that if you wanna pass a list of features, you should use Group. 🎈


### Changed

- PHPCS: The minimum PHP version is now 8.2.
- Unit test: `WidgetFeatureTest` test works por PHP 8.3 and 8.4.
- `Features::include()` no longer accepts a spread of individual `Feature` instances. Use something more specific like `Group` or `Ordered` to include multiple features at once.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm pretty sure this is a breaking change. So we should bump the version for this change.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, it definitely is breaking. I think #40 is a good candidate to include in the next release for the same reason.

# Conflicts:
#	CHANGELOG.md
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