Posts tagged 'bundle'

Importing Symfony2 security settings from a bundle

published on August 25, 2011.

I started to work on/figuring out the security part in Symfony2 and one part where the docs fail so far is to explain how to import security settings from a bundle.

Once I put some thinking into it, it’s pretty easy actually. Simply import the needed security file in your main config file. Something like this will work:

# app/config/config.yml
    - { resource: parameters.ini }
    - { resource: '@AcmeDemoBundle/Resources/config/security.xml' }

where the security.xml file is the same as already described in the documentation.

Happy hackin’!

P.S.: Bonus tip: When googling for symfony2 stuff, start your query with +symfony2 to include only symfony2 results. Makes life a bit easier.

Robert Basic

Robert Basic

Software developer making web applications better.

Let's work together!

I would like to help you make your web application better.

Robert Basic © 2008 — 2020
Get the feed