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

Option to choose which PHP version to use #48

Open
tarlepp opened this issue Mar 20, 2021 · 4 comments
Open

Option to choose which PHP version to use #48

tarlepp opened this issue Mar 20, 2021 · 4 comments
Labels
enhancement New feature or request

Comments

@tarlepp
Copy link

tarlepp commented Mar 20, 2021

Today I learn that psalm.dev has support for different PHP version via query parameter - vimeo/psalm#5442 (comment)

So It would be really helpfull for users if there was an clear choice to choose used PHP version on the UI itself.

@weirdan weirdan added the enhancement New feature or request label Jun 30, 2021
@caugner
Copy link
Contributor

caugner commented Jul 14, 2021

I'm thinking of tackling this issue with the following solution:

  1. Add a PHP version select that defaults to "Latest" and make sure it gets passed to the right location.
  2. Add a "php" database column (CHAR(3) DEFAULT NULL) and make sure the PHP version is persisted, if the user selected a specific version other than "Latest".

@muglug @weirdan Does this specification make sense to you, or do you have any remarks?

@orklah
Copy link
Contributor

orklah commented Jul 14, 2021

I must say I really like PHPStan implementation: https://phpstan.org/r/13d9f782-9b40-4013-bc34-8177c6f5857b

Every version is checked so when there are differences, the versions appear clearly.

It even help users understand issues on their own when they see they aren't running the correct version

@weirdan
Copy link
Member

weirdan commented Jul 14, 2021

Add a "php" database column (CHAR(3) DEFAULT NULL) and make sure the PHP version is persisted, if the user selected a specific version other than "Latest".

It will also need to be a part of slug calculation, so that snippets differing in version only have different urls.

@muglug
Copy link
Member

muglug commented Jul 14, 2021

I think saving this info in the DB makes sense.

@orklah I don’t think the PHPStan way is really necessary — users rarely ticket issues where the version of PHP is decisive for the bug/feature.

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

5 participants