Skip to content

Drop pre-8.5 PDO MySQL constant fallbacks and tidy migrate:temporal output - #356

Merged
techmahedy merged 1 commit into
doppar:4.xfrom
techmahedy:techmahedy-4.x
Oct 11, 2026
Merged

techmahedy merged 1 commit into
doppar:4.xfrom
techmahedy:techmahedy-4.x

Conversation

@techmahedy

@techmahedy techmahedy commented Oct 11, 2026 •

Copy link
Copy Markdown
Member

Pull Request Checklist

Q A
Branch? 4.x
Bug fix? no
New feature? no
Deprecations? yes
Issues -
License MIT

1. Remove PHP 8.3/8.4 MySQL constant fallbacks

composer.json already requires php ^8.5, and PHP 8.5 deprecates PDO::MYSQL_ATTR_* in favour of Pdo\Mysql::ATTR_*. The compatibility code for older PHP versions was therefore dead.

  • MySQLDriver: removed the mysqlAttr() helper. connect() now uses Pdo\Mysql::ATTR_SSL_CA, ATTR_SSL_VERIFY_SERVER_CERT, ATTR_SSL_CERT, ATTR_SSL_KEY, ATTR_SSL_CAPATH, ATTR_SSL_CIPHER and ATTR_INIT_COMMAND directly. Behaviour is unchanged: SSL options are applied only when a CA is configured, and server-cert verification is still disabled in that case.
  • InteractsWithBigDataProcessing::openCursor(): removed the legacy PDO::MYSQL_ATTR_USE_BUFFERED_QUERY branch. The defined('Pdo\Mysql::...') guard is kept on purpose, because pdo_mysql may not be loaded on SQLite or PostgreSQL apps.

Config note: the mysql connection's options can now be written as:

'options' => extension_loaded('pdo_mysql') ? array_filter([
    \Pdo\Mysql::ATTR_SSL_CA => env('MYSQL_ATTR_SSL_CA'),
]) : [],

Apps that still key options by PDO::MYSQL_ATTR_SSL_CA will stop getting SSL options applied. The option is read from the Pdo\Mysql::ATTR_* key only.

2. Cleaner migrate:temporal output

Each model used to print five lines. It now prints one aligned line: status icon, model, base → history table, connection and status.

✓ App\Models\Product     product → product_history        mysql         created
• App\Models\Permission  permission → permission_history  mysql_second  already exists
  • Status colours: green ✓ for created or actor column added, yellow • for already exists, yellow › for would create (--show).
  • --show still prints the SQL, indented under each model line, and the header marks it as a dry run.
  • No logic changes: the same checks, failure handling and final summary.

Checklist

  • Tests have been added or updated
  • Documentation has been updated if necessary
  • Code follows the project coding standards
  • All tests pass locally

@techmahedy
techmahedy merged commit 3fe44d3 into doppar:4.x Oct 11, 2026
16 checks passed
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.

1 participant