Download the PHP package algoyounes/idempotency without Composer

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


Idempotency

Build Status Total Downloads Latest Stable Version License

Idempotency is a Laravel package that helps you make your requests idempotent. Idempotent requests can be safely retried without causing any side effects. This is useful when you're dealing with unreliable networks or when you want to prevent duplicate requests from being processed.

Features ✨

Installation

You can install the package via Composer:

You can publish the configuration file using the following command:

Here are the available options in the configuration file:

Option Default Value Description
enable true Enable or disable the idempotency middleware
cache.ttl 86400 (1 Day) The time-to-live for idempotency keys in minutes
cache.store default The cache store to use for idempotency keys
idempotency_header Idempotency-Key The header to use for idempotency keys
idempotency_relayed_header Idempotency-Relayed The header for relaying idempotency keys
duplicate_handling replay The action to take when a duplicate request is detected. Options are replay or exception
enforced_verbs ['GET', 'POST', 'PUT', 'PATCH', 'DELETE'] The HTTP verbs to enforce idempotency on
max_lock_wait_time 10 (10 seconds) The maximum time to wait for a lock in seconds
user_id_resolver null The user ID resolver to use for generating cache keys
unauthenticated_user_id guest The default user ID name for unauthenticated requests

Usage

To request idempotent, try adding something like idempotency middleware to the route or group of routes you want to protect. The middleware will check if the request is idempotent by looking for the Idempotency-Key header. If the header is present, the middleware will cache the response and reuse it for subsequent requests with the same key.

You can also add the middleware to a group of routes:

Custom Resolver 🔧

You can create your resolver by implementing the Resolver interface. This is useful when you want to store the cache in a different store or when you want to customize the key generation logic.

Contributing

Thank you for considering contributing to the Idempotency package. For more details, please check the CONTRIBUTING file.

License

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


All versions of idempotency 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 algoyounes/idempotency contains the following files

Loading the files please wait ....