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

Symfony 4.2 utf8 data cut off when saving to MySQL

I'm saving a heading from a CSV file to the database. Viewed with less on Ubuntu the file starts like this: Date,Supermarket,Speciality,Takeaway,Caf/restaurant 1/06/2019,0.039175903,-0.01496395,0.03603785,0.029072835 …
jdog
  • 2,465
  • 6
  • 40
  • 74
1
vote
1 answer

Forcing HTTPS in Symfony PHP causes redirect loop behind AWS load balancer

I am trying to force HTTPS in my Symfony PHP application. The docs on this topic seem pretty straight-forward: # config/routes.yaml secure: path: /secure controller: App\Controller\MainController::secure schemes: …
yevg
  • 1,846
  • 9
  • 34
  • 70
1
vote
2 answers

Dompdf not working in Symfony and displays characters

I already installed the dompdf in composer but I cannot render a pdf file and it shows some characters on the browser. Is there something i missed out on the code? %PDF-1.3 1 0 obj << /Type /Catalog /Outlines 2 0 R /Pages 3 0 R >> endobj 2 0 obj <<…
JBA
  • 219
  • 4
  • 15
1
vote
0 answers

Script cache:clear returned with error code 255 Fatal error: Uncaught Error: Class 'Doctrine\Bundle\DoctrineCacheBundle\DoctrineC

I have a Symfony project that works very well locally but when I put it on the server and I make the command composer install --prefer-dist --no-interaction --no-dev --optimize-autoloader I have every time this error [c1131570c@web44 falah]$ rm -rf…
1
vote
1 answer

How to prevent doctrine from generating unneeded migrations?

everyone. I use Symfony 4.2 and following database-first approach and have auto-generated entities; But then I need to do some changes in field definitions in entities but I don't want to affect the database structure. Everything works well but if I…
Ilia
  • 11
  • 2
1
vote
0 answers

Upload multiple images in Sonata Admin Symfony 4.2

I'm trying to build a CRUD function in Sonata Admin and want to upload images at Product Admin (not Image Admin). But I got this error and didn't know why when I click Edit: Mapping not found for field "images" I'm new in Symfony. I uploaded…
Ben
  • 75
  • 1
  • 14
1
vote
3 answers

How to run script or a method after a bundle install in Symfony 4.2?

I'm building a new bundle for my Symfony 4.2 application and I want to run a specific code only once after the bundle installation to set up some skeleton class in the root project. Like the maker bundle but without manual interaction. The installed…
ntomka
  • 36
  • 1
  • 6
1
vote
1 answer

Symfony4.2 Autowire bundle services

I want to autowire bundle service interface in my own services, but I get the error: Cannot resolve argument $slackOauthService of "App\Controller\Panel\Slack\SigninController::afterOauth()": Cannot autowire service…
George Olah
  • 577
  • 5
  • 16
1
vote
2 answers

How to show image in generated pdf by dompdf using symfony 4.2?

I am genearting a pdf file using DOMPDF. My pdf file is admit card which holds the information about the particular student. In this admit card I have wo images to show. So in my twig file, Profile Image:
Saurabh
  • 432
  • 1
  • 10
  • 23
1
vote
3 answers

How to use JMSSerializer with symfony 4.2

i am building an Api with symfony 4.2 and want to use jms-serializer to serialize my data in Json format, after installing it with composer require jms/serializer-bundle and when i try to use it this way : ``` demands = $demandRepo->findAll(); …
1
vote
2 answers

Getting error while using interval in doctrine

When I use below query (Doctrine 2), I was getting error, and can't use INTERVAL in query, $qb->andWhere("(pv.appointment_date + INTERVAL 48 HOUR) >= UTC_TIMESTAMP()"); Error: Expected Doctrine\ORM\Query\Lexer::T_CLOSE_PARENTHESIS, got '48'"
1
vote
2 answers

Implementing Strategy pattern Symfony 4 with Compiler pass is broken for me

I implement the strategy pattern using Symfony 4.2 and the issue is the addMethodCall in the following isn't executed. class ConverterPass implements CompilerPassInterface { const CONVERSION_SERVICE_ID = 'crv.conversion'; const SERVICE_ID =…
Sela Yair
  • 284
  • 2
  • 17
1
vote
2 answers

How to set access_control to disallow users having a 'ROLE_USER' to access path: ^/login after successful login?

In security.yaml file we define the access control for various routes and the ROLES who can access that same route. But how can we set the user, who is logged-in but can't revisit the /login page unless and untill it logs out and "ROLE_USER" changes…
Saurabh
  • 432
  • 1
  • 10
  • 23
1
vote
0 answers

Symfony 4.2/API-platform: non-deterministic security related errors

We're developing a REST API using symfony 4.2 and API-platform and we're experience a strange behavior. When we issue e.g. GET HTTP requests on the generated endpoints : we either get the expected JSON response or a 500 error for the very same…
1
vote
2 answers

How to quick search files in whole workspace (Visual Studio Code)

I have used ctrl+p to search my file in whole project but its not working. I am seaching 'Request.php' file which is used to get request. but I am unable to find this using 'ctrl+p'. Although, ctrl+p finds my controllers and other stuff but it does…
Saurabh
  • 432
  • 1
  • 10
  • 23