Skip to content

Commit

Permalink
Allow symfony/contract 3.* & psr/container 2.* (#48)
Browse files Browse the repository at this point in the history
  • Loading branch information
benji07 authored May 10, 2023
1 parent e6b8cd1 commit b317327
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 10 deletions.
10 changes: 5 additions & 5 deletions Listener/ConsoleEventsSubscriber.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,18 +60,18 @@ public function onTerminate(ConsoleTerminateEvent $event): void
);
}
$this->eventDispatcher->dispatch(
ConsoleTerminateMonitoringEvent::fromFacade(
ConsoleMonitoringEventFacade::fromEvent($event, $this->startTime)
)
ConsoleTerminateMonitoringEvent::fromFacade(
ConsoleMonitoringEventFacade::fromEvent($event, $this->startTime)
)
);
}

public function onException(ConsoleEvent $event): void
{
$this->eventDispatcher->dispatch(
ConsoleExceptionMonitoringEvent::fromFacade(
ConsoleMonitoringEventFacade::fromEvent($event, $this->startTime)
)
ConsoleMonitoringEventFacade::fromEvent($event, $this->startTime)
)
);
}
}
2 changes: 1 addition & 1 deletion Listener/EventListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public function handleEvent($event, string $eventName): void
// In a few cases, we need to handle events without metrics.
// Those events are mainly "flush events", used to send immediately the queued metrics.
$this->metricHandler->addMetricToQueue(
(new Metric($event, $metricConfig))
new Metric($event, $metricConfig)
);
}
// We ask for the metric handler to try to send the message
Expand Down
2 changes: 1 addition & 1 deletion Metric/Metric.php
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ public function getResolvedTags(array $resolvers = []): array
// Add global parameters (configured in client or group)
foreach (array_merge($this->configurationTags, $this->tags) as $tagName => $tagValue) {
$resolvedTag = $this->resolveTagValue(
// By default (~), we look for the parameter with the same name as the tag.
// By default (~), we look for the parameter with the same name as the tag.
!is_null($tagValue) ? $tagValue : self::TAG_PARAMETER_KEY.$tagName,
$resolvers
);
Expand Down
5 changes: 2 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
},
"require": {
"php": "^7.2|^8.0",
"psr/container": "^1.0",
"psr/container": "^1.0 || ^2.0",
"psr/event-dispatcher": "^1.0",
"symfony/contracts": "^1.1 || ^2.0",
"symfony/contracts": "^1.1 || ^2.0 || ^3.0",
"symfony/expression-language": "^4.4 || ^5.0 || ^6.0",
"symfony/framework-bundle": "^4.4 || ^5.0 || ^6.0",
"symfony/property-access": "^4.4 || ^5.0 || ^6.0",
Expand All @@ -30,7 +30,6 @@
"m6web/php-cs-fixer-config": "^2.0",
"phpstan/phpstan": "0.12.*",
"phpstan/phpstan-phpunit": "0.12.*",
"sensiolabs/security-checker": "6.0.*",
"symfony/phpunit-bridge": "5.1 || ^6.0"
},
"suggest": {
Expand Down

0 comments on commit b317327

Please sign in to comment.