php - Doubts about require and require-dev of Composer -
i'm setting composer-installable repository. read composer documentation , setup repository success following instructions. understood of difference between require
, require-dev
require-dev
declare dependencies aren't mandatory repository works properly.
however, watched composer.json of libraries on github, zend form , respect validation, and, on these 2 repositories, there packages required these repositories works , listed in require-dev
. example, egulias/email-validator
dependency listed in require-dev
in respect validation, on this file, dependency required in order email validator works. so, why dependency isn't listed in require
?
the same happens zendframework/zend-captcha
, required captcha element works.
this dependency required in order email validator works.
it isn't. can see respect\validation\rules\email
has optional dependency egulias\emailvalidator\emailvalidator
. if egulias/email-validator
provided, class use it, otherwise fallback filter_var. class works either way. package can suggest install it.
Comments
Post a Comment