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!: Make implementors of Entity internal #24

Merged
merged 1 commit into from
Feb 6, 2024

Conversation

mikeymike
Copy link
Contributor

Implementors of \Paddle\SDK\Entities\Entity should not be used directly. To prevent this the constructors are now private, and the static factory should be used instead conforming to the shape of the API.

A PHPCS rule has been added to automate this and prevent future breakages.

BREAKING CHANGE: Makes core Entity constructors private.

@mikeymike mikeymike requested a review from a team February 5, 2024 12:52
@mikeymike mikeymike force-pushed the fix/privatise-entity-constructors branch from 266d23a to c605cdc Compare February 5, 2024 12:54
@mikeymike mikeymike marked this pull request as draft February 5, 2024 13:09
@mikeymike mikeymike force-pushed the fix/privatise-entity-constructors branch 4 times, most recently from b68463a to 58b7def Compare February 5, 2024 14:37
Implementors of \Paddle\SDK\Entities\Entity should not be used directly.
To prevent this the constructors are now protected, and the static factory
should be used instead conforming to the shape of the API.

Each isntance is also documented as @internal now

BREAKING CHANGE: Makes core Entity constructors private.
@mikeymike mikeymike force-pushed the fix/privatise-entity-constructors branch from 58b7def to 2c74478 Compare February 5, 2024 17:18
@mikeymike mikeymike marked this pull request as ready for review February 5, 2024 17:19
@mikeymike mikeymike merged commit 05ecdae into main Feb 6, 2024
3 checks passed
@mikeymike mikeymike deleted the fix/privatise-entity-constructors branch February 6, 2024 14:43
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