Conversation
Coverage summary from CodacySee diff coverage on Codacy
Coverage variation details
Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: Diff coverage details
Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: See your quality gate settings Change summary preferences |
fad6a8d to
b13a2ce
Compare
fef9cb1 to
ef8cace
Compare
Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>
Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>
Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>
Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>
Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>
Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>
Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>
Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>
Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>
Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>
Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>
Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>
Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>
Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>
Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>
ef8cace to
ed47c4d
Compare
Signed-off-by: Jan Kowalleck <jan.kowalleck@gmail.com>
There was a problem hiding this comment.
Pull request overview
This PR establishes a new "Contrib" area for non-standard implementations, moving utilities and factories that aren't part of the core CycloneDX specification. The refactoring maintains full backward compatibility through class inheritance-based aliases while directing users to the new locations via deprecation notices.
Key Changes
- Created
CycloneDX\Contribnamespace with separate autoloading configuration for community-contributed functionality - Migrated
LicenseFactoryandBomUtilityclasses to the Contrib area with new class names (BomUtils) - Established deprecation pattern using class inheritance to maintain backward compatibility while directing users to new locations
Reviewed changes
Copilot reviewed 10 out of 11 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| composer.json | Added PSR-4 autoload mapping for the new CycloneDX\Contrib\ namespace |
| src/Contrib/README.md | Documented the purpose and guidelines for the Contrib area |
| src/Contrib/License/Factories/LicenseFactory.php | New location for LicenseFactory implementation |
| src/Contrib/Bom/Utils/BomUtils.php | New location for BomUtility implementation with renamed class |
| src/Core/Factories/LicenseFactory.php | Converted to deprecated alias extending the new Contrib class |
| src/Core/Utils/BomUtility.php | Converted to deprecated alias extending the new Contrib class |
| tests/Core/Factories/LicenseFactoryTest.php | Added CoversClass attribute for new Contrib class location |
| tests/Core/Utils/BomUtilityTest.php | Added CoversClass attribute for new Contrib class location |
| examples/build_and_serialize.php | Updated to use new LicenseFactory namespace |
| HISTORY.md | Documented the changes including added, changed, deprecated, and refactored items |
| tests/Contrib/.gitkeep | Placeholder for future Contrib test directory |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| } | ||
|
|
||
| /** | ||
| * @throws DomainException when the SPDX license expressions was invalid |
There was a problem hiding this comment.
Grammar error in the documentation comment. The phrase "expressions was" should be "expression is" - the word "expression" should be singular to match the parameter name, and the verb should be present tense to match the PHPDoc convention.
| * @throws DomainException when the SPDX license expressions was invalid | |
| * @throws DomainException when the SPDX license expression is invalid |
| /** | ||
| * Deprecated — Alias of {@see \CycloneDX\Contrib\License\Factories\LicenseFactory}. | ||
| * | ||
| * @deprecated use {@see \CycloneDX\Contrib\License\Factories\LicenseFactory} instead |
There was a problem hiding this comment.
Inconsistent capitalization in @deprecated tag. The word "use" should be capitalized as "Use" to match the capitalization used in the BomUtility.php deprecation notice (line 31) and follow standard sentence capitalization conventions.
| * @deprecated use {@see \CycloneDX\Contrib\License\Factories\LicenseFactory} instead | |
| * @deprecated Use {@see \CycloneDX\Contrib\License\Factories\LicenseFactory} instead |
Added
CycloneDX\ContribChanged
Deprecated
Note: the symbols themselves remain supported. See documentation and the "Refactored" section below for details.
Refactored
The symbols are still import-able through their old location.
CycloneDX\Core\Factories\LicenseFactory->CycloneDX\Contrib\License\Factories\LicenseFactoryCycloneDX\Core\Utils\BomUtility->CycloneDX\Contrib\Bom\Utils\BomUtilsthe tests will be moved in a later step