Skip to content

feat: Add PHP extensions handling.#12

Merged
WyriHaximus merged 2 commits into
WyriHaximus:mainfrom
drupol:feat/add-extensions-handling
Aug 22, 2022
Merged

feat: Add PHP extensions handling.#12
WyriHaximus merged 2 commits into
WyriHaximus:mainfrom
drupol:feat/add-extensions-handling

Conversation

@drupol

@drupol drupol commented Aug 14, 2022

Copy link
Copy Markdown
Contributor

Hi,

Here's a small feature I just added that would be useful for me.

Basically, it infers PHP extensions from composer.json.

Let me know what you think.

@drupol drupol requested a review from WyriHaximus as a code owner August 14, 2022 21:53
@boring-cyborg boring-cyborg Bot added Dependencies 📦 Pull requests that update a dependency file JavaScript 🦏 JSON 👨‍💼 PHP 🐘 Hypertext Pre Processor labels Aug 14, 2022
@WyriHaximus

Copy link
Copy Markdown
Owner

@drupol Thanks for filing, loving the suggestion. But could you add the list of extensions as output to the CI workflow? https://github.com/WyriHaximus/github-action-composer-php-versions-in-range/blob/main/.github/workflows/ci.yml

@drupol

drupol commented Aug 18, 2022

Copy link
Copy Markdown
Contributor Author

@drupol Thanks for filing, loving the suggestion. But could you add the list of extensions as output to the CI workflow? https://github.com/WyriHaximus/github-action-composer-php-versions-in-range/blob/main/.github/workflows/ci.yml

I'm afraid I have no idea how to do that :(

Feel free to commit in this PR if you want.

@WyriHaximus

Copy link
Copy Markdown
Owner

I'm afraid I have no idea how to do that :(

Want me to guide you through that in this PR?

@drupol

drupol commented Aug 19, 2022

Copy link
Copy Markdown
Contributor Author

Of course, all the help is welcome.

@WyriHaximus WyriHaximus added this to the v1.7.0 milestone Aug 20, 2022

@WyriHaximus WyriHaximus left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

The code all looks good, however, there are two things missing. Most importantly an example in the readme on how to use this in a workflow.

Secondly, it's missing showing this output in the CI. My suggestion would be to add the outputs you added to this list: https://github.com/WyriHaximus/github-action-composer-php-versions-in-range/blob/main/.github/workflows/ci.yml#L16-L19

Secondly to show that, add the following at the end of the file:

  extensions:
    name: Detected extensions on ${{ matrix.os }}
    strategy:
      matrix:
        os:
          - ubuntu-latest
          - windows-latest
          - macos-latest
    needs:
      - get-supported-php-versions
    runs-on: ${{ matrix.os }}
    steps:
      - run: |
          echo "All require extensions: ${{ needs.get-supported-php-versions.outputs.extensions }}"
          echo "Require extensions: ${{ needs.get-supported-php-versions.outputs.requiredExtensions }}"
          echo "Dev require extensions: ${{ needs.get-supported-php-versions.outputs.requiredDevExtensions }}"

Comment thread main.js Outdated

@WyriHaximus WyriHaximus left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

LGTM, thanks 👍!

Take your time for the readme updates, I'll merge and tag this as is. And once you have worked out a real-world example, feel free to open a PR for the readme.

@WyriHaximus WyriHaximus self-requested a review August 22, 2022 21:15
@WyriHaximus WyriHaximus merged commit e214511 into WyriHaximus:main Aug 22, 2022
@WyriHaximus

WyriHaximus commented Aug 22, 2022

Copy link
Copy Markdown
Owner

Just released v1.7.0 with this.

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