Skip to content

Adding support for Laravel 13#104

Open
aglipanci wants to merge 6 commits intosquirephp:3.xfrom
aglipanci:3.x
Open

Adding support for Laravel 13#104
aglipanci wants to merge 6 commits intosquirephp:3.xfrom
aglipanci:3.x

Conversation

@aglipanci
Copy link
Contributor

Basically what title says :)

@aglipanci
Copy link
Contributor Author

@danharrin is that time of the year :) Whenever you find the time please run the tests.

@danharrin
Copy link
Collaborator

The tests have now run, there are some failures

@danharrin danharrin added the dependencies Pull requests that update a dependency file label Mar 18, 2026
@aglipanci
Copy link
Contributor Author

Thanks @danharrin ! Tests are passing now.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Can you explain the problem that caused these changes and how they work to solve the problem?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Because in Laravel 13: Creating a new model instance while that model is still booting is now disallowed and throws a LogicException.

So instead I resolve the table name through reflection if possible or just by using the Laravel model/table name convention.
In addition the data insert is done through a query builder connection instead of the Model insert.

I know it's ideal, but this way it works for all the Laravel versions supported. Otherwise we would have to release this only for L13+ and work on a more elegant solution.

Your call.

Copy link
Contributor Author

@aglipanci aglipanci left a comment

Choose a reason for hiding this comment

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

I left my comment on the logic behind the update.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants