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

feat(config): make min-requirements configurable through file #362

Merged
merged 5 commits into from
Mar 5, 2020

Conversation

yhortuk
Copy link

@yhortuk yhortuk commented Feb 15, 2020

Q A
Bug fix? no
New feature? yes
Fixed tickets #361

This PR makes min-requirements configurable via configuration file

Copy link
Collaborator

@olivernybroe olivernybroe left a comment

Choose a reason for hiding this comment

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

Really nice, thanks for the amazing work you have done for this issue. 💥

I have added a few small comments 👍

src/Application/ConfigResolver.php Outdated Show resolved Hide resolved
src/Application/Injectors/Configuration.php Outdated Show resolved Hide resolved
stubs/config.php Show resolved Hide resolved
stubs/config.php Show resolved Hide resolved
@olivernybroe olivernybroe linked an issue Feb 17, 2020 that may be closed by this pull request
@olivernybroe olivernybroe added the enhancement New feature or request label Feb 17, 2020
commit 1e07842
Author: devyk <[email protected]>
Date:   Mon Feb 24 03:16:58 2020 +0200

    docs(config): document requirements config option

commit b5254cf
Author: devyk <[email protected]>
Date:   Mon Feb 24 02:49:20 2020 +0200

    fix: resolve insights warnings

commit c3849e4
Author: devyk <[email protected]>
Date:   Mon Feb 24 02:44:59 2020 +0200

    refactor(config): make resolve accept general input interface

commit e373eb3
Merge: 87c274c 1968d4f
Author: devyk <[email protected]>
Date:   Wed Feb 19 02:38:07 2020 +0200

    Merge branch 'master' of github.com:devyk/phpinsights

commit 87c274c
Author: devyk <[email protected]>
Date:   Sat Feb 15 17:52:42 2020 +0200

    feat(config): make min-requirements configurable through file

commit 43f36b4
Author: devyk <[email protected]>
Date:   Sat Feb 15 17:05:59 2020 +0200

    feat(config): make min-requirements configurable through file
Copy link
Author

@yhortuk yhortuk left a comment

Choose a reason for hiding this comment

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

@olivernybroe Sorry for delay with this PR, I was quite busy this week.

Decided to finalize it properly and prepare it for further improvement, so refactored it as we initially agreed. Changed resolve method signature to accept input interface, directory resolving and requirement merge now happens inside resolve method. Because of that I was ought to modify multiple tests, so it might be reasonable to take a closer look on this.

Moved options from composer command into configuration file and added documentation for requirements array.

Copy link
Collaborator

@olivernybroe olivernybroe left a comment

Choose a reason for hiding this comment

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

Looks good to me 👍
Thanks for making these changes, it's a really nice addition.

@Jibbarth Could you make a quick review of this, overall I think it's pretty clean. But as I have been more involved in this one, I think a quick look by you would be nice.

Copy link
Collaborator

@Jibbarth Jibbarth left a comment

Choose a reason for hiding this comment

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

It's a really nice implementation and great feature ! Good job @DevYK

I just left few comments.

I think you can also mention this new possibility in docs about CI (here), WDYT ?

phpinsights.php Outdated Show resolved Hide resolved
src/Application/ConfigResolver.php Outdated Show resolved Hide resolved
];
foreach ($requirements as $requirement) {
if ($input->hasParameterOption('--'.$requirement)) {
$config['requirements'][$requirement] = $input->getOption($requirement);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Great ❤️

src/Domain/Configuration.php Show resolved Hide resolved
@olivernybroe
Copy link
Collaborator

@Jibbarth Haha, I always forget about the docs 😅

@olivernybroe
Copy link
Collaborator

@Jibbarth I made the last changes, so I think this should be ready now 😄
Can you give it a quick review and then merge it, or just approve and i'll merge.

Copy link
Collaborator

@Jibbarth Jibbarth left a comment

Choose a reason for hiding this comment

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

@olivernybroe No doc update ? 😅

If you can add it, would be perfect 👌 Can be done later if you prefer 😉

I approve, I let you merge 👍

src/Domain/Configuration.php Outdated Show resolved Hide resolved
@olivernybroe olivernybroe merged commit 2de6f1c into nunomaduro:master Mar 5, 2020
@olivernybroe
Copy link
Collaborator

@DevYK Thanks a lot for the work on this! ❤️

@olivernybroe
Copy link
Collaborator

@DevYK do you have a twitter so we can tag you in the release?

@yhortuk
Copy link
Author

yhortuk commented Mar 11, 2020

@olivernybroe sure, @wioncy if not too late :)

@olivernybroe
Copy link
Collaborator

Tagged you in a comment and will fix it in the blog post :)

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

Successfully merging this pull request may close these issues.

Add min-requirements to config file
3 participants