Questions tagged [symfony-2.6]

This is the Symfony 2.6.x specific tag. Use it in addition to the symfony2 tag if your question is specific to Symfony 2.6.x — not just 2.x.

Symfony is a PHP full-stack web framework developed and maintained by Sensio Labs.

Information

This tag is specific for the 2.6 version of Symfony, which was released on the 29th November 2014. See the tag for general Symfony 2.x questions.

Living on the edge

There are a set of interesting links on the symfony blog about what's new in this version:

Useful links

163 questions
2
votes
1 answer

How to profile code through Symfony StopWatch component

As per docs says: The Stopwatch component provides an easy and consistent way to measure execution time of certain parts of code so that you don't constantly have to parse microtime by yourself. I want to profile my REST API cURL calls and…
ReynierPM
  • 17,594
  • 53
  • 193
  • 363
2
votes
1 answer

How to write and use Monolog handlers and channels

I have read some docs here but still not clear to me how to write and use a custom Monolog handler and channel. Let me explain a bit what I want to achieve. I have a custom function and I want that log to be logged into a file called custom.log. I…
ReynierPM
  • 17,594
  • 53
  • 193
  • 363
2
votes
2 answers

The show action of Symfony 2 Sonata Admin Bundle is not working

I'm integrating Sonata Admin Bundle into my Symfony 2.6 application by following Symfony 2 jobeet tutorial. Everything is fine except the Show action. I have an entiry "Job" and so I have src/Ibw/JobeetBundle/Admin/JobAdmin.php which have a function…
Sithu
  • 4,752
  • 9
  • 64
  • 110
2
votes
1 answer

How to get Container object from LifecycleEventArgs of postLoad in Entity?

I'm trying to inject the Container object (which is available in controllers) into an Entity using postLoad lifecycleCallbacks. The argument to the postLoad method is LifecycleEventArgs. I could see the container property (which I want to retrieve)…
Sithu
  • 4,752
  • 9
  • 64
  • 110
2
votes
2 answers

Symfony2 - Twig updates are not rendering

I am a beginner in Symfony2. I have created my first template and I can access to it through the URL http://localhost/mylibrary-web/web/app_dev.php/hello/Test. Here the content of my…
rolandl
  • 1,769
  • 1
  • 25
  • 48
2
votes
1 answer

Migrate Symfoy 2.0.15 app to newest release, the right way

I have a project (developed by others) running on Symfony 2.0.15 and I need to upgrade it to newest Symfony2 version cause I need to add some new code and it's been hard to get it done. I can't find enough information for this, can any give me some…
ReynierPM
  • 17,594
  • 53
  • 193
  • 363
2
votes
1 answer

symfony2 phpunit - functional testing error (host_with_path)

So thanks to Matteo (phpunit in symfony2 - No tests executed) I can now test my functional tests. Now I got the following error when running phpunit -c app: You must change the main Request object in the front controller (app.php) in order to use…
Mr.wiseguy
  • 4,092
  • 10
  • 35
  • 67
2
votes
0 answers

How to install Symfony 2.6 in windows 8 successfully?

When i tried this command php -r "readfile('http://symfony.com/installer');" > symfony Im getting this error But i have given permission to C: Directry to Write & execute
MAFAIZ
  • 681
  • 6
  • 13
2
votes
1 answer

How to create one log file per session?

I want to create for each session an own logfile. I have seen that it is possible to create an own logger (source): use Monolog\Logger; use Monolog\Handler\StreamHandler; // create a log channel $log = new Logger('name'); $log->pushHandler(new…
CSchulz
  • 10,882
  • 11
  • 60
  • 114
2
votes
1 answer

Error page based on host

With Symfony2, it's easy to match routes based on the host (details here http://symfony.com/doc/current/components/routing/hostname_pattern.html). I would like to have different error pages according to host. 404 error on example.com -> one…
Ka.
  • 1,189
  • 1
  • 12
  • 18
2
votes
1 answer

Success handler not working after Symfony2 login

The goal is to do something after authentication success in Symfony2. In order to do that I have extended AuthenticationSuccessHandlerInterface creating a service for the form login in order to be its success handler. Here is the firewall in the…
rfc1484
  • 9,441
  • 16
  • 72
  • 123
2
votes
1 answer

login_check performs a wrong redirect in login form using FosUserBundle

I use a UserBundle that overrides FosUserBundle, in there I have set the users prefix for all my user routes: // UserBundle/Resources/config/routing/all.xml ...
rfc1484
  • 9,441
  • 16
  • 72
  • 123
2
votes
1 answer

Symfony 2.6 - Flot chart doesn't populate properly from JSON

I'm trying to populate Flot Pie chart with JSON created from doctrine query result, but unsuccessfully. Here are details... Controller: $resultJson = json_encode($query); return $this->render('default/index.html.twig', array( 'result' =>…
ddtr
  • 45
  • 5
2
votes
1 answer

Symfony 2 multiple form in same page Submition

I try to make a simple login-register on the same page. One form for register One form for login. I manage to render 2 forms on the page that I want, but if I try to submit the registration form it gives me a message that the other form cannot be…
1
vote
1 answer

Symfony security.password_encoder isPasswordValid is returning empty

In Symfony 2.6, I am using the following method to encode my password. The password is successfully encoded and saved in the DB. $encoder = $this->container->get('security.password_encoder'); $encodedPwd = $encoder->encodePassword($adminUser,…
Sharad
  • 31
  • 3
1 2
3
10 11