Download the PHP package stayallive/laravel-passport-memoized without Composer

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

Laravel Passport Memoized

Latest Version Build Status Total Downloads

Laravel Passport comes with repositories for the underlying oauth2-server that result in multiple queries to retrieve the same exact object from the database in a single request. With a good database engine this will have a small impact in the range of milliseconds but this is still unacceptable and should be avoided if possible.

With a typical Passport token authenticated request you will see that the token is retrieved 3 times and the client is retrieved twice.

This might be patched in future Laravel Passport releases, but until that time you can install this package.

This package replaces the client and token repositories with ones that memoize the results of certain calls that perform database queries to remove the duplicate queries.

It's safe to use with Laravel Octane since we make sure that the memoize cache is cleared after each request to prevent stale caches.

Why a package?

And not a PR to Laravel Passport? This was attempted (although not a perfect solution yet) in the past but it was decided to not be changed so this package was created as an alternative. See also this pinned issue for more information and another package if you are looking for an alternative solution.

Installation

Usage

You should only have to install this package to benefit, unless you have disable package auto discovery, in that case you will need to add the service provider to your config/app.php manually.

Security Vulnerabilities

If you discover a security vulnerability within this package, please send an e-mail to Alex Bouma at [email protected]. All security vulnerabilities will be swiftly addressed.

License

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


All versions of laravel-passport-memoized with dependencies

PHP Build Version
Package Version
Requires php Version ^8.0.2
laravel/framework Version ^9|^10|^11
laravel/passport Version ^10|^11|^12
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 stayallive/laravel-passport-memoized contains the following files

Loading the files please wait ....