poliander / cron

Parse and validate crontab expressions in PHP
https://github.com/poliander/cron
GNU General Public License v3.0
63 stars 10 forks source link

Could you change the namespace to "PoliadeCron", because in laravel this name "Cron" conflicts? #8

Closed jeffleyd closed 2 years ago

jeffleyd commented 2 years ago

https://github.com/poliander/cron/blob/fda892c60cd87056d1963f342f0f732b3cb2c2a0/src/Cron/CronExpression.php#L3

poliander commented 2 years ago

I see, Laravel 9 depends on package "dragonmantank/cron-expression" which has the same namespace an class name. But may I ask why you don't switch over to this library? Seems to be quite similiar :-)

jeffleyd commented 2 years ago

I see, Laravel 9 depends on package "dragonmantank/cron-expression" which has the same namespace an class name. But may I ask why you don't switch over to this library? Seems to be quite similiar :-)

Your library has methods I would like to use and "dragonmantank/cron-expression" doesn't.

poliander commented 2 years ago

Well I was wondering which breaking change I could introduce to justify a v3.0.0 (just kidding). More seriously, my thinking was to release a v3.0.0 with PHPUnit 10 support and wanted to drop PHP 7 support then. This should be somewhere around in the first half of February. Would that timeframe be okay for you?

jeffleyd commented 2 years ago

Well I was wondering which breaking change I could introduce to justify a v3.0.0 (just kidding). More seriously, my thinking was to release a v3.0.0 with PHPUnit 10 support and wanted to drop PHP 7 support then. This should be somewhere around in the first half of February. Would that timeframe be okay for you?

This is very good for me, I'll be waiting for the changes. Thanks a lot!

poliander commented 2 years ago

Okay, I'll leave this issue open until then. Thank you for reporting the namespace/classname conflict!

Robertkeli commented 2 years ago

Just came across the same issue, in Laravel,

Warning: Ambiguous class resolution, "Cron\CronExpression" was found 2x: in "/home/vagrant/code/commercekit-mis/vendor/dragonmantank/cron-expression/src/Cron/CronExpression.php" and "/home/vagrant/code/commercekit-mis/vendor/poliander/cron/src/Cron/CronExpression.php", the first will be used.

The namespace hasn't been changed?

poliander commented 2 years ago

@Robertkeli

Nah, not yet, I was hoping for a PHPUnit 10 release this February to justify a v3.0 release with changed namespace, but I think I will do so this week anyway.

Robertkeli commented 2 years ago

Thanks a lot @poliander , looking forward to it.

poliander commented 2 years ago

Sorry for the delay. I just released a v3.0.0 (identical to latest v2.4) with an updated namespace. Next minor release v3.1.0 will then depend on PHPUnit 10 and drop support for PHP versions v7.4 and v8.0.