Skip to content

Commit 9c7ccb7

Browse files
committed
Change of argument order in call() scalar method
1 parent 7cff1f9 commit 9c7ccb7

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

documentation/upgrading.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,9 @@ After:
2222
```php
2323
ref('integers')->call(lit('explode'), refAlias: 'string', arguments: ['separator' => ','], returnType: type_list(type_integer()))
2424
ref('integers')->call(lit('explode'), refAlias: 'string', arguments: ['separator' => ','])
25-
ref('integers')->call(lit('count'), 'value')
25+
ref('integers')->call(lit('explode'), arguments: [',']) // will return null or error in strict mode
26+
ref('integers')->call(lit('explode')) // will return null or error in strict mode
27+
ref('integers')->call(lit('count')) // will work same as before
2628
```
2729

2830
## Upgrading from 0.26.x to 0.27.x

examples/topics/transformations/match/code.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
match_cases(
3535
[
3636
match_condition(ref('string')->contains('-'), ref('string')->strReplace('-', ' ')),
37-
match_condition(ref('string')->call('is_numeric', 'value'), ref('string')->cast(type_integer())),
37+
match_condition(ref('string')->call('is_numeric'), ref('string')->cast(type_integer())),
3838
match_condition(ref('string')->endsWith('%'), ref('string')->strReplace('%', '')->cast(type_integer())),
3939
match_condition(ref('string')->startsWith('+'), ref('string')->strReplace('+', '')->cast(type_integer())),
4040
],

src/core/etl/tests/Flow/ETL/Tests/Integration/Function/MatchCasesTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public function test_case_match() : void
2727
match_cases(
2828
[
2929
match_condition(ref('string')->contains('-'), ref('string')->strReplace('-', ' ')),
30-
match_condition(ref('string')->call('is_numeric', 'value'), ref('string')->cast(type_integer())),
30+
match_condition(ref('string')->call('is_numeric'), ref('string')->cast(type_integer())),
3131
match_condition(ref('string')->endsWith('%'), ref('string')->strReplace('%', '')->cast(type_integer())),
3232
match_condition(ref('string')->startsWith('+'), ref('string')->strReplace('+', '')->cast(type_integer())),
3333
],

0 commit comments

Comments
 (0)