-
-
Notifications
You must be signed in to change notification settings - Fork 56
chore: clean up docs #438
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
chore: clean up docs #438
Conversation
WalkthroughDocumentation reorganized and expanded across Doctrine, Laravel, and Symfony integration guides, adding categorized DBAL types, DQL functions, platform type mappings, and entity usage examples. Laravel docs introduce an event subscriber and a service provider for runtime registration. Symfony docs updated to 6.4+/7.x conventions. One test file renames methods. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor Dev as Developer
participant App as Laravel App
participant Prov as PostgreSQLDoctrineServiceProvider
participant Sub as PostgreSQLTypesSubscriber
participant Conn as DB Connection
participant EM as EntityManager
Dev->>App: boots application
App->>Prov: register()
Prov->>App: app->resolving('em', callback)
App->>Prov: boot()
Prov->>EM: register DBAL types + DQL + platform mappings (on boot)
App->>Conn: create connection
Conn-->>App: connected
App->>Sub: dispatch Events::postConnect
Sub->>Conn: register additional DBAL types/mappings (arrays/json/network/spatial/range)
note over Sub,Conn: Event-driven, modular registration
App->>EM: use configured types/functions
EM-->>Dev: ready for queries/migrations
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Poem
✨ Finishing Touches
🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
Status, Documentation and Community
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
docs/INTEGRATING-WITH-LARAVEL.md (1)
34-85: Fix Laravel Doctrine config key: use mapping_types (not type_mappings).Laravel Doctrine expects the DBAL platform mappings under mapping_types. Using type_mappings will be ignored and users won’t get the intended mappings.
Apply this diff:
- 'type_mappings' => [ + 'mapping_types' => [
🧹 Nitpick comments (6)
docs/INTEGRATING-WITH-LARAVEL.md (5)
51-77: Clarify array type naming vs. PostgreSQL internal names.Good to map PostgreSQL’s internal array names (e.g., _text, _point) to DBAL types (text[], point[]). Add a short note that:
- Left side: database/internal names (underscore-prefixed) the platform may report.
- Right side: DBAL type names used in config/custom_types (with []), per AVAILABLE-TYPES.md.
Would you like me to add a one-liner note under “Register DBAL Types” explaining this? I can draft it.
Also applies to: 111-118, 520-528
151-303: Consider splitting functions by category for Doctrine config.Laravel Doctrine supports custom_string_functions, custom_numeric_functions, and custom_datetime_functions. Keeping everything under custom_string_functions may work but is non-idiomatic and can be brittle across ORM versions.
Example (partial) restructure:
'custom_string_functions' => [ 'ALL_OF' => MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\All::class, 'ANY_OF' => MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\Any::class, 'CONTAINS' => MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\Contains::class, 'ILIKE' => MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\Ilike::class, 'REGEXP' => MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\Regexp::class, 'ROW' => MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\Row::class, // ... ], + 'custom_numeric_functions' => [ + 'CBRT' => MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\Cbrt::class, + 'CEIL' => MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\Ceil::class, + 'POWER' => MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\Power::class, + 'RANDOM' => MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\Random::class, + // ... + ], + 'custom_datetime_functions' => [ + 'DATE_ADD' => MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\DateAdd::class, + 'DATE_EXTRACT' => MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\DateExtract::class, + 'DATE_SUBTRACT' => MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\DateSubtract::class, + // ... + ],
305-305: Remove stray literal ellipsis.Line contains a bare ... which makes the snippet invalid if copy-pasted. Replace with a comment like // ... other configuration.
- ... + // ... other configuration
133-141: Tiny formatting: add a blank line before the list after the colon.For Markdown lint/readability, insert a blank line after the sentence ending with “sub-pages:”.
-Register the functions you'll use in your DQL queries. The full set of available functions and operators can be found in the [Available Functions and Operators](AVAILABLE-FUNCTIONS-AND-OPERATORS.md) documentation and its specialized sub-pages: +Register the functions you'll use in your DQL queries. The full set of available functions and operators can be found in the [Available Functions and Operators](AVAILABLE-FUNCTIONS-AND-OPERATORS.md) documentation and its specialized sub-pages: +
478-483: Remove unused import.DoctrineServiceProvider is imported but unused in the Service Provider example.
-use LaravelDoctrine\ORM\DoctrineServiceProvider;docs/TEXT-AND-PATTERN-FUNCTIONS.md (1)
58-61: Add Postgres version note and examples for WEBSEARCH_TO_TSQUERYNice addition. To reduce surprises on older DBs and to mirror the renamed tests (default vs explicit config), please:
- Note availability (PostgreSQL 11+).
- Add two short usage examples (with/without explicit regconfig).
Apply within the row:
-| websearch_to_tsquery | WEBSEARCH_TO_TSQUERY | `MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\WebsearchToTsquery` | +| websearch_to_tsquery (PostgreSQL 11+) | WEBSEARCH_TO_TSQUERY | `MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\WebsearchToTsquery` |Add examples near the Full‑text examples section:
-- Web-search syntax (defaults to current text search config) SELECT e FROM Entity e WHERE TSMATCH(TO_TSVECTOR(e.content), WEBSEARCH_TO_TSQUERY(:q)) = TRUE -- Explicit config SELECT e FROM Entity e WHERE TSMATCH(TO_TSVECTOR('english', e.content), WEBSEARCH_TO_TSQUERY('english', :q)) = TRUE
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (6)
docs/INTEGRATING-WITH-DOCTRINE.md(4 hunks)docs/INTEGRATING-WITH-LARAVEL.md(4 hunks)docs/INTEGRATING-WITH-SYMFONY.md(2 hunks)docs/RANGE-TYPES.md(1 hunks)docs/TEXT-AND-PATTERN-FUNCTIONS.md(1 hunks)tests/Integration/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/WebsearchToTsqueryTest.php(1 hunks)
🧰 Additional context used
🧠 Learnings (10)
📚 Learning: 2025-05-23T11:11:57.951Z
Learnt from: martin-georgiev
PR: martin-georgiev/postgresql-for-doctrine#383
File: tests/Unit/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/RadiansTest.php:1-9
Timestamp: 2025-05-23T11:11:57.951Z
Learning: Tests in the `Tests\Unit\MartinGeorgiev\Doctrine\ORM\Query\AST\Functions` namespace extend a custom `TestCase` class from the same namespace (`Tests\Unit\MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\TestCase`), rather than PHPUnit's TestCase directly, and therefore don't need an explicit import.
Applied to files:
tests/Integration/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/WebsearchToTsqueryTest.php
📚 Learning: 2025-03-29T03:31:17.114Z
Learnt from: martin-georgiev
PR: martin-georgiev/postgresql-for-doctrine#318
File: tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/XmlAggTest.php:1-9
Timestamp: 2025-03-29T03:31:17.114Z
Learning: Tests in the `Tests\MartinGeorgiev\Doctrine\ORM\Query\AST\Functions` namespace extend a custom `TestCase` class from the same namespace (`Tests\MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\TestCase`), rather than PHPUnit's TestCase, and therefore don't need an explicit import.
Applied to files:
tests/Integration/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/WebsearchToTsqueryTest.php
📚 Learning: 2025-03-29T03:31:17.114Z
Learnt from: martin-georgiev
PR: martin-georgiev/postgresql-for-doctrine#318
File: tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/XmlAggTest.php:1-9
Timestamp: 2025-03-29T03:31:17.114Z
Learning: Tests in the `Tests\MartinGeorgiev\Doctrine\ORM\Query\AST\Functions` namespace extend a custom `TestCase` class from the same namespace (`Tests\MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\TestCase`), not PHPUnit's TestCase, and therefore don't need an explicit import statement.
Applied to files:
tests/Integration/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/WebsearchToTsqueryTest.php
📚 Learning: 2025-09-01T18:48:28.508Z
Learnt from: martin-georgiev
PR: martin-georgiev/postgresql-for-doctrine#434
File: tests/Unit/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/PostGIS/ST_CrossesTest.php:12-31
Timestamp: 2025-09-01T18:48:28.508Z
Learning: When analyzing unit test files in this codebase, always verify the actual file structure and existing patterns before suggesting changes. The ContainsGeometries fixture exists at ./fixtures/MartinGeorgiev/Doctrine/Entity/ContainsGeometries.php and the PostGIS unit tests use the namespace Tests\Unit\MartinGeorgiev\Doctrine\ORM\Query\AST\Functions\PostGIS consistently.
Applied to files:
tests/Integration/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/WebsearchToTsqueryTest.php
📚 Learning: 2025-08-19T13:07:15.184Z
Learnt from: martin-georgiev
PR: martin-georgiev/postgresql-for-doctrine#421
File: docs/AVAILABLE-TYPES.md:31-33
Timestamp: 2025-08-19T13:07:15.184Z
Learning: In martin-georgiev/postgresql-for-doctrine, the AVAILABLE-TYPES.md documentation table's second column shows DBAL type names (what getName() method returns) not PostgreSQL internal catalogue names. Array types use the format like 'text[]', 'jsonb[]', 'inet[]' - not the underscore-prefixed PostgreSQL internal names like '_text', '_jsonb', '_inet'.
Applied to files:
docs/INTEGRATING-WITH-SYMFONY.mddocs/INTEGRATING-WITH-DOCTRINE.mddocs/INTEGRATING-WITH-LARAVEL.md
📚 Learning: 2025-08-19T13:07:15.184Z
Learnt from: martin-georgiev
PR: martin-georgiev/postgresql-for-doctrine#421
File: docs/AVAILABLE-TYPES.md:31-33
Timestamp: 2025-08-19T13:07:15.184Z
Learning: In martin-georgiev/postgresql-for-doctrine, the AVAILABLE-TYPES.md documentation table's second column shows DBAL type names (what TYPE_NAME constants contain and getName() method returns) not PostgreSQL internal catalogue names. Array types use the format like 'text[]', 'jsonb[]', 'inet[]' - not the underscore-prefixed PostgreSQL internal names like '_text', '_jsonb', '_inet'.
Applied to files:
docs/INTEGRATING-WITH-SYMFONY.mddocs/INTEGRATING-WITH-DOCTRINE.mddocs/INTEGRATING-WITH-LARAVEL.md
📚 Learning: 2025-04-20T11:24:18.300Z
Learnt from: martin-georgiev
PR: martin-georgiev/postgresql-for-doctrine#352
File: tests/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/RegexpInstrTest.php:1-67
Timestamp: 2025-04-20T11:24:18.300Z
Learning: This PostgreSQL-for-Doctrine project is a translation layer only, focusing on correctly converting Doctrine DQL to PostgreSQL SQL syntax. It ensures arguments are passed in the expected format but does not test or handle PostgreSQL's actual function behavior or data handling. Test cases should focus on DQL-to-SQL translation and argument validation, not on PostgreSQL-specific behaviors.
Applied to files:
docs/INTEGRATING-WITH-SYMFONY.mddocs/INTEGRATING-WITH-LARAVEL.md
📚 Learning: 2025-08-24T16:52:32.488Z
Learnt from: martin-georgiev
PR: martin-georgiev/postgresql-for-doctrine#0
File: :0-0
Timestamp: 2025-08-24T16:52:32.488Z
Learning: This repository uses BaseType extension pattern for custom Doctrine DBAL types with PostgreSQL platform assertions, comprehensive unit and integration testing with data providers, and dedicated exception classes for type conversion errors.
Applied to files:
docs/INTEGRATING-WITH-SYMFONY.mddocs/INTEGRATING-WITH-DOCTRINE.mddocs/INTEGRATING-WITH-LARAVEL.md
📚 Learning: 2025-03-11T12:32:10.726Z
Learnt from: martin-georgiev
PR: martin-georgiev/postgresql-for-doctrine#263
File: src/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/Numrange.php:19-21
Timestamp: 2025-03-11T12:32:10.726Z
Learning: In the postgresql-for-doctrine repository, PostgreSQL range functions have distinct implementations for different data types. The `Numrange` function works with numeric/decimal values and is tested using the `ContainsDecimals` fixture with properties typed as `float`. In contrast, the `Int4range` function works with 32-bit integers and is tested using the `ContainsIntegers` fixture with properties typed as `int`. While the PHP implementations share a similar structure (extending `BaseFunction`), they are semantically different as they handle different PostgreSQL data types.
Applied to files:
docs/INTEGRATING-WITH-SYMFONY.md
📚 Learning: 2025-08-19T13:07:15.184Z
Learnt from: martin-georgiev
PR: martin-georgiev/postgresql-for-doctrine#421
File: docs/AVAILABLE-TYPES.md:31-33
Timestamp: 2025-08-19T13:07:15.184Z
Learning: In martin-georgiev/postgresql-for-doctrine, the point[] array type should be documented as "point[]" not "_point" in the AVAILABLE-TYPES.md table, to be consistent with all other array types like text[], jsonb[], inet[], etc.
Applied to files:
docs/INTEGRATING-WITH-DOCTRINE.md
🧬 Code graph analysis (1)
tests/Integration/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/WebsearchToTsqueryTest.php (1)
tests/Integration/MartinGeorgiev/TestCase.php (1)
executeDqlQuery(271-285)
🪛 LanguageTool
docs/INTEGRATING-WITH-SYMFONY.md
[grammar] ~119-~119: There might be a mistake here.
Context: ...mentation and its specialized sub-pages: - [Array and JSON Functions](ARRAY-AND-JSON...
(QB_NEW_EN)
[grammar] ~120-~120: There might be a mistake here.
Context: ...d sub-pages: - Array and JSON Functions - [PostGIS Spatial Functions](SPATIAL-FUNCT...
(QB_NEW_EN)
[grammar] ~121-~121: There might be a mistake here.
Context: ...NCTIONS.md) - PostGIS Spatial Functions - [Text and Pattern Functions](TEXT-AND-PAT...
(QB_NEW_EN)
[grammar] ~122-~122: There might be a mistake here.
Context: ...RATORS.md) - Text and Pattern Functions - [Date and Range Functions](DATE-AND-RANGE...
(QB_NEW_EN)
[grammar] ~123-~123: There might be a mistake here.
Context: ...UNCTIONS.md) - Date and Range Functions - [Mathematical Functions](MATHEMATICAL-FUN...
(QB_NEW_EN)
docs/INTEGRATING-WITH-DOCTRINE.md
[grammar] ~55-~55: There might be a mistake here.
Context: ...mentation and its specialized sub-pages: - [Array and JSON Functions](ARRAY-AND-JSON...
(QB_NEW_EN)
docs/INTEGRATING-WITH-LARAVEL.md
[grammar] ~135-~135: There might be a mistake here.
Context: ...mentation and its specialized sub-pages: - [Array and JSON Functions](ARRAY-AND-JSON...
(QB_NEW_EN)
[grammar] ~136-~136: There might be a mistake here.
Context: ...d sub-pages: - Array and JSON Functions - [PostGIS Spatial Functions](SPATIAL-FUNCT...
(QB_NEW_EN)
[grammar] ~137-~137: There might be a mistake here.
Context: ...NCTIONS.md) - PostGIS Spatial Functions - [Text and Pattern Functions](TEXT-AND-PAT...
(QB_NEW_EN)
[grammar] ~138-~138: There might be a mistake here.
Context: ...RATORS.md) - Text and Pattern Functions - [Date and Range Functions](DATE-AND-RANGE...
(QB_NEW_EN)
[grammar] ~139-~139: There might be a mistake here.
Context: ...UNCTIONS.md) - Date and Range Functions - [Mathematical Functions](MATHEMATICAL-FUN...
(QB_NEW_EN)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (19)
- GitHub Check: Code Quality
- GitHub Check: sloth
- GitHub Check: PostgreSQL 16 + PostGIS 3.4 + PHP 8.3
- GitHub Check: PostgreSQL 17 + PostGIS 3.5 + PHP 8.2
- GitHub Check: PostgreSQL 16 + PostGIS 3.5 + PHP 8.3
- GitHub Check: PostgreSQL 17 + PostGIS 3.4 + PHP 8.4
- GitHub Check: PostgreSQL 17 + PostGIS 3.4 + PHP 8.3
- GitHub Check: PostgreSQL 17 + PostGIS 3.4 + PHP 8.2
- GitHub Check: PostgreSQL 16 + PostGIS 3.5 + PHP 8.2
- GitHub Check: PostgreSQL 16 + PostGIS 3.4 + PHP 8.2
- GitHub Check: PostgreSQL 17 + PostGIS 3.5 + PHP 8.3
- GitHub Check: PostgreSQL 17 + PostGIS 3.5 + PHP 8.1
- GitHub Check: PostgreSQL 16 + PostGIS 3.4 + PHP 8.1
- GitHub Check: PHP 8.3 + Doctrine ORM 2.14 + Doctrine Lexer latest
- GitHub Check: PHP 8.3 + Doctrine ORM latest + Doctrine Lexer 2.1
- GitHub Check: PHP 8.4 + Doctrine ORM 2.14 + Doctrine Lexer 2.1
- GitHub Check: PHP 8.2 + Doctrine ORM 2.14 + Doctrine Lexer latest
- GitHub Check: PHP 8.2 + Doctrine ORM 2.18 + Doctrine Lexer 3.0
- GitHub Check: wait-for-tests-worflows-before-upload
🔇 Additional comments (24)
tests/Integration/MartinGeorgiev/Doctrine/ORM/Query/AST/Functions/WebsearchToTsqueryTest.php (3)
21-21: Method name improved for clarity.The rename from
websearch_to_tsquery_with_explicit_configtocan_use_with_explicit_configfollows a more descriptive test naming pattern that clearly indicates the test's purpose.
29-29: Method name improved for clarity.The rename from
websearch_to_tsquery_with_default_configtocan_use_default_configfollows a more descriptive test naming pattern that clearly indicates the test's purpose.
37-37: Method name improved for clarity.The rename from
totsquery_throws_with_invalid_inputtothrows_for_invalid_config_inputcorrects the typo and follows a more descriptive test naming pattern that clearly indicates the test's purpose.docs/INTEGRATING-WITH-DOCTRINE.md (7)
3-3: Version requirement clarity is helpful.Adding the specific version requirements (Doctrine DBAL 3.x/4.x and ORM 2.14+/3.x) provides clear guidance to users about compatibility.
5-7: Documentation structure improved with clear reference to complete type list.The reorganization into a dedicated section with a bold reference to the complete type list in AVAILABLE-TYPES.md makes it easier for users to find comprehensive information.
14-50: Well-organized categorization of DBAL types.The grouping of types into logical categories (Array, JSON, Network, Spatial, Range) makes the configuration more readable and easier to understand. The comprehensive coverage aligns well with the documentation's goal of providing a complete integration guide.
53-61: Improved section organization and comprehensive documentation references.The restructure into a dedicated "Register DQL Functions" section with links to specialized documentation pages provides better navigation and context for users.
197-197: Function class reference updated correctly.The change from
FlaggedRegexpLike::classtoRegexpLike::classappears to reflect an updated implementation. This aligns with the broader documentation cleanup theme of this PR.
225-284: Excellent addition of platform type mappings section.This new section addresses a critical integration requirement by documenting the mapping between PostgreSQL and Doctrine types for schema introspection and migrations. The categorized organization matches the DBAL types section above, creating consistency throughout the documentation.
286-323: Practical entity usage examples enhance the documentation.The new "Usage in Entities" section provides concrete examples of how to use the registered types in actual Doctrine entities, complete with proper imports and attribute usage. This bridges the gap between configuration and implementation.
docs/RANGE-TYPES.md (2)
46-46: Property type made non-nullable consistently.The change from
private ?NumericRange $priceRange = null;toprivate NumericRange $priceRange;aligns with the broader documentation pattern of showing non-nullable type usage, as seen in the main Doctrine integration guide.
49-49: Property type made non-nullable consistently.The change from
private ?DateRange $availabilityPeriod = null;toprivate DateRange $availabilityPeriod;aligns with the broader documentation pattern of showing non-nullable type usage, as seen in the main Doctrine integration guide.docs/INTEGRATING-WITH-SYMFONY.md (8)
3-3: Version requirement clarity is helpful.Adding the specific version requirements (Symfony 6.4+ and 7.x) provides clear guidance to users about compatibility and aligns with the modernization theme seen across the documentation updates.
5-7: Documentation structure improved with clear reference to complete type list.The reorganization into a dedicated section with a reference to the complete type list in AVAILABLE-TYPES.md improves discoverability and maintains consistency with the Doctrine integration guide.
13-50: Well-organized categorization with proper YAML syntax.The categorized approach (Array types, JSON types, Network types, Spatial types, Range types) improves readability. The quoted keys for array types (e.g.,
'bool[]','text[]') correctly handle the special characters in YAML.
53-114: Comprehensive type mapping configuration with correct PostgreSQL naming.The addition of the type mappings section is essential for proper Doctrine-PostgreSQL integration. The mappings correctly handle both the DBAL type names and PostgreSQL's internal naming conventions (e.g.,
_bool,_int2,_int4,_int8,_text).
117-286: Enhanced DQL functions section with comprehensive coverage.The renamed section and expanded function mappings provide thorough coverage of available PostgreSQL functions through Doctrine. The organization follows logical groupings that make it easier for developers to find specific functionality.
288-330: Practical entity usage examples with proper imports.The new "Usage in Entities" section provides concrete examples that help developers understand how to use the configured types in practice. The imports show the proper value object types (Point, NumericRange, DateRange, WktSpatialData) that developers need to work with.
332-358: Environment-specific configuration guidance is valuable.The addition of environment-specific configuration examples helps developers understand how to optimize their setup for different deployment environments.
360-384: Service container integration example completes the guide.The programmatic type registration example provides an alternative approach for bundle developers and shows how to integrate with Symfony's service container, complementing the YAML configuration approach.
docs/INTEGRATING-WITH-LARAVEL.md (4)
488-496: Good pattern: resolving('em') + platform mappings.Using a resolving hook for the EntityManager and registering platform type mappings centrally is solid. This will catch platform-reported internal names and align with DBAL type names.
Also applies to: 516-533
319-343: Event subscriber approach looks correct.postConnect hook and addTypeIfNotExists guards are appropriate to avoid redeclaration errors when combined with config-based custom_types.
Also applies to: 391-396
89-126: Geometry/Geography types are present – no changes needed.All
Geometry,GeometryArray,Geography, andGeographyArrayclasses exist undersrc/MartinGeorgiev/Doctrine/DBAL/Types, so thecustom_typessnippet is accurate as-is.
71-77: Geometry and Geography types confirmed – no gating needed
Geometry, GeometryArray, Geography and GeographyArray classes exist undersrc/MartinGeorgiev/Doctrine/DBAL/Types, so the Laravel integration examples can remain as-is.
Summary by CodeRabbit
Documentation
Tests