You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
minor #47412 [Form] Add generics to DataTransformerInterface (VincentLanglet)
This PR was squashed before being merged into the 6.2 branch.
Discussion
----------
[Form] Add generics to DataTransformerInterface
| Q | A
| ------------- | ---
| Branch? | 6.2
| Bug fix? | no
| New feature? | not really
| Deprecations? | no
| Tickets | Fix #... <!-- prefix each issue number with "Fix #", no need to create an issue if none exist, explain below instead -->
| License | MIT
| Doc PR | symfony/symfony-docs#... <!-- required for new features -->
Now that some generics are added to the Symfony codebase, I think we could add more.
For people using phpstan/psalm this will be helpful:
- It avoid duplicating the generics in both psalm-plugin/phpstan-plugin
- It avoid duplicating code between symfony and plugins
- When phpstan/psalm report an error it's less confusing to look for the generic in the symfony file rather the plugin one.
You can look at the current generic definition
for psalm https://github.com/psalm/psalm-plugin-symfony/blob/master/src/Stubs/common/Component/Form/DataTransformerInterface.stubphp
for phpstan https://github.com/phpstan/phpstan-symfony/blob/1.2.x/stubs/Symfony/Component/Form/DataTransformerInterface.stub
Commits
-------
dff26d39bf [Form] Add generics to DataTransformerInterface
0 commit comments