-
-
Notifications
You must be signed in to change notification settings - Fork 2
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: static type fixes #214
Conversation
WalkthroughIn the Changes
Poem
Tip Early access features: enabledWe are currently testing the following features in early access:
Note:
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #214 +/- ##
=========================================
Coverage 98.43% 98.43%
Complexity 74 74
=========================================
Files 15 15
Lines 255 255
=========================================
Hits 251 251
Misses 4 4 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files ignored due to path filters (1)
composer.lock
is excluded by!**/*.lock
Files selected for processing (1)
- src/Config.php (1 hunks)
Additional context used
GitHub Check: mutation-testing (ubuntu-latest, 8.2, locked)
src/Config.php
[warning] 30-30:
Escaped Mutant for Mutator "FalseValue":--- Original
+++ New
@@ @@
private const REQUIRED_FIELDS = ['default', 'debug', 'normalizerRegistrationStrategy', 'encoderRegistrationStrategy', 'metadataLoader'];
public function __construct(
private readonly string $defaultSerializer = 'symfony-json',
private readonly bool $debug = false,
private readonly bool $debug = true, /** @var class-string<NormalizerRegistrationStrategy>|null */ private readonly ?string $normalizerRegistrationStrategy = null, /** @var class-string<EncoderRegistrationStrategy>|null */
GitHub Check: psalm (ubuntu-latest, 8.2, locked)
src/Config.php
[failure] 1-1: UnusedBaselineEntry
src/Config.php:0:0: UnusedBaselineEntry: Baseline for issue "DocblockTypeContradiction" has 2 extra entries. (see https://psalm.dev/316)
[failure] 1-1: UnusedBaselineEntry
src/Config.php:0:0: UnusedBaselineEntry: Baseline for issue "InvalidParamDefault" has 2 extra entries. (see https://psalm.dev/316)
Additional comments not posted (2)
src/Config.php (2)
31-31
: LGTM! The propertynormalizerRegistrationStrategy
is updated to allownull
values.This change aligns with the objective of allowing
null
values and initializing them tonull
.
33-33
: LGTM! The propertyencoderRegistrationStrategy
is updated to allownull
values.This change aligns with the objective of allowing
null
values and initializing them tonull
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files ignored due to path filters (1)
composer.lock
is excluded by!**/*.lock
Files selected for processing (2)
- psalm-baseline.xml (1 hunks)
- src/Config.php (1 hunks)
Additional context used
GitHub Check: mutation-testing (ubuntu-latest, 8.2, locked)
src/Config.php
[warning] 30-30:
Escaped Mutant for Mutator "FalseValue":--- Original
+++ New
@@ @@
private const REQUIRED_FIELDS = ['default', 'debug', 'normalizerRegistrationStrategy', 'encoderRegistrationStrategy', 'metadataLoader'];
public function __construct(
private readonly string $defaultSerializer = 'symfony-json',
private readonly bool $debug = false,
private readonly bool $debug = true, /** @var class-string<NormalizerRegistrationStrategy>|null */ private readonly ?string $normalizerRegistrationStrategy = null, /** @var class-string<EncoderRegistrationStrategy>|null */
Additional comments not posted (6)
src/Config.php (5)
Line range hint
39-57
: LGTM!The code changes are approved.
Tools
GitHub Check: mutation-testing (ubuntu-latest, 8.2, locked)
[warning] 30-30:
Escaped Mutant for Mutator "FalseValue":--- Original
+++ New
@@ @@
private const REQUIRED_FIELDS = ['default', 'debug', 'normalizerRegistrationStrategy', 'encoderRegistrationStrategy', 'metadataLoader'];
public function __construct(
private readonly string $defaultSerializer = 'symfony-json',
private readonly bool $debug = false,
private readonly bool $debug = true, /** @var class-string<NormalizerRegistrationStrategy>|null */ private readonly ?string $normalizerRegistrationStrategy = null, /** @var class-string<EncoderRegistrationStrategy>|null */
Line range hint
67-74
: LGTM!The code changes are approved.
Tools
GitHub Check: mutation-testing (ubuntu-latest, 8.2, locked)
[warning] 30-30:
Escaped Mutant for Mutator "FalseValue":--- Original
+++ New
@@ @@
private const REQUIRED_FIELDS = ['default', 'debug', 'normalizerRegistrationStrategy', 'encoderRegistrationStrategy', 'metadataLoader'];
public function __construct(
private readonly string $defaultSerializer = 'symfony-json',
private readonly bool $debug = false,
private readonly bool $debug = true, /** @var class-string<NormalizerRegistrationStrategy>|null */ private readonly ?string $normalizerRegistrationStrategy = null, /** @var class-string<EncoderRegistrationStrategy>|null */
Line range hint
76-83
: LGTM!The code changes are approved.
Tools
GitHub Check: mutation-testing (ubuntu-latest, 8.2, locked)
[warning] 30-30:
Escaped Mutant for Mutator "FalseValue":--- Original
+++ New
@@ @@
private const REQUIRED_FIELDS = ['default', 'debug', 'normalizerRegistrationStrategy', 'encoderRegistrationStrategy', 'metadataLoader'];
public function __construct(
private readonly string $defaultSerializer = 'symfony-json',
private readonly bool $debug = false,
private readonly bool $debug = true, /** @var class-string<NormalizerRegistrationStrategy>|null */ private readonly ?string $normalizerRegistrationStrategy = null, /** @var class-string<EncoderRegistrationStrategy>|null */
Line range hint
85-92
: LGTM!The code changes are approved.
Tools
GitHub Check: mutation-testing (ubuntu-latest, 8.2, locked)
[warning] 30-30:
Escaped Mutant for Mutator "FalseValue":--- Original
+++ New
@@ @@
private const REQUIRED_FIELDS = ['default', 'debug', 'normalizerRegistrationStrategy', 'encoderRegistrationStrategy', 'metadataLoader'];
public function __construct(
private readonly string $defaultSerializer = 'symfony-json',
private readonly bool $debug = false,
private readonly bool $debug = true, /** @var class-string<NormalizerRegistrationStrategy>|null */ private readonly ?string $normalizerRegistrationStrategy = null, /** @var class-string<EncoderRegistrationStrategy>|null */
31-33
: LGTM! But verify the default value fordebug
.The code changes are approved.
However, ensure that the default value for
debug
is correctly set tofalse
.Verification successful
The default value for
debug
is correctly set tofalse
.The property definition in
src/Config.php
confirms this:
src/Config.php: private readonly bool $debug = false,
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify the default value for `debug`. # Test: Search for the usage of the constructor to ensure the default value for `debug` is correctly set. rg --type php $'new Config'Length of output: 28
Script:
#!/bin/bash # Description: Verify the default value for `debug` in the Config class. # Search for the definition of the `debug` property in the Config class. ast-grep --lang php --pattern '$debug = $_' > debug_property.txt # Output the results to verify the default value for `debug`. cat debug_property.txtLength of output: 177
Script:
#!/bin/bash # Description: Verify the default value for `debug` in the Config class. # Search for the definition of the `debug` property in the Config class. rg --type php 'private $debug' > debug_property.txt # Output the results to verify the default value for `debug`. cat debug_property.txtLength of output: 57
Script:
#!/bin/bash # Description: Verify the default value for `debug` in the Config class. # Search for the definition of the `debug` property in the Config class, including all visibility keywords. rg --type php '\$debug' > debug_property.txt # Output the results to verify the default value for `debug`. cat debug_property.txtLength of output: 198
psalm-baseline.xml (1)
Line range hint
1-155
: LGTM!The changes related to static analysis are approved.
Summary by CodeRabbit
null
values fornormalizerRegistrationStrategy
andencoderRegistrationStrategy
properties.