Download the PHP package omegacms/serializable-closure without Composer

On this page you can find all versions of the php package omegacms/serializable-closure. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package serializable-closure

Serializable Closure Package

The Serializable Closure package provides a convenient and secure way to serialize closures in PHP. It allows you to serialize and unserialize closures, preserving their state and functionality even across different PHP processes. This can be particularly useful in scenarios where closures need to be stored and retrieved, such as in caching mechanisms or queue systems.

How it Works

The package introduces two main classes: SerializableClosure and UnsignedSerializableClosure.

⚠️ Experimental Feature: Serialization of Anonymous Functions

Caution: This feature is experimental! We've added support for the serialization of anonymous functions, but it comes with a warning. This feature is considered experimental, and we recommend using it only if you fully understand its implications.

Anonymous function serialization involves intricacies and potential risks, and its usage should be approached with caution. If you're unsure about the consequences or don't specifically need this functionality, it's advisable to stick to serializing named functions or closures.

Before incorporating this feature into your code, ensure you are aware of the implications and are comfortable handling any potential issues that might arise. Proceed with caution!

Requirements

Installation via Composer

To install the package, add the following to your composer.json file:

Then run:

Getting Started

Example 1: Using SerializableClosure with Signing.

Example 2: Using UnsignedSerializableClosure.

Example 3: Using SerializableClosure with Signing and anonymous functions.

Example 4: UsUsing UnsignedSerializableClosure and anonymous functions.

Contributing

If you'd like to contribute to the OmegaCMS Serializable Closure package, please follow our contribution guidelines.

License

This project is open-source software licensed under the GNU General Public License v3.0.


All versions of serializable-closure with dependencies

PHP Build Version
Package Version
Requires php Version >=8.2
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package omegacms/serializable-closure contains the following files

Loading the files please wait ....