feat(loggable): replace PHP-serialized array type with json for DBAL 4 compatibility#1
Open
Copilot wants to merge 20 commits into
Open
feat(loggable): replace PHP-serialized array type with json for DBAL 4 compatibility#1Copilot wants to merge 20 commits into
array type with json for DBAL 4 compatibility#1Copilot wants to merge 20 commits into
Conversation
…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>
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>
Agent-Logs-Url: https://github.com/QurPlus/DoctrineExtensions/sessions/e44795ea-762d-486e-b81c-3d50475d8da1 Co-authored-by: stephanvierkant <601833+stephanvierkant@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
stephanvierkant
May 7, 2026 16:22
View session
There was a problem hiding this comment.
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
datafrom DBALarray/PHPserialize()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
datavalues to JSON, and trackbin/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.
…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>
… 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>
Agent-Logs-Url: https://github.com/QurPlus/DoctrineExtensions/sessions/243336ad-8bbd-4a3d-94ec-bbb282d1892c Co-authored-by: stephanvierkant <601833+stephanvierkant@users.noreply.github.com>
…ptional Agent-Logs-Url: https://github.com/QurPlus/DoctrineExtensions/sessions/e2ee88ec-9bfd-48d4-81c8-eb88c446c83b 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>
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>
Agent-Logs-Url: https://github.com/QurPlus/DoctrineExtensions/sessions/7e5ec2df-2525-4389-8d6f-589b90b1c2fb Co-authored-by: stephanvierkant <601833+stephanvierkant@users.noreply.github.com>
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
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.
--tableis no longer needed