x-laravel/pulse-oci-mysql

Laravel Pulse compatibility layer for Oracle Cloud MySQL (OCI) — removes generated columns and computes key_hash in PHP.

Maintainers

Package info

github.com/x-laravel/pulse-oci-mysql

pkg:composer/x-laravel/pulse-oci-mysql

Statistics

Installs: 49

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v1.0.0 2026-04-11 01:04 UTC

This package is auto-updated.

Last update: 2026-04-12 07:08:29 UTC


README

Tests PHP Laravel Pulse License

A Laravel Pulse compatibility layer for Oracle Cloud MySQL (OCI).

OCI MySQL does not support md5() in generated columns, which breaks Pulse's default migration and storage layer. This package replaces the generated key_hash column with a plain char(32) and computes the hash in PHP instead.

Requirements

  • PHP ^8.2
  • Laravel Pulse ^1.0

Installation

composer require x-laravel/pulse-oci-mysql

The service provider is auto-discovered — no manual registration needed.

Do not publish or run Pulse's own migrations. Use the ones provided by this package instead.

Publish and run the OCI-compatible migrations:

php artisan vendor:publish --tag=pulse-oci-mysql-migrations
php artisan migrate

That's it.

How It Works

Default Pulse This package
key_hash column char(16) BINARY — generated via unhex(md5(key)) char(32) — populated by PHP md5()
Storage class DatabaseStorage PulseDatabaseStorage (extends DatabaseStorage)
Binding automatic overrides in boot(), always wins

Why boot() instead of register()?

PulseServiceProvider binds Storage::class → DatabaseStorage::class in its register() method. By binding the replacement in boot() — which always runs after all register() calls — the override is guaranteed regardless of provider load order.

Why char(32) instead of a generated column?

OCI MySQL does not support md5() inside generated column expressions. The char(32) column stores the hex output of PHP's md5() function directly, bypassing the database-level computation entirely.

Testing

# Build first (once per PHP version)
DOCKER_BUILDKIT=0 docker compose --profile php82 build

# Run tests
docker compose --profile php82 up
docker compose --profile php83 up
docker compose --profile php84 up
docker compose --profile php85 up

License

This package is open-sourced software licensed under the MIT license.