## BC BREAK The type of `$start` in `AbstractPlatform::getLocateExpression()` changed from `string|false` to `?string`
The default value of `$start` is now `null`, not `false`.
## BC BREAK The types of `$start` and `$length` in `AbstractPlatform::getSubstringExpression()` changed from `int` and `?int` to `string` and `?string` respectively
The platform abstraction allows building arbitrary SQL expressions, so even if the arguments represent numeric literals, they should be passed as a string.
## BC BREAK The type of `$char` in `AbstractPlatform::getTrimExpression()` changed from `string|false` to `?string`
## BC BREAK The type of `$char` in `AbstractPlatform::getTrimExpression()` changed from `string|false` to `?string`
The default value of `$char` is now `null`, not `false`. Additionally, the method will throw an `InvalidArgumentException` in an invalid value of `$mode` is passed.
The default value of `$char` is now `null`, not `false`. Additionally, the method will throw an `InvalidArgumentException` in an invalid value of `$mode` is passed.
@@ -37,7 +37,7 @@ class SqlitePlatformTest extends AbstractPlatformTestCase
...
@@ -37,7 +37,7 @@ class SqlitePlatformTest extends AbstractPlatformTestCase
publicfunctiontestGeneratesSqlSnippets():void
publicfunctiontestGeneratesSqlSnippets():void
{
{
self::assertEquals('REGEXP',$this->platform->getRegexpExpression(),'Regular expression operator is not correct');
self::assertEquals('REGEXP',$this->platform->getRegexpExpression(),'Regular expression operator is not correct');
self::assertEquals('SUBSTR(column, 5, LENGTH(column))',$this->platform->getSubstringExpression('column',5),'Substring expression without length is not correct');
self::assertEquals('SUBSTR(column, 5)',$this->platform->getSubstringExpression('column',5),'Substring expression without length is not correct');
self::assertEquals('SUBSTR(column, 0, 5)',$this->platform->getSubstringExpression('column',0,5),'Substring expression with length is not correct');
self::assertEquals('SUBSTR(column, 0, 5)',$this->platform->getSubstringExpression('column',0,5),'Substring expression with length is not correct');