Looking to hire Laravel developers? Try LaraJobs

pulse-oci-mysql maintained by x-laravel

Description
Laravel Pulse compatibility layer for Oracle Cloud MySQL (OCI) — removes generated columns and computes key_hash in PHP.
Author
Last update
2026/04/11 03:04 (dev-master)
License
Links
Downloads
197
Tags

Comments
comments powered by Disqus

Pulse OCI MySQL

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.