Download the PHP package ecomdev/magento-psr6-bridge without Composer

On this page you can find all versions of the php package ecomdev/magento-psr6-bridge. 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 magento-psr6-bridge

Magento 2.0 PSR-6 Bridge Build Status Coverage Status

This small module is a bridge, that allows you to integrate any PSR-6 compatible library into your Magento 2.0 project.

As well it is more convenient to use PSR-6 based cache pool than creating your custom cache type for a Magento module.

Read more about PSR-6

Installation

  1. Add module as dependency:

  2. Enable module

  3. Enable PSR-6 cache type

Usage

Basic usage

If you already have a PSR-6 compatible library, that uses Psr\Cache\CacheItemPoolInterface in one of its components, it will work out of the box. All the cache keys will be automatically prefixed with psr6_ prefix in standard Magento cache storage. Also PSR6 cache tag will be applied automatically.

Using custom cache tags and prefix

If you would like to implement own cache invalidation on particular actions (ERP import, etc).

Then you might find it convenient to use additional custom cache tags so items will be cleaned by them on invoking clear() method.

  1. Add a new virtual type into your di.xml and use it for your instances

  2. Now you can use it in your custom class

Use cache key generator

Modules comes out of the box with properly configured cache key generator, so if you do not want to take care about your cache key structure, but have PSR6 compatible, you can use it:

This allows you remove all that terrible logic of cache key generation based on your class properties.

Read more about cache key generator

Contribution

Make a pull request based on develop branch


All versions of magento-psr6-bridge with dependencies

PHP Build Version
Package Version
Requires php Version ~5.6|>=7.0
psr/cache Version ^1.0
ecomdev/cache-key Version ^1.1
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 ecomdev/magento-psr6-bridge contains the following files

Loading the files please wait ....