Skip to content

[12.x] Fix typo in BelongsToMany::createOrFirst method name#58284

Merged
taylorotwell merged 1 commit into
laravel:12.xfrom
mischasigtermans:fix-belongs-to-many-savepoint-typo
Jan 5, 2026
Merged

[12.x] Fix typo in BelongsToMany::createOrFirst method name#58284
taylorotwell merged 1 commit into
laravel:12.xfrom
mischasigtermans:fix-belongs-to-many-savepoint-typo

Conversation

@mischasigtermans

Copy link
Copy Markdown
Contributor

Fixed withSavePointIfNeeded to withSavepointIfNeeded (lowercase 'p' in 'point').

The method withSavepointIfNeeded exists on Builder, but line 662 was calling withSavePointIfNeeded (capital P), causing it to fall through to __call instead of the intended method.

Found by taylor-says 🤠

"Consistency matters. One capital letter breaks the chain."

@taylorotwell taylorotwell merged commit 8d70aa6 into laravel:12.x Jan 5, 2026
72 checks passed
@mischasigtermans mischasigtermans deleted the fix-belongs-to-many-savepoint-typo branch January 15, 2026 15:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants