the Symfony 3.x specific tag. Use it in addition to the symfony3 tag if your question is specific to any version of Symfony 3.
Questions tagged [symfony3.x]
174 questions
0
votes
0 answers
Symfony3 amendment of the logger convention
Welcome,
My task is to change the convention of loggers in the application. Currently, loggers are configured as dedicated services. I would like to define the loggers in the Symfony convention and ensure backward compatibility by defining DI…

rad11
- 1,561
- 3
- 15
- 30
0
votes
2 answers
symfony twig custom submit label form
I want to customize my form submit button label from "submit" to "Edit" in some of pages , and "submit" to "Add" in some other pages, with twig and Symfony 3.4 as this :
{{ form(form) }}
{{ form_widget(form.submit,{'label':'edit'}) }}
but this is…

sohaieb azaiez
- 768
- 9
- 20
0
votes
1 answer
Symfony Validation Constraint Assert\Date() is accepting empty string
In an Entity class I defined a property like
use Symfony\Component\Validator\Constraints as Assert;
class MyEntity
{
...
/**
* @Assert\Date()
*/
protected $date_of_birth;
...
}
In the FormType class I use the…

user3440145
- 793
- 10
- 34
0
votes
1 answer
Symfony FOS UserBundle - prevent authenticated users access login, register, reset
I am using Symfony with the FOS UserBundle, I would like to prevent authenticated users from accessing the login, register or password resetting pages. Any attempt to access those pages should result in a redirect to the homepage.
I've read that…

lookbadgers
- 988
- 9
- 31
0
votes
1 answer
Getting data from POST request
I'm trying to update some data of my User Entity using AJAX request with VueJS-Ressource.
Here is my AJAX request:
this.$http.post('/profile/edit', {
description: this.description
}).then(response => {
…

iGoDLiK3
- 23
- 4
0
votes
1 answer
Symfony inject EntityManager in LogoutListener
Using Symfony 3.4, I need to do persist user before logout, so I've implemented the following listener:

Laurent
- 289
- 1
- 3
- 17
0
votes
1 answer
Error:symfony 3 Uncaught Twig_Error_Loader:
i downloaded a Symfony project from my friends run both
Composer update and php bin/console doctrine:schema:update --force
commands without errors
but when i open the project on my browser i get this error:
Fatal error: Uncaught…
user8069069
0
votes
2 answers
Symfony3 Use Entity Manager in Custom Container
I want to create HelperController for my project. I generate a controller with doctrine:generate:controller and I need to use entity manager in it.
I enjected to services.yml but it is giving an error like this:
Argument 1 passed to…

Çağdaş DAĞ
- 3
- 3
0
votes
1 answer
Bootstrap4, JQuery3 and FOS Comment Bundle => $.get(...).error is not a function
This is more a fix I found rather than a question.
On a Symfony 3 project, I decided to upgrade to bootstrap 3 to 4. It implied using JQuery3 which is not fully compatible with the asynchronous comments display of Fos Comment Bundle 2.0.14 (and…

Fazhom Arnaud
- 61
- 3
0
votes
1 answer
Order and storage space, what relation?
I do not know what relationship to use for this application: Many orders can have the same storage space, and one storage space can refer to many orders.I tried Many-To-Many, Unidirectional and One-To-Many, Bidirectional but using such a solution…

grda
- 35
- 7
0
votes
1 answer
Combining data and inserting to database with a one-to-one relationship
I have a problem with inserting data to the database with a one-to-one relationship. The problem is that I can not use FormBuilder. Because the data comes from the form js.
User selects the status field from the drop-down list.Now I would like…

grda
- 35
- 7
0
votes
2 answers
How to Use validation inside the service
I would like to use validation inside the service.
services.yml:
AppBundle\Service\BookingCreateService:
arguments: [ "@doctrine.orm.entity_manager" , "@service_container"]
public: true
Status Entity:
/**
* @var string
*…

grda
- 35
- 7
0
votes
1 answer
Symfony3 & Assetic : different behavior in dev or prod
I'm working on Symfony 3.4 and Assetic.
Let's say my website is www.mycompany.com and i'm using 2 particular types of asset :
Google web font via @Import() in my main CSS file
Custom CSS fonts, with font files manually uploaded in in…

Paolito75
- 558
- 1
- 11
- 33
0
votes
1 answer
Inheritance Mapping and Many-To-One Relation
I made an abstract Upload class with 4 different children.
The classes UploadCompanyPic, UploadCompanyLogo and UploadUserPic are one-to-one relations, but the UploadPostFile has to be Many-to-one (one post has many uploaded files), I want to use…

sneaky
- 439
- 1
- 6
- 18