Questions tagged [symfony]

Symfony refers to both a PHP framework for building web applications as well as a set of components on which the framework is built. This tag refers to the currently supported major versions 4.x, 5.x, 6.x and 7.x. Alternatively, you can specify an exact version using the respective tag. This tag should not be used for questions about Symfony 1.x. Please use the Symfony1 tag instead.

Filter by
Sorted by
Tagged with
0 votes
0 answers
5 views

Including calculated SUM column in an api-platform response

I use SF 6.3 and the latest api-platform. I am trying to SUM all available positions of all jobs from a company. $queryBuilder ->leftJoin('company.jobs', 'job') ->addSelect('SUM(...
botjaeger's user avatar
0 votes
0 answers
12 views

Dynamic path upload for Elfinder under symfony 6

I'm using Symfony 6.3 and elfinder for image uploads. I have multiple users, and I want to configure an upload directory per user. The upload directory is generated via a service. I tried putting the ...
wehtam's user avatar
  • 39
0 votes
1 answer
17 views

How to make string math calculation to be calculated in Twig

I have string like "((2*160)+53)*1.00000" which I recieve in data into Twig template. How to make calculation work and return the calculed number, not the plain string of the math? So ...
Viv's user avatar
  • 25
0 votes
2 answers
25 views

Symfony Doctrine :Column Not Added to Table in Database Despite Executing php bin/console doctrine:schema:update --complete --force Command

Column Not Added to Table in Database Despite Executing php bin/console doctrine:schema:update --complete --force Command The command php bin/console doctrine:schema:update --force is indeed ...
Fatimaezzahra Ezzahra's user avatar
-3 votes
0 answers
22 views

symfony 6.3.4 auto-update fields create and update At [closed]

comment mettre à jour automatiquement les champs créé le et mis à jour le en version 6.4 ? En version 6.0, j'utilisais use Doctrine\\ORM\\Mapping as ORM; use Doctrine\ORM\Mapping\PrePersist as ...
Christian Alcon's user avatar
-1 votes
0 answers
17 views

symfony website hosting using apache on ubuntu [closed]

looking for a resource that explains how to configure Apache to host a symfony website on ubuntu youtube links or medium articles and my symfony.conf file is here i ve enable this and disabled 000-...
gj30158's user avatar
0 votes
1 answer
17 views

Webpack Encore and import React

I am trying a React project with Symfony and Webpack Encore. I have added the following packages : yarn add @babel/preset-react --dev yarn add --dev react react-dom For this, I had to add import ...
Dte's user avatar
  • 239
1 vote
2 answers
36 views

Symfony framework.lock with .env set-up

Problem I need to set up Symfony framework.yaml parameter framework.lock with 2+ memcached servers using .env. But when I try to do so, it does not recognize 2 servers, but only one, and with a glitch....
Yury A.'s user avatar
  • 13
0 votes
0 answers
15 views

API Platform : custom filter is not working

I created a custom filter in order to check if a table attribute is not "Brouillon" but when I call it in my Entity, nothing happens. Here are my files: NotCaracteristiqueFilter.php: <?...
AdriTech's user avatar
1 vote
0 answers
18 views

My Symfony Entity does not publish an Update on an Get-Operation with an modified uriTemplate-Url

In an Symfony-Entity (using Apiplattform and ApiResource-Definitions) I added a second Get-Operation like #[ApiResource(operations: [ new Get(), new Get(uriTemplate: '/[pathtoEntity]/{id}', ...
Thomas Güting's user avatar
0 votes
1 answer
21 views

API Platform only accepts arrays for doctrine type json_array, how can you save strings?

I have a Symfony 4.4 doctrine class like this: /** * @ApiResource( * collectionOperations={ * "GET" = {"security"="is_granted('ROLE_ADMIN')"}, * ...
L.A. Rabida's user avatar
0 votes
0 answers
20 views

Kunstmaan ArticleBundle and categories

Do you have any experience with the CMS Kunstmaan? We want to deploy it for a project and use the ArticleBundle. I have the task to handle categories and tags (creation, editing, and soft deletion), ...
Martin Matoušek's user avatar
1 vote
1 answer
27 views

Why does this Doctrine EntityListener not work in Symfony6?

On Symfony 6.3, I Use this listener based on the documentation. It calculates additional data before saving an entity: <?php namespace App\EventListener; use App\Entity\Simulation; use App\Goflex\...
Loïc Pennamen's user avatar
0 votes
0 answers
37 views

Sanitizing HTML from Form Input not working (symfony6.3 php 8.2)

Trying to implement a form that sanitizes html input according to https://symfony.com/doc/current/html_sanitizer.html#sanitizing-html-from-form-input but I cannot make it work properly. Here is my ...
pok_net's user avatar
  • 380
0 votes
0 answers
8 views

Symfony WebTestCase InvalidArgumentException: Invalid "base_uri" option

I am trying to set up functional testing for my symfony 5.4 application. However, I keep getting the following exception: App\\Tests\\Functional\\LoginTest::testSomething Symfony\\Component\\...
Floris's user avatar
  • 1
1 vote
0 answers
36 views

Logout is not working in symfony 6.3 on prod server

I have a site on symfony 6.3. When I developed it locally on localhost in docker there was no problem. But as soon as I moved it to a purchased domain on the server, the problem appeared. The domain ...
F. Tomas's user avatar
  • 180
0 votes
1 answer
16 views

Tailwind-Elements to work with webpack encore defer attribute false

My projects is running with Symfony 5.4 and uses Webpack Encore Bundle. I added Tailwind to it, no problem with that. When I added Tailwind-Elements (TE) which adds some JS I had the following issue: ...
JEEASH's user avatar
  • 31
0 votes
0 answers
32 views

API Platform Custom Filter With Between Issue

I created a custom filter where it filters the range of the total (e.g. items) with their status of delivered. I'm using the SIZE but unfortunately, it only filters the actual total items not the SIZE ...
blueshark67's user avatar
0 votes
2 answers
47 views

Symfony: setter injection not working in a custom Doctrine filter

To make sure that every user gets only data that belongs to its account, I tried to create a doctrine filter that inject Security service to it using a setter (setSecurity) and #[Required] attribute, ...
Az.Youness's user avatar
  • 2,207
1 vote
1 answer
42 views

Symfony - Sending Failed Messages on purpose

I'm currently using Messenger to send mails with Mailer through my MessageHandler. Here's my messenger.yaml config file. # config/packages/messenger.yaml framework: messenger: transports: ...
AureSanta's user avatar
-1 votes
1 answer
36 views

Symfony/composer showing Deprecated errors with php8.2

I am trying to get the latest version of mPDF for my recently upgraded (centos) dev php environment (now on php 8.2.10) but I am getting the following Symfony error: $ composer require mpdf/mpdf ...
user1432181's user avatar
0 votes
0 answers
10 views

FOSUser + LexikJWT still returning 401 (Full authentication is required to access this resource.)

I'm working on a project that implements two-level authentication (username + password) and TOTP authentication using the FOS User bundle. Additionally, I'm integrating a REST API using the FOSRest ...
Fatimaezzahra Ezzahra's user avatar
0 votes
0 answers
17 views

Uncaught PHP Exception LogicException: "Unable to add global "ea" as the runtime or the extensions

In browser, easyadmin is working fine. But when I run test case which asserts redirection logic to EasyAdmin's dashboard controller after login, it failed with the following error: Uncaught PHP ...
Erkhembayar Gantulga's user avatar
0 votes
0 answers
10 views

In Sulu CMS, enabling Monolog has no effect

For a Sulu project, I want to enable Logging. The Monolog Bundle is installed. This is my config/packages/monolog.yaml monolog: handlers: logs: type: stream path: "%kernel....
MadCatERZ's user avatar
  • 113
0 votes
2 answers
68 views

How to resolve the Composer dependencies conflicts (symfony)?

I'm writing a PHP application based on Symfony v6. Now I want to upgrade Symfony to the ^v6.3 composer require symfony/symfony:^6.3 ./composer.json has been updated Running composer update symfony/...
Fatimaezzahra Ezzahra's user avatar
0 votes
0 answers
22 views

Facebook API integration SDK for PHP Symfony Graph API

I am not getting the response in my console, server side. I am trying to connect server with facebook API. Following the recent SDK version instructions for PHP with Symfony. In my file I have: $...
Ramón Fo's user avatar
0 votes
0 answers
26 views

Deploy issues with Symfony Project - JWT

I am trying to put my symfony project online by deploying it. Everytime I try to deploy it i got this messages. Your lock file does not contain a compatible set of packages. Please run composer ...
Adrien's user avatar
  • 1
0 votes
1 answer
26 views

You have requested a non-existent service "profiler"

I want enable Production on my website, but after executing command: composer dump-env prod I am getting this error, when want clear cache: In ContainerBuilder.php line 992: ...
Jakub's user avatar
  • 21
0 votes
0 answers
26 views

Symfony 6 Type error in Form for getting id from another class

I have the following error My two classes : <?php //Entity/Cars.php namespace App\Entity; use App\Repository\CarsRepository; use Doctrine\Common\Collections\ArrayCollection; use Doctrine\Common\...
DevTuna's user avatar
  • 11
0 votes
1 answer
36 views

OAuth2: Force HWIOAuthBundle install with Symfony 6.3

I would like to use HWIOAuthBundle to Symfony 6.3 Officially from the composer perspective, HWIOAuthBundle is compatible with Symfony v5.4.28. "hwi/oauth-bundle 1.4.5 requires symfony/framework-...
Thierry Beaucamp's user avatar
0 votes
0 answers
45 views

How to check if I'm already in a message handler when dispatching a new message in Symfony Messenger?

I'm trying to log every message that goes through Symfony Messenger, along with every information I can gather: message dispatched at <timestamp> message handled / failed / retried at <...
BenMorel's user avatar
  • 34.6k
-1 votes
1 answer
44 views

Symfony - Get the state of the mail sended with Messenger

I'm currently using Symfony Messenger on my project. I'm using it to send mails through the MessageHandler Heres the file : <?php namespace App\MessageHandler; use App\Entity\Dossier; use App\...
AureSanta's user avatar
0 votes
2 answers
93 views
+300

How to send error-message to Graylog from Symfony-app, inside Kubernetes-cluster

A couple of docker-containers, running inside a Kubernetes Cluster: PHP Nginx MySQL Redis There is a Graylog-instance (version 3), that listens to the stdout and stderr from those containers. In the ...
Zeth's user avatar
  • 2,055
1 vote
1 answer
39 views

Shopware 6 plugin: Config value is incorrect after update due to removed config key

I have a plugin that handles a configuration value for auto-publishing reviews (reviewModeration). In version 1.6.3, I added a new config key autoPublishStars. Furthermore, I want to totally remove ...
mlodhi's user avatar
  • 463
-1 votes
0 answers
35 views

Symfony MessageHandler

I'm currently using Symfony Messenger on my project. I also use Symfony Mailer. I'd like to send mail throught my MessageHandler but it doesnt work. Heres the message handler : <?php namespace App\...
AureSanta's user avatar
-1 votes
0 answers
29 views

#[ApiProperty(security)] doesn't work with nested object

I'm trying to use the ApiProperty attribute to secure a field present in an nested object of the object I'm querying. But the property seems to have no effect when I use it on a field of the parent ...
Aurélien W's user avatar
0 votes
0 answers
15 views

An exception occurred in the driver: could not find driver - Symfony [closed]

Hola una pregunta estoy tratando de enviar emails con symfony 6.3 pero me aparece el siguiente error, el problema es que me parece muy raro porque con symfony 6.2 me funcionada y tengo el mismo código ...
Mónica García's user avatar
0 votes
1 answer
65 views

I get error on sending email with laravel

I have a laravel app. I sent an email with the following configuration, MAIL_MAILER=sendmail MAIL_HOST=smtp.googlemail.com MAIL_PORT=587 MAIL_USERNAME=fa[email protected] MAIL_PASSWORD=*****...
fatemeh mansoori's user avatar
0 votes
1 answer
28 views

Interface Alias acting like Singleton when it shouldn't in TYPO3 12.4.6?

I have a service MyService that extends MyServiceInterface. In the Services.yaml I configure: My\Extension\Domain\Interface\MyServiceInterface: alias: My\Extension\Service\MyService public: true ...
Timo's user avatar
  • 98
0 votes
1 answer
31 views

Using a DTO and retrieving an ORM subresource using a uriVariable in API Platform/Symfony

I'm using API Platform 3 with Symfony 6 to build an API. I have an ORM entity Subscriber. To change certain fields of the Subscriber, I want to use PUT with a Data Transfer Object (DTO). Since I need ...
jushjgher's user avatar
0 votes
0 answers
16 views

Symfony ORM Ilike DQL function Metadata Driver error

In symfony 4.4 I try to create ilike dql function. Because it's not possible to use ILIKE in query builder. Only LIKE with LOWER. But it's not possible to use index with LIKE and LOWER. I found some ...
user3659832's user avatar
0 votes
1 answer
24 views

FOSElastica search in multiple entities

I managed to install FOSElastica in my symfony project, my fos_elsastica.yaml. It works fine with one entity. fos_elastica: clients: default: { host: localhost, port: 9200 } indexes: ...
Nina's user avatar
  • 101
0 votes
2 answers
53 views

How to collect Symfony cache metrics in production?

I am using Symfony 5.4 together with Shopware 6.4 I would like to collect metrics about the cache usage like hits/misses in production. This should be done in a way that doesnt impact production ...
Thomas's user avatar
  • 630
0 votes
1 answer
35 views

Warning: Attempt to read property "type" on null : symfony [closed]

I am new to symfony and i've got this error "Warning: Attempt to read property "type" on null" i don't know how to fix it i 've tried clearing the cache checking the typoes none ...
eremalauda's user avatar
-1 votes
1 answer
15 views

Why maker of symfony will abort command line actions that require user input on a docker project on windows?

I am developing a project with Symfony 6.1 on Windows 11 PC. The project is in a docker container. The problem happens on any execution which requires user input such as: php bin/console make:entity ...
Bahamut0's user avatar
0 votes
2 answers
41 views

Cannot connect to postgres dabase running in docker with my credentials

I am following the symfony book on symfony.com to learn symfony. When I create my symfony project I update my docker-compose.yml like this (values for the db name, password and user are just example): ...
Ondra David's user avatar
0 votes
0 answers
34 views

Symfony 6 Ajax?

I have a project with Symfony 6.3.4, PHP 8.2.9, in development with a SSL certificate locally installed with symfony-cli with Windows 10 and Firefox. In a form, I have to choose a city from a select ...
user3049922's user avatar
0 votes
0 answers
28 views

404 error after deployment of Symfony 6 API

I am currently developing an API using symfony 6 (I am new to this technology). Everything works fine in local environment. However, I tried deploying my API (on my website poly-api.fr) and I get 404 ...
Maxime Antoine's user avatar
0 votes
0 answers
15 views

Login_check route in api platform doesn't work

hello i generate a route to login with api platform and jwt but it doesn't work, i got this error "Unable to find the controller for path "/api/login_check". The route is wrongly ...
Nabil SI-SMAIL's user avatar
-1 votes
3 answers
166 views

What is faster - `findOneBy()` or `countBy()`? [Sf6, Doctrine]

I am using Symfony 6 and Doctrine and I want to check if a specific entry in my database exists. ExampleEntity id field1 field2 I want to check if an entity with field2='test' exists in the database....
Roman's user avatar
  • 2,488

1
2 3 4 5
1473