Category "symfony"

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 -

Sentry on Symfony: how to exclude `NotFoundHttpException`

I'm using the SentryBundle to integrate Sentry in my Symfony app. I don't want to record "NotFoundExceptions", so I configured the bundle this way: sentry:

Symfony Form / FormBuilder: How to add an option or attribute to multiple form fields

I want to add a stylesheet class attribute to most of the fields, but not all. public function buildForm(FormBuilder $builder, array $options) { $builder

How to import TomSelect in App.js to avoid browser error?

I'm working on a symfony 5.4 application that uses webpack / encore. I want to use the tomselect javascript plugin. i installed it with yarn and want to import

Symfony2 Doctrine merge

I am studying https://www.doctrine-project.org/projects/doctrine-orm/en/2.6/reference/working-with-associations.html but I cannot figure out what cascade merge

Symfony-Twig: insert fontawesome icon in a form_widget

To validate a form I am using a standard: {{ form_widget(form.save, {'attr': {'class': 'btn btn-sm btn-danger'}, 'label': 'Submit form'}) }} I want to insert

How to minify Symfony / Twig generated HTML code to satisfy Google PageSpeed Insight?

When testing my Symfony 2.8 based webpage with Google PageSpeed Insights I am getting warned, that the HTML code is not minified. This is true, while Assetic

Apply session id from request header

I am not sure if this is possible in Symfony so I came up with a question. The high-level scenario is: A request on the API (built in Symfony) must return the

insert ignore on duplicate entries in Doctrine2/Symfony2

How to ignore on duplicate entries using Doctrine2? Error example: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'symfony' for key 'UN

Symfony 6 - lexik JWT - Authenticator does not support the request

I'm having some problems with lexik JWT bundle and Symfony 6.0, for swagger I use NelmioApiDocBundle. The thing is, that every in swagger works before I decide