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

How tout use kernel.terminate Event in a Service

I do a service that run an heavy task, this service is call in a Controller. To avoid a too long page loading, I want return the HTTP Response and run the heavy task after. I've read we can use kernel.terminate event to do it, but I don't understand…
mpiot
  • 1,482
  • 2
  • 15
  • 36
4
votes
0 answers

Symfony + Redis - how to search by tag

As of version 3.x Symfny supports Redis as a cache. It is working fine, but only if I want to get some data from cache like: $redis = $this->get('cache.app'); $cached = $redis->getItem('video#32'); $data = $cached->get(); if (!$cached->isHit()) { …
breq
  • 24,412
  • 26
  • 65
  • 106
4
votes
3 answers

mailgun - send mail with attachment

I am trying to send mail in symfony with attachment with the help of mailgun I have referred this Question. And this Reference. But didn't helped me. This is my function, public function sendMail($to, $subject, $body, $attachment = null) { …
Keyur
  • 1,113
  • 1
  • 23
  • 42
4
votes
2 answers

Asset cache busting by parametrized url with Assetic

How can I configure asset versioning via Assetic in Symfony 3.2? In Symfony 2 this could have been achieved by configuring packages version in framework:templating, but this is no longer the case in 3. I've tried to use the following…
Olia.Bn
  • 190
  • 9
3
votes
1 answer

Symfony CollectionType: Merge new entries

My symfony form represents an entity Mail which has a one to many relation with another entity called Attachment. Therefore, the MailType form contains a CollectionType field for embedding its AttachmentType forms: $builder ->add('attachments',…
fishbone
  • 3,140
  • 2
  • 37
  • 50
3
votes
1 answer

Type error: Too few arguments to function

services.yml located in src/EliteFifa/MatchBundle/Resources/services.yml parameters: # repositories match_repository.class: EliteFifa\MatchBundle\Repository\MatchRepository match_repository.factory_argument: …
Jonathan
  • 3,016
  • 9
  • 43
  • 74
3
votes
0 answers

How to force Symfony 3 to use Memcached instead of Memcache class

I am running php7 on debian and I do only have the php7-memcached extension available since php-memcache appears to be deprecated or not compatible with php7. When I run my Symfony 3.2.8 setup with composer some post-install-cmd's are executed…
Ben
  • 807
  • 1
  • 8
  • 22
3
votes
1 answer

authorizationChecker->isGranted in a phpUnit test

I'm currently creating my unit test for my application but it's the first time I do it. I want to test this function : /** * This method search if the user is already in a team for the same tournament than the one passed in argument * @param User…
Alexandre
  • 355
  • 1
  • 3
  • 18
3
votes
4 answers

Symfony 3 - Route excluding beginning of specific path (url)

I'm creating an application with Symfony 3.2.9, and I would to do a Admin panel to manage application. Application works like CMS, so is creating new pages with URL, like domain.com/pagename1 and also domain.com/pagename1/subpagelevel2 ect. Problem…
mcgoo
  • 103
  • 3
  • 12
3
votes
1 answer

bin/console without working DB

I would like to be able to run symfony php bin/console without configured dbal. I want to run some non-db related commands on CI without db. Is it somehow possible? Thanks.
michalhosna
  • 7,327
  • 3
  • 21
  • 40
3
votes
1 answer

Doctrine transactions - count number of pending requests

Is there a way to find out the number of pending requests in a transaction before launching the commit action ? I want to launch my commit only if I get a sufficient number of queries (that I can not count one by one before in my particular case...)
arno
  • 792
  • 14
  • 33
3
votes
1 answer

Normalizer null reference using NormalizerAwareTrait

I have two objects with a Parent-Child relationship. For each object I have a custom normalizer as can be seen below: ChildNormalizer.php use Symfony\Component\Serializer\Normalizer\scalar; class ChildNormalizer { public function…
Peppermintology
  • 9,343
  • 3
  • 27
  • 51
3
votes
3 answers

Doctrine Sluggable - Column 'slug' cannot be null

I am using Doctrine, with DoctrineExtensions via StofDoctrineExtensionsBundle to generate slugs automatically using "Doctrine Extensions Sluggable" behavior. The listener seems to be registred properly. Entity field is also marked as sluggable.…
3
votes
1 answer

Extracting a list of products bu category using doctrine

I want to extract a list of products by given category, I dont know how to do that! I have found findAll which return all products in database should I use dql? somthing like: my controller public function ProductByCategory(Request $request,…
Julie
  • 563
  • 6
  • 10
  • 23
3
votes
0 answers

Twig syntaxe : Unexpected token "punctuation" of value "."

I'm trying to assign an object to a form property : {% if form.person is not defined %} {%- set form.person = form.fatherContact -%} {% endif %} But I'm getting this error : Unexpected token "punctuation" of value "." ("end of statement…
Robouste
  • 3,020
  • 4
  • 33
  • 55
1
2
3
21 22