Quantcast
Channel: Active questions tagged symfony4 - Stack Overflow
Viewing all 3918 articles
Browse latest View live

Symfony 4 Dotenv escape special characters

$
0
0

I use a password with a special char and symfony return an error "Malformed parameter "url"."

How can i use this kind of password ? foo?bar

I try with variables like that

DATABASE_USER='foo'
DATABASE_PASSWORD='foo?bar'
DATABASE_URL=mysql://${DATABASE_USER}:${DATABASE_PASSWORD}@100.100.100.100:3306/db

But is not working


Symfony 4.4.2 - EventListener with TokenStorageInterface makes debug bar showing "An error occurred while loading the web debug toolbar."

$
0
0

I've just upgraded an app from Symfony 4.3.9 to 4.4.2. After that, I had the debug bar not working and showing "An error occurred while loading the web debug toolbar. " After a long investigation, I found that it's because of an EventListener on security.authentication.failure event that was the cause. Commenting the onAuthenticationFailure method content did nothing and after some investigation it works when removing the TokenStorageInterface from the tags and constructor... But I need it.

Any ideas?

Here's the code :

services.yaml

    App\EventListener\LoginListener:
    arguments: ["@doctrine", "@security.token_storage", "@router", "@event_dispatcher"]
    tags:
        - { name: kernel.event_listener, event: security.authentication.failure, method: onAuthenticationFailure }

LoginListener.php

<?php

namespace App\EventListener;

use App\Entity\AdminUser;
use Doctrine\Bundle\DoctrineBundle\Registry;
use Doctrine\ORM\EntityManager;
use Doctrine\ORM\OptimisticLockException;
use Doctrine\ORM\ORMException;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
use Symfony\Component\Routing\RouterInterface;
use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface;
use Symfony\Component\Security\Core\Event\AuthenticationFailureEvent;

/**
 * Class LoginListener
 * Listens to user log in events (failure, interactive log in) to provide additionnal security measures
 *
 * @package App\EventListener
 */
final class LoginListener
{
    protected $doctrine;
    protected $request;
    protected $tokenStorage;
    protected $router;
    protected $dispatcher;

    /**
     * Login constructor.
     *
     * @param Registry                 $doctrine
     * @param TokenStorageInterface    $tokenStorage
     * @param RouterInterface          $router
     * @param EventDispatcherInterface $dispatcher
     */
    public function __construct(
        Registry $doctrine,
        TokenStorageInterface $tokenStorage,
        RouterInterface $router,
        EventDispatcherInterface $dispatcher
    ) {
        $this->doctrine = $doctrine;
        $this->tokenStorage = $tokenStorage;
        $this->router = $router;
        $this->dispatcher = $dispatcher;
    }

    /**
     * @param AuthenticationFailureEvent $event
     * @throws ORMException
     * @throws OptimisticLockException
     */
    public function onAuthenticationFailure(AuthenticationFailureEvent $event)
    {
        /** @var EntityManager $em */
        $em = $this->doctrine->getManager();
        $username = $event->getAuthenticationToken()->getUsername();
        /** @var AdminUser $user */
        $user = $em->getRepository(AdminUser::class)->findOneBy(['username' => $username]);
        if ($user instanceof AdminUser) {
            $user->addFailedLogin();
            if ($user->getFailedLogin() == 5) {
                $user->setLocked(1);
            }
            $em->persist($user);
            $em->flush();
        }
    }
}

Thanks :)

---EDIT--- In fact that listener was an edit from another one. It doesn't need the TokenStorage but I'll have the problem in that one in a near future then :

<?php

namespace App\XXXBundle\EventListener;

use App\XXXBundle\Entity\AdminUser;
use Doctrine\Bundle\DoctrineBundle\Registry;
use Doctrine\ORM\EntityManager;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
use Symfony\Component\HttpKernel\Event\FilterResponseEvent;
use Symfony\Component\HttpKernel\Event\ResponseEvent;
use Symfony\Component\HttpKernel\KernelEvents;
use Symfony\Component\Routing\RouterInterface;
use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorage;
use Symfony\Component\Security\Core\Event\AuthenticationFailureEvent;
use Symfony\Component\Security\Core\Exception\CustomUserMessageAuthenticationException;
use Symfony\Component\Security\Core\User\AdvancedUserInterface;
use Symfony\Component\Security\Http\Event\InteractiveLoginEvent;

