Skip to content
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

Support Composite types #303

Merged
merged 40 commits into from
Jan 9, 2024
Merged
Changes from 1 commit
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
9a25d99
Support Composite types
Tigrov Jul 26, 2023
97863dc
Update comment and test
Tigrov Jul 26, 2023
913ea1f
Fix styleci issues
Tigrov Jul 26, 2023
8d88a2a
Fix psalm issues
Tigrov Jul 26, 2023
17beaef
Fill skipped items for indexed `$value`
Tigrov Jul 27, 2023
7e24fd4
Add CompositeExpressionInterface
Tigrov Jul 27, 2023
d2975b5
Add tests and fixes
Tigrov Jul 28, 2023
42ff006
Remove CompositeExpressionInterface
Tigrov Jul 28, 2023
6cc2920
Remove TODO retrieve columns from schema
Tigrov Jul 28, 2023
3f6c680
Move to folder `Composite`
Tigrov Jul 28, 2023
47c0622
Apply fixes from StyleCI
Tigrov Jul 28, 2023
d0c21d3
Add tests and fixes
Tigrov Jul 28, 2023
fd67929
Merge branch 'yiisoft:master' into support_composite_types
Tigrov Jul 29, 2023
a455ab8
Remove check of `CompositeExpression` type
Tigrov Jul 28, 2023
65a388b
Refactor
Tigrov Jul 29, 2023
32645ec
Apply fixes from StyleCI
Tigrov Jul 29, 2023
09be4f6
Update tests and comments
Tigrov Jul 29, 2023
ae6f41c
Update comments
Tigrov Jul 29, 2023
d5f295e
Fix typo in `$compositeParser`
Tigrov Jul 30, 2023
4119262
Refactor ColumnSchema.php (#302)
Tigrov Jul 29, 2023
7ef91fd
Revert "Refactor ColumnSchema.php (#302)"
Tigrov Jul 30, 2023
b4bde58
Merge remote-tracking branch 'origin/master' into support_composite_t…
Tigrov Jul 30, 2023
ec137b7
Improve initialization of ColumnSchema type
Tigrov Aug 1, 2023
0747938
Mark `CompositeParser` class as `final`
Tigrov Aug 1, 2023
c6ba36f
Merge branch 'master' into support_composite_types
Tigrov Sep 6, 2023
3a3f47b
Update according to #297
Tigrov Sep 6, 2023
0f872e3
Improve `dbTypecastArray()`
Tigrov Sep 6, 2023
1a06c70
Add test for excessive elements
Tigrov Sep 6, 2023
feb58a1
Add line to CHANGELOG.md
Tigrov Sep 6, 2023
edb4f17
Rename $fieldName to $compositeColumnName
Tigrov Sep 6, 2023
90e9dbf
Double array of null values
Tigrov Sep 6, 2023
12cd867
Update test
Tigrov Sep 6, 2023
f39f761
Merge branch 'master' into support_composite_types
Tigrov Nov 14, 2023
c06f2b1
Apply suggestions from code review
Tigrov Nov 14, 2023
f9cfa6a
Merge branch 'master' into support_composite_types
Tigrov Jan 8, 2024
da586d2
Psalm suppress `MixedAssignment`
Tigrov Jan 8, 2024
77fa5ab
Remove `null` type from `ColumnSchema::$columns`
Tigrov Jan 8, 2024
0f6c122
Update CHANGELOG.md, improve
Tigrov Jan 8, 2024
d85acfb
Merge branch 'master' into support_composite_types
Tigrov Jan 9, 2024
a5e1dbb
Remove `@psalm-var mixed` annotations
Tigrov Jan 9, 2024
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
Prev Previous commit
Next Next commit
Update according to #297
  • Loading branch information
Tigrov committed Sep 6, 2023
commit 3a3f47be22d4697948dffba5974357be5e433fe2
10 changes: 1 addition & 9 deletions src/ColumnSchema.php
Original file line number Diff line number Diff line change
@@ -212,7 +212,7 @@ private function phpTypecastValue(mixed $value): mixed
private function phpTypecastComposite(mixed $value): array|null
{
if (is_string($value)) {
$value = $this->getCompositeParser()->parse($value);
$value = (new CompositeParser())->parse($value);
}

if (!is_iterable($value)) {
@@ -306,12 +306,4 @@ public function getColumns(): array|null
{
return $this->columns;
}

/**
* Creates instance of `CompositeParser`.
*/
private function getCompositeParser(): CompositeParser
{
return new CompositeParser();
}
}