Download the PHP package prr/multi-stimulus-bundle without Composer

On this page you can find all versions of the php package prr/multi-stimulus-bundle. 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 multi-stimulus-bundle

MultiStimulusBundle: Symfony integration with Stimulus!

This bundle adds integration between MultiAssetMapperBundle and Stimulus, allowing you to manage a different set of Stimulus controllers per asset collection.

This bundle is based on StimulusBundle by Symfony, licensed under MIT.

Why use this bundle?

When using MultiAssetMapperBundle, you can have multiple asset collections in your Symfony project. Each collection can have its own set of Stimulus controllers. This bundle allows you to manage those controllers separately.

Examples of common asset collections that demand different sets of Stimulus controllers:

Installation

Add the bundle to your Symfony project

You can install this bundle using Composer:

Configure the bundle

Create config/packages/multi_stimulus.yaml listing the asset collections you want to manage. In the following example, we are managing two asset collections: admin and frontend.

Now, setup to load the controllers for each asset collection running the following command:

Check if the bundle is aware of the new configuration:

Configure Multi Asset Mapper to load the Stimulus controllers loader

Asset Mapper needs to know where to find the package @prr/multi-stimulus-bundle in order to load the Stimulus controllers loader. You can do this by changing the configuration in your config/packages/multi_asset_mapper.yaml file. In the following example, we are configuring the admin asset collection to be aware of @prr/multi-stimulus-bundle package:

You also need to configure the corresponding importmap.php to use the controllers loader whenever the bare import @prr/multi-stimulus-bundle is used.

Now create a page that uses a Stimulus controller from the admin asset collection. It should work as expected.

Usage

Including a Stimulus controller outside your controllers directory

First, Asset Mapper must be configured to include the directory where the controller is located. For example, if you have a controller in ../../asset-collections/shared/controllers/my-shared-controller.js, you need to configure Multi Package Asset Mapper like this:

Second, import the controller in your bootstrap-stimulus.js file:


All versions of multi-stimulus-bundle with dependencies

PHP Build Version
Package Version
Requires php Version >=8.1
symfony/config Version ^6.4|^7.0|^8.0
symfony/dependency-injection Version ^6.4|^7.0|^8.0
symfony/finder Version ^6.4|^7.0|^8.0
symfony/http-kernel Version ^6.4|^7.0|^8.0
twig/twig Version ^2.15.3|^3.8
symfony/deprecation-contracts Version ^2.0|^3.0
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 prr/multi-stimulus-bundle contains the following files

Loading the files please wait ...