Update beberlei/assert for PHP 8 compatibility

Run `composer update beberlei/assert` using composer 2.3.8 on PHP 8.1.7

Updating other packages without updating this fails with:

```
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - beberlei/assert v3.2.2 requires php ^7 -> your php version (8.1.7) does not satisfy that requirement.
    - spomky-labs/otphp v10.0.1 requires beberlei/assert ^3.0 -> satisfiable by beberlei/assert[v3.2.2].
    - spomky-labs/otphp is locked to version v10.0.1 and an update of this package was not requested.
```
This commit is contained in:
Chih-Hsuan Yen
2022-07-03 14:47:43 +08:00
committed by Andrew Dolgov
parent f8fe5e02f1
commit d9861038bc
32 changed files with 1557 additions and 840 deletions
@@ -23,10 +23,8 @@ class LazyAssertionException extends InvalidArgumentException
/**
* @param InvalidArgumentException[] $errors
*
* @return self
*/
public static function fromErrors(array $errors)
public static function fromErrors(array $errors): self
{
$message = \sprintf('The following %d assertions failed:', \count($errors))."\n";
@@ -45,7 +43,10 @@ class LazyAssertionException extends InvalidArgumentException
$this->errors = $errors;
}
public function getErrorExceptions()
/**
* @return InvalidArgumentException[]
*/
public function getErrorExceptions(): array
{
return $this->errors;
}