composer / satis

Simple static Composer repository generator - For a full private Composer repo use Private Packagist

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Since $repositoryUrl is set as VALUE_REQUIRED it cannot be `null`

nikolareljin opened this issue · comments

This line breaks the satis builds for individual packages:

if (null !== $repositoryUrl && count($packagesFilter) > 0) {

./satis/bin/satis build -vvv ./satis.json ./dist namespace/plugin

In BuildCommand.php line 164:
                                                                          
  [InvalidArgumentException]                                              
  The arguments "package" and "repository-url" can not be used together.  
                                                                          

Exception trace:
  at /home/nik/publications/satis/src/Console/Command/BuildCommand.php:164
 Composer\Satis\Console\Command\BuildCommand->execute() at /home/nik/publications/satis/vendor/symfony/console/Command/Command.php:299
 Symfony\Component\Console\Command\Command->run() at /home/nik/publications/satis/vendor/symfony/console/Application.php:978
 Symfony\Component\Console\Application->doRunCommand() at /home/nik/publications/satis/vendor/symfony/console/Application.php:295
 Symfony\Component\Console\Application->doRun() at /home/nik/publications/satis/src/Console/Application.php:49
 Composer\Satis\Console\Application->doRun() at /home/nik/publications/satis/vendor/symfony/console/Application.php:167
 Symfony\Component\Console\Application->run() at /home/nik/publications/satis/bin/satis:60

build [--repository-url REPOSITORY-URL] [--repository-strict] [--no-html-output] [--skip-errors] [--stats] [--minify] [--] [<file> [<output-dir> [<packages>...]]]

Since the $repositoryUrl is always an array, additional check should be set instead:

        if ((null !== $repositoryUrl && [] !== $repositoryUrl) && count($packagesFilter) > 0) {
            throw new \InvalidArgumentException('The arguments "package" and "repository-url" can not be used together.');
        }
commented

Thanks for submitting a fix so quickly. 👍