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: Specify a different path of composer.json file #894

Open
1 task done
meteorlxy opened this issue Dec 16, 2024 · 1 comment
Open
1 task done

Feature: Specify a different path of composer.json file #894

meteorlxy opened this issue Dec 16, 2024 · 1 comment
Assignees
Labels
awaiting-release Added/Fixed and tested, awaiting release enhancement New feature or request

Comments

@meteorlxy
Copy link

Describe the feature

Per the docs:

php-version (optional)

  • ...
  • If not specified, it looks for the following in order:
    • The php-version-file input if it exists
    • A composer.lock file and the platform-overrides.php value
    • A composer.json file and the config.platform.php value

However, if composer.json file is in a different sub directory, it could not be located correctly.

So it would be better to support specifying a different path of composer.json file.

Please check the latest release

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

Underlying issue

Currently the filepath is hard-coded. It would be better to make it customizable:

setup-php/src/utils.ts

Lines 455 to 456 in 85a8dfd

const composerJson = 'composer.json';
if (fs.existsSync(composerJson)) {

Describe alternatives

No response

Additional context

No response

Are you willing to submit a PR?

Yes

@meteorlxy meteorlxy added the enhancement New feature or request label Dec 16, 2024
@shivammathur
Copy link
Owner

Added in 84f76b1

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

No branches or pull requests

2 participants