Skip to content

Conversation

@martin-georgiev
Copy link
Owner

@martin-georgiev martin-georgiev commented Sep 4, 2025

Summary by CodeRabbit

  • Documentation

    • Major overhaul of integration guides for Doctrine, Laravel 11, and Symfony 6.4/7.
    • Added categorized DBAL type registration (arrays, JSON, network, spatial, range), platform type mappings, and DQL function registration.
    • Introduced service provider and event-subscriber setup patterns.
    • Expanded entity usage examples; updated range type examples to non-nullable properties.
    • Added a full‑text search function entry (websearch_to_tsquery) to the reference.
  • Tests

    • Renamed tests for clarity; no behavioral changes.

@martin-georgiev martin-georgiev marked this pull request as ready for review September 4, 2025 22:03
@martin-georgiev martin-georgiev merged commit f011b54 into main Sep 4, 2025
68 of 70 checks passed
@martin-georgiev martin-georgiev deleted the docs branch September 4, 2025 22:06
@coveralls
Copy link

Coverage Status

coverage: 95.104%. remained the same
when pulling a3e945d on docs
into be90545 on main.

@coderabbitai
Copy link

coderabbitai bot commented Sep 4, 2025

Walkthrough

Documentation 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

Cohort / File(s) Summary
Doctrine integration docs
docs/INTEGRATING-WITH-DOCTRINE.md
Reworks sections for registering DBAL types, DQL functions, platform type mappings; adds arrays/JSON/network/spatial/range groupings; updates REGEXP_LIKE mapping; adds entity usage examples.
Laravel integration docs and runtime wiring
docs/INTEGRATING-WITH-LARAVEL.md
Targets Laravel 11.x; adds installation flow; introduces event-subscriber and service-provider patterns for type registration and platform mappings; updates config references; expands entity examples.
Symfony integration docs
docs/INTEGRATING-WITH-SYMFONY.md
Updates to Symfony 6.4+/7.x config style; categorizes DBAL types; adds explicit mappings and DQL registration; includes entity usage, env-specific config, and container integration example.
Range types doc adjustments
docs/RANGE-TYPES.md
Changes example entity properties from nullable with defaults to non-nullable for NumericRange and DateRange.
Text/pattern functions doc update
docs/TEXT-AND-PATTERN-FUNCTIONS.md
Adds websearch_to_tsquery/WEBSEARCH_TO_TSQUERY entry documented as WebsearchToTsquery.
Tests: WebsearchToTsquery
tests/Integration/.../WebsearchToTsqueryTest.php
Renames three public test methods for clarity; no logic 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
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Poem

I thump my paw on parchment bright,
Arrays and ranges spring to light.
JSON burrows, networks hop,
Spatial points go pop-pop-pop!
Providers hum, subscribers sing—
“Postgres, Doctrine—everything!”
A happy hare reviews the lot. 🐇✨

✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch docs

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.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore or @coderabbit ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@coderabbitai coderabbitai bot left a 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_TSQUERY

Nice 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.

📥 Commits

Reviewing files that changed from the base of the PR and between be90545 and a3e945d.

📒 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.md
  • docs/INTEGRATING-WITH-DOCTRINE.md
  • docs/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.md
  • docs/INTEGRATING-WITH-DOCTRINE.md
  • docs/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.md
  • docs/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.md
  • docs/INTEGRATING-WITH-DOCTRINE.md
  • docs/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_config to can_use_with_explicit_config follows 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_config to can_use_default_config follows 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_input to throws_for_invalid_config_input corrects 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::class to RegexpLike::class appears 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; to private 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; to private 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, and GeographyArray classes exist under src/MartinGeorgiev/Doctrine/DBAL/Types, so the custom_types snippet is accurate as-is.


71-77: Geometry and Geography types confirmed – no gating needed
Geometry, GeometryArray, Geography and GeographyArray classes exist under src/MartinGeorgiev/Doctrine/DBAL/Types, so the Laravel integration examples can remain as-is.

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.

3 participants