| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
The foreign() method always returns ForeignKeyDefinition, not Fluent|ForeignKeyDefinition as the docblock claimed. This caused phpstan errors in downstream code: Call to an undefined method Hyperf\Support\Fluent::references() The method creates a ForeignKeyDefinition and returns it directly, so the union type was misleading. ForeignKeyDefinition extends Fluent and has the references(), on(), onDelete() etc. methods via @method annotations.
| Back | FazBrowse Home | New Git URL |
The foreign() method always returns ForeignKeyDefinition, not Fluent|ForeignKeyDefinition as the docblock claimed. This caused phpstan errors in downstream code:
Call to an undefined method Hyperf\Support\Fluent::references()
The method creates a ForeignKeyDefinition and returns it directly, so the union type was wrong. ForeignKeyDefinition extends Fluent and has the references(), on(), onDelete() etc. methods via @method annotations.