/**
 * Class Login
 * Listens to user log in events (failure, interactive log in) to provide additionnal security measures
 *
 * @package App\XXXBundle\EventListener
 */
class Login
{
    protected $doctrine;
    protected $request;
    protected $tokenStorage;
    protected $router;
    protected $dispatcher;

    /**
     * Login constructor.
     *
     * @param Registry                 $doctrine
     * @param TokenStorage             $tokenStorage
     * @param RouterInterface          $router
     * @param EventDispatcherInterface $dispatcher
     */
    public function __construct(
        Registry $doctrine,
        TokenStorage $tokenStorage,
        RouterInterface $router,
        EventDispatcherInterface $dispatcher
    ) {
        $this->doctrine = $doctrine;
        $this->tokenStorage = $tokenStorage;
        $this->router = $router;
        $this->dispatcher = $dispatcher;
    }

    /**
     * @param AuthenticationFailureEvent $event
     * @throws \Doctrine\ORM\ORMException
     * @throws \Doctrine\ORM\OptimisticLockException
     */
    public function onAuthenticationFailure(AuthenticationFailureEvent $event)
    {
        /** @var EntityManager $em */
        $em = $this->doctrine->getManager();
        $userName = $event->getAuthenticationToken()->getUsername();
        /** @var AdminUser $user */
        $user = $em->getRepository(AdminUser::class)->findOneByUsername($userName);
        if ($user instanceof AdvancedUserInterface) {
            $user->addFailedLogin();
            if ($user->getFailedLogin() == 5) {
                $user->setLocked(1);
            }
            $em->persist($user);
            $em->flush();
        }
    }

    /**
     * @param InteractiveLoginEvent $event
     * @throws \Exception
     */
    public function onInteractiveLogin(InteractiveLoginEvent $event)
    {
        $user = $event->getAuthenticationToken()->getUser();
        if ($user instanceof AdvancedUserInterface) {
            $em = $this->doctrine->getManager();
            if ($user->getLocked()) {
                $this->tokenStorage->setToken(null);
                throw new CustomUserMessageAuthenticationException('Compte verrouillé.');
            }
            if ($user->getExpiresAt() && $user->getExpiresAt() <= new \DateTime()) {
                $user->setIsActive(0);
                $em->persist($user);
                $em->flush();
                $this->tokenStorage->setToken(null);
                throw new CustomUserMessageAuthenticationException('Compte expiré.');
            }
            if ($user->getCredentialsExpireAt() && $user->getCredentialsExpireAt() <= new \DateTime()) {
                $this->dispatcher->addListener(KernelEvents::RESPONSE, [$this, 'redirectToCredentialsChange']);
            }
            $user->setLastLogin(new \DateTime());
            $user->setFailedLogin(0);
            $em->persist($user);
            $em->flush();
        }

    }

    public function redirectToCredentialsChange(ResponseEvent $event)
    {
        $event->getResponse()->headers->set('Location', $this->router->generate('admin_security_changecredentials'));
    }
}

URL for the named route "lightsaml.login_check"

$
0
0

