Symfony2 is an open source PHP web development framework for PHP 5.3.3+ focusing on easy and fast development cycles and including state-of-the-art design patterns and programming philosophies.
0
votes
0answers
2 views
request symfony2 time waiting
I'm doing performance testing and the inspectors of chrome on network I get this:
image
where I see that the page takes to load 2s being compressed with gzip (Total 270kb compressed), the problem is ...
0
votes
0answers
4 views
Sonata User - Security on custom field
I used SonataUser with FOSUser to manage my users and created a custom field company to attach each one to a given company.
Now I'd simply need to give users the ability to manage only users attached ...
0
votes
0answers
4 views
How to get userid from eventlistener which are called from AJAX
I am using symfony2 and FOSUserBundle.
Normally,I can get user data from Controller
$user = $this->get('security.context')->getToken()->getUser();
or
$user = ...
0
votes
0answers
14 views
How to solve a Json encode pb. with JMS Serializer Bundle (not sequential array)
In my REST If I GET: "events":["Noël", "Pâques", "Foo"] When I PUT : "events":["Noël", "Pâques"] to my REST I have : "events":["Noël", "Pâques"]... PERFECT :)
when i PUT an "events":["Pâques", "Foo"] ...
0
votes
1answer
14 views
JMSSerializationBundle can't serialize on attributes based on groups
I am trying to serialize based on the groups that I have specified on my Product class. The full product class can be seen here. Here's the code that I am using following the example on the ...
0
votes
1answer
18 views
Entity manager in Controller Constructor Symfony2
I am writing a simple symfony2 application and I wanted to create a constructor for my Default Controller and have it run a query with doctrine. So I wrote something like:
public function ...
0
votes
1answer
18 views
Doctrine's date field - how to write query
I'm using Symfony2 and Doctrine.
I have a date field, here it is:
/**
* @ORM\Column(type="date")
*/
protected $date;
In my form I use a text field to avoid Chrome default datepicker, but I ...
0
votes
2answers
13 views
symfony 2.2 getChild deprecated
so im trying to install a bundle for locations JulLocationBundle .
and i came across some problems , which i managed to solve ..
then an error came up call undefined function getChild .
some research ...
0
votes
2answers
10 views
Query only works if I run a query before it
I want to get the schools the user is in, but for some reason I can only access it by running a query to the school table that is otherwise unrelated. Here is my code:
This doesn't work (within the ...
0
votes
1answer
14 views
How to use xml instead of yml after making bundles
Mybundle was already set upped as using services.yml
But I want to use services.xml.
So I changed in DependacyInjection/MybundleExtension.php
#$loader->load('services.yml');
...
0
votes
1answer
33 views
Translation doesn't work with Anonymous user at symfony2
I have symfony 2.3 and I configured the translation for i18n purpose, putting the _locale in url, and it works well for authenticated users but not for anonymous user, for the anonymous user always ...
2
votes
1answer
33 views
Symfony2, Error “The uploaded file was too large.” without file field
So i have unknown error when start use 2.3 version of symfony
Assert Entity
class FormRegister
{
/**
* @Assert\Regex
* (
* pattern="/^[a-zA-Z0-9]{1,}$/i",
* ...
0
votes
1answer
18 views
Overriding Doctrine Entities
I'm trying to create an application on Symfony2 with Doctrine 2 entities. My problem is that I should have a main application which contains the mainly used functions and other applications which are ...
0
votes
1answer
20 views
symfony2 assetic dump stopped watch
I am doing a project in Symfony2 and I have a problem with assetics. I use to compress assetics yuicompressor but the command:
app/console assetic:dump --force --watch
does not work i get always ...
0
votes
1answer
16 views
Symfony2 - passing values between ESI and main request
I need to pass a value from the main controller in a route to the controller used by an ESI.
So a controller renders a Twig template and in Twig this is called:
{{ render_esi(url('route_name')) }}
...