a well-defined structure and can host anything from classes to controllers and web resources." http://symfony.com/doc/current/cookbook/bundles/best_practices.html
__construct($required) ➔setOptional($optional) • Use private/public • Use parameters for classes parameters: my_mailer.class: Acme\HelloBundle\Mailer services: my_mailer: class: "%my_mailer.class%" DI Tipps
development possible ✔ DI config "where it's used" ➔ Cluttering DI over code ➔ Testing DI is harder ➔ Magic hard to test ➔ Transparent code generation (!) JMS/DiExtraBundle
• Generate coverage as a tool • Testing only units Functional Tests • Using context (Db, Caches, ...) • Can be slower • Testing functionality Separate Testing
DB from Fixtures • Copy SQLite DB • Run Test • Revert DB to copy Mock external behaviour • Create Mock Service Class • Overwrite Services in config_test.yml Functional Testing