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
2
votes
1 answer

Is there any way to add custom column to sessions table while working with pdo sessions in symfony 4?

I Just configure Pdo sessions with symfony which work absolutely fine for me but now i am looking to add some extra fields like user IP, user id etc for make a report later on for which user login from which area so i find no way to add new columns…
2
votes
3 answers

Symfony 4 CollectionType validation groups not working

I try to validate FormType inside CollectionType with some simple groups rules but It doesn't work, but if i try to make the same without validations groups, it's work fine. Any idea? This is a complete and simple exemple that reproduct the error…
chakroun yesser
  • 1,407
  • 1
  • 12
  • 18
2
votes
1 answer

Symfony 4.2+: Replacement for ContainerAwareCommand's getContainer->get()

My goal In Plesk i want to run a PHP script frequently using PHP 7.2. It has to be as a PHP script and not console command (see "my environment" for more details). My current Symfony 4.2 based implementation works fine, but it is marked deprecated.…
k00ni
  • 315
  • 4
  • 17
2
votes
2 answers

Delete file from a folder in symfony 4

I have a controller with a supprimer action. I can add files and delete them from the database. As I followed the Symfony doc to create an uploader file, I also created in my services.yml this route parameters: repertoire_soumissions:…
m.deye
  • 41
  • 2
  • 6
2
votes
0 answers

Why my datas change after form submit when I make SQL requests but no save in database?

When I submit my form and I get the team in the database (no INSERT / no UPDATE before), Doctrine returns the new member's ID (I was selected in the form), when I had already the old member's ID in the database. How to fix the issue? Thank. // Get…
2
votes
0 answers

Symfony 4 Generate Api Token from api login|register using email and password

I'm using Symfony 4 "Custom Authentication System with Guard (API Token Example)"Custom Authentication System with Guard (API Token Example) I want to generate api token when user register from other app(i.e Advance Rest Client) and then want to use…
Muhammad Shahzad
  • 9,340
  • 21
  • 86
  • 130
2
votes
1 answer

automatically set database ID in CollectionType

I have two entities, ParkingType and Exception, there's a OneToMany relation between them, since each ParkingType can have multiple exceptions. I made it so whenever I create a new ParkingType I can also create the exceptions related to it at the…
Nova
  • 47
  • 6
2
votes
0 answers

Invalid xml message received when post data xml includes DOCTYPE

I've for a REST endpoint that will be accepting a POST in the form of XML. Currently it's throwing an "Invalid xml message received" in vendor/friendsofsymfony/rest-bundle/EventListener/BodyListener.php (line 115) when it attempts to decode the…
RustedBucket
  • 23
  • 1
  • 5
2
votes
2 answers

Symfony 4 Custom config yaml file for Bundle

I'm trying to convert a bundle to symfony 4 and need to update my ancient parameters.yml to the modern symfony 4 way of life. Basicall the bundle itself - shared across multiple apps - should have a configurable file under /config/packages/. However…
ptmr.io
  • 2,115
  • 4
  • 22
  • 34
2
votes
0 answers

Remove collection that contains a hiddentype

Essentially I cannot remove a collection with orphanRemoval if the builder has a hiddenType attached. I'm not sure if there is something special that I need to do for the hiddenType field to be able to remove it. Everything works fine without the…
mcoatney
  • 143
  • 9
2
votes
2 answers

Why isn't my custom Symfony validator executed?

I have the following classes The entity to be validated:
Dushyant Joshi
  • 3,672
  • 3
  • 28
  • 52
2
votes
2 answers

How to insert data into two table have a single form type in symfony?

I have a single form which inserts data in following table: Vendor first_name last_name address address address city state pincode country Note: I have not created address as FK in Vendor table but it does saves the id for address table. I…
Saurabh
  • 432
  • 1
  • 10
  • 23
2
votes
2 answers

Filter required in Api Platform

Im using API Platform and I have defined a custom filter following https://api-platform.com/docs/core/filters/#creating-custom-filters It works ok, but I need to that filter is required everytime that application do a GET HTTP Request of particular…
AythaNzt
  • 1,057
  • 6
  • 14
2
votes
1 answer

Why After first load symfony stop working?

I'm new to symfony and when installation finish the welcome page work correctly but when i'm refreshing the page the load doesnt finish! EDIT : For my server configuration i juste use the "php bin\console sever:run" commande to launch my…
1
vote
1 answer

How to execute a payment with paypal/checkout-php-sdk?

I'm working with paypal/checkout-php-sdk, but am at a loss for what to do after creating an order. I can create an order successfully: /** * @Route("/create-order", name="create_order") */ public function createOrder(Paypal $paypal) { //…
Med Karim Garali
  • 923
  • 1
  • 14
  • 37