Merge branch 'master' into upgrade-php82

This commit is contained in:
2023-03-06 16:37:09 +01:00
41 changed files with 254 additions and 233 deletions

View File

@@ -11,18 +11,21 @@ declare(strict_types=1);
namespace Chill\DocGeneratorBundle\Service\Generator;
class GeneratorException extends \RuntimeException
use RuntimeException;
use Throwable;
class GeneratorException extends RuntimeException
{
/**
* @var list<string>
*/
private array $errors;
public function __construct(array $errors = [], \Throwable $previous = null)
public function __construct(array $errors = [], ?Throwable $previous = null)
{
$this->errors = $errors;
parent::__construct(
"Could not generate the document",
'Could not generate the document',
15252,
$previous
);

View File

@@ -11,10 +11,12 @@ declare(strict_types=1);
namespace Chill\DocGeneratorBundle\Service\Generator;
class ObjectReadyException extends \RuntimeException
use RuntimeException;
class ObjectReadyException extends RuntimeException
{
public function __construct()
{
parent::__construct("object is already ready", 6698856);
parent::__construct('object is already ready', 6698856);
}
}

View File

@@ -11,12 +11,14 @@ declare(strict_types=1);
namespace Chill\DocGeneratorBundle\Service\Generator;
class RelatedEntityNotFoundException extends \RuntimeException
use RuntimeException;
class RelatedEntityNotFoundException extends RuntimeException
{
public function __construct(string $relatedEntityClass, int $relatedEntityId, \Throwable $previous = null)
public function __construct(string $relatedEntityClass, int $relatedEntityId, ?\Throwable $previous = null)
{
parent::__construct(
sprintf("Related entity not found: %s, %s", $relatedEntityClass, $relatedEntityId),
sprintf('Related entity not found: %s, %s', $relatedEntityClass, $relatedEntityId),
99876652,
$previous
);