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

FIX Respect strict-typing of Factory interface #620

Merged

Conversation

GuySartorelli
Copy link
Member

@GuySartorelli GuySartorelli commented Jul 4, 2024

Respects the new strict typing in silverstripe/silverstripe-framework#11300
That PR is required for Ci to go green.

Issue

@@ -35,7 +35,7 @@ public function __construct(Factory $creator)
* @param array $params The constructor parameters.
* @return object The created service instances.
*/
public function create($service, array $params = [])
public function create(string $service, array $params = []): ?Image_Backend
Copy link
Member

Choose a reason for hiding this comment

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

Why would is this nullable?

Copy link
Member Author

Choose a reason for hiding this comment

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

See lines 58 on - if the file is missing, null is returned.

@emteknetnz emteknetnz merged commit e5b927b into silverstripe:3 Jul 12, 2024
6 of 10 checks passed
@emteknetnz emteknetnz deleted the pulls/3/strict-typing-factory branch July 12, 2024 00:29
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