GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
Already on GitHub? Sign in to your account
Check for dependencies of downloaders (eg whether git, hg, svn.. binary installed, if package requires so) on upload/install and dies with runtime error, if requirements not satisfied.
Check downloader for requirements (eg git binary) before running inst…
…all / update -> throw runtime exception if not satisfied
Why adding the localRepo here ? It will always be the same.
'install' === $operation->getJobType()
'dist' === $source
@pborreli no. Composer does not use this rule of the capital B which confuses the IDEs (they don't recognize it as boolean but as a class name).
ok my bad, removing the others keeping this one for the record
typo here. And using interface seems weird to me
Please don't add trailing whitespaces
'OK' === trim($output)
typo on executs, dunno what you wanna say
What i wanted to say: Before, the operations were executed immediately, now i build an array of executions, which will be executed delayed - after each operation/package is checked for availability. Will remove it.. Thx
Please remove the @return void
The $preferSource param is missing
you should remove this line
Typo, code style, white spaces
Typo, code style, white spaces II
Thx guys. Fixed.
Aligned code style
Please keep the phpdoc aligned (the PHP-CS-Fixer can fix it for you)
missing is before available
Is there really a huge benefit to this? It adds more code, more stuff to maintain, and I don't know if saving a few seconds in the odd case that you don't have a git/hg/svn binary available warrants it.
Up to you guys.
IMO any tool should make aware of missing requirements as early as possible. You cannot assume hg, svn and git are always available (don't know about Mac&Win, but on Linux, not even Ubuntu pre-installs them).
Running these check commands will have a bad impact on composer performance. Having such check sounds interesting to unserstand issues, but useless once the system is configured.
To avoid performance impacts, but get debug information, it would be better to run the check only after an error occured to check if it is due to a missing system requirement of a runtime error.
Well we already do that if a git clone fails and you don't have git for example, to be honest nobody complained about this in years so I think it can safely be closed.