Questions tagged [symfony-4.2]

Symfony is a PHP framework developed by SensioLabs. Symfony 4.2 was released in November 2018.

Symfony is a PHP web framework first released in July 2011 and was created by SensioLabs. Symfony 4.2 was released in November 2018.

Bug fixes

  • bug #29343 [Form] Handle all case variants of "nan" when parsing a number (@mwhudson, @xabbuh)
  • bug #29373 [Routing] fix trailing slash redirection (@nicolas-grekas)
  • bug #29355 [PropertyAccess] calculate cache keys for property setters depending on the value (@xabbuh)
  • bug #29369 [DI] fix combinatorial explosion when analyzing the service graph (@nicolas-grekas)
  • bug #29349 [Debug] workaround opcache bug mutating "$this" !?! (@nicolas-grekas)
  • bug #29344 Fixes sprintf(): Too few arguments in Translator (@stephanedelprat)
  • bug #29318 [Console] Move back root exception to stack trace in verbose mode (@chalasr)

Documentation / Resources

  • Overview: Documentation for current version.
  • Flex: New way to manage Symfony apps.
  • Best Practices: Best practices for developing web apps, esp. the ones using the full-stack Symfony framework.
  • Symfony Recipes Server: Includes official and community recipes.
96 questions
1
vote
1 answer

Binding entities to query parameters only allowed for entities that have an identifier

I have a entity Annonce has Tags ManyToMany to Entity Tag When i search an Annonce by tags like this picture My probleme is : For example If the Bike tags exist in Database that will return Annonces with that tag, without errors If i add for…
Khalil
  • 288
  • 3
  • 16
1
vote
3 answers

How can I restart the doctrine entity manager for Symfony 4.2?

I am using Symfony version 4.2 . I use other packages I write below. "php": "^7.1.3", "ext-ctype": "*", "ext-iconv": "*", "enqueue/enqueue-bundle": "^0.9.7", "enqueue/pheanstalk": "^0.9.7", "friendsofsymfony/elastica-bundle":…
ahmet
  • 363
  • 2
  • 5
  • 16
1
vote
1 answer

Symfony Argument n passed to *** must be an instance of Swift_Mailer, null giveno

I'm struggling with Symfony 3.4 and autowiring. He here an exemple of the error message : Argument 2 passed to App\Controller\MainController::contact() must be an instance of Swift_Mailer, null given It's the same message with every Service I pass…
Charly
  • 436
  • 4
  • 12
1
vote
1 answer

Serialising with annotation groups

Symfony v4.2 I'm trying to use symfony's normalizer and serialiser to convert my entities into JSON. I followed the Groups annotation pattern, because it sounds like the most intuitive and future proof way to do it. According to the docs, we have to…
DerpyNerd
  • 4,743
  • 7
  • 41
  • 92
0
votes
1 answer

Doctrine 2 avec Symfony 4.2.5 et FOSRestBundle - OneToMany association - Redondant registering

Here is the problem: Two entities Books and Auteurs. A book has only one auteur, an auteur can have multiple books. When the base is populated if I create a book with an existing auteur in the Auteurs table, this one creates (wrongly) a duplicate in…
Caplande
  • 23
  • 1
  • 4
0
votes
1 answer

JMSSerializer with Symfony4 serialize encoding

My configuration: Symfony 4.2.5 , JMSSerialiser 3.2. I cannot obtain UTF-8 response with serialization. I thougt solution was in config: jms_serializer: visitors: json: options: [JSON_UNESCAPED_UNICODE] But it does'nt work,…
0
votes
1 answer

How to call a service in Symfony 4?

I want to generate XML feeds in Symfony 4 and I think that the FeedBundle is more than enough for me. I installed and configured it without any problem, my problem comes when I want to call the service from the Controller, his documentation tells to…
redunicorn
  • 39
  • 7
0
votes
1 answer

Not able to install Symfony 4.2.10 version

What I've tried: I tried with: composer create-project symfony/framework-standard-edition my_project_name "4.2.*" But get: " Could not find package symfony/framework-standard-edition with version 4.2.10." And I need the exact one. Any help?
Amol
  • 1
0
votes
0 answers

Error: Expected argument of type "int", "App\Entity\Provincie" given at property path "provincie_id"

Error: Expected argument of type "int", "App\Entity\Provincie" given at property path "provincie_id". I use an entity to create a selectbox in my form. It loads fine, when I submit the form I get the above error. I generated my entity with symfony…
Bart
  • 91
  • 3
  • 11
0
votes
0 answers

Get service dynamically by value in Symfony 4.2

I need to use a service by value in an "Utils" Class method called from a controller which implements AbstractControllerInterface. I have an entity in my project which have some mappings. Some of them have a Utils Class. Some of them implement…
0
votes
0 answers

Unable to show the events in calendar

I use https://github.com/tattali/CalendarBundle#1-download-calendarbundle-using-composer I work with symfony4.2.9 I took almost the same code(just putted dates in the events) and I can't see the events in the calendar. No error, no troubleshooting…
cessother
  • 127
  • 1
  • 1
  • 9
0
votes
1 answer

Symfony 4.2 event POST_SUBMIT is returning null

Im doing 3 forms in Symfony 4.2.5 all with the same code when load states and cities (estados and municipios) but only this form is making me crazy because has the same code that all but doesnt work it always return null in "municipio", and when I…
EsopMx
  • 85
  • 1
  • 10
0
votes
0 answers

How to upgrade Symfony minor version from 4.2 to 4.3

I need to upgrade Symfony minor version from 4.2 to 4.3. I check the official document and find there is only 4.0 to 4.1 and there is no description for which files should be edited manually. I follow the document and find that is not clear enough…
AntmadDG
  • 66
  • 1
  • 6
0
votes
1 answer

How do I abort a query execution on a PrePersist function?

I'm currently working on a synfomy 4.2 project using sonata admin and Doctrine ORM. I would like to abort a query execution when some condition is set to true, for example, if I would like to insert a new Product, but the Product for some reason…
Benjamin Gil
  • 127
  • 1
  • 12
0
votes
1 answer

$request->request->replace() what does it do?

I was going through some code in symfony, and I found $request->request->replace() Actually, a form is posted and its value is fetched in a function say, public function someFunction(Request $request){ $data = $request->request->all() ? :…
Saurabh
  • 432
  • 1
  • 10
  • 23