All Questions
Tagged with symfony-3.x or symfony3
182 questions
0
votes
0
answers
56
views
"Unable to write in the cache directory (var/cache/prod)" error occurs randomly every few days/hourq [closed]
I'm using Symfony 3.4.36 and experiencing a recurring cache issue where randomly every few days or hours, the application stops working with this error on screen:
Unable to write in the cache ...
0
votes
1
answer
866
views
retrying messenger message from a Symfony controller
I need to retry a specific failed messenger message from a Symfony controller. When I try to retrieve failed messages by $this->failedTransport->get(); all messages are cleared which is not what ...
1
vote
0
answers
185
views
Symphony 3.0 Password Change security.yml
A friend who has a Symfony tool asks me to change his password. I am a PHP developer but I don't know Symfony...
I found the security.yml file with the password encrypted in bcrypt (12 passes). When I ...
-1
votes
1
answer
332
views
Symfony 3.1 composer conflicts
I'm resuscitating the old Symfony project.
Cannot "composer install". I have tried to make changes in packages removing composer.lock , changing versions of packages. Bugs are multiplying.
...
3
votes
0
answers
1k
views
Using encore_entry_script_tags in both parent and grand child twig template logs to console 2 times
I have parent main_layout.html.twig and inside it something like this:
{% block javascripts %}
{{ encore_entry_script_tags('main_layout') }}
{% endblock %}
{% block content %}{% endblock %}
We ...
0
votes
1
answer
552
views
Upgrading Symfony from 3 to 4 getting error: "no registered migrations"
Trying to upgrade a project from Symfony 3.x to 4.4 and running into some issues with the doctrine migrations.
Currently when trying to run migrations I am receiving this error:
[ERROR] The version &...
-1
votes
2
answers
10k
views
No route found for POST ... : Method Not Allowed (Allow: PUT)
Currently, I am updating the system running on the existing Symfony 2.3 (currently 3.0.9), and checking the operation.
When I tried to change the state of an item to the selected state, I got an error....
0
votes
1
answer
579
views
how to run composer install?
I'm trying to install composer using "composer install" but i get this error. I've searched about it but there is no solution for me.
I just understood that it's a version compatibility problem
...
0
votes
2
answers
2k
views
Call to a member function getId() on string after login
I am accessing a part of the site that requires the user to be logged in. But the system, instead of going to the login, and then to the site I want to access, shows me the error indicating that I am ...
0
votes
0
answers
690
views
How Symfony works to remove an collection items
When I submit a collection with removed elements, my elements are correctly removed but, I don't understand how Symfony remove elements.
When I die(); the script doesn't stop into my remover method, ...
0
votes
1
answer
562
views
Symfony3 pass form data to collection inside collection
I have some nested forms with CollectionType and seems that the data from the constructor is not passed to the 2nd nesting level.
I simplified my form classes, just with I think's important (if you ...
0
votes
1
answer
215
views
auth token creation with LexikJWTAuthenticationBundle and Symfony 3.4
In my Symfony 3.4 Application I am trying to use LexikJWTAuthenticationBundle (v2.6.3).
I installed and configured it and created the needed keys like said on the github page:
https://github.com/lexik/...
0
votes
1
answer
610
views
Definition::addMethodCall Is not calling the set method
I am trying to upgrade Symfony from 2.3 to 3.4. At the moment I am try to fix an issue with the dependancy injection. It seems like the old version of the DependencyInjection\Definition class would ...
3
votes
0
answers
4k
views
Unused binding error when trying to bind logger to autowired controller constructor in Symfony 3.4
After upgrading to Symfony 3.4 from 2.8, I am attempting to get rid of warnings about using services from the container. One hang up is my controller all extend from an abstract controller which needs ...
1
vote
1
answer
688
views
Symfony3 - The association refers to the owning side field which does not exist with ManyToMany and fields table
i'm trying to make a manyToMany relationship with more attributes than the ids, so I need two OneToMany relationships and two ManytoOne relationships having three tables/entities.
I have Product ...
0
votes
1
answer
320
views
Symfony/Doctrine ManyToMany get records in order they assigned or saved
I have an entity called Item which has a ManyToMany connection with a JoinTable to an entity called Tags
This is working well. The problem is, that I need the tags in the exact order as they are ...
0
votes
3
answers
1k
views
How to show errors in browser?
I'm getting started with Sylius. Symfony version is 3.2.7. On some pages I have some errors. The pages show text:
Oops! An Error Occurred
The server returned a "500 Internal Server Error".
...
1
vote
1
answer
1k
views
How to prevent rebuilding of Symfony cache in each request in test environment
I have Symfony 3.3/3.4 and since at some time my functional tests have started to work very slowly. Tests which took 10 minutes started to take 1 hour and more.
We use these packages:
"symfony/...
0
votes
0
answers
86
views
no rendering in my twig template with a manytomany relation in symfony 3
Here I have a relationship ManyToMany between my entity doctor and insurance.Car a doctor can be affiliated with several insurance for his clinic. And insurance can insure several doctors.
I have ...
0
votes
1
answer
200
views
How to use Container to access parameters on a custom Exception
I have been struggling a bit to understand how can I make use of the Container that gives me access to the parameters located at config/parameters.yml.
The problem in my hands is I created some ...
2
votes
1
answer
2k
views
Reset (clear) a table in Doctrine ORM 2.5 and Symfony 3.4
Using Smyfony 3.4 and Doctrine ORM 2.5 (mySql) I am looking for a way to "reset" a table.
By reset I mean I want to delete all entries of that table and reset the autoincrement for the id column. ...
1
vote
1
answer
2k
views
Doctrine single table inheritance ManyToOne association with parent entity
I'm working on a project made in Symfony 3.1.10.
I have three entities:
MyEntity 1->n MyPivotEntity
MyPivotEntity n->1 MySuperInheritanceEntity
and I have another entity MyInheritanceEntity ...
3
votes
2
answers
8k
views
Checking which form field value has changed Symfony 3
I need to check inside the FormType which field has changed. Is there any method to do it? I've searched for a while, then tried to get edited entities field in few ways (with form events too) to ...
0
votes
1
answer
443
views
Sonata ODM Admin custom set of filters
I am trying to upgrade my sonata-admin section in project from version 2 to 3. As I understood, the system of filtering had a little bit changed.
The section of filtering now is like below:
/**
* ...
0
votes
2
answers
2k
views
Symfony3 - How to validate HTML tags
By using Symfony validators
How to prevent some HTML tags like
<input></input> <textarea><textarea>
from being entered in input field and saved in database?