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

Add translatable interface stub for content entities #588

Merged
merged 1 commit into from
Jul 12, 2023

Conversation

simonbaese
Copy link
Contributor

This is a stub for the TranslatableInterface. Note that this stub will be unnecessary for Drupal 10.1+ (see https://www.drupal.org/project/drupal/issues/3269177). Nevertheless, it may be useful for users that run a prior version of Drupal.

This change is a little bit aggressive because it creates a stub for the TranslatableInterface directly, although only tests for content entities are provided. We could be more passive by basing the stub on the ContentEntityBase.

@simonbaese
Copy link
Contributor Author

Need some advice on how to approach the failure in the baseline test.

Copy link
Owner

@mglaman mglaman 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 it's fine to provide the stub for TranslatableInterface. I think it's worth backporting the fix here for others.

As for the baseline failures for Drupal core: we can ignore those, I noticed that as well. There was a change in PHPStan I guess which broke the baseline. Or only in this project's CI.

@mglaman mglaman merged commit 04ad273 into mglaman:main Jul 12, 2023
@mglaman
Copy link
Owner

mglaman commented Jul 12, 2023

Thank you!

@simonbaese simonbaese deleted the translatable-interface-stub branch July 12, 2023 18:53
simonbaese added a commit to simonbaese/phpstan-drupal that referenced this pull request Jul 18, 2023
Add TranslatableInterface stub (mglaman#588)
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