Firstly, thank you for this great library. Since this month is themed by the Hacktoberfest a few months ago, I found a little bug working with this library, that I would like to fix.
We used a Symfony application with a lot of custom business logic and had the need to create a custom holiday provider to handle some application specific edge cases. Since this custom provider was located in our code, our namespace was obviously different from the one used in this library.
With this PR, I suggest switching to from getShortName() to getName() for the ReflectionClass created by the private method anotherTime() in the AbstractProvider.
We noticed that using getShortName() could result in a ProviderNotFoundException for some custom holiday providers, since the namespace is not fully qualified.
You can reproduce this bug by creating a custom holiday provider in a test project, where the namespace of the custom holiday provider differs in any way from the one used by this library. Next implement the next() or previous() methods from the AbstractProvider in your custom provider and see the application crash.
Firstly, thank you for this great library. Since this month is themed by the Hacktoberfest a few months ago, I found a little bug working with this library, that I would like to fix.
We used a Symfony application with a lot of custom business logic and had the need to create a custom holiday provider to handle some application specific edge cases. Since this custom provider was located in our code, our namespace was obviously different from the one used in this library.
With this PR, I suggest switching to from
getShortName()
togetName()
for the ReflectionClass created by the private methodanotherTime()
in theAbstractProvider
.We noticed that using
getShortName()
could result in aProviderNotFoundException
for some custom holiday providers, since the namespace is not fully qualified.You can reproduce this bug by creating a custom holiday provider in a test project, where the namespace of the custom holiday provider differs in any way from the one used by this library. Next implement the
next()
orprevious()
methods from theAbstractProvider
in your custom provider and see the application crash.Greetings from Germany and keep contributing!