Skip to content

Use class-string param type for Metadata::getClass #7307

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

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

VincentLanglet
Copy link
Contributor

@VincentLanglet VincentLanglet commented Jul 21, 2025

Q A
Branch? main
Tickets Closes #...
License MIT
Doc PR api-platform/docs#...

cc @soyuka

I target main since:

  • I think the 4.2 release will be soon
  • I did so much change for static analysis on main, that I think it's easier/better to keep doing it on main.

@@ -104,11 +105,17 @@ public function withShortName(string $shortName): static
return $self;
}

/**
* @return class-string|null
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is the main change, everything else is changing 'foo' by \stdClass::class in tests to avoid PHPStan failure.

@VincentLanglet VincentLanglet force-pushed the classString branch 2 times, most recently from 66cefee to 92df6bf Compare July 21, 2025 10:14
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.

1 participant