-
-
Notifications
You must be signed in to change notification settings - Fork 288
feat(php-version): Check php version in config #347
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
feat(php-version): Check php version in config #347
Conversation
- Add a class for composer config
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work ! I like the Composer class, which can later allow us to drop dependency to composer.
I just made a quick review, I'll try to reread it tonight 😉
However, I think we shouldn't rely on illuminate/support in the code to avoid much dependencies and possible version conflict. WDYT ?
@Jibbarth One thing is that I used |
@olivernybroe 🤔 I think I prefer a Composer object with empty data. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 LGTM
@Jibbarth Just made a little change so it should be able to parse more version constraint strings. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm wonder if we could avoid all this Composer $composer
passed in all Preset.
Maybe there is something to do with the container ? 🤔
Anyway, that could be refactoring later. I just left one comment about the array_filter
.
@Jibbarth Might be possible yeah 😄 Nice catch, was a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good job @olivernybroe 👍
This PR adds support for checking composer file directly in the preset.
This enables the support for checking if we should enable
enableNativeTypeHint
when php version is lower than 7.4 in composer file.The initial work for it is ready, however right now it only supports checking the php version if the version is formatted as
7.1
or^7.1
, I haven't been able to find a way to make it work for all types yet without having to write the code for all scenarios.