packages/sql-fixture/src/Plan/Exception/CyclicDependencyException.php
1<?php
2
3declare(strict_types=1);
4
5namespace SqlFixture\Plan\Exception;
6
7use SqlFixture\Plan\PlanStructureException;
8
9/**
10 * The pending table dependencies contain a cycle.
11 */
12final class CyclicDependencyException extends PlanStructureException
13{
14 /**
15 * The pending table dependencies contain a cycle.
16 * @param non-empty-list<string> $blockedTables
17 */
18 public function __construct(
19 public readonly array $blockedTables,
20 ) {
21 parent::__construct(sprintf(
22 'The plan contains cyclic dependencies among: %s. No generation order satisfies them.',
23 implode(', ', $blockedTables)
24 ));
25 }
26}
27