Any thoughts? I'm porting my payments library from CI to Fuel and I need a curl library as a dependency (the alternative is embedding all the curl stuff within the class).
How should dependencies be handled? Checking if a core namespace (ie Curl) exists, and if not, throwing an exception?
Ah, right on. I've been off in CodeIgniter land for a spell and didn't know this had been added.
Thanks for the heads up = )
On dependencies though (let's just assume the dependency is a package, not part of the core), what path do you recommend?
I would say check the dependencies either in your package bootstrap (probably the most logical place), or in the _init() of your main class (if such a thing exists).
It is a good question though, and something we need to document also for modules, as you will get packages or modules that are written for a specific Fuel release, and might not work in newer releases.
In case of packages, you can check if a package is loaded by calling \Package::loaded('dependency') in 1.1/develop. Something similar is on the way for modules.