bmitch / churn-php

Discover files in need of refactoring.
MIT License
1.36k stars 56 forks source link

"commitsSince" not recognized #360

Closed MGatner closed 2 years ago

MGatner commented 2 years ago

When I drop in the example config (modified or verbatim) I get the following warning on launch:

Unrecognized configuration keys: commitsSince

Fresh install of church as composer require --dev, both pulled version 1.7.0. I don't see any other reports of this so far; I will dig through the config code and bit and see if anything is apparent.

MGatner commented 2 years ago

It is because the configuration string is actual the singular commitSince: https://github.com/bmitch/churn-php/blob/fca48716d5b958a3bd87ed80adefdf87e0e63f27/src/Configuration/Validator/CommitsSince.php#L20

The Validator is actually the plural though as well. Need a maintainer to advise, then I can send a PR one way or another.

villfa commented 2 years ago

Thank you for the report!

The right key is commitsSince. This regression exists since 1.6.0 and has been introduced by 1b59a42.

In my opinion we should support the 2 spellings just in case some users already use the singular form. However the usage of commitSince must trigger a deprecation message indicating it won't be supported in the next major version.

villfa commented 2 years ago

FYI the fix has been released with Churn 1.7.1 :)

MGatner commented 2 years ago

🥳🎉🎊