Category "symfony"

Try to use Symfony mailer with Gmail

Try to use Symfony mailer with Gmail on my Symfony 5.1 app. mailer.yaml: framework: mailer: dsn: '%env(MAILER_DSN)%' .env: MAILER_DSN=gmail+smtp://

disable transport fallback when sending emails

I have two transports, one for general emails and the other for noreply emails because of huge number mailer.yml: framework: mailer: transports:

getUser method from Symfony Security can't get my User Repository

My problem is the $this->getUser(); method (called from Controller) from Symfony Security can't get my User Repository. The "App\Model\ODM\Repository\UserRep

Symfony 4.4 Translation Annotations Nelmio ApiDoc

I have a symfony 4.4 project with enabled translations and now I have to find a solution that translations also take effect for swagger annotations. The result

Exception thrown during the rendering of a template("Parameter "id" for route "url" must match "[^/]++" ("" given) to generate a corresponding URL.")

I have a delete button which is created here: _delete_form.html.twig <form method="post" action="{{ path('finals_delete', {'id': final.id}) }}" onsubmit="ret

Symfony 4: how to allow dynamic values for array nodes in bundle configuration?

In the Configuration of my bundle I have defined the following for example: $treeBuilder = new TreeBuilder('foo'); $treeBuilder ->getRootNode() -&

inside a script module, try to import js files with twig asset() (error: myalias.x is not a function)

[ Environment: symfony (PHP), twig files with HTML/JS code, and Managing assets with Webpack ] Files Tree _assets |__js |__file.js |__library |_

how to solve openssl problem on windows 11 pro while working on symfony jwt authentication generating key pair

openssl rsa -pubout -in app/var/jwt/private.pem -out app/var/jwt/public.pem openssl : The term 'openssl' is not recognized as the name of a cmdlet, function, sc

Keep messages when I use the Messenger component with Doctrine

I am using the Messenger component configured with Doctrine to store the messages in a database table. I see that in the default configuration the table "messe

How to translate the Main Menu Labels in Symfony EasyAdmin?

I am building an admin backend with Symfony EasyAdmin 4 and couldn't figure out how to change the main menu's entities' labels. They default to their entities'

Symfony Mercure "Failed to send an update"

I am having an issue sending updates to the Caddy-based Mercure Hub with both the Symfony Mercure\HubInterface and the "pure" PHP example. When attempting to pu

Symfony autowiring issues since docker update

I'm having autowiring issues within symfony since I have updated my Docker to the latest version. I am not entirely sure of the causality here but certainly, my

Why can't I access the response content when the Symfony HTTP Client encounters an error, and an exception is thrown instead?

I want to make a request to retrieve user info from OAUTH server with Symfony HttpClient but I can't fetch fetch the response directly when encountering an erro

Symfony5: Recommended pattern for using DataTransformers within Entities

I am currently trying to make our Symfony project type-safe and thereby refactoring it a bit, because it uses some anti-patterns here and there. My problem is t

How to change locale in Symfony5 / PHPUnit before calling request?

I need to change locale in my functional test: <?php namespace App\Tests\Controller; use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; class Translati

Is there a way to use Foundry Model for Authentification inside Functional Tests?

1) App\Tests\Controller\Admin\Api\Promotion\PromotionDeleteControllerTest::test_deleting_promotion LogicException: The first argument of "Symfony\Bundle\Framewo

Symfony - "framework.test" config is not set to true

Using Symfony 5.2 and PhpUnit last version, I have this error with my functional test LogicException: You cannot create the client used in functional tests if t

Swoole server run failed, "unsupported option [worker_max_concurrency] in @swoole-src"

i successfully install swoole on mac. but when i try to run it from the app dir php bin/console swoole:server:run the console return: Error: Uncaught ErrorExc

Doctrine - The referenced column name 'id' has to be a primary key

Hy, I have problem with validation and schema creation I am creating an api via the api platform, (this is my 1st project under symfony) I have a constraint, th

Symfony 3.4 and MySQl 8. General error: 2006 MySQL server has gone away when running a transaction in a rabbitmq queue

I have one system (Symfony 5, symfony/messenger) sending data to another (Symfony 3.4, enqueue/enqueue-bundle 0.9) using a rabbitmq queue. The data is used to c