Category "symfony"

Symfony how to NOT route public folder

I have a Symfony web app. As per default, all site calls are routed by Symfony. However, when I want to call for example mysite.com/public/example.img and retre

$env must not be accessed before initialization

I upgrade my project from SF 5.4 to SF 6 with php 8.1.2. With my dev env I have no errors! When I use the prod env when I cache clear I have the error: In Route

Importing React as default module not working inside Symfony Webpack Encore project

I have a Symfony project, where the frontend-pipeline is built with Webpack Encore, I would like to add React to the project and have a React widget inserted in

Tags support is not enabled. You must use the flag "Yaml::PARSE_CUSTOM_TAGS" to use "!service_locator"

I am trying to add the webpack-encore-bundle to my Drupal site, I have this in services.yml file: services: webpack_encore.twig_entry_files_extension: cla

Symfony form EntityType class

I am preparing a form for the user's choice of a game according to selected parameters. I am using the EntityType class. Example: ///... -> add ('Age_of_year

Symfony 4 Sonata FormBuilder skip loading some relations

I've inherited an older project to provide maitanance. I don't have Symfony experience, I am coming from Laravel/Yii experience. I've tracked down a certain aja

Why my API-Plateform resource give me always and only 2 attributes in response?

I try to create a new API rest on monolithic project with symfony 4.4, api-platform 2.6.8, i have to use yaml configuration, but i have the same issue with anno

New alternative for getDoctrine() in Symfony 5.4 and up

As my IDE points out, the AbstractController::getDoctrine() method is now deprecated. I haven't found any reference for this deprecation neither in the official

Symfony - fixtures load throw unexpected error

In my Symfony 6 project, I am trying to load a fixture: /** * @param ObjectManager $manager */ public function load(ObjectManager $manager): void { $mana

Variable returned by Symfony controller always undefined

Ok, so I have a text field in which I type a string and I have a button next to it. <div class="sidebar-search"> <div class="input-group custom-se

Call to undefined function Symfony\Component\Console\Input\escapeshellarg()

When running composer install in production I get a new error message today: $ composer install Installing dependencies from lock file (including require-dev) V

Symfony- docker container Could not open input file: bin/bash

I started my Symfony 6 project with Docker successfully. I have a problem when accessing the PHP container and trying to run php bin/console doctrine:migrations

Symfony nginx reverse proxy on folder

I have a simple Symfony application, using Webpack Encore. I also have a nginx server, with this below configuration to access to my Symfony app: server {

Doctrine - Undefined clas const JSON_ARRAY

I got this message error: On stack trace I cant find the file that produces it. I'm using symfony 5 and doctrine. Undefinied class constant 'JSON_ARRAY' I sear

How to create a full text index with PHP attributes and Symfony 6?

I need to create a search input inside my symfony 6.0 project. I'm using PHP 8.1.5 In the old days i used the following syntax with annotations : /** * @ORM\Ta

How to query for an entity that contains an asscociated entity in ArrayCollection field (many-to-many) in Doctrine?

Setup & Problem There are two entities in my Symfony project (Entries and Persons) that are associated by a many-to-many relationship. An Entry (extended in

FOSJSRoutingBundle : "The route xxx does not exist"

I created a new controller with a new route. I dump generate my new fos_js-routes.json with this command : php bin/console fos:js-routing:dump My new json was

jwt lexik JWT Authetication not found

I have been looking for a solution for a while now. All authentication system is in place, I get my token but when I use it to retrieve the data I get a 404 jwt

Array to string conversion in EasyAdmin 3 (Symfony 5)

I'm trying to display a json array on the EasyAdmin detail page. I read here Is there a way to represent a JSON field in EasyAdmin 3? that you can use ArrayFiel

Symfony Messenger (Messages Queue), ho to get queue status?

I am approaching Symfony 4.4 Message Queue with the Doctrine Transport. How can I get an overall view of the queue status? I noticed that Doctrine stores the qu