phpinsights icon indicating copy to clipboard operation
phpinsights copied to clipboard

Feature/add support for custom presets

Open Andrew-Shook opened this issue 4 years ago β€’ 11 comments

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

Adds the ability for custom presets to be added to the configuration as a fully qualified class name.

Andrew-Shook avatar Oct 12 '20 13:10 Andrew-Shook

@Andrew-Shook Is this rdy for review?

olivernybroe avatar Oct 13 '20 07:10 olivernybroe

Yes it should be ready for review. I’m just now seeing merge conflicts, do you want me to resolve them?

Andrew-Shook avatar Oct 13 '20 11:10 Andrew-Shook

@Andrew-Shook Yes please πŸ‘

olivernybroe avatar Oct 13 '20 13:10 olivernybroe

It look great ! Thanks @Andrew-Shook ! I'll test it tomorrow :+1:

Jibbarth avatar Oct 24 '20 19:10 Jibbarth

So I have no idea why the ComposerLoader class is failing because it's not a class I changed. What do you want me to do about it?

Andrew-Shook avatar Nov 01 '20 14:11 Andrew-Shook

@Jibbarth, What's left to be done with this PR?

Andrew-Shook avatar Nov 10 '20 12:11 Andrew-Shook

@Andrew-Shook Really sorry for the delay :confounded:

For me, this PR is almost ready :+1: I just have an interrogation if we should throw an exception to user when it has an InvalidPreset in config file, instead of using DefaultPreset. WDYT ?

Jibbarth avatar Nov 14 '20 20:11 Jibbarth

Oh, and can you also complete the doc to indicate that this feature will be possible in v2 ? :hugs:

Jibbarth avatar Nov 14 '20 20:11 Jibbarth

@Andrew-Shook Really sorry for the delay πŸ˜–

For me, this PR is almost ready πŸ‘ I just have an interrogation if we should throw an exception to user when it has an InvalidPreset in config file, instead of using DefaultPreset. WDYT ?

So I was thinking about this when I did the last change and I do think we should throw an exception if they supply a preset but it’s invalid. I feel like the logic should be: If there is a preset and it’s valid return the preset. If there is a preset and it’s invalid, then throw an exception. If there is no preset, then guess the preset and return the guess. Does that sound good to you?

Andrew-Shook avatar Nov 14 '20 21:11 Andrew-Shook

Oh, and can you also complete the doc to indicate that this feature will be possible in v2 ? πŸ€—

Is there a v2 of the docs in the repo or should I just add it to the v1 of the docs where configs are covered and mark it as v2?

Andrew-Shook avatar Nov 14 '20 21:11 Andrew-Shook

@Andrew-Shook Sounds good πŸ‘ I agree that, that is the direction we shoud lgo.

You should just mark it with the v2 label πŸ‘

olivernybroe avatar Nov 14 '20 23:11 olivernybroe

Great idea that was never really followed up on. Closing for now. but has given plenty of food for thought

JustSteveKing avatar Sep 06 '22 09:09 JustSteveKing