Category "symfony"

How to avoid duplicating workers with Symfony local server?

I found out that I have quite many Symfony local web server workers registered (around ~35), and the number keeps growing. I usually just start server with symf

aws eb deploy doesn't load environment variables

I'm deploying symfony project via eb deploy to ec2 instance (aws linux 2). Post deploy migrations scripts works well, but then I try to run symfony command with

VichUploaderBundle error "Expected argument of type "File", "NULL" given" when submitting the form without selecting any file

I am integrating VichUploaderBundle, and I've successfully been able to submit a file and save it, download it and edit the form resubmiting another file and re

Symfony Make:Migration : The metadata storage is not up to date, please run the sync-metadata-storage command to fix this issue

I keep getting this problem everytime i try to migrate using the commandline: php bin/console make:migration or even doctrine:migration status when i try the do

Doctrine ORM: Excluding Records Based on Values of Nested Relationships

Quick Overview Hey guys! I'm working on an app that has the ability for an Order to contain multiple OrderStatus which then have a relationship with the Status

Cannot autowire service in symfony

I'm trying to split one big service.yaml to few smaller files. In origin service.yaml I had services: _defaults: autowire: true autoconfigure: true

Generate admin Sonata with command line in Symfony 4

I'm starting to use Sonata with Symfony 4. I try to generate an admin with the command line "make:sonata:admin" and i've an error at the end of the process like

Symfony 5.2 mock service disappear in second request

I used Symfony 5.2 and I need to mock service method which execute send request to stripe payment system, obviously don't need to execute it when tests executin

Symfony 5.2 mock service disappear in second request

I used Symfony 5.2 and I need to mock service method which execute send request to stripe payment system, obviously don't need to execute it when tests executin

Symfony Error: "An exception has been thrown during the rendering of a template"

I am trying to include <link href="{{ asset('css/mystyle.css') }}" rel="stylesheet"/> in my twig file and render it. But it gives me Uncaught P

Symfony run hint kernel.secret parameter not found

error message: The service "uri_signer" has a dependency on a non-existent parameter "kernel.secret". Did you mean this: "kernel.charset"? index.php de

Doctrine entity listener not firing using YAML configuration

When i use the following annotation within an entity, the listener for it is called successfully. The problem with using the annotation rather than configuring

Reset Symfony session lifetime/timeout on user activity

How do I reset the time of the Symfony session as long as there is activity of the user logged into the application. in config.yml: cookie_lifetime: 3600 # 1

Not able to access model in the controller mautic

Not able to access new model in the controller in mautic Mautic uses Symfony 2.x framework Steps taken: created entity extending CommonEntity created reposit

Phpunit partial mock + proxy Entity

I tried find solution to my issue but didn't find anything. I use: Symfony, Doctrine, PhpUnit I have one entity class InvoiceNumerator: /** * InvoiceNumerat

How to access Session in PHPUnit WebTestCase (Symfony 5)

I'm trying to test methods which requires Sessions in my PHPUnit WebTestCase, with no success. PHP 8.0, Symfony 5.4 Here's my code: When user log-in, I'm saving

Cannot retrieve error message using Symfony HttpClient if the response is not "ok"

I use Symfony HttpClient to call an external API. When the status code is 200 I can use getContent() method to retrieve the API response. If the API response is

Symfony / Doctrine: OneToMany insert results in null id

I have two entities that I'm trying to apply a OneToMany / ManyToOne relationship to (one Game has many GameContent). Game /** * @ORM\OneToMany(targetEntity=

Symfony there are no commands defined in the "make" namespace

Following the documentation found here I enter php bin/console make:entity Product in Terminal and get the following error: [Symfony\Component\Console\Exceptio

Uncaught Error: Class "Symfony\Bundle\DebugBundle\DebugBundle" not found

I trying to deploy my application (Symfony 6 and php 8) through the Gandi.net french service. When I run the command to deploy the app by ssh I get the followin