Category "symfony"

ConstraintViolationListInterface to Exception in Symfony

I need to convert an object of type ConstraintViolationListInterface to a single exception for further logging, where the message is a concatenation of the mess

How to properly set "0000-00-00 00:00:00" as a DateTime in PHP

I have a column viewedAt which is a DATETIME and accept NULL values. It's a software restriction to set that column on each new record as 0000-00-00 00:00:00 so

Allow the addition of new values to a ChoiceType Field

I use Form Component and have a ChoiceType field on the form which is rendered to a select field. On the client-side I use select2 plugin which initializes a se

Symfony 4: how to safely 'join' migrations together? / remove migrations in between the first and last?

I was recently tweaking around with my DB and noticed that I made 5 migrations on top of my existing 2. So 7 in total, m1, m2, ..., m7. From these 5, I only wan

Add a header when sending a message with php-enqueue and RabbitMQ

I am trying to send a header using php-enqueue bundle I'm trying this: public function __construct( ProducerInterface $producer ) { parent::__constru

Failed user login on production server using Symfony framework (Authentication request could not be processed due to...)

I'm using Symfony for a project and I have been trying to get the login to work on production server with no success for the past 2 days. I keep getting the err

How to install a custom certificate in Symfony server?

With server:ca:install on the Symfony console an SSL certificate can be generated and installed. Is it possible / How to install an existing one, created separa

How to get all possible values for an existing ENUM or SET - field

I'm using Doctrine in Symfony4. How do I retrieve all possible values for an ENUM or SET column on this base?

Looking for a clean way to export data to a CSV that is previously used in a different controller route that renders a Form/DB query

I have a page that has a form that generates a query that renders relevant information from my database: Render Example The controller function I use creates th

Doctrine 2 Symfony 5 migration to an oracle database

I have PHP 8.0 Ubuntu 20.4 running in a VM Symfony Version 5 doctrine/orm 2.8.2 doctrine/dbal 2.12.1 doctrine/migrations 3.1.1 and oracle19c running I have als

upload image from react native app to symfony backend via axios

I want to upload an image from react native app to backend in symfony via axios. here is the code of the front end : const [pickedImage, setPickedImage] = u

Double listbox with CollectionType/ChoiceType for user roles

With Symfony 4, I don't have this problem : a simple form to choose or edit the role of an user with a listbox. Since I start a new project with Symfony 5 (with

Why the name of trucks are same in 2nd and 3rd record of company data retrieval?

My data in database: My objective is to retrieve all data of company collection (MongoDB) data from the database. The company collection holds one or many truc

How to specify the scope of Google API to get the birthday

I am trying to get the birthday from the Google API, but the retrieved data in HWIOAuthBundle do not contain it. I am wondering if the specified scope for goog

Mark an individual Doctrine migration as ran/executed

Is there a way that I can mark a Doctrine migration as "ran" or "executed" in the way that it won't be shown as a migration that needs to be migrated? app/cons

How to improve my tables and queries for Big Data applications?

I created an API on Symfony which produces more than 1 million entries by day into one of the MySql tables. This table structure is defined this way: After s

Authorization Required - Error 401 only in firefox

I made a website and put it on a local Linux server. I can access it without problem on Chrome and IE but firefox outputs this : Authorization Required

FOSUserBundle overriding register form

I would like to override the register form from FOSUserBundle. I have followed this page: https://github.com/FriendsOfSymfony/FOSUserBundle/blob/1.3.x/Resource

Twig - How to check if variable is a number / integer

How to check if variable is a number, integer or float? I can't find anything about this. Making project in Symfony 3.

RuntimeException: Unable to create the cache directory (/var/www/sonata/app/cache/dev)

I installed the Sonata admin bundle. After installation i refresh my page there is the cache problem then i use the following command to remove the cache: rm -