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
22
votes
4 answers

Symfony 3.2 A circular reference has been detected (configured limit: 1)

I have this two entities in my project class PoliceGroupe { /** * @var int * * @ORM\Column(name="id", type="integer") * @ORM\Id * @ORM\GeneratedValue(strategy="AUTO") */ private $id; /** * @var…
Chaymae
  • 427
  • 4
  • 7
  • 16
13
votes
9 answers

Symfony autowiring monolog channels

Following this documentation, I can create many channels which will create services with the following name monolog.logger. How can I inject these services into my service with DI injection and autowiring ? class FooService { …
Fabien Papet
  • 2,244
  • 2
  • 25
  • 52
12
votes
1 answer

test command symfony with phpunit

I create some basic command with symfony3.2 to generate some newsletter periodically I'm dealing with some issue when i want to test my symfony command with phpunit 5.5.4. It fail from the beginning: /** * @param InputInterface $input …
ryl
  • 333
  • 1
  • 4
  • 12
9
votes
1 answer

OAuthException: redirect_uri isn't an absolute URI. Check RFC 3986 (Symfony)

I would like to add facebook login option to my website, following this tutorial. I did everything as it is in the tutorial, but I still get this error: OAuthException: redirect_uri isn't an absolute URI How is it possible to solve it? This urls…
Iter Ator
  • 8,226
  • 20
  • 73
  • 164
8
votes
1 answer

How to get error message after entity validation

I'm trying to get a clean error message after validating my Subscribe Entity : /** * Subscribe * @UniqueEntity("email") * @ORM\Table(name="subscribe") * @ORM\Entity(repositoryClass="AppBundle\Repository\SubscribeRepository") */ class…
famas23
  • 2,072
  • 4
  • 17
  • 53
7
votes
1 answer

Symfony 3 : Configure cache component pools with Redis

I'd like to use the new Cache Component to store datas in Redis. I'd like to configure pools with different lifetime of data. Right now, I configured : framework: cache: app: cache.adapter.redis default_redis_provider:…
melicerte
  • 363
  • 4
  • 12
7
votes
1 answer

Symfony Request get all url Parameters

I have a Symfony\Component\HttpFoundation\Request object and from it I want to fetch all the url paramethers that provided. In other words when the user visits the http://example.org/soempage?param1=value1¶m2=value2¶m3=value3 I want to…
Dimitrios Desyllas
  • 9,082
  • 15
  • 74
  • 164
6
votes
1 answer

Custom JSON serializers for a Symfony 3 entity

I have a Symfony 3.2 entity using Doctrine's Translatable extension. namespace AppBundle\Entity; use Doctrine\ORM\Mapping as ORM; use Gedmo\Mapping\Annotation as Gedmo; use Symfony\Component\Serializer\Annotation\Groups; /** * Media * *…
Damien Debin
  • 2,812
  • 25
  • 41
6
votes
1 answer

Symfony3 can't create translated routes with router in service

I'm trying to build a language switcher into my main navigation, which is created by the KNPMenuBundle. Translations are done with the JMSTranslationBundle. Both work fine. I want to create a language switcher with my menu builder, but the…
KhorneHoly
  • 4,666
  • 6
  • 43
  • 75
6
votes
4 answers

Why does Symfony Guard fire 'security.interactive_login' event on every request?

I have a Symfony 3.2 application which exposes a REST API and uses Json Web Tokens (JWT) for authentication. I recently switched to using Symfony's Guard component. Now my security.yml contains a firewall config section as follows (I'm using the…
dwytrykus
  • 256
  • 2
  • 7
5
votes
3 answers

Symfony 3 - EntityManager dependency injection with multiple db connections

I have setup a Custom Authenticator using guard and auto wired the service. This is tested and works fine with just MySQL configured. I have now specified a second database connection (oracle), but Symfony will now not allow autowiring in my service…
PrestonDocks
  • 4,851
  • 9
  • 47
  • 82
5
votes
9 answers

Notice: Undefined property: DOMDocument::$documentElement

I recently re-opened an old (1 year) Symfony project and I am having an error on every page (I don't remember having this issue a year ago) : [exception] 500 | Internal Server Error |…
pjehan
  • 820
  • 10
  • 18
4
votes
1 answer

Sonata Admin Advance Filter Customization in DataGridFilter

I am using sonata admin for my project as backend. I have a module and where i have status in the filter like below : $datagridMapper->add('status', '', array('label' => 'Status','field_type' => 'choice','field_options' => array('choices'=>…
Parth Khatri
  • 277
  • 1
  • 10
4
votes
1 answer

Sonata form field - change a field based on the selection of another model field

I have a very simple problem and I think it is also very common. My sonata admin configureFormFields function looks like: protected function configureFormFields(FormMapper $formMapper) { $formMapper ->add('status', 'sonata_type_model',…
Stiff Roy
  • 124
  • 1
  • 14
4
votes
3 answers

Symfony how to test an AJAX request

In my project I have a piece of my form that sends an AJAX request: $.ajax({ url: '/bio_control/sample', type: 'POST', dataType: 'json', data: {sample_number: $(input_field).val()}, }); Which activates the following…
Darkstarone
  • 4,590
  • 8
  • 37
  • 74
1
2 3
21 22