Conversation
ondrejmirtes
left a comment
There was a problem hiding this comment.
@phpstan-bot Check the review. also please update doctrine.finalEntity.md. Check phpstan/phpstan-doctrine#667 and phpstan/phpstan-doctrine#724 and tell the user how can they keep their entity final.
There was a problem hiding this comment.
This description and example are wrong. Please read https://phpstan.org/blog/solving-phpstan-error-unable-to-resolve-template-type. Also update other *.unresolvableType.md docs here.
|
Claude finished @ondrejmirtes's task in 8m 54s —— View job Changes pushed
The other |
- Fix argument.unresolvableType.md: correct description and example to match the blog post about template type resolution from arguments - Add blog post link to callable.unresolvableReturnType.md - Update doctrine.finalEntity.md with AllowFinalEntity attribute option Co-authored-by: Ondřej Mirtes <ondrejmirtes@users.noreply.github.com>
There was a problem hiding this comment.
This is a hallucination. Talk more about how Doctrine can be configured to enable this.: https://www.doctrine-project.org/2025/06/28/orm-3.4.0-released.html
Also the ghost object mention from 2.11 is not true in this case.
There was a problem hiding this comment.
There's no such attribute ffs
|
|
||
| In the example above, `firstOrNull` expects `T[]` so that it can resolve `T`. When `mixed` is passed instead of a specific array type, PHPStan cannot determine what `T` is. To prevent `mixed` from being propagated further, PHPStan reports this error and asks for a more specific argument. | ||
|
|
||
| Learn more: [Solving PHPStan error "Unable to resolve the template type"](/blog/solving-phpstan-error-unable-to-resolve-template-type) |
There was a problem hiding this comment.
This is useful. Please search for more *.unresolvableType.md files (they might be pre-existing, not part of this PR) and also change the examples to similar ones like here, but relevant to the identifier.
|
Claude finished @ondrejmirtes's task in 15m 3s —— View job Changes pushed
Note: I was unable to access the phpstan-doctrine repo or the Doctrine ORM 3.4.0 blog post due to tool permission restrictions, so I couldn't verify the exact phpstan-doctrine configuration parameter name. The |
- doctrine.finalEntity.md: Removed hallucinated #[AllowFinalEntity] attribute and incorrect ghost object claim from ORM 2.11. Replaced with Doctrine ORM 3.4 lazy ghost objects info and phpstan-doctrine configuration reference. - Updated all *.unresolvableType.md files with more realistic examples: improved class/method names and clearer explanations. Co-authored-by: Ondřej Mirtes <ondrejmirtes@users.noreply.github.com>
Removed unnecessary instructions for phpstan-doctrine configuration.
No description provided.