-
-
Notifications
You must be signed in to change notification settings - Fork 56
fix: parse text[] as array<string> #157
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -44,7 +44,7 @@ public static function provideValidTransformations(): array | |
| ], | ||
| [ | ||
| 'phpValue' => [ | ||
| 1, | ||
|
Owner
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why was this changed? |
||
| '1', | ||
| '2', | ||
| 'text', | ||
| 'some text here', | ||
|
|
@@ -67,7 +67,7 @@ public static function provideValidTransformations(): array | |
| */ | ||
| public function has_name(): void | ||
| { | ||
| $this->assertEquals('text[]', $this->fixture->getName()); | ||
| $this->assertSame('text[]', $this->fixture->getName()); | ||
| } | ||
|
|
||
| /** | ||
|
|
@@ -77,7 +77,7 @@ public function has_name(): void | |
| */ | ||
| public function can_transform_from_php_value(?array $phpValue, ?string $postgresValue): void | ||
| { | ||
| $this->assertEquals($postgresValue, $this->fixture->convertToDatabaseValue($phpValue, $this->platform)); | ||
| $this->assertSame($postgresValue, $this->fixture->convertToDatabaseValue($phpValue, $this->platform)); | ||
| } | ||
|
|
||
| /** | ||
|
|
@@ -87,6 +87,6 @@ public function can_transform_from_php_value(?array $phpValue, ?string $postgres | |
| */ | ||
| public function can_transform_to_php_value(?array $phpValue, ?string $postgresValue): void | ||
| { | ||
| $this->assertEquals($phpValue, $this->fixture->convertToPHPValue($postgresValue, $this->platform)); | ||
| $this->assertSame($phpValue, $this->fixture->convertToPHPValue($postgresValue, $this->platform)); | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -43,7 +43,7 @@ public static function provideValidTransformations(): array | |
| 0 => 'dfasdf', | ||
| 1 => 'qw,,e{q"we', | ||
| 2 => "'qrer'", | ||
| 3 => 604, | ||
|
||
| 3 => '604', | ||
| 4 => '"aaa","b""bb","ccc"', | ||
| ], | ||
| 'postgresValue' => '{"dfasdf","qw,,e{q\"we","\'qrer\'",604,"\"aaa\",\"b\"\"bb\",\"ccc\""}', | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. logic: Mismatch between test data - phpValue has '604' as string but postgresValue has 604 as unquoted number. This will cause type inconsistency. |
||
|
|
@@ -71,7 +71,7 @@ public static function provideValidTransformations(): array | |
| */ | ||
| public function can_transform_from_php_value(array $phpValue, string $postgresValue): void | ||
| { | ||
| $this->assertEquals($postgresValue, DataStructure::transformPHPArrayToPostgresTextArray($phpValue)); | ||
| $this->assertSame($postgresValue, DataStructure::transformPHPArrayToPostgresTextArray($phpValue)); | ||
| } | ||
|
|
||
| /** | ||
|
|
@@ -83,7 +83,7 @@ public function can_transform_from_php_value(array $phpValue, string $postgresVa | |
| */ | ||
| public function can_transform_to_php_value(array $phpValue, string $postgresValue): void | ||
| { | ||
| $this->assertEquals($phpValue, DataStructure::transformPostgresTextArrayToPHPArray($postgresValue)); | ||
| $this->assertSame($phpValue, DataStructure::transformPostgresTextArrayToPHPArray($postgresValue)); | ||
| } | ||
|
|
||
| /** | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
logic: Error message mentions expecting integer/float values but code no longer handles these types