Skip to content

Allow to configure ignore globally#1104

Merged
theofidry merged 5 commits intoinfection:masterfrom
theofidry:feature/global-ignore
Mar 3, 2020
Merged

Allow to configure ignore globally#1104
theofidry merged 5 commits intoinfection:masterfrom
theofidry:feature/global-ignore

Conversation

@theofidry
Copy link
Copy Markdown
Member

@theofidry theofidry commented Mar 3, 2020

As of now, if you want to add an ignore setting, you need to add it on a mutator basis. This however gets seriously tedious, repetitive and hard to keep in sync if you have a lot of mutators listed.

This PR proposes to allow a global ignore config which will be enriched (not overwritten) by each mutators.

Comment thread resources/schema.json Outdated
Comment thread src/Mutator/MutatorResolver.php
Comment thread src/Mutator/MutatorResolver.php
Comment thread tests/phpunit/Mutator/MutatorResolverTest.php Outdated
theofidry and others added 2 commits March 3, 2020 10:08
Co-Authored-By: Alexey Kopytko <alexey@kopytko.com>
@BackEndTea
Copy link
Copy Markdown
Member

Is it not possible atm to set an ignore on the @default mutator set?

@theofidry
Copy link
Copy Markdown
Member Author

@BackEndTea it is but the default is not necessarily all the mutators

@maks-rafalko maks-rafalko added this to the 0.16.0 milestone Mar 3, 2020
Copy link
Copy Markdown
Member

@maks-rafalko maks-rafalko left a comment

Choose a reason for hiding this comment

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

Nice.

Let's write detailed documentation for this new feature with examples for

This PR proposes to allow a global ignore config which will be enriched (not overwritten) by each mutators.

I mean, docs should clearly state that ignore configs will be merged, not overridden, to avoid any confusion.


/**
* @param array<string, string>|bool|stdClass $settings
* @param array<string, array<string, string>> $mutators
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Why was it changed?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

It was incorrect :)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Hm actually lemme double check that again

@maks-rafalko
Copy link
Copy Markdown
Member

maks-rafalko commented Mar 3, 2020

Hm.. I know why I hasn't noticed docs PR, its for your fork: https://github.com/theofidry/site/pull/1/files. I've updated first message to include information about docs, please update with infection/site url once ready

@theofidry
Copy link
Copy Markdown
Member Author

sight stupid me, thanks will update the PR tonight

@theofidry theofidry merged commit 593189d into infection:master Mar 3, 2020
@theofidry theofidry deleted the feature/global-ignore branch March 3, 2020 16:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants