Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"require": {
"php": ">=8.0",
"cycle/orm": "^2.2.0",
"cycle/schema-builder": "^2.1.0",
"cycle/schema-builder": "^2.2",
"doctrine/annotations": "^1.13",
"spiral/attributes": "^2.8|^3.0",
"spiral/tokenizer": "^2.8|^3.0",
Expand Down
3 changes: 2 additions & 1 deletion src/Annotation/Column.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ final class Column
* @param bool $castDefault
*/
public function __construct(
#[ExpectedValues(values: ['primary', 'bigPrimary', 'enum', 'boolean', 'integer', 'tinyInteger', 'bigInteger',
#[ExpectedValues(values: ['primary', 'bigPrimary', 'enum', 'boolean',
'integer', 'tinyInteger', 'smallInteger', 'bigInteger',
'string', 'text', 'tinyText', 'longText', 'double', 'float', 'decimal', 'datetime', 'date', 'time',
'timestamp', 'binary', 'tinyBinary', 'longBinary', 'json', 'uuid',
])]
Expand Down
9 changes: 6 additions & 3 deletions tests/Annotated/Functional/Driver/Common/InvalidTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
use Cycle\Schema\Generator\SyncTables;
use Cycle\Schema\Generator\ValidateEntities;
use Cycle\Schema\Registry;
use Spiral\Attributes\AnnotationReader;
use Spiral\Attributes\ReaderInterface;
use Spiral\Tokenizer\Config\TokenizerConfig;
use Spiral\Tokenizer\Tokenizer;
Expand Down Expand Up @@ -59,10 +60,12 @@ public function testInvalidRelation(ReaderInterface $reader): void
*/
public function testNotDefinedColumnTypeShouldThrowAnException(ReaderInterface $reader): void
{
$message = $reader instanceof AnnotationReader
? 'Too few arguments to function Cycle\Annotated\Annotation\Column::__construct(), 0 passed'
: 'Some of required arguments [`type`] is missed on `Cycle\Annotated\Tests\Fixtures\Fixtures4\User.id.`';

$this->expectException(AnnotationException::class);
// $this->expectErrorMessage(
// 'Some of required arguments [`type`] is missed on `Cycle\Annotated\Tests\Fixtures\Fixtures4\User.id.`'
// );
$this->expectErrorMessage($message);

$tokenizer = new Tokenizer(new TokenizerConfig([
'directories' => [__DIR__ . '/../../../Fixtures/Fixtures4'],
Expand Down