Closed ekoisa closed 7 years ago
Having the "ext-gd"
requirement is a good idea IMO. It makes it really easy to figure out if the server is missing the dependency.
ampps, wamp, and dkk don't satisfy the php dependency? that seems odd
I agree, if there is problem with the dependency itself, guess it's should be reported at composer
this is captcha plugin not full stack framework, i think better just notify in readme there's need "php ext-gd" so composer no need to download ext-gd, because every server environment has specific setup
I think it is reasonable to state the minimum PHP version that the code will run on. On the other hand it is also useful to state the same in the readme. It's what I do in my own readmes (see Strongtype - check out the source to see how I do it using the Shields service.)
I also think that if ext-gd is required, then again it is right to put it in the composer.json file, (and state it in the readme.)
As a side note, looking at the code for Formidable, the readme says users will need to install your captcha lib to use captcha. In fact, you require it in composer. Would be better to make it a composer suggestion, put trap code in the Formidable class that uses your lib to die if it isn't installed, and then have the ext-gd requirement in the captcha lib
It is recommended by Composer that you include the PHP versions (and extensions required) when creating packages.
As someone installing Composer modules, you can use --ignore-platform-reqs
to specifically ignore these platform-level dependencies if you know for example that the machine you are installing composer deps on is not the same as your target infrastructure (e.g. if you are building a package to be deployed to a separate cluster).
OK, I agreee @chippyash about the Formidable dependency
Server not always installed natively in local server like ampps, wamp, dkk. So no need php dependency