Download the PHP package dunglas/action-bundle without Composer

On this page you can find all versions of the php package dunglas/action-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 action-bundle

DunglasActionBundle: Symfony controllers, redesigned

Build Status Build status SensioLabsInsight Scrutinizer Code Quality StyleCI

This bundle is a replacement for the controller system of the Symfony framework and for its command system.

It is as convenient as the original but doesn't suffer from its drawbacks:

DunglasActionBundle allows to create reusable, framework agnostic (especially when used with the PSR-7 bridge) and easy to unit test classes.

See https://github.com/symfony/symfony/pull/16863#issuecomment-162221353 for the history behind this bundle.

Note for Symfony >=3.3 users

If you use Symfony at version 3.3 or superior, you do not need to use this bundle as all the features were ported in Symfony. You can learn more about it in the Symfony blog or in the Symfony documentation.

Installation

Use Composer to install this bundle:

composer require dunglas/action-bundle

Add the bundle in your application kernel:

Optional: to use the @Route annotation add the following lines in app/config/routing.yml:

If you don't want to use annotations but prefer raw YAML, use the following syntax:

Usage

  1. Create an invokable class in the Action\ namespace of your bundle:

Alternatively, you can create a typical Symfony controller class with several *Action methods in the Controller directory of your bundle, it will be autowired the same way.

There is no step 2! You're already done.

All classes inside Action/ and Controller/ directories of your project bundles are automatically registered as services. By convention, the service name is the Fully Qualified Name of the class.

For instance, the class in the example is automatically registered with the name AppBundle\Action\Homepage.

There are other classes/tags supported:

Class Name Tag automatically added Directory
Command console.command Command
EventSubscriberInterface kernel.event_subscriber EventSubscriber
Twig_ExtensionInterface twig.extension Twig

Thanks to the autowiring feature of the Dependency Injection Component, you can just typehint dependencies you need in the constructor, they will be automatically initialized and injected.

Service definition can easily be customized by explicitly defining a service named according to the same convention:

This bundle also hooks into the Routing Component (if it is available): when the @Route annotation is used as in the example, the route is automatically registered: the bundle guesses the service to map with the path specified in the annotation.

Dive into the TestBundle to discover more examples such as using custom services with ease (no configuration at all) or classes containing several actions.

Using the Symfony Micro Framework

You might be interested to see how this bundle can be used together with the Symfony "Micro" framework.

Here we go:

Amazing isn't it?

Want to see a more advanced example? Checkout our test micro kernel.

Configuration

Credits

This bundle is brought to you by Kévin Dunglas and awesome contributors. Sponsored by Les-Tilleuls.coop.


All versions of action-bundle with dependencies

PHP Build Version
Package Version
Requires php Version >=5.5.9
symfony/config Version ^2.8 || ^3.0
symfony/dependency-injection Version ^2.8 || ^3.0
symfony/finder Version ^2.8 || ^3.0
symfony/http-kernel Version ^2.8 || ^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 dunglas/action-bundle contains the following files

Loading the files please wait ....