FAQ Database Discussion Community

Symfony2 - Environments - Can't import routing.yml from common folder

I'm trying to create a folder structure like described in Different Directories per Environment: - app - config - common - config.yml - routing.yml - dev - config.yml - routing.yml This does work pretty well for all files (config.yml, parameters.yml etc.) but nor for config.yml. I get this error: The...

Getting Objects from database in Symfony2

I had read somewhere some day that symfony2/Doctrine2 has a method(i don't remember the method name now) that fetches all "like" objects that we specify.. For example, I have User entity that has userName , password, name, state and city as properties.. For getting all Users who has name =...

ConfigCache::__toString() is deprecated since version 2.7

After updating to Symfony 2.7 I've got depreciated notification in my profiler. Here it is: It looks like an internal Symfony stuff. Any ideas about how to fix it or it will be fixed in next Symfony patches?...

How to fix Symfony2 deployment issues?

I'm having this issue for a while at differents environments, differents projects and some times I did fixed some others likes now I can't find what is failing so this is my latest try. I want to deploy a app so following rules as docs say the first I did...

There is no element matching XPath “//html” (Behat\Mink\Exception\DriverException)

I really can't figure out why Mink / Behat cannot find "Login" text. My scenario is simple enough: Scenario: Valid Registration Given I am on "/register/" Then the response status code should be 200 Then print current URL Then show last response Then I should see "Login" And the output...

Converting query string to an associative array in symfony2

How to convert query string to an associative array in symfony2? Im new to symfony2. I googled it for couple of hours but there is no straightforward answer (example). Can anyone tell me how to do this?...

Should the changes of SymfonyRequirements.php be included in version control?

After running composer update, I got app/SymfonyRequirements.php is updated in my working changes of my symfony [email protected] application. What is that file? Should I commit the changes of the file?

Disable deprecated warning in Symfony 2(.7)

Since my Symfony 2 update to 2.7. I get a lot of deprecated erors in PHPUnit and console (message is clear by now). ProjectX\ApiBundle\Tests\Controller\SectionsControllerTest::testPostDebug() The twig.form.resources configuration key is deprecated since version 2.6 and will be removed in 3.0. Use the twig.form_themes configuration key instead. Any idea how to disable...

Symfony “No route found for ”GET /check.php" fresh install

I've just installed Symfony 2.7. I've started my app from the command line with: $ php app/console server:run I installed XAMPP to run PHP. The following pictures show my localhost:8000/config.php and localhost:8000 pages. Config ! Main page ! EXACT SOLUTION: _blog: path: / defaults: { _controller: AppBundle:Default:index } Where: path...

Using a Factory to Create Services with symfony2.7

How to use factory to create services with symfony2.7 ? #service.yml #in symfony 2.6 my.repository.photo: class: My\AppBundle\Repository\PhotoRepository factory_method: getRepository factory_service: doctrine arguments: [My\AppBundle\Entity\Photo] #I have some errors like this Deprecated: Symfony\Component\DependencyInjection\Definition::setFactoryMethod(getRepository) is deprecated since version 2.6 and will be removed in 3.0. Use Definition::setFactory() instead. in...

Symfony2.7.0 app_dev.php route not found

I am learning symfony2, I have installed symfony2.7.0 LTS using below command. symfony new sflearning and I have installed symfony2.7.0 successfully. Now when I am trying run app_dev.php on localhost using below url, http://localhost/sflearning/web/app_dev.php It gives me an error No route found for "GET /" It was working with previous...