I try a login my application Symfony 4.3 with AzureAD. I have following the Getting Started(https://www.lightsaml.com/SP-Bundle/Getting-started/) but he doesn't work !

He show me this error Unable to generate a URL for the named route "lightsaml.login_check"

I don't know how fix this !

Someone can help me please :/

Use two entitymanagers does not work with repository

$
0
0

I'm using two Entitymanagers to work with two databases. The problem is that I can't set the correct entitymanager for my repository(it uses the default entitymanager). When I persist the entity to the database, it works fine (with the wp entitymanager) . How can I use the wp entitymanager?

The problem is similar to this one. The solution didn't work

Use different Entity Manager in the Repository of specific Entity objects

doctrine.yaml

    orm:
        default_entity_manager: default
        auto_generate_proxy_classes: true
        entity_managers:
            default:
                connection: default
                naming_strategy: doctrine.orm.naming_strategy.underscore
                auto_mapping: true
                mappings:
                    App:
                        is_bundle: false
                        type: annotation
                        dir: '%kernel.project_dir%/src/Entity'
                        prefix: 'App\Entity'
                        alias: App
            wp:
                naming_strategy: doctrine.orm.naming_strategy.underscore
                connection: wp
                mappings:
                    Appwp:
                        is_bundle: false
                        type: annotation
                        dir: '%kernel.project_dir%/src/Entitywp'
                        prefix: 'App\Entitywp'
                        alias: Appwp

EventListener

class CustomSessionListener
{
    function __construct(Security $security,ManagerRegistry $em,WpSessionTableRepository $sessionTableRepository) {

        $this->security = $security;
        $this->em = $em;
        $this->sessionTableRepository = $sessionTableRepository;
    }


    public function onKernelController(ControllerEvent $event)
    {
        $user = $this->security->getUser();
        $manager=$this->em->getManager("wp");
        $repository=$manager->getRepository(WpSessionTable::class,"wp");

            if(!is_null($user)){//TODO){
                $sessionTableObj=new WpSessionTable();
                $sessionTableObj=$repository->findByEmail($user->getEmail());



...

How to get query string in Symfony 4

$
0
0

I am trying to access the query string parameters in Symfony 4

namespace App\Controller;

use Symfony\Component\HttpFoundation\RequestStack;

class Home extends Controller {

    private $request;

    public function __construct(RequestStack $request){

        $this->request = $request;
    }

    public function getQueryString(){

       $req = $this->request->getCurrentRequest();

       print_r($req); // see all the request data

       // $req -> grab the query parameters
       // return query parameters
    }
}

I am using RequestStack and able to see a bunch of request data when I print the result of getCurrentRequest() (including the query parameters I need), but most of the methods are private and I am not able to access them.

How does one go about getting the request URL components (including query parameters) in Symfony?

var from service.yaml return null

$
0
0

I have a problem with the services.yaml and a service in Symfony 4. I have define a cookie generator ( based on https://www.grafikart.fr/tutoriels/symfony-mercure-1151 if you know) that is construct with an argument given by the services.yaml. when I dump my var in the __construct() to check the value there is no probleme, but when I dump it from a function, it returns a null value...

My .env

MERCURE_JWT_KEY=aVerySecretKey

Here my services.yaml :

services:
    App\Service\MercureCookieGenerator:
        arguments:
            $secret: '%env(MERCURE_JWT_KEY)%'

And my service

<?php
// src/Service/MercureCookieGenerator.php

namespace App\Service;

use App\Entity\User;
use Lcobucci\JWT\Builder;
use Lcobucci\JWT\Signer\Hmac\Sha384;

class MercureCookieGenerator
{
    private $secret;

    public function __construct($secret) {
        $this->$secret = $secret;
        // return aVerySecretKey
        dump($this->secret);
    }

    public function generate(User $user)
    {
        $id = $user->getId();
        // return null
        dump($this->secret);
        $token = (new Builder())
            ->set('mercure', ['subscribe' => ["http://mysite.fr/user/{$id}"]])
            ->sign(new Sha384(), $this->secret)

            ->getToken();
        return "mercureAuthorization={$token}; Path=/.well-known/mercure; HttpOnly;";
    }
}

Have you any idea ?

PS : I find this topic but I don't need if it's related : Symfony 4 - How tu use service.yaml parameter from within Entity

Symfony 4: Connect to database manually / Create a dynamic entity manager

$
0
0

I'm working on a Symfony 4 Web Project, and I have a database for every Client, so, in every request I have to connect to a database based on client id.

How to use doctrine to connect to a database manually ?

MyController:

/**
 * @Route("/api/log", name="log", methods={"GET"})
 */
public function log(Request $request)
{
    $this->denyAccessUnlessGranted(['ROLE_CLIENT','ROLE_ADMIN']);
    $clientId = $request->query->get('client_id');

    $dbName = 'project_'.$clientId;            

    //I have database credentials: $host,$port,$username,$password & $dbName:


    $this->getDoctrine()->........

Attempted to load class "DoctrineCacheBundle" from namespace "Doctrine\Bundle\DoctrineCacheBundle"

$
0
0

Can anyone help me guys? Every time i'm gonna run the php bin/console server:run command this error occurs:

PHP Fatal error: Uncaught Symfony\Component\Debug\Exception\ClassNotFoundException: Attempted to load class "DoctrineCacheBundle" from namespace "Doctrine\Bundle\DoctrineCacheBundle". Did you forget a "use" statement for another namespace? in C:\Users\XX-2\Desktop\React Projects\test_project\src\Kernel.php:23 Stack trace:

0 C:\Users\XX-2\Desktop\React Projects\test_project\vendor\symfony\http-kernel\Kernel.php(429): App\Kernel->registerBundles()

1 C:\Users\XX-2\Desktop\React Projects\test_project\vendor\symfony\http-kernel\Kernel.php(130): Symfony\Component\HttpKernel\Kernel->initializeBundles()

2 C:\Users\XX-2\Desktop\React Projects\test_project\vendor\symfony\framework-bundle\Console\Application.php(159): Symfony\Component\HttpKernel\Kernel->boot()

3 C:\Users\XX-2\Desktop\React Projects\test_project\vendor\symfony\framework-bundle\Console\Application.php(65): Symfony\Bundle\FrameworkBundle\Console\Application->registerCommands()

4 C:\Users\XX-2\Desktop\React Projects\test_project\vendor\symfony\consol in C:\Users\XX-2\Desktop\React Projects\test_project\src\Kernel.php on line 23

Fatal error: Uncaught Symfony\Component\Debug\Exception\ClassNotFoundException: Attempted to load class "DoctrineCacheBundle" from namespace "Doctrine\Bundle\DoctrineCacheBundle". Did you forget a "use" statement for another namespace? in C:\Users\XX-2\Desktop\React Projects\test_project\src\Kernel.php:23 Stack trace:

0 C:\Users\XX-2\Desktop\React Projects\test_project\vendor\symfony\http-kernel\Kernel.php(429): App\Kernel->registerBundles()

1 C:\Users\XX-2\Desktop\React Projects\test_project\vendor\symfony\http-kernel\Kernel.php(130): Symfony\Component\HttpKernel\Kernel->initializeBundles()

2 C:\Users\XX-2\Desktop\React Projects\test_project\vendor\symfony\framework-bundle\Console\Application.php(159): Symfony\Component\HttpKernel\Kernel->boot()

3 C:\Users\XX-2\Desktop\React Projects\test_project\vendor\symfony\framework-bundle\Console\Application.php(65): Symfony\Bundle\FrameworkBundle\Console\Application->registerCommands()

4 C:\Users\XX-2\Desktop\React Projects\test_project\vendor\symfony\consol in C:\Users\XX-2\Desktop\React Projects\test_project\src\Kernel.php on line 23


Changing page content to modal window [closed]

$
0
0

I am developping en App with Symfony 4 and now I want to turn a page into a modal window. Do you think it is possible? How can I do it if it is possible?

Thank you!

How exclude deprecations Log on Symfony 4.4

$
0
0

I have migrate an application from Symfony 3.4 to Symfony 4.4. I have a lot of deprecations message for each request/ Sf command (i can't fix deprecations). How can i exclude deprecations log from monolog for this symfony App ?

Thx for help,

How to configure certain parameters of the site in the admin? [closed]

$
0
0

I am creating a site with symfony 4, I'm working on the admin of my site and I have a question,

There are several things that must be configurable in the admin:

1 - currently I have 2 ways to check a candidate when he registers (either by email or by phone), I would like the super-admin to be able to choose the verification mode.

2 - For each form on the site I would like the super-admin to be able to choose the fields that appear.

It is the first site I have created and I have no idea how to do what I want, I don't know what to look for on the internet, could you guide me on what to do please ?

Best practice for embedded documents with Doctrine MongoDB and Symfony API Platform

$
0
0

We are prototyping some things with Doctrine MongoDB on Symfony API Platform. The goal of this prototype is to get a good understanding of these technologies and avoid debt/smells, unfortunately, I cannot find much in the way of best practices with these technologies. While the initial CRUD UI created by the API Platform and the resulting Swagger UI is nice, we have concerns with the best practice for handling embedded documents.

Say, for instance, we have a Project Document, and an Embedded Documented called Tasks. In this example, "tasks" is an embed-many.

{
  "id": "objectId",
  "name": "string",
  "tasks": [
    {
      "id": "objectId",
      "name": "string"
    }
  ]
}

With this scenario, it makes sense to me, to only expose the Project Document as an API endpoint. However, how would you handle the embedded Task document?

In my tests, an HTTP patch made to Project simply overwrites the entire tasks array. It seems there is no way to handle pushing a Task into the embed-many structure.

So either I am doing something wrong or I am misunderstanding how to organize this and relying to much on CRUD magic. Is the better approach here to create custom endpoints for Task that accepts a Project.id (and Task.id as needed) as an argument with options CRUD each task with POST, PUT, PATCH, and DELETE?

Symfony : best method to translate data from database

$
0
0

I have an impediment to use translated data getting from database, to understand more my issue I have a dynamic data (database) and I want to translate it. but it's very hard to use the symfony translation.

So, I think for a solution to add new columns to the table, and get the column language by the location language.

for example :

EN_NAME | FR_NAME |
-------------------
  test  | examiner|
-------------------

but this solution is very hard, because you need to add new column for any new language. So is this the only one solution or is there any other solution can improve and optimise the code ?

Symfony flash messages are not shown on RedirectResponse

$
0
0

In my application flash messages are not shown on RedirectResponse to referer page.

Controller:

...  
$referer = $request->headers->get('referer');
$response = new RedirectResponse($referer);

return $response;

Twig in layout:

...
    <div id="flash-messages" class="d-none">
        {% for label, messages in app.flashes %}
            {% for message in messages %}
                <div class="flash-message" data-label="{{ label }}">{{ message|raw }}</div>
            {% endfor %}
        {% endfor %}
    </div>
...

The flash messages are not shown on redirect. I figured out, that they are shown, if I check "Disable Cache" in Chromes Dev Tools! Is this a caching problem?

Environment: Symfony 4.4, PHP 7.3.8, MAMP

Symfony 4.4 Mailer Timeout

$
0
0

I'm using Mailer component for send email in Symfony and set env variables for MAILER_DSN

 MAILER_USERNAME=mailer@example.con
 MAILER_PASSWORD=**************
 MAILER_DSN=smtp://$MAILER_USERNAME:$MAILER_PASSWORD@mail.example.com:465

the emails was send but throw error for timeout:

request.CRITICAL: Uncaught PHP Exception Symfony\Component\Mailer\Exception\TransportException: "Connection to "ssl://mail.example.com:465" timed out." at path/path/vendor/symfony/mailer/Transport/Smtp/Stream/AbstractStream.php line 81 {"exception":"[object] (Symfony\Component\Mailer\Exception\TransportException(code: 0): Connection to \"ssl://mail.grandsocial.net:465\" timed out. at path/path/vendor/symfony/mailer/Transport/Smtp/Stream/AbstractStream.php:81)"} []


Dynamic host in axios

$
0
0

How can I create a dynamic host in axios?

Example:

 const host = location.hostname;
 // axios.defaults.baseURL = 'http://hastore.local';
 axios.defaults.baseURL = host;
 axios.defaults.port = 8080;
 axios.get('api/categories')
 .then((res) => {
      this.categories = res.data;
      console.log(res);
 })
 .catch((err) => {
      console.warn('error during http call', err);
 });

String axios.defaults.baseURL = 'http://hastore.local'; does not fit, because on prodaction don't be work.

String const host = location.hostname; also not a solution, because I get incorrect port and dublicate host.

enter image description here

The goal is to get the right host depending on the environment. I read a lot of articles about this, but I did not find a solution. Thanks for help!

  • axios version: e.g.: v0.16.2
  • Environment: e.g.: node v8.9.4, chrome 64.0.3282.119, Ubuntu 16.04
  • Symfony 4.0.4
  • Vue.js 2.4.2
  • vue-axios 2.0.2

ODBC Driver 17 unable to establish connection to MSSQL 2008 R2

$
0
0

I'm having an issue concerning my Debian 9 server on Apache2, php7.3, ODBC Driver 17, sqlsrv (7.3). I can't connect it to my Microsoft SQL Server 2008 R2 running on a Windows Server 2003 R2.

I tried using

isql -v -k "DRIVER={ODBC Driver 17 For SQL Server};Server=SRV-WINDOS\MSSQLSERVER2008;UID=MyUser;PWD=MyPWD;Database=DB

on the Debian Server. Outputs:

[08001][unixODBC][Microsoft][ODBC Driver 17 for SQL Server]TCP Provider: Error code 0x2746
[08001][unixODBC][Microsoft][ODBC Driver 17 for SQL Server]Client unable to establish connection
[ISQL]ERROR: Could not SQLConnect

The SQL server seems correctly set-up as I can connect to it with the same Symfony project on my local machine (Windows 10 running Wamp - apache2, php7.2.18, symfony4, doctrine and the sqlsrv extensions).

I also tried using the ODBC Driver 13 but I'm having issues with it,

[01000][unixODBC][Driver Manager]Can't open lib '/opt/microsoft/msodbcsql/lib64/libmsodbcsql-13.1.so.9.2' : file not found

since it seems like ODBC Driver 13 and lower are not supported on Debian 9`)

ODBC Driver 17 should enable me to establish a connection to my MSSQLSERVER 2008 R2 right ?

N.B: The Debian 9 server can indeed ping and resolves the domain of the MSSQLSERVER 2008 so it's not a networking issue.

How to allow the super-admin to select the fields he wants for each form? [closed]

$
0
0

I am creating a site with symfony 4,

I'm working on the admin of my site and I have a question,

I have created a full generic form that I use many times on my site and I would like the super-admin to be able to choose the fields for each form, according to his needs.

How can i do that ?

API Symfony 4 / Reactjs / Paybox - submit a form from back side and send its redirection to front side for payment

$
0
0

i'm trying to make a payment with paybox and I want to do all this in back side (Api Symfony). The paybox documentation give us an example to implement the payment here http://www1.paybox.com/espace-integrateur-documentation/la-solution-paybox-system/appel-page-paiement/

I want to click on a "Pay" button in reactjs which call my api route (symfony), in which i render my paybox view with paybox data and i want to submit my form directly to redirect to paybox platform for payment but i don't receive a redirection response but the html content page.

My Paybox controller :

public function paybox(int $agreementId, Request $request)
    {
        $user = $this->getUser();
        $agreement = $this->agreementService->findUserAgreementByAgreementId($user->getId(), $agreementId);

        $paybox = $this->payboxService->getPayboxData($agreement);

        return $this->render('paybox/paybox.html.twig', [
           'paybox' => $paybox
        ]);
}

My paybox.html.twig :

<html>
    <body onload="document.payboxForm.submit()">
        <form action="{{ paybox_url }}" name="payboxForm">
            <input type="hidden" name="PBX_SITE"        value="{{ paybox.PBX_SITE }}">
            <input type="hidden" name="PBX_RANG"        value="{{ paybox.PBX_RANG }}">
            <input type="hidden" name="PBX_IDENTIFIANT" value="{{ paybox.PBX_IDENTIFIANT }}">
            <input type="hidden" name="PBX_TOTAL"       value="{{ paybox.PBX_TOTAL }}">
            <input type="hidden" name="PBX_DEVISE"      value="{{ paybox.PBX_DEVISE }}">
            <input type="hidden" name="PBX_CMD"         value="{{ paybox.PBX_CMD }}">
            <input type="hidden" name="PBX_PORTEUR"     value="{{ paybox.PBX_PORTEUR }}">
            <input type="hidden" name="PBX_RETOUR"      value="{{ paybox.PBX_RETOUR }}">
            <input type="hidden" name="PBX_HASH"        value="{{ paybox.PBX_HASH }}">
            <input type="hidden" name="PBX_TIME"        value="{{ paybox.PBX_TIME }}">
            <input type="hidden" name="PBX_HMAC"        value="{{ paybox.PBX_HMAC }}">
            <input type="hidden" name="PBX_EFFECTUE"    value="{{ paybox.PBX_EFFECTUE }}">
            <input type="hidden" name="PBX_REFUSE"      value="{{ paybox.PBX_REFUSE }}">
            <input type="hidden" name="PBX_ANNULE"      value="{{ paybox.PBX_ANNULE }}">
            <input type="submit" value="Payer">
        </form>
    </body>
</html>

I want to send the redirection to my reactjs app when clicking the 'Pay' button. And redirect the front page to the paybox platform. But all the mecanism is done in back side.

Custom exception from Messenger handler

$
0
0

I try Symfony 4.3.0-dev version to get some new features from Messenger component. My command bus works in sync mode.

Before upgrading I could easily throw my custom exception ConflictException from handler. But for 4.3.0-dev I get a Symfony\Component\Messenger\Exception\HandlerFailedException.

How can I catch my custom exception again?

Viewing all 3918 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>