Questions tagged [symfony-4.4]

Symfony is a PHP framework developed by SensioLabs. Symfony 4.4 was released in November 2019.

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

Bug fixes

  • bug #34464 [Form] group constraints when calling the validator (@nicolas-grekas)
  • bug #34451 [DependencyInjection] Fix dumping multiple deprecated aliases (@shyim)
  • bug #34448 [Form] allow button names to start with uppercase letter (@xabbuh)
  • bug #34428 [Security] Fix best encoder not wired using migrat _from (@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.
108 questions
2
votes
1 answer

How to use `IntlDateFormatter` in Symfony?

How can I implement IntlDateFormatter in Symfony 4.4. With reference to https://symfony.com/doc/current/components/intl.html I have installed symfony/intl Now when I use it in my code: use Symfony\Component\Intl\DateFormatter\IntlDateFormatter; …
nas
  • 2,289
  • 5
  • 32
  • 67
2
votes
2 answers

Cannot install sonata admin on Symfony

I installed symfony 4.4 full, and then tried to install sonata-project/doctrine-orm-admin-bundle. Out of the box, this doesn't work. can someone please explain this? I got the same error using symfony 5. Your requirements could not be resolved to an…
Jonas de Herdt
  • 422
  • 5
  • 18
2
votes
1 answer

Symfony LTS: how to upgrade from 3.4 to 4.4?

Tell me please, what steps are required in order to upgrade Symfony from 3.4 to 4.4 LTS?
vladislav_zp
  • 39
  • 1
  • 3
1
vote
1 answer

Symfony, set a lock in a command to lock another command

On Symfony 4.4, I am trying to establish a lock in a command and keep it alive until explicitly released. Reading the docs I understand that this should be obtained with the $autoRelease param of Symfony\Component\Lock\LockFactory::createLock(), but…
nulll
  • 1,465
  • 1
  • 17
  • 28
1
vote
0 answers

Invalid configuration for path "sentry.options.integrations.0": Expecting service reference, got ""Sentry\\Integration\\IgnoreErrorsIntegration""

I'm setting sentry in Symfony4.4 to ignore some types of exceptions. Following the doc, I set config.yml this way: sentry: dsn: "%sentry%" register_error_listener: true options: attach_stacktrace: true integrations: …
dr_fg2
  • 47
  • 1
  • 1
  • 5
1
vote
1 answer

Symfony 4.4 ignores env variables

I've just migrated my project from 3.4 to 4.4 and having a trouble to configure it correctly. My project is running inside a Docker container. I provide an env variable DATABASE_URL with a production url inside container: env | grep DATABASE_URL -…
Majesty
  • 2,097
  • 5
  • 24
  • 55
1
vote
0 answers

Symfony 4 authenticator with user activation system: modify login error message

I'm implementing a security system that, apart from credential, checks if user is enabled. To check if user is enabled after checking credentials is easy in my AppAuthenticator. But the problem is I don't know how I can set lastAuthenticationError…
K. Weber
  • 2,643
  • 5
  • 45
  • 77
1
vote
1 answer

Passing argument as array in Symfony 4.4 Process Component

This is the process command I have to execute, The argument contactIds is an array. $process = new Process([ "php", "../fairgate4/bin/console", "contactlist:remove", $contactIds // array ]); …
manu
  • 351
  • 2
  • 15
1
vote
1 answer

Convert h:m:s to hh:mm:ss in twig

I have a little problem that I can't seem to solve and ask for your help please: I have a branch variable which only contains hour, minute and second with no date. The problem is that its format is h: m: s is I would like to convert it to hh: mm:…
DevG
  • 13
  • 3
1
vote
1 answer

Custom voter does not work as expected after migrating from Symfony 3.4 to Symfony 4.4

I'm migrating an app from Symfony 3.4 to Symfony 4.4. This app gives admin users the possibility to edit the role needed to access each route, so all the roles and routes are stored in the database. To check if the user has access to a route, a…
Augustin
  • 13
  • 2
1
vote
1 answer

symfony - getting logged out at form->handleRequest

I have a problem regarding my Symfony4 App. What is happening? I want to build a "Change Password" function for the currently logged in user. So far everything is fine imo. When I submit the form everything seems to have worked fine (redirect to…
fehmelchen
  • 203
  • 3
  • 15
1
vote
0 answers

Symfony 4.4 - "No route found for "GET /""

I'm getting the following Error on the server: Uncaught PHP Exception Symfony\Component\HttpKernel\Exception\NotFoundHttpException: "No route found for "GET /"" at ../vendor/symfony/http-kernel/EventListener/RouterListener.php line 136 Routes are…
Etereal
  • 51
  • 3
1
vote
2 answers

How to set a default cache lifetime for doctrine in Symfony 4.4?

I would like to set a default cache lifetime / timeout for doctrine caches in my different environments. php bin/console config:dump-reference doctrine shows only options to set the lifetime quite deep down in the advanced configuration in the…
Calamity Jane
  • 2,189
  • 5
  • 36
  • 68
1
vote
2 answers

Implement a custom error controller in Symfony 4.4

What i have done: I have created this custom controller cause I want to pass to the error pages some extra variables. #Controller/CustomErrorControler.php namespace App\Controller; use App\Controller\Base\BaseController; use…
Makis
  • 1,214
  • 3
  • 16
  • 40
1
vote
0 answers

Symfony 4 default_locale is not working on Security library messages

I am building single language Symfony (v4.4.7) application. As I understood from the documentation I need to set framework: default_locale: tr translator: default_path: '%kernel.project_dir%/translations' fallbacks: …