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
Let's say that the Address value object has a method getCountryName() and that address is a string database column in the users table. For $user->address->getCountryName(), larastan gives a cannot call method getCountryName() on string. error. This only happens if the ':argument' is present in the $casts.
--level
used: 5Description
When using
Castable
classes and providing arguments in the eloquent model's$casts
definition, the property is not being casted to aphpstan
type.Model property casting has been handled in #1333.
How to replicate
Implement a
castable
class as defined here and provide an argument via the model's$casts[]
.The text was updated successfully, but these errors were encountered: