Conversation
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The changes directly address the reported installation failures with targeted fixes and add tests to prevent regressions for publish tags, translation paths, and index name length constraints.
Review effort: Lite
Findings: None
What changed in this PR
This PR fixes several installation-time problems in the package by making migrations compatible with MySQL identifier limits, avoiding an SQLite-only migration failure on Laravel 10, and correcting translation publishing so it doesn’t override an app’s own lang/ directory translations.
Changes:
- Add explicit, shorter morph index names in PaysafeCard and Credit Card migrations to stay under MySQL/MariaDB’s 64-character identifier limit.
- Skip the
mbway_references.valuecolumn type alteration migration on SQLite to avoid requiringdoctrine/dbalfor installs/tests. - Publish translations to
lang_path('vendor/eupago')and add package-prefixed publish tags while keeping legacy tags working; update docs and add feature tests for publishing and index-name length.
| File | Description |
|---|---|
| UPGRADE.md | Adds upgrade/recovery guidance for previously-failed MySQL migrations and translation relocation. |
| tests/Feature/PublishingTest.php | Adds coverage for publish tags, translation publish path, and index-name length constraints. |
| src/Providers/EuPagoServiceProvider.php | Switches publishing to prefixed+legacy tags and publishes translations to the app lang path. |
| README.md | Updates installation command to use the new eupago-migrations publish tag. |
| docs/payshop.md | Reorders trait usage before relationship examples and clarifies one-call create/save usage. |
| docs/paysafecard.md | Reorders trait usage before relationship examples and clarifies one-call create/save usage. |
| docs/multibanco.md | Reorders trait usage before relationship examples and documents additional result keys. |
| docs/mbway.md | Reorders trait usage before relationship examples and clarifies one-call create/save usage. |
| docs/installation.md | Updates publish commands to the new prefixed tags for migrations/config/translations. |
| docs/credit-card.md | Reorders trait usage before relationship examples and clarifies one-call create/save usage. |
| docs/configuration.md | Fixes the new MB(...)->create() example to valid PHP syntax. |
| database/migrations/2026_09_05_000000_create_credit_card_references_table.php | Adds an explicit morph index name to avoid MySQL identifier-length failures. |
| database/migrations/2026_07_15_000000_change_mbway_references_value_to_decimal.php | Skips the migration on SQLite to avoid doctrine/dbal-required column changes on Laravel 10. |
| database/migrations/2026_06_29_000000_create_paysafecard_references_table.php | Adds an explicit morph index name to avoid MySQL identifier-length failures. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
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.
Closes #93.
Fixes the problems a user hits while installing the package, before any payment is made.
migratefailed after creating the table and blocked every later migration.mbway_references.valueto decimal is skipped on SQLite, where it neededdoctrine/dbalon Laravel 10. Fresh installs already create the column as decimal.lang_path('vendor/eupago'). Publishing toresources/langcreated that directory and made Laravel stop loading the app's ownlang/translations.eupago-migrations,eupago-config,eupago-translations); the old tags keep working.(new MB(...))->create()sample is fixed, and the Multibanco result lists all its keys.UPGRADE.mdcovers recovering a MySQL install that already hit the failed migration, and moving translations published to the old location.Verified on a MySQL 8 container: v3.9.0 fails with "Identifier name ... is too long", this branch migrates and rolls back cleanly, and the recovery steps in
UPGRADE.mdrepair a database left broken by the old migration.tests/Feature/PublishingTest.phpcovers the tags, the translations path and the 64-character index limit.