Download the PHP package mjohann/call-morph without Composer
On this page you can find all versions of the php package mjohann/call-morph. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download mjohann/call-morph
More information about mjohann/call-morph
Files in mjohann/call-morph
Package call-morph
Short Description CallMorph is a PHP class that simplifies and secures the serialization of anonymous functions by automatically selecting the appropriate library based on the PHP version, with support for a secret key when using Laravel's Serializable Closures.
License MIT
Informations about the package call-morph
Call Morph
CallMorph is a PHP class that provides a simple and secure interface for serializing and unserializing anonymous functions (Closures). It automatically detects the PHP version and uses the appropriate library for maximum compatibility and security, including support for a secret key when using Laravel's Serializable Closures.
π¦ Installation
You can install the library via Packagist/Composer:
βοΈ Requirements
- PHP 7.0 or higher
- For PHP >= 8.1: laravel/serializable-closure must be installed.
- For PHP < 8.1: opis/closure is required.
π Features
- Serialize and unserialize Closures with automatic compatibility based on PHP version
- Supports secret key configuration for secure serialization in Laravel
- Simple and clean API
Available Methods
__construct(string $secret)getSecret(): stringsetSecret(string $secret): voidserialize(Closure $callback): stringunserialize(string $callback): Closure
π§ͺ Usage Example
Publisher
For more examples, see the example/ file in the repository.
π Project Structure
π License
This project is licensed under the MIT License. See the LICENSE file for more information.
π¨βπ» Author
Developed by Matheus Johann AraΓΊjo β Pernambuco, Brazil.