Skip to content

fix: [OSM-2584] Bump PHP plugin version to fix project scanning - #5869

Merged
nico-incubiq merged 1 commit into
mainfrom
fix/osm-2584-php-support
May 7, 2025
Merged

fix: [OSM-2584] Bump PHP plugin version to fix project scanning#5869
nico-incubiq merged 1 commit into
mainfrom
fix/osm-2584-php-support

Conversation

@nico-incubiq

Copy link
Copy Markdown
Contributor

Pull Request Submission Checklist

  • Follows CONTRIBUTING guidelines
  • Includes detailed description of changes
  • Contains risk assessment (Low | Medium | High)
  • Highlights breaking API changes (if applicable)
  • Links to automated tests covering new functionality
  • Includes manual testing instructions (if necessary)
  • Updates relevant GitBook documentation (PR link: ___)
  • Includes product update to be announced in the next stable release notes

What does this PR do?

Bumps the version of the PHP Plugin used by the CLI, which fixes Open Source scanning of PHP projects.
Previously when composer/ composer.phar is available on the machine, the command's result stdout was not handled properly and resulted in [object Object] being parsed as JSON.

Risk is Low as this only affects PHP, which has low traffic and it fixes a bug rather than changing any logic.

Where should the reviewer start?

How should this be manually tested?

  • Run the CLI on a directory containing PHP code, making sure that you have composer either installed globally or the composer.phar file in the current working directory.
  • This should output scan results as expected, while before this would have crashed with a JSON parsing error

What's the product update that needs to be communicated to CLI users?

Scanning open source dependencies of PHP projects when composer is installed on the user machine works again.

@nico-incubiq
nico-incubiq requested a review from a team as a code owner May 1, 2025 12:47
@nico-incubiq
nico-incubiq force-pushed the fix/osm-2584-php-support branch 2 times, most recently from eeddce5 to ea98589 Compare May 2, 2025 11:46
@nico-incubiq
nico-incubiq enabled auto-merge May 2, 2025 13:33
@PeterSchafer

Copy link
Copy Markdown
Contributor

@nico-incubiq based on the description it appears to me that we don't have any relevant php related test here. Could you please take a look in test/jest/acceptance/snyk-test and see if we can add at least add a happy path test?

@nico-incubiq

nico-incubiq commented May 6, 2025

Copy link
Copy Markdown
Contributor Author

@PeterSchafer interesting point; there is already an acceptance test for this, but it was exercising an overly permissive code path which was hiding the issue (interpreting the error as if we found a [object dependency with version Object]). I've removed this code branch from my PHP plugin bump such that there's only a single code path; so now the existing test properly exercises everything there is to exercise, and a similar error would no longer be hidden.

@nico-incubiq
nico-incubiq force-pushed the fix/osm-2584-php-support branch from ea98589 to 39e3379 Compare May 6, 2025 15:55
@nico-incubiq
nico-incubiq merged commit 61dc85a into main May 7, 2025
@nico-incubiq
nico-incubiq deleted the fix/osm-2584-php-support branch May 7, 2025 08:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants