brianlmoon / net_gearman

A PHP interface for Gearman
84 stars 46 forks source link

Using relative requires which are more compatible. #22

Closed j03k64 closed 9 years ago

j03k64 commented 10 years ago

Also removes dependency on the PEAR_Exception class. Now Net_Gearman_Exception just extends Exception for better or worse.

brianlmoon commented 10 years ago

I rely on an autoloader and remove these in my local code tree. If we are adding Composer support and the whole world is likely using autoloaders, I would kind of like to try and think about removing these requires. What do you think?

croensch commented 10 years ago

:-1: the old require_once are good as they are. You just have to setup include_path at runtime to have brians source directory before PEAR. I also agree that it we should focus on autoloading in the future.

Arguably if PEAR_Exception is the only dependency than i'd favor removing it.

j03k64 commented 10 years ago

Sorry for the delay in responding ... For some reason I wasn't watching these repos and wasn't getting notifications.

@croensch Well doing the requires I suggested in the pull request should be compatible with existing installs (removing them would not) as well as the autoloaders (since the the class would already be loaded and therefore not go through the autoloader). I guess I don't follow your objection to the new requires since I don't even have PEAR installed (and never would).

So I could break out removing the PEAR_Exception requirement (which basically kills composer installs) into a separate pull request.

Rebuttals welcome :-)