Skip to content

Commit

Permalink
Merge pull request #21 from win32service/revert-20-issue_17_failed_me…
Browse files Browse the repository at this point in the history
…ssage_never_retried

Revert "issue #17 add code to retry and PHPUnit for tests"
  • Loading branch information
macintoshplus authored Oct 23, 2024
2 parents fbfedf4 + 764337d commit 26ab698
Show file tree
Hide file tree
Showing 28 changed files with 3 additions and 1,062 deletions.
68 changes: 0 additions & 68 deletions .github/workflows/quality.yaml

This file was deleted.

4 changes: 1 addition & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,10 @@
"symfony/dotenv": "^5.4|^6.0",
"symfony/runtime": "^5.4|^6.0",
"symfony/messenger": "^5.4|^6.0",
"symfony/doctrine-messenger": "^5.4|^6.0",
"symfony/monolog-bundle": "^3.10",
"doctrine/doctrine-bundle": "^2.12",
"doctrine/doctrine-migrations-bundle": "^3.3",
"doctrine/orm": "^2.19",
"phpunit/phpunit": "^9.6"
"doctrine/orm": "^2.19"
},
"suggest": {
"ext-win32service": "On Windows only, install this extension to run PHP Service on Windows Service Manager"
Expand Down
39 changes: 0 additions & 39 deletions lib/DependencyInjection/MessengerPass.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Exception\OutOfBoundsException;
use Symfony\Component\DependencyInjection\Reference;
use Win32ServiceBundle\MessengerSubscriber\SendFailedMessageForRetryListener;
use Win32ServiceBundle\MessengerSubscriber\SendFailedMessageToFailureTransportListener;

final class MessengerPass implements CompilerPassInterface
{
Expand All @@ -18,13 +16,6 @@ final class MessengerPass implements CompilerPassInterface
private string $win32ServiceRunnerTag = TagRunnerCompilerPass::WIN32SERVICE_RUNNER_TAG.'.messenger';

public function process(ContainerBuilder $container): void
{
$this->processService($container);
$this->processRetryConfig($container);
$this->processFailledConfig($container);
}

private function processService(ContainerBuilder $container): void
{
$busIds = [];
foreach ($container->findTaggedServiceIds($this->busTag) as $busId => $tags) {
Expand Down Expand Up @@ -60,34 +51,4 @@ private function processService(ContainerBuilder $container): void
}
}
}

private function processFailledConfig(ContainerBuilder $container): void
{
if (
$container->hasDefinition('messenger.failure.send_failed_message_to_failure_transport_listener') === false
|| $container->hasDefinition(SendFailedMessageToFailureTransportListener::class) === false
) {
return;
}

$serviceSF = $container->findDefinition('messenger.failure.send_failed_message_to_failure_transport_listener');

$serviceWin32 = $container->findDefinition(SendFailedMessageToFailureTransportListener::class);
$serviceWin32->replaceArgument('$failureSenders', $serviceSF->getArgument(0));
}

private function processRetryConfig(ContainerBuilder $container): void
{
if (
$container->hasDefinition('messenger.retry.send_failed_message_for_retry_listener') === false
|| $container->hasDefinition(SendFailedMessageForRetryListener::class) === false
) {
return;
}

$serviceSF = $container->findDefinition('messenger.retry.send_failed_message_for_retry_listener');

$serviceWin32 = $container->findDefinition(SendFailedMessageForRetryListener::class);
$serviceWin32->replaceArgument('$sendersLocator', $serviceSF->getArgument(0));
}
}
22 changes: 0 additions & 22 deletions lib/Event/MessengerWorkerStoppedEvent.php

This file was deleted.

31 changes: 0 additions & 31 deletions lib/MessengerSubscriber/AddErrorDetailsStampListener.php

This file was deleted.

43 changes: 0 additions & 43 deletions lib/MessengerSubscriber/ResetServicesListener.php

This file was deleted.

Loading

0 comments on commit 26ab698

Please sign in to comment.