Skip to content
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

Suggestion: improve feedback about installed Xdebug/Pcov versions #610

Closed
1 task done
jrfnl opened this issue Jun 29, 2022 · 7 comments
Closed
1 task done

Suggestion: improve feedback about installed Xdebug/Pcov versions #610

jrfnl opened this issue Jun 29, 2022 · 7 comments
Assignees
Labels
enhancement New feature or request

Comments

@jrfnl
Copy link
Contributor

jrfnl commented Jun 29, 2022

Describe the feature

Currently, when using the coverage key, the feedback shown to the user will be along the lines of:

      - name: Install PHP
        uses: shivammathur/setup-php@v2
        with:
          php-version: ${{ matrix.php }}
          coverage: xdebug
==> Setup Coverage
✓ xdebug Xdebug enabled as coverage driver

I presume this is similar when using PCov.

I believe it would be useful to be able to see at a glance which Xdebug (or Pcov) version was installed and would like to suggest adjusting the feedback to include this information, like so:

==> Setup Coverage
✓ xdebug Xdebug x.x.x enabled as coverage driver

Version

  • I have checked releases, and the feature is missing in the latest patch version of v2.

Underlying issue
If/when something is going wrong with the code coverage recording, the Xdebug/Pcov version used is generally needed in the debugging process.

Describe alternatives
For Xdebug, it's easy enough to retrieve the information by adding an extra step, but IMO that's an unnecessary extra step and it would be helpful if the information would always be available in the feedback from setup-php.

      - name: "DEBUG: Show version details"
        run: php -v

Are you willing to submit a PR?
If you're open to the idea, I'd be happy to attempt a PR for this, though I haven't looked at the implementation details (yet).

@shivammathur
Copy link
Owner

@jrfnl

Yes, adding Xdebug and PCOV versions for coverage input would be great.

For implementing this phpversion can be used.
https://www.php.net/manual/en/function.phpversion.php

You can define extensions.getExtensionVersion function in extensions.ts and call that in coverage.ts.

@jrfnl
Copy link
Contributor Author

jrfnl commented Jun 30, 2022

You can define extensions.getExtensionVersion function in extensions.ts and call that in coverage.ts.

@shivammathur Thanks for the pointers, but I have to admit that looking at the code in those files, I'm out of my depth in this instance. Sorry. Happy to help in other ways, but I think I need to leave this one for someone who actually knows what they are doing ;-)

@shivammathur
Copy link
Owner

Added in 050cb80

@shivammathur shivammathur added the awaiting-release Added/Fixed and tested, awaiting release label Jun 30, 2022
@jrfnl
Copy link
Contributor Author

jrfnl commented Jun 30, 2022

@shivammathur You are an absolute star! Thank you so much.

@jrfnl
Copy link
Contributor Author

jrfnl commented Jun 30, 2022

Would you like me to close the issue ? Or do you leave it open until the feature has been released ?

@shivammathur
Copy link
Owner

I will close it when I create the new release, most likely on Monday next week.

@shivammathur
Copy link
Owner

Released in 2.20.0

@shivammathur shivammathur removed the awaiting-release Added/Fixed and tested, awaiting release label Jul 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants