Skip to content

Conversation

lirshindalman
Copy link
Contributor

Description
This MR updates the PHP parser logic in parseComposerJson to ensure that require-dev dependencies are also added to the rootRequires list. This aligns the behavior with the handling of require dependencies, enabling a more complete and accurate representation of the project's dependency tree in the SBOM.

Motivation
Previously, only require dependencies were being tracked in rootRequires, causing require-dev packages to be excluded from root-level analysis. This change ensures that development dependencies are also included, which is useful for auditing, security scanning, and development context.

Notes
The change is minimal and does not impact dependency resolution.

Only affects PHP projects using composer.json.

@lirshindalman lirshindalman requested a review from prabhu as a code owner July 16, 2025 08:24
@lirshindalman lirshindalman force-pushed the php_add_require_dev_to_rootRequires branch from eed3cef to 2d6c6a2 Compare July 16, 2025 09:04
Copy link
Collaborator

@prabhu prabhu left a comment

Choose a reason for hiding this comment

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

Thank you!

@prabhu
Copy link
Collaborator

prabhu commented Jul 16, 2025

could you kindly run pnpm run lint && pnpm run gen-types

@lirshindalman
Copy link
Contributor Author

@prabhu Thanks for the quick response!

Signed-off-by: lshindelman <lshindelman@paloaltonetworks.com>
@lirshindalman lirshindalman force-pushed the php_add_require_dev_to_rootRequires branch from 46a9432 to eda95fb Compare July 16, 2025 10:35
lshindelman added 2 commits July 16, 2025 14:11
Signed-off-by: lshindelman <lshindelman@paloaltonetworks.com>
Signed-off-by: lshindelman <lshindelman@paloaltonetworks.com>
@lirshindalman lirshindalman force-pushed the php_add_require_dev_to_rootRequires branch from eda95fb to 886c77e Compare July 16, 2025 11:12
@prabhu prabhu merged commit 8c2f6d2 into CycloneDX:master Jul 16, 2025
80 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants