Conversation
| Q | A |-----------------|----- | Branch? | 2.1 | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | no<!-- don't forget to update the UPGRADE-*.md file --> | Related tickets | after #18650 | License | MIT <!-- - Bug fixes must be submitted against the 1.14 or 2.1 branch - Features and deprecations must be submitted against the 2.2 branch - Make sure that the correct base branch is set To be sure you are not breaking any Backward Compatibilities, check the documentation: https://docs.sylius.com/en/latest/book/organization/backward-compatibility-promise.html -->
This PR has been generated automatically. For more details see [refactor.yaml](/Sylius/Sylius/blob/2.1/.github/workflows/refactor.yaml).
WalkthroughUpdates telemetry documentation, adds cache management constants, refactors global constant qualification in namespaced context, reorders type hints for consistency (float|int instead of int|float), and applies minor formatting cleanup across telemetry bundle files and tests. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes
Suggested labels
Suggested reviewers
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
❌ Preview Environment deleted from BunnyshellAvailable commands:
|
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (2)
UPGRADE-2.1.md (1)
3-52: Comprehensive telemetry documentation!The new Telemetry section clearly explains:
- What anonymous data is collected and why
- Privacy safeguards (no sensitive data)
- Configuration options for enabling/disabling and customizing salt
- Optional migration with clear instructions to run or skip
The documentation addresses user concerns proactively and provides actionable guidance.
Optional: Minor style refinements suggested by linters.
If you'd like to polish the documentation further:
- Lines 11-12: Adjust list indentation to 2 spaces (currently 3)
- Line 35: Consider rephrasing "will make" to "will improve" or "will speed up" for stronger wording
These are purely cosmetic and don't affect the quality of the documentation.
src/Sylius/Bundle/CoreBundle/tests/Telemetry/Sender/TelemetrySenderTest.php (1)
36-44: Consider multi-line formatting for callback readability.The callback condition is functionally correct but spans seven checks in a single expression. Breaking it into multiple lines would improve readability and make future modifications easier.
Apply this diff to improve readability:
->with( 'POST', 'http://localhost:8000/telemetry', $this->callback(function ($options) { - return isset($options['json']) && - isset($options['timeout']) && - $options['timeout'] === 5 && - isset($options['headers']['Content-Type']) && - $options['headers']['Content-Type'] === 'application/json' && - isset($options['headers']['User-Agent']) && - $options['headers']['User-Agent'] === 'Sylius-Prism/1.0'; + return isset($options['json']) + && isset($options['timeout']) + && $options['timeout'] === 5 + && isset($options['headers']['Content-Type']) + && $options['headers']['Content-Type'] === 'application/json' + && isset($options['headers']['User-Agent']) + && $options['headers']['User-Agent'] === 'Sylius-Prism/1.0'; }), )
📜 Review details
Configuration used: defaults
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (23)
UPGRADE-2.1.md(1 hunks)src/Sylius/Bundle/CoreBundle/Telemetry/Collector/BusinessDataCollector.php(1 hunks)src/Sylius/Bundle/CoreBundle/Telemetry/Provider/Business/OrdersBusinessDataProvider.php(1 hunks)src/Sylius/Bundle/CoreBundle/Telemetry/Provider/Technical/DatabasePlatformDataProvider.php(1 hunks)src/Sylius/Bundle/CoreBundle/Telemetry/Provider/Technical/EnvironmentDataProvider.php(3 hunks)src/Sylius/Bundle/CoreBundle/Telemetry/Provider/Technical/VersionDataProvider.php(1 hunks)src/Sylius/Bundle/CoreBundle/Telemetry/Sender/TelemetrySender.php(0 hunks)src/Sylius/Bundle/CoreBundle/tests/Telemetry/Cache/TelemetryCacheTest.php(1 hunks)src/Sylius/Bundle/CoreBundle/tests/Telemetry/EventListener/TelemetryListenerTest.php(1 hunks)src/Sylius/Bundle/CoreBundle/tests/Telemetry/Mapper/ValueRangeMapperTest.php(3 hunks)src/Sylius/Bundle/CoreBundle/tests/Telemetry/Provider/Business/CurrenciesDataProviderTest.php(1 hunks)src/Sylius/Bundle/CoreBundle/tests/Telemetry/Provider/Business/LocalesDataProviderTest.php(1 hunks)src/Sylius/Bundle/CoreBundle/tests/Telemetry/Provider/Business/MetricsCountsDataProviderTest.php(1 hunks)src/Sylius/Bundle/CoreBundle/tests/Telemetry/Provider/Business/OrdersBusinessDataProviderTest.php(1 hunks)src/Sylius/Bundle/CoreBundle/tests/Telemetry/Provider/Business/PaymentMethodsDataProviderTest.php(1 hunks)src/Sylius/Bundle/CoreBundle/tests/Telemetry/Provider/Business/ShippingMethodsDataProviderTest.php(1 hunks)src/Sylius/Bundle/CoreBundle/tests/Telemetry/Provider/Technical/DatabasePlatformDataProviderTest.php(1 hunks)src/Sylius/Bundle/CoreBundle/tests/Telemetry/Provider/Technical/EnvironmentDataProviderTest.php(1 hunks)src/Sylius/Bundle/CoreBundle/tests/Telemetry/Provider/Technical/VersionDataProviderTest.php(1 hunks)src/Sylius/Bundle/CoreBundle/tests/Telemetry/Sender/TelemetrySenderTest.php(1 hunks)src/Sylius/Component/Core/Telemetry/Cache/TelemetryCache.php(1 hunks)src/Sylius/Component/Core/Telemetry/Mapper/ValueRangeMapper.php(3 hunks)src/Sylius/Component/Core/Telemetry/Sender/TelemetrySenderInterface.php(1 hunks)
💤 Files with no reviewable changes (1)
- src/Sylius/Bundle/CoreBundle/Telemetry/Sender/TelemetrySender.php
🧰 Additional context used
📓 Path-based instructions (4)
**/*.php
📄 CodeRabbit inference engine (AGENTS.md)
**/*.php: Declarestrict_types=1in all PHP files
Add type declarations for all properties, arguments, and return values in PHP
Usefinalfor all classes, except entities and repositories in PHP
Usereadonlyfor immutable services and value objects in PHP
UsecamelCasefor variables and method names in PHP
UseSCREAMING_SNAKE_CASEfor constants in PHP
Use fast returns instead of nesting logic unnecessarily in PHP
Use trailing commas in multi-line arrays and argument lists in PHP
Order array keys alphabetically where applicable in PHP
Use PHPDoc only when necessary (e.g.,@var Collection<ProductInterface>) in PHP
Group class elements in this order: constants, properties, constructor, public methods, protected methods, private methods in PHP
Group getter and setter methods for the same properties together in PHP
Suffix interfaces with Interface and traits with Trait in PHP
Sortuseimports alphabetically and group by type (classes, functions, constants) in PHP
Use modern PHP 8.2+ syntax and features
Do not use deprecated features from PHP, Symfony, or Sylius
Ensure compatibility with Symfony and PHP versions defined incomposer.json
Files:
src/Sylius/Bundle/CoreBundle/Telemetry/Provider/Business/OrdersBusinessDataProvider.phpsrc/Sylius/Bundle/CoreBundle/Telemetry/Provider/Technical/VersionDataProvider.phpsrc/Sylius/Bundle/CoreBundle/Telemetry/Collector/BusinessDataCollector.phpsrc/Sylius/Bundle/CoreBundle/tests/Telemetry/Provider/Business/ShippingMethodsDataProviderTest.phpsrc/Sylius/Bundle/CoreBundle/tests/Telemetry/Cache/TelemetryCacheTest.phpsrc/Sylius/Bundle/CoreBundle/tests/Telemetry/Provider/Business/PaymentMethodsDataProviderTest.phpsrc/Sylius/Bundle/CoreBundle/tests/Telemetry/Provider/Technical/DatabasePlatformDataProviderTest.phpsrc/Sylius/Bundle/CoreBundle/tests/Telemetry/Provider/Business/CurrenciesDataProviderTest.phpsrc/Sylius/Bundle/CoreBundle/tests/Telemetry/Provider/Business/MetricsCountsDataProviderTest.phpsrc/Sylius/Bundle/CoreBundle/Telemetry/Provider/Technical/DatabasePlatformDataProvider.phpsrc/Sylius/Component/Core/Telemetry/Mapper/ValueRangeMapper.phpsrc/Sylius/Component/Core/Telemetry/Sender/TelemetrySenderInterface.phpsrc/Sylius/Bundle/CoreBundle/tests/Telemetry/EventListener/TelemetryListenerTest.phpsrc/Sylius/Bundle/CoreBundle/tests/Telemetry/Provider/Business/LocalesDataProviderTest.phpsrc/Sylius/Bundle/CoreBundle/Telemetry/Provider/Technical/EnvironmentDataProvider.phpsrc/Sylius/Bundle/CoreBundle/tests/Telemetry/Mapper/ValueRangeMapperTest.phpsrc/Sylius/Bundle/CoreBundle/tests/Telemetry/Sender/TelemetrySenderTest.phpsrc/Sylius/Bundle/CoreBundle/tests/Telemetry/Provider/Technical/EnvironmentDataProviderTest.phpsrc/Sylius/Bundle/CoreBundle/tests/Telemetry/Provider/Technical/VersionDataProviderTest.phpsrc/Sylius/Component/Core/Telemetry/Cache/TelemetryCache.phpsrc/Sylius/Bundle/CoreBundle/tests/Telemetry/Provider/Business/OrdersBusinessDataProviderTest.php
**/*.{php,yml,yaml,xml,twig}
📄 CodeRabbit inference engine (AGENTS.md)
Use 4 spaces for indentation in all files (PHP, YAML, XML, Twig, etc.)
Files:
src/Sylius/Bundle/CoreBundle/Telemetry/Provider/Business/OrdersBusinessDataProvider.phpsrc/Sylius/Bundle/CoreBundle/Telemetry/Provider/Technical/VersionDataProvider.phpsrc/Sylius/Bundle/CoreBundle/Telemetry/Collector/BusinessDataCollector.phpsrc/Sylius/Bundle/CoreBundle/tests/Telemetry/Provider/Business/ShippingMethodsDataProviderTest.phpsrc/Sylius/Bundle/CoreBundle/tests/Telemetry/Cache/TelemetryCacheTest.phpsrc/Sylius/Bundle/CoreBundle/tests/Telemetry/Provider/Business/PaymentMethodsDataProviderTest.phpsrc/Sylius/Bundle/CoreBundle/tests/Telemetry/Provider/Technical/DatabasePlatformDataProviderTest.phpsrc/Sylius/Bundle/CoreBundle/tests/Telemetry/Provider/Business/CurrenciesDataProviderTest.phpsrc/Sylius/Bundle/CoreBundle/tests/Telemetry/Provider/Business/MetricsCountsDataProviderTest.phpsrc/Sylius/Bundle/CoreBundle/Telemetry/Provider/Technical/DatabasePlatformDataProvider.phpsrc/Sylius/Component/Core/Telemetry/Mapper/ValueRangeMapper.phpsrc/Sylius/Component/Core/Telemetry/Sender/TelemetrySenderInterface.phpsrc/Sylius/Bundle/CoreBundle/tests/Telemetry/EventListener/TelemetryListenerTest.phpsrc/Sylius/Bundle/CoreBundle/tests/Telemetry/Provider/Business/LocalesDataProviderTest.phpsrc/Sylius/Bundle/CoreBundle/Telemetry/Provider/Technical/EnvironmentDataProvider.phpsrc/Sylius/Bundle/CoreBundle/tests/Telemetry/Mapper/ValueRangeMapperTest.phpsrc/Sylius/Bundle/CoreBundle/tests/Telemetry/Sender/TelemetrySenderTest.phpsrc/Sylius/Bundle/CoreBundle/tests/Telemetry/Provider/Technical/EnvironmentDataProviderTest.phpsrc/Sylius/Bundle/CoreBundle/tests/Telemetry/Provider/Technical/VersionDataProviderTest.phpsrc/Sylius/Component/Core/Telemetry/Cache/TelemetryCache.phpsrc/Sylius/Bundle/CoreBundle/tests/Telemetry/Provider/Business/OrdersBusinessDataProviderTest.php
**/*.{php,twig}
📄 CodeRabbit inference engine (AGENTS.md)
Follow secure coding practices to prevent XSS, CSRF, injections, auth bypasses, etc.
Files:
src/Sylius/Bundle/CoreBundle/Telemetry/Provider/Business/OrdersBusinessDataProvider.phpsrc/Sylius/Bundle/CoreBundle/Telemetry/Provider/Technical/VersionDataProvider.phpsrc/Sylius/Bundle/CoreBundle/Telemetry/Collector/BusinessDataCollector.phpsrc/Sylius/Bundle/CoreBundle/tests/Telemetry/Provider/Business/ShippingMethodsDataProviderTest.phpsrc/Sylius/Bundle/CoreBundle/tests/Telemetry/Cache/TelemetryCacheTest.phpsrc/Sylius/Bundle/CoreBundle/tests/Telemetry/Provider/Business/PaymentMethodsDataProviderTest.phpsrc/Sylius/Bundle/CoreBundle/tests/Telemetry/Provider/Technical/DatabasePlatformDataProviderTest.phpsrc/Sylius/Bundle/CoreBundle/tests/Telemetry/Provider/Business/CurrenciesDataProviderTest.phpsrc/Sylius/Bundle/CoreBundle/tests/Telemetry/Provider/Business/MetricsCountsDataProviderTest.phpsrc/Sylius/Bundle/CoreBundle/Telemetry/Provider/Technical/DatabasePlatformDataProvider.phpsrc/Sylius/Component/Core/Telemetry/Mapper/ValueRangeMapper.phpsrc/Sylius/Component/Core/Telemetry/Sender/TelemetrySenderInterface.phpsrc/Sylius/Bundle/CoreBundle/tests/Telemetry/EventListener/TelemetryListenerTest.phpsrc/Sylius/Bundle/CoreBundle/tests/Telemetry/Provider/Business/LocalesDataProviderTest.phpsrc/Sylius/Bundle/CoreBundle/Telemetry/Provider/Technical/EnvironmentDataProvider.phpsrc/Sylius/Bundle/CoreBundle/tests/Telemetry/Mapper/ValueRangeMapperTest.phpsrc/Sylius/Bundle/CoreBundle/tests/Telemetry/Sender/TelemetrySenderTest.phpsrc/Sylius/Bundle/CoreBundle/tests/Telemetry/Provider/Technical/EnvironmentDataProviderTest.phpsrc/Sylius/Bundle/CoreBundle/tests/Telemetry/Provider/Technical/VersionDataProviderTest.phpsrc/Sylius/Component/Core/Telemetry/Cache/TelemetryCache.phpsrc/Sylius/Bundle/CoreBundle/tests/Telemetry/Provider/Business/OrdersBusinessDataProviderTest.php
**/*Test.php
📄 CodeRabbit inference engine (AGENTS.md)
Use PHPUnit for unit and functional testing
Files:
src/Sylius/Bundle/CoreBundle/tests/Telemetry/Provider/Business/ShippingMethodsDataProviderTest.phpsrc/Sylius/Bundle/CoreBundle/tests/Telemetry/Cache/TelemetryCacheTest.phpsrc/Sylius/Bundle/CoreBundle/tests/Telemetry/Provider/Business/PaymentMethodsDataProviderTest.phpsrc/Sylius/Bundle/CoreBundle/tests/Telemetry/Provider/Technical/DatabasePlatformDataProviderTest.phpsrc/Sylius/Bundle/CoreBundle/tests/Telemetry/Provider/Business/CurrenciesDataProviderTest.phpsrc/Sylius/Bundle/CoreBundle/tests/Telemetry/Provider/Business/MetricsCountsDataProviderTest.phpsrc/Sylius/Bundle/CoreBundle/tests/Telemetry/EventListener/TelemetryListenerTest.phpsrc/Sylius/Bundle/CoreBundle/tests/Telemetry/Provider/Business/LocalesDataProviderTest.phpsrc/Sylius/Bundle/CoreBundle/tests/Telemetry/Mapper/ValueRangeMapperTest.phpsrc/Sylius/Bundle/CoreBundle/tests/Telemetry/Sender/TelemetrySenderTest.phpsrc/Sylius/Bundle/CoreBundle/tests/Telemetry/Provider/Technical/EnvironmentDataProviderTest.phpsrc/Sylius/Bundle/CoreBundle/tests/Telemetry/Provider/Technical/VersionDataProviderTest.phpsrc/Sylius/Bundle/CoreBundle/tests/Telemetry/Provider/Business/OrdersBusinessDataProviderTest.php
🧠 Learnings (1)
📓 Common learnings
Learnt from: CR
Repo: Sylius/Sylius PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T05:49:22.765Z
Learning: Sylius is designed to be fast and efficient
Learnt from: CR
Repo: Sylius/Sylius PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T05:49:22.765Z
Learning: Sylius is designed to be modular and flexible
Learnt from: CR
Repo: Sylius/Sylius PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T05:49:22.765Z
Learning: Sylius must be easily extendable in the end application
Learnt from: CR
Repo: Sylius/Sylius PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T05:49:22.765Z
Learning: Sylius is built on top of Symfony framework
Learnt from: CR
Repo: Sylius/Sylius PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-11-25T05:49:22.765Z
Learning: Sylius contains Bundles and Components that can be used independently
🪛 LanguageTool
UPGRADE-2.1.md
[style] ~35-~35: Consider using a different verb to strengthen your wording.
Context: ... without this index, but adding it will make data collection faster, especially for stores with large order...
(MAKE_XXX_FASTER)
🪛 markdownlint-cli2 (0.18.1)
UPGRADE-2.1.md
11-11: Unordered list indentation
Expected: 2; Actual: 3
(MD007, ul-indent)
12-12: Unordered list indentation
Expected: 2; Actual: 3
(MD007, ul-indent)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (21)
- GitHub Check: Static checks / PHP 8.4, Symfony ~7.4.0
- GitHub Check: Static checks / PHP 8.3, Symfony ~6.4.0
- GitHub Check: Tests (PostgreSQL) / UI, PHP 8.5, Symfony ~7.4.0, PostgreSQL 17.5
- GitHub Check: Tests (PostgreSQL) / PHPUnit, CLI, API, PHP 8.5, Symfony ~7.4.0, PostgreSQL 17.5
- GitHub Check: Tests (PostgreSQL) / PHPUnit, CLI, API, PHP 8.4, Symfony ~6.4.0, PostgreSQL 15.13
- GitHub Check: Tests (PostgreSQL) / UI, PHP 8.4, Symfony ~6.4.0, PostgreSQL 15.13
- GitHub Check: Tests (MariaDB) / UI, PHP 8.5, Symfony ~7.4.0, MariaDB 11.4.7, State Machine Adapter symfony_workflow, ApiPlatform ~4.1.7
- GitHub Check: Tests (MariaDB) / PHPUnit, CLI, API, PHP 8.4, Symfony ~6.4.0, MariaDB 10.11.13, State Machine Adapter winzou_state_machine
- GitHub Check: Tests (MariaDB) / PHPUnit, CLI, API, PHP 8.5, Symfony ~7.4.0, MariaDB 11.4.7, State Machine Adapter symfony_workflow, ApiPlatform ~4.1.7
- GitHub Check: Tests (MariaDB) / UI, PHP 8.4, Symfony ~6.4.0, MariaDB 10.11.13, State Machine Adapter winzou_state_machine
- GitHub Check: Packages / PHP 8.4, Symfony ~6.4.0
- GitHub Check: Packages / PHP 8.5, Symfony ~7.3.0
- GitHub Check: Tests (MySQL) / PHPUnit, CLI, API, PHP 8.5, Symfony ~7.4.0, MySQL 8.4
- GitHub Check: Tests (MySQL) / PHPUnit, CLI, API, PHP 8.4, Symfony ~6.4.0, MySQL 8.0
- GitHub Check: Tests (MySQL) / UI, PHP 8.4, Symfony ~6.4.0, MySQL 8.0
- GitHub Check: Tests (MySQL) / UI, PHP 8.5, Symfony ~7.4.0, MySQL 8.4
- GitHub Check: Javascript Tests (MySQL) / [Taxons, Shipping Methods, Countries, Zones] [PHP 8.4, Symfony ~7.4.0, MySQL 8.0]
- GitHub Check: Javascript Tests (MySQL) / [Checkout, Cart, Address Book] [PHP 8.4, Symfony ~7.4.0, MySQL 8.0]
- GitHub Check: Javascript Tests (MySQL) / [Remaining] [PHP 8.4, Symfony ~7.4.0, MySQL 8.0]
- GitHub Check: Javascript Tests (MySQL) / [Promotions, Catalog Promotions, Coupons] [PHP 8.4, Symfony ~7.4.0, MySQL 8.0]
- GitHub Check: Javascript Tests (MySQL) / Panther, PHP 8.4, Symfony ~7.4.0, MySQL 8.0
🔇 Additional comments (20)
src/Sylius/Bundle/CoreBundle/tests/Telemetry/EventListener/TelemetryListenerTest.php (1)
26-28: Code structure looks good.The formatting change adding a blank line between property declarations is acceptable. All coding guidelines are followed:
declare(strict_types=1)is present, properties and methods have proper type declarations, the class isfinal, imports are sorted correctly, and indentation is consistent.src/Sylius/Bundle/CoreBundle/tests/Telemetry/Provider/Business/ShippingMethodsDataProviderTest.php (1)
24-24: LGTM!Formatting improvement for consistency with other test files in the telemetry suite.
src/Sylius/Bundle/CoreBundle/tests/Telemetry/Provider/Business/CurrenciesDataProviderTest.php (1)
24-24: LGTM!Formatting improvement for consistency across telemetry test files.
src/Sylius/Bundle/CoreBundle/Telemetry/Provider/Technical/VersionDataProvider.php (1)
31-31: Good practice: fully qualified global constant.Using
\PHP_VERSIONensures correct resolution in namespaced context and prevents potential conflicts.src/Sylius/Bundle/CoreBundle/tests/Telemetry/Provider/Business/LocalesDataProviderTest.php (1)
26-26: LGTM!Formatting improvement aligning with other telemetry test files.
src/Sylius/Bundle/CoreBundle/Telemetry/Provider/Business/OrdersBusinessDataProvider.php (1)
84-84: LGTM!Minor PHPDoc formatting adjustment with no functional impact.
src/Sylius/Bundle/CoreBundle/tests/Telemetry/Provider/Business/PaymentMethodsDataProviderTest.php (1)
24-24: LGTM!Formatting improvement for consistency across the telemetry test suite.
src/Sylius/Bundle/CoreBundle/Telemetry/Provider/Technical/EnvironmentDataProvider.php (1)
32-32: Good practice: fully qualified global constants.Using
\PHP_OS_FAMILYand\PHP_SAPIensures correct resolution in namespaced context and makes it explicit these are global constants.Also applies to: 45-45, 55-55
src/Sylius/Bundle/CoreBundle/Telemetry/Collector/BusinessDataCollector.php (1)
82-82: LGTM!Minor PHPDoc formatting adjustment with no functional impact.
src/Sylius/Bundle/CoreBundle/tests/Telemetry/Provider/Business/OrdersBusinessDataProviderTest.php (1)
23-25: LGTM! Formatting alignment improves readability.The blank line between property declarations follows PHP coding standards and aligns with the broader formatting cleanup across telemetry test files.
src/Sylius/Component/Core/Telemetry/Sender/TelemetrySenderInterface.php (1)
19-24: LGTM! PHPDoc formatting improvement.The additional blank line improves the visual separation between the parameter and return documentation.
src/Sylius/Bundle/CoreBundle/Telemetry/Provider/Technical/DatabasePlatformDataProvider.php (1)
128-128: LGTM! Cleaner string literal for Oracle query.Switching from double quotes with escaped dollar sign (
\$) to single quotes with literal dollar sign simplifies the code since no variable interpolation is needed.src/Sylius/Component/Core/Telemetry/Cache/TelemetryCache.php (1)
22-33: Excellent refactoring! Magic values extracted to named constants.The addition of these constants improves maintainability and clarity:
- Cache TTLs (7 days for success, 3 days for failure) are now self-documenting
- Retry policy (24-hour delay, 3 max attempts) is explicit and configurable
- Status values are centralized
This follows coding guidelines for SCREAMING_SNAKE_CASE constants and eliminates magic numbers throughout the class.
src/Sylius/Bundle/CoreBundle/tests/Telemetry/Provider/Business/MetricsCountsDataProviderTest.php (1)
23-25: LGTM! Consistent formatting alignment.The blank line between property declarations maintains consistency with the broader test file formatting cleanup.
src/Sylius/Bundle/CoreBundle/tests/Telemetry/Cache/TelemetryCacheTest.php (1)
22-24: LGTM! Property separation formatting.The blank line improves visual separation between property declarations, consistent with test file formatting standards.
src/Sylius/Bundle/CoreBundle/tests/Telemetry/Provider/Technical/VersionDataProviderTest.php (1)
44-44: LGTM! Proper global constant qualification.Adding the leading backslash to
\PHP_VERSIONexplicitly references the global namespace constant, which is best practice in namespaced PHP code to avoid potential conflicts and improve clarity.src/Sylius/Bundle/CoreBundle/tests/Telemetry/Provider/Technical/EnvironmentDataProviderTest.php (1)
54-60: LGTM: Fully-qualified global constant.The use of
\PHP_OS_FAMILYwith the global namespace qualifier is correct and ensures the global constant is referenced unambiguously.src/Sylius/Bundle/CoreBundle/tests/Telemetry/Provider/Technical/DatabasePlatformDataProviderTest.php (1)
25-29: LGTM: Formatting improvement.The added whitespace improves readability and consistency in property declarations.
src/Sylius/Bundle/CoreBundle/tests/Telemetry/Mapper/ValueRangeMapperTest.php (1)
24-24: LGTM: Type hints align with implementation.The parameter type hints have been updated from
int|floattofloat|intto match the corresponding changes inValueRangeMapper. The union types are semantically equivalent and the tests remain functionally correct.Also applies to: 54-54, 163-163
src/Sylius/Component/Core/Telemetry/Mapper/ValueRangeMapper.php (1)
71-71: LGTM: Consistent type hint updates.The parameter type hints have been updated from
int|floattofloat|intconsistently across all relevant methods (mapGmv,mapAov,mapAvgItems, and the private helpermapToRange). The union types are semantically equivalent and the logic remains unchanged.Also applies to: 76-76, 101-101, 117-117
This PR has been generated automatically.
For more details see upmerge_pr.yaml.
Remember! The upmerge should always be merged with using
Merge pull requestbutton.In case of conflicts, please resolve them manually with usign the following commands:
If you use other name for the upstream remote, please replace
upstreamwith the name of your remote pointing to theSylius/Syliusrepository.Once the conflicts are resolved, please run
git merge --continueand push the changes to this PR.Summary by CodeRabbit
Documentation
Chores
✏️ Tip: You can customize this high-level summary in your review settings.