Tagged Questions
53
votes
4answers
8k views
Should everything really be a bundle in Symfony 2?
I'm aware of questions like this, where people tend to discuss the general Symfony 2 concept of bundle.
The thing is, in a specific application, like, for instance, a twitter-like application, should ...
45
votes
1answer
756 views
How to create a good hypermedia format using JMSSerializerBundle?
Lets say I want to create an XML-response that will looks something like the following:
<?xml version="1.0" encoding="utf‐8"?>
<product xmlns="urn:com.acme.prods" ...
15
votes
5answers
1k views
Authentication in functional tests in Symfony 2.1
I am currently in the process of migrating a 2.0.* project to the current 2.1 beta of Symfony.
In my functional tests i currently have this code to create a client with authentication:
$client = // ...
9
votes
2answers
157 views
Making configuration node support both string and array in Symfony 2 configuration?
Can my configuration node source support both string and array values?
Sourcing from string:
# Valid configuration 1
my_bundle:
source: %kernel.root_dir%/../Resources/config/source.json
...
9
votes
0answers
326 views
Why is the page execution time so much slower in Symfony 2.1 than 2.0 [closed]
I've updated from 2.0 to 2.1 When testing using the app_dev.php with the profiler on the same page I get two very diverse results:
Symfony 2.0
execution time: 799ms
memory used: 6144 kb
Symfony ...
8
votes
2answers
2k views
MySQL Illegal mix of collations
After viewing my prod logs, I have some error mentionning :
[2012-08-31 15:56:43] request.CRITICAL: Doctrine\DBAL\DBALException:
An exception occurred while executing 'SELECT t0.username ....... ...
8
votes
2answers
2k views
Set Flash in Symfony 2.1
I have been adapting our code in preparation of moving our code to the new 2.1 Symfony codebase.
In 2.0.* we could set Flash messages by simply calling the session service in our controller using the ...
8
votes
2answers
978 views
Cascade Validation not working on third layer of a form
I have a form with 3 layers:
First Layer is the container for the games:
class GameListType extends AbstractType {
public function buildForm(FormBuilderInterface $builder, array $options) {
...
8
votes
2answers
498 views
Symfony2 asset resources from static domain or subdomain
I am trying to optimize my project to avoid send cookies with the static resources (i.e: images, scripts, stylesheets, etc). My approach is to create a static.my-domain.com domain to serve from there ...
7
votes
1answer
310 views
Symfony assetic:dump runtime exception
I'm stepping into deploying my Symfony app using Capifony. When Capifony executes assetic:dump I get a runtime Exception.
[RuntimeException]
Unable to write file
...
6
votes
1answer
2k views
Error creating Symfony2 project from composer
I try to create a Symfony2 project with composer on Ubuntu with command:
php composer.phar create-project symfony/framework-standard-edition projectpath
And I get this error
Installing ...
6
votes
1answer
1k views
How to inject a repository into a service in Symfony2?
I need to inject two objects into ImageService. One of them is an instance of Repository/ImageRepository, which I get like this:
$image_repository = $container->get('doctrine.odm.mongodb')
...
6
votes
1answer
2k views
Symfony 2 - How to delete a bundle?
So my question is how to delete bundle I created?
You create bundles with this console command:
php app/console generate:bundle --namespace=Test/BlogBundle --format=yml
And thats awsome but what ...
6
votes
1answer
157 views
Symfony 2.1 REST API login to everywhere
I am working on a REST API using Symfony 2.1.
My code works now perfectly, but there is problem that I can login in /api/ but this login can work only under /api/*. But I need to have access to whole ...
5
votes
2answers
6k views
Using entity field type in symfony2.1 form
Using Symfony 2.1.3-dev and Doctrine 2.3
I am attempting to build a form which provide multiple options for a user to filter a returned set of data (Entity\EngineCodes). The form is composed of 1 ...