Download the PHP package roave/behat-psr11extension without Composer

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

PSR-11 Container extension for Behat

Build Status Scrutinizer Code Quality Code Coverage Latest Stable Version License

Allows injecting services from a PSR-11-compatibile container in a Behat context.

Created with lots of help from @ciaranmcnulty.

Usage

First require the extension and dependencies with Composer:

First, if you don't already have one, create a file that will be included by the extension that returns a PSR-11 compatible container, for example using Laminas\ServiceManager:

Then enable the extension in behat.yml:

Then enable the use of the psr_container service container (this is provided by the extension) in your behat.yml suite configuration, for example:

And finally, add the names of any services required by your contexts in behat.yml, for example:

You can also use behat's built-in autowire feature, to automatically inject the dependencies to the context:

If for some reason you want to use a name other than psr_container for the container (e.g. collision with another extension) this can be overridden:

Just for clarity (and hopefully ease of understanding), this would be the equivalent of doing this in plain PHP:


All versions of behat-psr11extension with dependencies

PHP Build Version
Package Version
Requires php Version ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0
behat/behat Version ^3.14.0
psr/container Version ^1.1.2
symfony/config Version ^6.0.19
symfony/dependency-injection Version ^6.0.20
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 roave/behat-psr11extension contains the following files

Loading the files please wait ....