Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(deps): update php minors #115

Merged
merged 3 commits into from
Jul 7, 2023
Merged

chore(deps): update php minors #115

merged 3 commits into from
Jul 7, 2023

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Jun 25, 2023

Mend Renovate

This PR contains the following updates:

Package Type Update Change
cyclonedx/cyclonedx-php-composer require-dev minor 4.0.2 -> 4.1.0
sentry/sentry (source) require-dev minor 3.19.1 -> 3.20.1
vimeo/psalm require-dev minor 5.12.0 -> 5.13.1

Release Notes

CycloneDX/cyclonedx-php-composer (cyclonedx/cyclonedx-php-composer)

v4.1.0

Compare Source

Added support for CycloneDX Specification-1.5.

  • Changed
    • This tool supports CycloneDX Specification-1.5 now (#​380 via #​383)
  • Added
    • CLI switch --spec-version now supports value 1.5 to reflect CycloneDX Specification-1.5 (#​380 via #​383)
      Default value for that switch is unchanged - still 1.4.
  • Dependencies
    • Requires cyclonedx/cyclonedx-library:^2.3, was :^2.1 (#​380 via #​383)
getsentry/sentry-php (sentry/sentry)

v3.20.1

Compare Source

The Sentry SDK team is happy to announce the immediate availability of Sentry PHP SDK v3.20.1.

Bug Fixes
  • Use the result of isTracingEnabled() to determine the behaviour of getBaggage() and getTraceparent() (#​1555)
Misc
  • Always return a TransactionContext from continueTrace() (#​1556)

v3.20.0

Compare Source

The Sentry SDK team is happy to announce the immediate availability of Sentry PHP SDK v3.20.0.

Features
  • Tracing without Performance (#​1516)

    You can now set up distributed tracing without the need to use the performance APIs.
    This allows you to connect your errors that hail from other Sentry instrumented applications to errors in your PHP application.

    To continue a trace, fetch the incoming Sentry tracing headers and call \Sentry\continueTrace() as early as possible in the request cycle.

    $sentryTraceHeader = $request->getHeaderLine('sentry-trace');
    $baggageHeader = $request->getHeaderLine('baggage');
    
    continueTrace($sentryTraceHeader, $baggageHeader);

    To continue a trace outward, you may attach the Sentry tracing headers to any HTTP client request.
    You can fetch the required header values by calling \Sentry\getBaggage() and \Sentry\getTraceparent().

  • Upserting Cron Monitors (#​1511)

    You can now create and update your Cron Monitors programmatically with code.
    Read more about this in our docs.

vimeo/psalm (vimeo/psalm)

v5.13.1

Compare Source

What's Changed

Fixes
Docs

Full Changelog: vimeo/psalm@5.13.0...5.13.1

v5.13.0

Compare Source

What's Changed

Features
Fixes
Docs
Internal changes
Typos

New Contributors

Full Changelog: vimeo/psalm@5.12.0...5.13.0


Configuration

📅 Schedule: Branch creation - "on sunday" (UTC), Automerge - At any time (no schedule defined).

🚦 Automerge: Enabled.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

👻 Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Mend Renovate. View repository job log here.

@renovate renovate bot enabled auto-merge (rebase) June 25, 2023 02:13
@renovate renovate bot requested review from a team June 25, 2023 03:29
@renovate renovate bot changed the title chore(deps): update dependency sentry/sentry to v3.20.0 chore(deps): update php minors Jun 26, 2023
@renovate renovate bot force-pushed the renovate/php-minors branch 3 times, most recently from e793f4d to 723fd13 Compare June 27, 2023 19:10
@GTony
Copy link
Contributor

GTony commented Jul 5, 2023

J'aime vraiment pas la solution, c'est pas beau de polluer le code avec de la logique de test.

Mais, la seule autre facon que je vois de corriger ca c'est de sortir la logique du writer pour pouvoir faire un mock de Scope, mais ca brise le pattern qui existe avec les autres writer.

Explication du changement:
Avec Sentry 3.20.x Scope un constructeur. Si on passe rien, ca génere du data. Ca cause un erreur dans le expect des tests qui s'attend a avoir 2 objet scope similaire, mais le sous-objet auto-généré dans le constructeur n'est pas le meme.

@renovate
Copy link
Contributor Author

renovate bot commented Jul 5, 2023

Edited/Blocked Notification

Renovate will not automatically rebase this PR, because it does not recognize the last commit author and assumes somebody else may have edited the PR.

You can manually request rebase by checking the rebase/retry box above.

Warning: custom changes will be lost.

Copy link

@Christian-Arcand Christian-Arcand left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Je pense que tu pourrais simplement te faire un décorateur de la classe Sentry pour les tests qui set les scopes et qui rapelle ensuite les méthodes originales sans affecter la classe Sentry. Faudrait juste mettre la méthode getSentryScope protected pour l'overrider dans le décorateur.

`class SentryWithScopeDecorator extends Sentry
{
const SPAN_ID = "3d1bf6350d09fb80";
const TRACE_ID = "141bb800f59d073b7a075b1eed7d5372";

public function __construct(private Sentry $original)
{}

public function log($level, $message, array $context = [])
{
    $this->original->log($level, $message, $context);
}

protected function getSentryScope($level, $context): Scope
{
    $scope = new Scope();
    $scope->setLevel($level);
    $this->setPropagationContext($scope);

    if (count($context)) {
        $scope->setExtras($context);
    }

    return $scope;
}

private function setPropagationContext(Scope $scope): void
{
    $propagationContext = PropagationContext::fromDefaults();
    $propagationContext->setSpanId(new SpanId(self::SPAN_ID));
    $propagationContext->setTraceId(new TraceId(self::TRACE_ID));

    $scope->setPropagationContext($propagationContext);
}

}
`

@jbreton
Copy link
Contributor

jbreton commented Jul 5, 2023

J'aime la solution de Christian. Peut-être que la solution serait d'avoir un check moins stricte sur le contexte qui ne touche pas ce que Sentry injecte lui même ?

@etremblay
Copy link
Contributor

On pourrait aussi injecter une factory de Scope et ça va comparer juste des mock

@GTony
Copy link
Contributor

GTony commented Jul 7, 2023

Je pense que tu pourrais simplement te faire un décorateur de la classe Sentry pour les tests qui set les scopes et qui rapelle ensuite les méthodes originales sans affecter la classe Sentry. Faudrait juste mettre la méthode getSentryScope protected pour l'overrider dans le décorateur.

Très bon point, je l'avais oublié celle là.

@renovate renovate bot merged commit 3ee5191 into master Jul 7, 2023
@renovate renovate bot deleted the renovate/php-minors branch July 7, 2023 11:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants