File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed
Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change 55namespace TypistTech \PhpMatrix \Matrices ;
66
77use Composer \Semver \Semver ;
8+ use Composer \Semver \VersionParser ;
89use TypistTech \PhpMatrix \Exceptions \UnexpectedValueException as AppUnexpectedValueException ;
910use TypistTech \PhpMatrix \Releases \ReleasesInterface ;
1011use UnexpectedValueException ;
1314{
1415 public function __construct (
1516 private ReleasesInterface $ releases ,
17+ private VersionParser $ versionParser = new VersionParser (),
1618 ) {}
1719
1820 /**
@@ -21,6 +23,9 @@ public function __construct(
2123 public function satisfiedBy (string $ constraint ): array
2224 {
2325 try {
26+ // Validate constraint before passing to Semver::satisfiedBy();
27+ $ this ->versionParser ->parseConstraints ($ constraint );
28+
2429 return Semver::satisfiedBy (
2530 $ this ->releases ->all (),
2631 $ constraint
You can’t perform that action at this time.
0 commit comments