Skip to content

feat(loggable): replace PHP-serialized array type with json for DBAL 4 compatibility#1

Open
Copilot wants to merge 20 commits into
mainfrom
copilot/convert-loggable-data-to-json
Open

feat(loggable): replace PHP-serialized array type with json for DBAL 4 compatibility#1
Copilot wants to merge 20 commits into
mainfrom
copilot/convert-loggable-data-to-json

Conversation

Copy link
Copy Markdown

Copilot AI commented May 7, 2026

  • Verify current command integration and Symfony docs in the repository
  • Remove DSN support from the command implementation
  • Auto-detect the log entry table from Doctrine metadata so --table is no longer needed
  • Assess true Symfony autoregistration: not achievable from this library alone without a bundle/recipe, so document the supported behavior
  • Run focused validation for the changed PHP code

Copilot AI and others added 5 commits May 7, 2026 16:09
…L 4 compatibility

Agent-Logs-Url: https://github.com/QurPlus/DoctrineExtensions/sessions/c9d7bf14-7e2d-40b1-92b7-c9e9394a79d8

Co-authored-by: stephanvierkant <601833+stephanvierkant@users.noreply.github.com>
…latform-specific DDL, regex)

Agent-Logs-Url: https://github.com/QurPlus/DoctrineExtensions/sessions/c9d7bf14-7e2d-40b1-92b7-c9e9394a79d8

Co-authored-by: stephanvierkant <601833+stephanvierkant@users.noreply.github.com>
…AGMA, unserialize)

Agent-Logs-Url: https://github.com/QurPlus/DoctrineExtensions/sessions/c9d7bf14-7e2d-40b1-92b7-c9e9394a79d8

Co-authored-by: stephanvierkant <601833+stephanvierkant@users.noreply.github.com>
@stephanvierkant stephanvierkant marked this pull request as ready for review May 7, 2026 16:23
Copilot AI review requested due to automatic review settings May 7, 2026 16:23
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the Loggable extension to be compatible with doctrine/dbal 4 by replacing the removed PHP-serialized array column type for AbstractLogEntry::$data with a JSON-based type, and adds guidance/tooling for migrating existing data.

Changes:

  • Update LogEntry mapping for data from DBAL array/PHP serialize() storage to DBAL JSON.
  • Re-enable Loggable ORM entity tests on DBAL 4 by removing the DBAL-4 skip guard.
  • Add migration documentation and a standalone CLI script to convert existing serialized data values to JSON, and track bin/ in git.

Reviewed changes

Copilot reviewed 3 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/Loggable/Entity/MappedSuperclass/AbstractLogEntry.php Changes the data column mapping from array to JSON (Types::JSON / type="json").
tests/Gedmo/Loggable/LoggableEntityTest.php Removes the DBAL-4 compatibility skip so tests run on DBAL 4.
doc/loggable.md Replaces the DBAL-4 incompatibility note with a migration guide section.
bin/migrate-loggable-data-to-json.php Adds a CLI migration script to rename the legacy column and batch-convert values from unserialize() to json_encode().
.gitignore Stops ignoring bin/ so the migration script is versioned.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/Loggable/Entity/MappedSuperclass/AbstractLogEntry.php
Comment thread doc/loggable.md Outdated
…migration guide

Agent-Logs-Url: https://github.com/QurPlus/DoctrineExtensions/sessions/706eac44-2949-4e1a-b2e0-c6177d8f8fef

Co-authored-by: stephanvierkant <601833+stephanvierkant@users.noreply.github.com>
Copilot AI and others added 3 commits May 8, 2026 09:56
… DB connection fallback

Agent-Logs-Url: https://github.com/QurPlus/DoctrineExtensions/sessions/243336ad-8bbd-4a3d-94ec-bbb282d1892c

Co-authored-by: stephanvierkant <601833+stephanvierkant@users.noreply.github.com>
…ex constants

Agent-Logs-Url: https://github.com/QurPlus/DoctrineExtensions/sessions/243336ad-8bbd-4a3d-94ec-bbb282d1892c

Co-authored-by: stephanvierkant <601833+stephanvierkant@users.noreply.github.com>
Copilot AI and others added 3 commits May 8, 2026 12:23
Agent-Logs-Url: https://github.com/QurPlus/DoctrineExtensions/sessions/7e5ec2df-2525-4389-8d6f-589b90b1c2fb

Co-authored-by: stephanvierkant <601833+stephanvierkant@users.noreply.github.com>
Agent-Logs-Url: https://github.com/QurPlus/DoctrineExtensions/sessions/7e5ec2df-2525-4389-8d6f-589b90b1c2fb

Co-authored-by: stephanvierkant <601833+stephanvierkant@users.noreply.github.com>
Copilot AI and others added 7 commits May 8, 2026 12:26
Agent-Logs-Url: https://github.com/QurPlus/DoctrineExtensions/sessions/7e5ec2df-2525-4389-8d6f-589b90b1c2fb

Co-authored-by: stephanvierkant <601833+stephanvierkant@users.noreply.github.com>
Agent-Logs-Url: https://github.com/QurPlus/DoctrineExtensions/sessions/7e5ec2df-2525-4389-8d6f-589b90b1c2fb

Co-authored-by: stephanvierkant <601833+stephanvierkant@users.noreply.github.com>
Agent-Logs-Url: https://github.com/QurPlus/DoctrineExtensions/sessions/7e5ec2df-2525-4389-8d6f-589b90b1c2fb

Co-authored-by: stephanvierkant <601833+stephanvierkant@users.noreply.github.com>
Agent-Logs-Url: https://github.com/QurPlus/DoctrineExtensions/sessions/7e5ec2df-2525-4389-8d6f-589b90b1c2fb

Co-authored-by: stephanvierkant <601833+stephanvierkant@users.noreply.github.com>
Agent-Logs-Url: https://github.com/QurPlus/DoctrineExtensions/sessions/7e5ec2df-2525-4389-8d6f-589b90b1c2fb

Co-authored-by: stephanvierkant <601833+stephanvierkant@users.noreply.github.com>
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