Skip to content
Advertisement

Tag: symfony

heroku local does not find pdo_postgres driver

I am trying to use heroku local on mac to run a Symfony project. But unfortunately it does not find the postgresql driver… which is found when I run php app/console server:run Here is the resulting output. How can I solve this? Answer Did you see these ? http://www.somacon.com/p520.php http://www.unixmen.com/solved-php-warning-module-pdo-already-loaded-in-unknown-on-line-0/ Point is that if you have postgres compiled into php

Working directly with libraries instead of bundles in Symfony2

How can I use a library directly inside an existing Symfony2 project. I am, for instance, trying to add the faker library. I installed it via composer but I don’t know how and where to put the code I need. According to documentation: What is a simple explanation of auto loader? How to use a library directly without a bundle?

Symfony: Overriding Symfony service ( compiler pass )

I’m on symfony 2.7 and need to override SymfonyComponentAssetUrlPackage I’ve looked at http://symfony.com/doc/current/cookbook/bundles/override.html and http://symfony.com/doc/current/cookbook/service_container/compiler_passes.html but can’t get it working. I have made a file in my bundle MyAppCoreBundleOverridesUrlPackage; I registered UrlPackage as a service and added a function: The weird thing is, if I call $this->has(‘assets.url_package’) in any controller, it returns false. I did grab it from the services

SQLSTATE[HY000] [1045] Access denied for user ‘root’@’localhost’ (using password: YES) symfony2

When I try to login I get an error: SQLSTATE[HY000] [1045] Access denied for user ‘root’@’localhost’ (using password: YES) parametrs.yml: This file is auto-generated during the composer install My OS is Debian Thanks for your help. Answer This is due to your mysql configuration. According to this error you are trying to connect with the user ‘root’ to the database

Symfony form collection rendering

I’m using symfony 2.3 I have form with field of type “collection” Visualization code in twig: Everything work, expect when form.fields is empty. Then nothing is visualized in twig loop, witch is fine. But at the end of the form there is “label” for the element “form.fields”. Only label. Workaround: If there are elements, they will be rendered in the

Doctrine migrations table collation

Trying to find a way to programatically create tables with certain collation, but can’t seem to find a way how to do it properly. I am using the “doctrine/doctrine-migrations-bundle”: “2.1.*@dev” and Symfony 2.3, I set up in my config.yml: It creates the database with LATIN1 charset and latin1_swedish_ci as default collation, when I run doctrine:database:create tool. Then I run my

Advertisement