-
Notifications
You must be signed in to change notification settings - Fork 11.5k
[12.x] Add operator class support for PostgreSQL GiST spatial indexes #56324
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
taylorotwell
merged 1 commit into
laravel:12.x
from
joteejotee:fix/56261-gist-operator-class
Jul 18, 2025
Merged
[12.x] Add operator class support for PostgreSQL GiST spatial indexes #56324
taylorotwell
merged 1 commit into
laravel:12.x
from
joteejotee:fix/56261-gist-operator-class
Jul 18, 2025
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This change allows specifying an operator class when creating spatial indexes on PostgreSQL, which is required for certain data types like inet. - Add optional operatorClass parameter to Blueprint::spatialIndex() - Update PostgresGrammar to handle operator class in SQL generation - Add tests for spatial index with operator class functionality Fixes laravel#56261
@taylorotwell I think this is a breaking change and not suitable for a minor release, it changes the signature for a method that is overriden by https://github.com/singlestore-labs/singlestoredb-laravel-driver, and it breaks it. |
itinerare
pushed a commit
to itinerare/Mundialis
that referenced
this pull request
Jul 23, 2025
This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [laravel/framework](https://laravel.com) ([source](https://github.com/laravel/framework)) | `12.20.0` -> `12.21.0` | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | [](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>laravel/framework (laravel/framework)</summary> ### [`v12.21.0`](https://github.com/laravel/framework/blob/HEAD/CHANGELOG.md#v12210---2025-07-22) [Compare Source](laravel/framework@v12.20.0...v12.21.0) - fix(vite): [#​55793](laravel/framework#55793) add explicit as-script to link tag for script modul… by [@​midsonlajeanty](https://github.com/midsonlajeanty) in laravel/framework#55794 - \[12.x] Allow globally disabling Factory parent relationships via `Factory::dontExpandRelationshipsByDefault()` by [@​cosmastech](https://github.com/cosmastech) in laravel/framework#56154 - \[12.x] Adds checking if a value is between two columns by [@​DarkGhostHunter](https://github.com/DarkGhostHunter) in laravel/framework#56119 - \[12.x] Ensure database connection is always restored by [@​xurshudyan](https://github.com/xurshudyan) in laravel/framework#56258 - \[12.x] Fix handling of `Htmlable` objects in `Js::convertDataToJavaScriptExpression()` by [@​jj15asmr](https://github.com/jj15asmr) in laravel/framework#56253 - Reduce meaningless intermediate variables. by [@​LjjGit](https://github.com/LjjGit) in laravel/framework#56265 - \[12.x] Improve typehints for `AbstractCursorPaginator@through()` by [@​cosmastech](https://github.com/cosmastech) in laravel/framework#56267 - Use `Date` facade instead of `time()` for `password_confirmed_at` check by [@​dylanbr](https://github.com/dylanbr) in laravel/framework#56270 - \[12.x] fix: Collection::transform() and Paginator::through() return types by [@​calebdw](https://github.com/calebdw) in laravel/framework#56273 - \[12.x] Merge 11.x into 12.x by [@​u01jmg3](https://github.com/u01jmg3) in laravel/framework#56289 - \[12.x] Reduce meaningless intermediate variables by [@​AhmedAlaa4611](https://github.com/AhmedAlaa4611) in laravel/framework#56288 - \[12.x] Refactor build Method to Use Null Coalescing Assignment for Default C… by [@​Ashot1995](https://github.com/Ashot1995) in laravel/framework#56283 - \[12.x] minor code formatting improvements by [@​browner12](https://github.com/browner12) in laravel/framework#56296 - \[12.x] Use more specific route binding exception message for child routes by [@​jessekoerhuis](https://github.com/jessekoerhuis) in laravel/framework#56298 - \[12.x] Fix Possible Undefined Variables by [@​calfc](https://github.com/calfc) in laravel/framework#56292 - \[12.x] Fix: Ensure scheduler `dailyAt()` method parses minutes and ignores seconds when seconds are provided by [@​amirhshokri](https://github.com/amirhshokri) in laravel/framework#56308 - \[12.x] Allows for strict boolean validation by [@​peterfox](https://github.com/peterfox) in laravel/framework#56313 - Improve `SeedCommand` console output by [@​Jehong-Ahn](https://github.com/Jehong-Ahn) in laravel/framework#56310 - \[12.x] Add unified enum support across framework docs by [@​amirhshokri](https://github.com/amirhshokri) in laravel/framework#56271 - \[12.x] Allows for strict numeric validation by [@​peterfox](https://github.com/peterfox) in laravel/framework#56328 - \[12.x] Update PHPDoc annotations in `Validation` by [@​mrvipchien](https://github.com/mrvipchien) in laravel/framework#56321 - \[12.x] Add operator class support for PostgreSQL GiST spatial indexes by [@​joteejotee](https://github.com/joteejotee) in laravel/framework#56324 - Fix multipart array value parsing in HTTP client ([#​55732](laravel/framework#55732)) by [@​joteejotee](https://github.com/joteejotee) in laravel/framework#56302 - Fixes bug with ShouldBeUniqueUntilProcessing locks getting stuck due to Middleware by [@​TWithers](https://github.com/TWithers) in laravel/framework#56318 - \[12.x] add prompts based expectations to PendingCommand by [@​BinaryKitten](https://github.com/BinaryKitten) in laravel/framework#56260 - \[12.x] Add Singleton and Scoped attributes to Container by [@​riasvdv](https://github.com/riasvdv) in laravel/framework#56334 - Fix unsetting model castable attribute when cast to object ([#​56335](laravel/framework#56335)) by [@​guram-vashakidze](https://github.com/guram-vashakidze) in laravel/framework#56343 - \[12.x] Fix/memory improvement by [@​CharrafiMed](https://github.com/CharrafiMed) in laravel/framework#56345 - \[12.x] Add hasMailer method to the mailable class by [@​kevinb1989](https://github.com/kevinb1989) in laravel/framework#56340 - \[12.x] Consistent use of `mb_split()` to split strings into words by [@​shaedrich](https://github.com/shaedrich) in laravel/framework#56338 - \[12.x] Add toStringable to Uri by [@​Kyrch](https://github.com/Kyrch) in laravel/framework#56359 - \[12.x] Fix PHPStan Integrations by [@​crynobone](https://github.com/crynobone) in laravel/framework#56369 - Add 'isEmpty' and 'isNotEmpty' to Fluent by [@​cworreschk](https://github.com/cworreschk) in laravel/framework#56370 - \[12.x] Add mergeMetadata method to the Mailable class by [@​kevinb1989](https://github.com/kevinb1989) in laravel/framework#56376 - Add 'dontReportUsing' to filter exceptions to be reported by [@​pelmered](https://github.com/pelmered) in laravel/framework#56361 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0MS40Mi4zIiwidXBkYXRlZEluVmVyIjoiNDEuNDMuMCIsInRhcmdldEJyYW5jaCI6ImRldmVsb3AiLCJsYWJlbHMiOlsiZGVwZW5kZW5jaWVzIl19--> Reviewed-on: https://code.itinerare.net/itinerare/Mundialis/pulls/282 Co-authored-by: Amadeus[bot] <[email protected]> Co-committed-by: Amadeus[bot] <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds support for specifying operator classes when creating spatial indexes on PostgreSQL, addressing issue #56261.
Problem
PostgreSQL GiST indexes require explicit operator classes for certain data types (like
inet
). Currently, Laravel'sspatialIndex()
method doesn't support specifying operator classes, causing migrations to fail with:Solution
Add an optional
$operatorClass
parameter toBlueprint::spatialIndex()
:Changes
$operatorClass
parameter toBlueprint::spatialIndex()
PostgresGrammar::compileSpatialIndex()
to handle operator classesFixes #56261