Questions tagged [symfony-3.2]

This is the Symfony 3.2.x specific tag. Use it in addition to the symfony3 tag if your question is specific to Symfony 3.2.x — not just 3.x.

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

Information

This tag is specific for the 3.2 version of Symfony. See the tag for general Symfony 3.x questions.

The 3.2.0 version was released on the 30th November 2016.

326 questions
1
vote
1 answer

Symfony bundle config parameters not available in listener?

I have a bundle that has a listener which I have configured: class Configuration implements ConfigurationInterface { /** * {@inheritdoc} */ public function getConfigTreeBuilder () { $treeBuilder = new TreeBuilder(); …
Alex.Barylski
  • 2,843
  • 4
  • 45
  • 68
1
vote
2 answers

How do I specify default values in a Symfony form

I am trying to specify a default value in a form so when creating an entity the form field has a value (not null or empty). However when the entity is being edited it should obviously show the stored value and not the default. My entity initializes…
Alex.Barylski
  • 2,843
  • 4
  • 45
  • 68
1
vote
1 answer

Can't send a variable to twig in order to send an email

I want to send an confirmation email, but I can't send the variable of my form to my email Here's my code if($form->isValid() && $form->isSubmitted()) { $NewsLetters = $form->getData(); if(!$NewsLetters->getNom()) { …
Porygon
  • 25
  • 4
1
vote
3 answers

How to connect to multiple db in a php file?

I am using DBAL with Doctrine to make a connection in Symfony 3 to a database. What I'd like to do is to have all my queries in a PHP file, not in a controller. In a controller I can use this: $conn =…
Álvaro
  • 157
  • 4
  • 10
1
vote
1 answer

Unrecognized option "knpu_guard" under "security.firewalls.main" (Symfony)

I would like to add facebook login option to my website. I try to follow this tutorial. But if I add the knpu_guard part under the main section, I get this error: Unrecognized option "knpu_guard" under "security.firewalls.main" My firewalls section…
Iter Ator
  • 8,226
  • 20
  • 73
  • 164
1
vote
2 answers

Connection to a db with Doctrine pdo_sqlsrv

I'm trying to connect to my database in SQL Server 2000, but i get an error could not find driver when i'm using pdo_sqlsrv. But if i use sqlsrv i get an error Attempted to call function "sqlsrv_configure" from namespace …
Álvaro
  • 157
  • 4
  • 10
1
vote
1 answer

Getting Parameters from parameters.yml on Symfony3

I am new to Symfony3 and trying to learn api connections. Just using endroid_twitter bundle. I copied twitter api keys to parameters.yml but when i try to use this keys on DefaultController.php its going wrong and can not get keys. here: "undefined…
onurkaya
  • 157
  • 2
  • 16
1
vote
2 answers

Symfony - Use parameters in Entity assert annotations

I'm trying to set the same phone regex everywhere on my website, using a pattern defined in the app/config/parameters.yml parameters: phone_regex: /^[+][3][3]\d{9}$/ How can i retrieve this patern in my entities assert annotations ? /** *…
1
vote
0 answers

FOSRestBundle can't parse JSON

I have little problem with FOSRestBundle in Symfony 3.2. First, let me show configs and action: FOSRest conf: fos_rest: versioning: true body_converter: enabled: true validate: true validation_errors_argument:…
pejkosz94
  • 11
  • 3
1
vote
0 answers

Unexpected '.' in Twig/Extension/Core.php after deployment

I have tried to run my Symfony application on a remote server. For this I chose cloud9, temporarily. Unfortunately, for some reasons I can't get the page to work. After loading the files and running composer install, which works fine (apart from…
aln447
  • 981
  • 2
  • 15
  • 44
1
vote
1 answer

Image Upload Issue with Symfony3, Doctrine 2 and Sonata Admin Bundle

i will upload multipe Images in an Sonta Admin Frontend with and Sonata_Form_Collection. The upload is the following error in the log: [2017-06-24 13:06:19] request.CRITICAL: Uncaught PHP Exception…
1
vote
1 answer

Using Symfony AttributeBags in a Controller

I've read about sessions here: https://symfony.com/doc/current/components/http_foundation/sessions.html If I use the code directly, Symfony logins using Guard don't work on the first attempt (first time always fails, second time succeeds). So I'm…
Alan Schmidt
  • 113
  • 7
1
vote
1 answer

knp menu bundle - how to add tags to a tag?

How to add tags to (a) tag ? I can add to a ->setLinkAttribute('class', 'fa fa-edit') but this does not solve my problem. If I add ->setLabel('Forms') It show my tags element as well. I would like to achieve like…
Daniel
  • 197
  • 1
  • 3
  • 16
1
vote
1 answer

sonata_type_collection is cleared on preSubmit

Related to this issue : https://github.com/sonata-project/SonataCoreBundle/issues/408, I have an unexpected behavior of a custom sonata_type_collection. The collection is used as an EAV model to build dynamic forms througth a standard…
PapsOu
  • 135
  • 2
  • 9
1
vote
1 answer

Symfony 3 authentication and authorization

I'm building a site on top of latest Symfony framework (v3.3). I have no limitation on what packages to use. The authentication/authorization mechanism will get complicated over time; currently it has the following requirements: In-memory…
user3429660
  • 2,420
  • 4
  • 25
  • 41