Installation

Standard Installation

To install the library use Composer:

$ composer require laminas/laminas-mvc-plugin-flashmessenger

Installation for a laminas-mvc Application

Installation and Automated Configuration

The laminas-component-installer is the recommended installation method when using in a laminas-mvc-based application. It will automatically inject the module in the configuration during the installation process.

Installation Requirements

The following descriptions depends on the laminas-component-installer component, so be sure to have it installed before getting started.

Global Installation

With a global installation of laminas-component-installer it can be used for all projects without a reinstallation.

$ composer global require laminas/laminas-component-installer

As Development Dependency

$ composer require --dev laminas/laminas-component-installer

Install laminas-mvc-plugin-flashmessenger and Inject Configuration

To install the library use Composer:

$ composer require laminas/laminas-mvc-plugin-flashmessenger

This will install an initial set of dependencies and it will also prompt to inject the component configuration.

  • For a laminas-mvc application, choose either modules.config.php or application.config.php.

If additional dependencies are to be installed, the option for other packages can be remembered.

Installation and Manual Configuration

If the installer is not used, the manual configuration is needed to add the component to the application.

Install laminas-mvc-plugin-flashmessenger

To install the library use Composer:

$ composer require laminas/laminas-mvc-plugin-flashmessenger

Manual Configuration for a laminas-mvc-based Application

Add laminas-mvc-plugin-flashmessenger as component at the top of the configuration file for modules, e.g. config/modules.config.php:


return [
    'Laminas\Mvc\Plugin\FlashMessenger\Module', // Add this line
    'Laminas\Router',
    'Laminas\Session',
    'Laminas\Validator',
    'Application',
];