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

Feature: Add support for asdf's .tool-versions file #883

Open
1 task done
yamadashy opened this issue Nov 13, 2024 · 0 comments
Open
1 task done

Feature: Add support for asdf's .tool-versions file #883

yamadashy opened this issue Nov 13, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@yamadashy
Copy link

Describe the feature

Add support for reading PHP version from asdf's .tool-versions file in setup-php action. Currently, the action supports .php-version file, and adding support for .tool-versions would help users who use asdf for version management.

Similar to the current support:

- uses: shivammathur/setup-php@v2
  with:
    php-version-file: .tool-versions  # New proposal, similar to .php-version support

Please check the latest release

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

Underlying issue

Projects using asdf for PHP version management currently need to maintain both .tool-versions for local development and either specify the version directly in workflows or maintain a separate .php-version file. Supporting .tool-versions would allow these projects to use a single source of truth for PHP versions across all environments.

The action already supports reading from .php-version, so extending this to support .tool-versions would be a natural evolution and help users who prefer asdf for version management.

Describe alternatives

Current alternatives:

  1. Manually specify PHP version in workflow (requires manual sync with .tool-versions)
  2. Maintain a separate .php-version file (requires maintaining two version files)
  3. Use a script to generate .php-version from .tool-versions (adds complexity to workflow)

Additional context

Example .tool-versions file content:

php 8.3.13

Similar functionality exists in other GitHub Actions:

  • actions/setup-node supports .tool-versions
- uses: actions/setup-node@v4
  with:
    node-version-file: .tool-versions

Are you willing to submit a PR?

Yes

@yamadashy yamadashy added the enhancement New feature or request label Nov 13, 2024
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