Skip to content
[DEPRECATED due to only 20 downloads per 2 years] Read an article about this idea
PHP
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src
tests
.gitattributes
.gitignore
.scrutinizer.yml
.travis.yml
LICENSE
README.md
composer.json
phpunit.xml

README.md

Register Symfony bundles as Nette extension

Build Status Quality Score Code Coverage Downloads Latest stable

Install

composer require symplify/nette-adapter-for-symfony-bundles

Register extension:

# app/config/config.neon
extensions:
	symfonyBundles: Symplify\NetteAdapterForSymfonyBundles\DI\NetteAdapterForSymfonyBundlesExtension

Usage

Register Symfony bundles just like Nette extensions:

symfonyBundles:
	bundles:
		# list all bundles like "your key": "bundle class"
		alice: Hautelook\AliceBundle\HautelookAliceBundle
	parameters:
		# and it's parameters (bound by same key name)
		alice:
			locale: cs_CZ

That's it!

Features

Tags

extensions:
	symfonyBundles: Symplify\NetteAdapterForSymfonyBundles\DI\NetteAdapterForSymfonyBundles

services:
	-
		class: Symplify\NetteAdapterForSymfonyBundles\Tests\TacticianBundle\NetteTagsSource\SomeCommandHandler
		tags:
			tactician.handler:
				- [command: Symplify\NetteAdapterForSymfonyBundles\Tests\TacticianBundle\NetteTagsSource\SomeCommand]

symfonyBundles:
	bundles:
		- League\Tactician\Bundle\TacticianBundle

Service references

extensions:
	symfonyBundles: Symplify\NetteAdapterForSymfonyBundles\DI\NetteAdapterForSymfonyBundles

services:
	- Symplify\NetteAdapterForSymfonyBundles\Tests\Container\ParametersSource\CustomMiddleware

symfonyBundles:
	bundles:
		tactician: League\Tactician\Bundle\TacticianBundle

	parameters:
		tactician:
			commandbus:
				default:
					middleware:
						# this is reference to service registered in Nette
						- @Symplify\NetteAdapterForSymfonyBundles\Tests\Container\ParametersSource\CustomMiddleware
						- tactician.middleware.command_handler

Testing

composer check-cs # see "scripts" section of composer.json for more details 
vendor/bin/phpunit

Contributing

Rules are simple:

  • new feature needs tests
  • all tests must pass
  • 1 feature per PR

We would be happy to merge your feature then!

You can’t perform that action at this time.