Questions tagged [symfony-3.1]

This is the Symfony 3.1.x specific tag. Use it in addition to the symfony3 tag if your question is specific to Symfony 3.1.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.1 version of Symfony, which will be released on November 2015 as long term support version of Symfony. See the tag for general Symfony 3.x questions.

The 3.1.0 version was released on the 30th May 2016.

Living on the edge

There are a set of interesting links on the symfony blog about what's new in this version:

196 questions
10
votes
1 answer

Unrecognized option "csrf_provider" under "security.firewalls.main.form_login" despite csrf enabled

After setting up the FOSUser Bundle I have experienced this error Unrecognized option "csrf_provider" under "security.firewalls.main.form_login" Now I know how to use google and the two main things that could cause the problem are Not enabling…
aln447
  • 841
  • 2
  • 14
  • 41
10
votes
3 answers

ICU version compatibility Symfony 3.1

I have a problem installing symfony 3.1 in php7, nginx and ubuntu 16.04, i have this error: intl ICU version installed on your system is outdated (55.1) and does not match the ICU data bundled with Symfony (57.1) To get the latest…
Andres
  • 389
  • 1
  • 6
  • 19
9
votes
1 answer

How to set up Typescript in Symfony?

Question: How do I set up Typescript with Symfony with the minimum amount of configurations changes to Symphony’s configuration files? Here are the points that this solution should solve: Typescript MVC Pattern in a private typescript…
kemicofa ghost
  • 14,587
  • 5
  • 63
  • 112
8
votes
2 answers

Symfony3 Dynamically Modify Forms with events

Problem is that nothing is loaded in the municipality field, it goes undefined. In the AJAX code I get the value of the province well. But in the class addMunicipioField.php does not take the value of the $province, it is always nul I am trying to…
Merche
  • 125
  • 8
6
votes
1 answer

Is there any documentation or example of using for Symfony/Cache component?

With symfony 3.1 we got Cache Component (https://github.com/symfony/cache) I can't find any documentation or examples for this component because it's new. Can anybody write simple example how to use this component with symfony 3.1
Danil Pyatnitsev
  • 1,848
  • 2
  • 23
  • 35
5
votes
3 answers

assetic.ERROR "DoctrineBundle:Collector:db.html.twig" contains an error: Unknown "profiler_dump" function

I am trying to send emails with Symfony. Everything works perfect locally. But on server I get following errore in prod.log: assetic.ERROR: The template "SecurityBundle:Collector:security.html.twig" contains an error: Unknown "profiler_dump"…
blahblah
  • 920
  • 11
  • 36
5
votes
2 answers

Check if an array contains any element of another array in doctrine query builder

I would like to know if it's possible to check if an array contains any element of another array in doctrine query builder. In my case, i want to get all the products (items) who have at least one of the category in the array passed in…
LedZelkin
  • 532
  • 8
  • 23
5
votes
1 answer

Symfony3 Keeping locale after login

Problem I have, is when user changes language in login page - it works, but after user login - it is back to default again. How to make it possible to the keep same language user selected before login, to stay after login? I've tried looking this up…
JustinasT
  • 599
  • 1
  • 5
  • 21
5
votes
0 answers

How to install intl 55.1 version matched with symfony3?

I have installed symfony 3.1. An error info occur when to check whether is ready to run Symfony applications. My intl icu was installed with command apt-get install php5-intl,the version is 52.1 lower than 55.1. Here is my steps to compile intl…
showkey
  • 449
  • 30
  • 101
  • 235
4
votes
3 answers

Symfony 3 forms: how to set default value for a textarea widget

I want to set the value on a textarea widget. How i can set default value for textarea in Symfony 3 for TextType(input type="text") i can use value parameter but for textarea i can not!!!how i can set default value for textarea. this is my…
pedram shabani
  • 1,553
  • 2
  • 17
  • 25
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
  • 20,864
  • 20
  • 55
  • 98
4
votes
2 answers

Symfony JWT token: exception when token is expired

I am using JWT Token Bundle for user authentication. When the token is expired I get 500 server error. Instead of this how can I return JsonResponse with error code and message? Here is my authenticator class: class JwtTokenAuthentication extends…
blahblah
  • 920
  • 11
  • 36
4
votes
1 answer

Setup of Symfony 3.1 cache component with Redis

I try to setup Symfony 3.1 cache with Redis. I follow this tutorial: https://symfony.com/blog/new-in-symfony-3-1-cache-component I've installed predis/predis and SncRedisBundle. In my config.yml I've put framework: cache: app:…
Robert
  • 17,808
  • 4
  • 50
  • 79
4
votes
2 answers

TWIG Get first letter of HTML after Raw filter

I know how to get the first letter of a string in TWIG

The first letter is {{someString | first}}

With an HTML string like

This is a sting

The above would return '<' Adding 'Raw'/'escape' ends up to the same result. I need to…
R.Damasinoro
  • 301
  • 1
  • 12
3
votes
0 answers

Symfony - field unique and null

it is a way to have a field in an entity whith option nullable=true, unique=true ? I try to do it, and I have an error when I update the database schema : /** * @var string * * @ORM\Column(name="code", type="string", length=16, nullable=true,…
user7867717
  • 267
  • 2
  • 13
1
2 3
13 14