Should everything really be a bundle in Symfony 2.x?

I’ve written a more thorough and updated blog post on this topic: http://elnur.pro/symfony-without-bundles/ No, not everything has to be in a bundle. You could have a structure like this: src/Vendor/Model — for models, src/Vendor/Controller — for controllers, src/Vendor/Service — for services, src/Vendor/Bundle — for bundles, like src/Vendor/Bundle/AppBundle, etc. This way, you would put in the … Read more

Count Rows in Doctrine QueryBuilder

Something like: $qb = $entityManager->createQueryBuilder(); $qb->select(‘count(account.id)’); $qb->from(‘ZaysoCoreBundle:Account’,’account’); $count = $qb->getQuery()->getSingleScalarResult(); Some folks feel that expressions are somehow better than just using straight DQL. One even went so far as to edit a four year old answer. I rolled his edit back. Go figure.

What is the difference between .yaml and .yml extension? [duplicate]

File extensions do not have any bearing or impact on the content of the file. You can hold YAML content in files with any extension: .yml, .yaml or indeed anything else. The (rather sparse) YAML FAQ recommends that you use .yaml in preference to .yml, but for historic reasons many Windows programmers are still scared … Read more