brianlmoon / GearmanManager

PHP daemon for managing gearman workers
http://brian.moonspot.net/GearmanManager
BSD 2-Clause "Simplified" License
682 stars 190 forks source link

Missing composer check for Gearman Extension #155

Closed ReduktorSpalin closed 5 years ago

ReduktorSpalin commented 5 years ago

I think this project should have more verbose dependency on ext-gearman in composer.json. It misses line: "ext-gearman":"*".

This way, if gearman extension was not installed by chance it can be early detected with composer's check-platform-reqs command.

brianlmoon commented 5 years ago

ext-gearman is not required.

ReduktorSpalin commented 5 years ago

Maybe that is incorrect solution. But problem is still there (I think). IMHO if Any of required classes in GearmanPearManager would be missing, script should exit with some error message and code to help target issue, instead of silently requiring dependencies.

I might be wrong, but I feel it might get confusing. Maybe there should be separate function : check lib dependencies (with default implementation) and overriden by each of adapters (Pecl and Pear).

That's just my guess.

brianlmoon commented 5 years ago

What would happen if you didn’t have either the pecl or pear lib installed? It would not be silent. And the README clearly states the requirements. In the seven years this project has been in use, this has never been an issue.