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

ENH Add generic types #2914

Merged
merged 1 commit into from
Jan 18, 2024

Conversation

GuySartorelli
Copy link
Member

@GuySartorelli GuySartorelli commented Jan 11, 2024

Requires silverstripe/silverstripe-framework#11108 and the associated PR in silverstripe/recipe-cms for these generics to take effect.

Issue

@@ -10,9 +10,11 @@
use SilverStripe\Control\HTTPResponse_Exception;
use SilverStripe\Core\Extension;

/**
* @extends Extension<Controller>
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
* @extends Extension<Controller>
* @extends Extension<ContentController|ModelAsController>

Copy link
Member Author

Choose a reason for hiding this comment

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

Those are both subclasses of Controller - and there's no reason this couldn't be applied to someone's custom controller.

But given that would be a pretty unlikely edge case, and for the sake of avoiding ping pong, I've made the change.

Copy link
Member

@emteknetnz emteknetnz left a comment

Choose a reason for hiding this comment

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

Behat failures are existing

@emteknetnz emteknetnz merged commit 3847b3e into silverstripe:5 Jan 18, 2024
10 of 12 checks passed
@emteknetnz emteknetnz deleted the pulls/5/add-generics branch January 18, 2024 21:00
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