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

Endpoint interface #22

Merged
merged 4 commits into from
Oct 2, 2023
Merged

Endpoint interface #22

merged 4 commits into from
Oct 2, 2023

Conversation

pionl
Copy link
Contributor

@pionl pionl commented Oct 2, 2023

When using fake overrides you need to pass interface and implementation into makeEndpoint method. This changes helps PHPStan to check, if interface is used in the real implementation.

public function unitsAvailabilities(): UnitsAvailabilitiesEndpointInterface
    {
        return $this->makeEndpoint(endpoint: UnitsAvailabilitiesEndpointInterface::class, implementation: UnitsAvailabilitiesEndpoint::class);
    }

- Now fake override needs interface and implementation in makeEndpoint.
- Add tests for fake implementation using environment interface swap
@pionl pionl merged commit 2edc2ad into main Oct 2, 2023
7 checks passed
@pionl pionl deleted the endpoint-interface branch October 2, 2023 20:03
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.

None yet

1 participant