Skip to content

Commit

Permalink
Add limit for unbounded items
Browse files Browse the repository at this point in the history
  • Loading branch information
tvdijen committed Jun 3, 2023
1 parent 57c9ffb commit 35af9a5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"php": "^8.0",
"ext-dom": "*",

"simplesamlphp/xml-common": "^1.11.0",
"simplesamlphp/xml-common": "^1.11.5",
"simplesamlphp/assert": "^1.0.4"
},
"require-dev": {
Expand Down
1 change: 1 addition & 0 deletions src/XML/cas/Proxies.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ final class Proxies extends AbstractCasElement
final public function __construct(
protected array $proxy = [],
) {
Assert::maxCount($proxy, C::UNBOUNDED_LIMIT);
Assert::allIsInstanceOf($proxy, Proxy::class);
Assert::minCount($proxy, 1, 'Missing at least one Proxy in Proxies.', MissingElementException::class);
}
Expand Down

0 comments on commit 35af9a5

Please sign in to comment.