The trait Cycle\Migrations\Operation\Traits\OptionsTrait requires the property $aliases which is not provided by Cycle\Migrations\Operation\Index\Alter.
Loading history...
21
22
/**
23
* @param string $table
24
* @param array $columns
25
* @param array $options
26
*/
27
public function __construct(string $table, array $columns, array $options = [])
28
{
29
parent::__construct($table, $columns);
30
$this->options = $options;
31
}
32
33
/**
34
* {@inheritdoc}
35
*/
36
public function execute(CapsuleInterface $capsule): void
37
{
38
$schema = $capsule->getSchema($this->getTable());
39
40
if (!$schema->hasIndex($this->columns)) {
41
$columns = implode(',', $this->columns);
42
throw new IndexException(
43
"Unable to alter index '{$schema->getName()}'.({$columns}), no such index"
It seems like $this->getOption('unique', false) can also be of type null; however, parameter $unique of Cycle\Database\Schema\AbstractIndex::unique() does only seem to accept boolean, maybe add an additional type check?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the ignore-type annotation