Category "symfony"

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

Is there any way to access a Symfony secret value in userland code?

Despite making them appear to be environment variables, Symfony does not actually load secrets into the environment, so you can't access them via getenv() or $_

Symfony 5 select QueryBuilder select object return soft deleted propery

I have object: Shipment with property Supplier of class Company App\Entity\Shipment id:1234 status:"wait" supplier:Proxies\__CG__\App\Entity\Company when $q

Symfony: how to add a serializer group on a Route depending on logged in user's roles

I'm using JMSSerializerBundle in my entities definition, and RestBundle's annotations in controllers. I have an entity with public and admin-protected attribute

Public Access with Symfony's AbstractAuthenticator

I'm exploring the new system for User Authentication using the new AbstractAuthenticator class in my symfony 5 project. My symfony app will contain a mix of rou

Symfony DateTime format errors - datatransformation (external datepicker)

I'm working with Symfony 6 and a TempusDomini datepicker. I have read (amongst many others) the symfony documentation, https://symfony.com/doc/current/reference

Symfony - Dispatch event and listen in controller when route requested

I don't know if it's a good practice or what ever, but I would like to dispatch an event when an order is created, then I wish catch this event inside a control

Drop or Paste file on the Textarea

I want to make a message input like this. But I have a question how to get file data, which I drag & drop or Ctrl+V on the textarea to upload. I am using R

Symfony find user by role (JSON array Doctrine property)

I am doing a small project where I have an entity with a roles property which consists of an array. What I am trying to do is, in some controller, find an exist

Symfony / twig - Form with master-detail in it .. How to?

I'm coding a master detail page with Symfony 5 and twig I have table product, and another options When I create a product, I want to ask for name and have to ch

Symfony Test - Testing database with data to check Show($id) Feature

Could someone explain me how can I add some entities in to database for test purpose? I want to test that endpoint /show/{id} show correct response, but to chec

Twig: Unexpected token "name" of value "as" ("end of statement block" expected)

When i run a Twig Lint test localy using CLI on a file, i get no warning. But, my Gitlab pipeline returns a KO for the same file at the Twig-Lint stage: Unexpe

Inserting the current date doctrine

I have created a symfony project and am having a date issue. I would like to make a request which inserts the current date in the database. In my entity my fiel

Is it possible to change the way EasyAdmin load entities in index?

in my project with Symfony (PHP), i use EasyAdminBundle and i'm wondering if it's possible to change the way easyadmin load entities with pagination? I would li