Download the PHP package juanparati/laravel-timeout without Composer

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

example workflow

Laravel Query Timeout ⏰

A Laravel database extension that implements query timeouts at the database level, helping you implement the circuit breaker pattern.

Note: This library only supports MariaDB and MySQL databases.

How it works.

Use the \DB::timeout method to set a maximum execution time for your queries:

In the previous example if the query exceeds the specified timeout (3 seconds), it will be terminated and throw a \Juanparati\LaravelTimeout\QueryTimeoutException.

How it works under the hood

Instead of using co-routines or parallel execution monitoring, this library leverages native database features:

The timeout mechanism works by:

  1. Setting the timeout value for the database session
  2. Executing the query
  3. Restoring the original timeout value

Limitations

MySQL-specific

MariaDB-specific

General Limitations:

Best Practices

  1. Keep application logic outside the closure.

✅ Recommended:

❌ Not recommended:

  1. In MySQL, try to use only one query per closure (Be cautious with ORM operations that might trigger multiple queries).

Configuration

Publish configuration (Optional)


All versions of laravel-timeout with dependencies

PHP Build Version
Package Version
Requires php Version >=8.2
ext-pdo Version *
illuminate/support Version >=10.3
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 juanparati/laravel-timeout contains the following files

Loading the files please wait ....