Skip to content

Commit

Permalink
Merge branch refs/heads/master into feature/scopes
Browse files Browse the repository at this point in the history
  • Loading branch information
spiralbot committed May 30, 2024
1 parent 48d9178 commit 1d47c18
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 deletions.
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
],
"require": {
"php": ">=8.1",
"spiral/boot": "^3.13",
"spiral/core": "^3.13"
"spiral/boot": "^3.14",
"spiral/core": "^3.14"
},
"require-dev": {
"phpunit/phpunit": "^10.1",
Expand All @@ -47,7 +47,7 @@
},
"extra": {
"branch-alias": {
"dev-master": "3.13.x-dev"
"dev-master": "3.14.x-dev"
}
},
"config": {
Expand Down
4 changes: 3 additions & 1 deletion src/AbstractTracer.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

namespace Spiral\Telemetry;

use Spiral\Core\Attribute\Proxy;
use Spiral\Core\Container;
use Spiral\Core\InvokerInterface;
use Spiral\Core\ScopeInterface;
Expand All @@ -16,7 +17,7 @@
abstract class AbstractTracer implements TracerInterface
{
public function __construct(
private readonly ?ScopeInterface $scope = new Container(),
#[Proxy] private readonly ?ScopeInterface $scope = new Container(),
) {
}

Expand All @@ -25,6 +26,7 @@ public function __construct(
*/
final protected function runScope(Span $span, callable $callback): mixed
{
// TODO: Can we remove this scope?
return $this->scope->runScope([
SpanInterface::class => $span,
TracerInterface::class => $this,
Expand Down
3 changes: 2 additions & 1 deletion src/LogTracerFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

use Psr\Log\LoggerInterface;
use Ramsey\Uuid\UuidFactory;
use Spiral\Core\Attribute\Proxy;
use Spiral\Core\ScopeInterface;
use Spiral\Logger\LogsInterface;

Expand All @@ -21,7 +22,7 @@ final class LogTracerFactory implements TracerFactoryInterface
private readonly LoggerInterface $logger;

public function __construct(
private readonly ScopeInterface $scope,
#[Proxy] private readonly ScopeInterface $scope,
private readonly ClockInterface $clock,
LogsInterface $logs,
string $channel = self::LOG_CHANNEL
Expand Down
3 changes: 2 additions & 1 deletion src/NullTracerFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

namespace Spiral\Telemetry;

use Spiral\Core\Attribute\Proxy;
use Spiral\Core\Container;
use Spiral\Core\ScopeInterface;

Expand All @@ -15,7 +16,7 @@
final class NullTracerFactory implements TracerFactoryInterface
{
public function __construct(
private readonly ?ScopeInterface $scope = new Container(),
#[Proxy] private readonly ?ScopeInterface $scope = new Container(),
) {
}

Expand Down

0 comments on commit 1d47c18

Please sign in to comment.