Bug: --skip-errors doesn't skip all exceptions
- Dominant language
- PHP
- Stars
- 3.3k
- Forks
- 530
- Avg merge
- 6h 53m
- Merged PRs (30d)
- 13
Description
An old version of some dependencies depedency uses that pessimistic version constraint, which causes the build to fail completely because the exception isn't caught:
```
[UnexpectedValueException]
Could not parse version constraint ~>1.4.0: Invalid operator "~>", you probably meant to use the "~" operator
Exception trace:
() at /opt/satis/satis-gui/vendor/composer/composer/src/Composer/Package/Version/VersionParser.php:309
Composer\Package\Version\VersionParser->parseConstraint() at /opt/satis/satis-gui/vendor/composer/composer/src/Composer/Package/Version/VersionParser.php:264
Composer\Package\Version\VersionParser->parseConstraints() at /opt/satis/satis-gui/vendor/composer/composer/src/Composer/Package/Version/VersionParser.php:228
Composer\Package\Version\VersionParser->parseLinks() at /opt/satis/satis-gui/vendor/composer/composer/src/Composer/Package/Loader/ArrayLoader.php:123
Composer\Package\Loader\ArrayLoader->load() at /opt/satis/satis-gui/vendor/fxp/composer-asset-plugin/Repository/NpmRepository.php:133
Fxp\Composer\AssetPlugin\Repository\NpmRepository->createArrayRepositoryConfig() at /opt/satis/satis-gui/vendor/fxp/composer-asset-plugin/Repository/NpmRepository.php:79
Fxp\Composer\AssetPlugin\Repository\NpmRepository->createVcsRepositoryConfig() at /opt/satis/satis-gui/vendor/fxp/composer-asset-plugin/Repository/AbstractAssetsRepository.php:136
Fxp\Composer\AssetPlugin\Repository\AbstractAssetsRepository->whatProvides() at /opt/satis/satis-gui/vendor/composer/composer/src/Composer/DependencyResolver/Pool.php:192
Composer\DependencyResolver\Pool->computeWhatProvides() at /opt/satis/satis-gui/vendor/composer/composer/src/Composer/DependencyResolver/Pool.php:181
Composer\DependencyResolver\Pool->whatProvides() at /opt/satis/satis-gui/vendor/composer/satis/src/Composer/Satis/Command/BuildCommand.php:279
Composer\Satis\Command\BuildCommand->selectPackages() at /opt/satis/satis-gui/vendor/composer/satis/src/Composer/Satis/Command/BuildCommand.php:152
Composer\Satis\Command\BuildCommand->execute() at /opt/satis/satis-gui/vendor/symfony/console/Symfony/Component/Console/Command/Command.php:252
Symfony\Component\Console\Command\Command->run() at /opt/satis/satis-gui/vendor/symfony/console/Symfony/Component/Console/Application.php:874
Symfony\Component\Console\Application->doRunCommand() at /opt/satis/satis-gui/vendor/symfony/console/Symfony/Component/Console/Application.php:195
Symfony\Component\Console\Application->doRun() at /opt/satis/satis-gui/vendor/composer/satis/src/Composer/Satis/Console/Application.php:52
Composer\Satis\Console\Application->doRun() at /opt/satis/satis-gui/vendor/symfony/console/Symfony/Component/Console/Application.php:126
Symfony\Component\Console\Application->run() at /opt/satis/satis-gui/vendor/composer/satis/bin/satis:9
build [--no-html-output] [--skip-errors] [file] [output-dir] [packages1] ... [packagesN]
```
Contributor guide
Research direction
Start by reproducing the malformed version constraint with the Satis build command and --skip-errors. Read the Satis BuildCommand entry points shown in the trace, especially selectPackages and execute, then locate existing tests for build error handling. Done means this exception is skipped and the build continues as the option promises.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- backend, cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100