hmazter / laravel-schedule-list

Laravel package to add command to list all scheduled artisan commands
MIT License
94 stars 14 forks source link

Conflict between cron-expression vendors in Laravel 5.6 #12

Closed syphernl closed 6 years ago

syphernl commented 6 years ago

This package uses mtdowling/cron-expression:

hmazter/laravel-schedule-list  v0.2.1  requires  mtdowling/cron-expression (^1.2)  

but Laravel 5.6 makes use of dragonmantank/cron-expression:

laravel/framework  v5.6.3  requires  dragonmantank/cron-expression (~2.0)  

This appears to be working just fine, but running composer commands results in a list of warnings:

Warning: Ambiguous class resolution, "Cron\DayOfWeekField" was found in both "/var/www/vendor/dragonmantank/cron-expression/src/Cron/DayOfWeekField.php" and "/var/www/vendor/mtdowling/cron-expression/src/Cron/DayOfWeekField.php", the first will be used.
Warning: Ambiguous class resolution, "Cron\CronExpression" was found in both "/var/www/vendor/dragonmantank/cron-expression/src/Cron/CronExpression.php" and "/var/www/vendor/mtdowling/cron-expression/src/Cron/CronExpression.php", the first will be used.
Warning: Ambiguous class resolution, "Cron\FieldFactory" was found in both "/var/www/vendor/dragonmantank/cron-expression/src/Cron/FieldFactory.php" and "/var/www/vendor/mtdowling/cron-expression/src/Cron/FieldFactory.php", the first will be used.
Warning: Ambiguous class resolution, "Cron\MinutesField" was found in both "/var/www/vendor/dragonmantank/cron-expression/src/Cron/MinutesField.php" and "/var/www/vendor/mtdowling/cron-expression/src/Cron/MinutesField.php", the first will be used.
Warning: Ambiguous class resolution, "Cron\HoursField" was found in both "/var/www/vendor/dragonmantank/cron-expression/src/Cron/HoursField.php" and "/var/www/vendor/mtdowling/cron-expression/src/Cron/HoursField.php", the first will be used.
Warning: Ambiguous class resolution, "Cron\MonthField" was found in both "/var/www/vendor/dragonmantank/cron-expression/src/Cron/MonthField.php" and "/var/www/vendor/mtdowling/cron-expression/src/Cron/MonthField.php", the first will be used.
Warning: Ambiguous class resolution, "Cron\AbstractField" was found in both "/var/www/vendor/dragonmantank/cron-expression/src/Cron/AbstractField.php" and "/var/www/vendor/mtdowling/cron-expression/src/Cron/AbstractField.php", the first will be used.
Warning: Ambiguous class resolution, "Cron\FieldInterface" was found in both "/var/www/vendor/dragonmantank/cron-expression/src/Cron/FieldInterface.php" and "/var/www/vendor/mtdowling/cron-expression/src/Cron/FieldInterface.php", the first will be used.
Warning: Ambiguous class resolution, "Cron\DayOfMonthField" was found in both "/var/www/vendor/dragonmantank/cron-expression/src/Cron/DayOfMonthField.php" and "/var/www/vendor/mtdowling/cron-expression/src/Cron/DayOfMonthField.php", the first will be used.

Perhaps it would be wise to depend on the same package as Laravel?

Also because the dependency this package is relying on is deprecated:

NOTE This fork has been deprecated and development moved to https://github.com/dragonmantank/cron-expression. More information can be found in the blog post here. tl;dr - v2.0.0 is a major breaking change, and @dragonmantank can better take care of the project in a separate fork.
hmazter commented 6 years ago

Hi!

Yeah I saw this as well. I will take a look at switching the dependency next time I have time to work on this. Which hopefully is tonight.