After struggling with my webhost for almost a month, they've finally just told me they don't support Composer. I still want to use PHRets. Is it possible to install and/or use PHRets without Composer?
-
1Honestly, I'd just install it locally with composer after which just copy+pasta the files to the remote host. Sure, it's not the best solution, but from I can see in the PHPREST docs they don't provide their own autoload option for the package(which is silly as far as I'm concerned). – Andrei Oct 31 '16 at 12:51
-
Yeah, it turns out I can use composer to download the vendor dependencies on another server, and I'm currently FTPing the vendor directory to the server upon which I need it. Hopefully it works. If not, then I guess I have a lot of code to write to access IDX without PHRets. – DiMono Nov 11 '16 at 20:58
1 Answers
If you're unable to use Composer on a server, you should still be able to install Composer locally and run it to populate your vendor/
directory. With that populated, you can simply copy/FTP that to the server and you should be fine.
Installing Composer packages from a machine other than the one that the code will run on has a few risks but is usually OK. For example, if a certain package requires PHP 7+ which you have installed locally but your server only runs PHP 5.6, Composer may gather the PHP 7+ dependencies just fine, but you'd run into problems loading those on your server (whereas if you ran Composer on that server, you'd get errors or earlier versions that didn't require PHP 7+ that still satisfied your defined requirements).
There are no plans for PHRETS to include it's own autoload option simply because of the other PHP libraries it depends on. Having to gather PHRETS, Guzzle, some Illuminate packages, etc. and put them all together in a way that doesn't involve Composer and still works is an incredible amount of work.

- 341
- 1
- 4