<commit_before><?php

declare(strict_types=1);

/*
 * Copyright (c) the Contributors as noted in the AUTHORS file.
 *
 * This file is part of the Park-Manager project.
 *
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 */

namespace Symfony\Component\DependencyInjection\Loader\Configurator;

use ParkManager\Module\CoreModule\Infrastructure\Messenger\Middleware\SecurityMiddleware;

return function (ContainerConfigurator $c) {
    $di = $c->services()->defaults()
        ->autowire()
        ->private();

    $di->set('messenger.middleware.security', SecurityMiddleware::class)
        ->args([ref('security.authorization_checker')])
        ->abstract();

    $applicationDir = __DIR__ . '/../../../../Application/';
    $di->load('ParkManager\Module\CoreModule\Application\Command\\', $applicationDir . 'Command/**/*Handler.php')
        ->exclude(__DIR__ . '/../../../../Application/Command/Client/{RequestEmailAddressChangeHandler}.php')
        ->tag('messenger.bus', ['bus' => 'park_manager.command_bus']);

    $di->load('ParkManager\Module\CoreModule\Application\Query\\', $applicationDir . 'Query/**/*Handler.php')
        ->tag('messenger.bus', ['bus' => 'park_manager.query_bus']);
};
<commit_msg>[Core] Fix wrong tag for messenger handlers<commit_after><?php

declare(strict_types=1);

/*
 * Copyright (c) the Contributors as noted in the AUTHORS file.
 *
 * This file is part of the Park-Manager project.
 *
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 */

namespace Symfony\Component\DependencyInjection\Loader\Configurator;

use ParkManager\Module\CoreModule\Infrastructure\Messenger\Middleware\SecurityMiddleware;

return function (ContainerConfigurator $c) {
    $di = $c->services()->defaults()
        ->autowire()
        ->private();

    $di->set('messenger.middleware.security', SecurityMiddleware::class)
        ->args([ref('security.authorization_checker')])
        ->abstract();

    $applicationDir = __DIR__ . '/../../../../Application/';
    $di->load('ParkManager\Module\CoreModule\Application\Command\\', $applicationDir . 'Command/**/*Handler.php')
        ->exclude(__DIR__ . '/../../../../Application/Command/Client/{RequestEmailAddressChangeHandler}.php')
        ->tag('messenger.message_handler', ['bus' => 'park_manager.command_bus']);

    $di->load('ParkManager\Module\CoreModule\Application\Query\\', $applicationDir . 'Query/**/*Handler.php')
        ->tag('messenger.message_handler', ['bus' => 'park_manager.query_bus']);
};

{'fraction_non_alphanumeric': 0.16929698708751795, 'fraction_numerical': 0.003586800573888092, 'mean_word_length': 3.656093489148581, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 31, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6746306', 'n_tokens_mistral': 821, 'n_tokens_neox': 795, 'n_words': 180}