Download the PHP package ixarlie/mutex-bundle without Composer

On this page you can find all versions of the php package ixarlie/mutex-bundle. 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 mutex-bundle

IXarlie Mutex Bundle

GitHub Actions Codacy Badge Packagist

This bundle integrates the symfony/lock capabilities into kernel.controller events.

For previous releases with arvenil/ninja-mutex dependency follow the version 1

Before continuing, please read the following links for more information.

Install

Add the bundle in the kernel class:

Configuration

Locking Strategy

This bundle ships 3 different locking strategies:

You can implement your own LockingStrategy classes. Use the tag ixarlie_mutex.strategy in your services to register them in the LockExecutor service.

Naming Strategy

The name option is not required in the annotation. However, a name is mandatory in order to create a LockInterface instance.

This bundle ships 2 naming strategies:

You can implement your own NamingStrategy.

  1. Decorating ixarlie_mutex.naming_strategy (recommended)

  2. Replacing the alias definition ixarlie_mutex.naming_strategy with your own service id. This will execute only your logic.

Annotation

The MutexRequest annotation can be used only on controller methods.

Options

The lock factory service name. It should be one of the services listed in the factories setting.

Examples:

One of the registered locking strategies. Read the Locking Strategy section.

Examples:

The lock's name. If no name is provided, the name will be generated using the registered naming strategies.

Note: Read userIsolation option to know how it affects to the name.

Note: The prefix ixarlie_mutex_ is prefixed to the name.

Note: The naming strategy output is md5 hashed to avoid any issue with some PersistingStoreInterface implementations.

Examples:

This is a custom message for the exception in case the lock cannot be acquired.

Examples:

This option will add token user context to the name option in order to have isolated locks for different users.

Example:

Note: If security.token_storage is not available and userIsolation is set to true, an exception will be thrown.

Note: Be aware about using userIsolation in anonymous routes.

Maximum expected lock duration in seconds.

Example:


All versions of mutex-bundle with dependencies

PHP Build Version
Package Version
Requires php Version ^7.1.13 || ^8.0
doctrine/annotations Version ^1.13 || ^2.0
symfony/event-dispatcher Version ^4.4 || ^5.0
symfony/framework-bundle Version ^4.4 || ^5.0
symfony/lock Version ^4.4 || ^5.0
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 ixarlie/mutex-bundle contains the following files

Loading the files please wait ....