Details
-
Task
-
Resolution: Fixed
-
None
-
Medium
-
Empty show more show less
Description
PDO MySQL driver returns integers and floats
Integers and floats in result sets will now be returned using native PHP types instead of strings when using emulated prepared statements.
This effects test artifacts with string API responses like testSegmentEditing-assert-seg3.json property metaCache:
fakeSegId_3\":{\"nr\":\"3\" will become fakeSegId_3\":{\"nr\":3
Potentially many more parts can be affected, so this has to be checked carefully.
Especially places where === is used to compare against a DB response.
Classes implementing PHP built-in interfaces must specify return type
Most of the PHP internal classes are updated with tentative (=preliminary) return types [which ...] will be enforced since PHP 9.0.
PHP 8.1 and later emits a deprecation notice if a class declaration has an incompatible return type and lack of a return type declaration is also considered a return type mismatch.
This affects mainly zf1-future. In this PR the needed return types are added.
Passing null to non-nullable internal function parameters is deprecated
- preg_match(... string $subject)
- file_get_contents( ... bool $use_include_path)
- String functions: trim, str_replace, substr, ...
fix deprecation messages
[30-Nov-2023 Europe/Berlin] PHP Warning: Undefined array key "tmgr:matchratio" in /var/www/translate5/application/modules/editor/src/Task/Import/FileParser/Xlf/Namespaces/Tmgr.php on line 53
[30-Nov-2023 Europe/Berlin] PHP Warning: Undefined array key "translate5:maxNumberOfLines" in /var/www/translate5/application/modules/editor/src/Task/Import/FileParser/Xlf/Namespaces/Translate5.php on line 65
[30-Nov-2023 Europe/Berlin] PHP Deprecated: strtotime(): Passing null to parameter #1 ($datetime) of type string is deprecated in /var/www/translate5/library/ZfExtended/Worker/Abstract.php on line 581
[30-Nov-2023 Europe/Berlin] PHP Deprecated: ucfirst(): Passing null to parameter #1 ($string) of type string is deprecated in /var/www/translate5/application/modules/editor/Models/Export/Exported/Worker.php on line 57
fixing by updating vendors
[30-Nov-2023 Europe/Berlin] PHP Deprecated: Return type of Alchemy\BinaryDriver\Configuration::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/translate5/vendor/alchemy/binary-driver/src/Alchemy/BinaryDriver/Configuration.php on line 26
[30-Nov-2023 Europe/Berlin] PHP Deprecated: Return type of Alchemy\BinaryDriver\Configuration::offsetExists($offset) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/translate5/vendor/alchemy/binary-driver/src/Alchemy/BinaryDriver/Configuration.php on line 79
[30-Nov-2023 Europe/Berlin] PHP Deprecated: Return type of Alchemy\BinaryDriver\Configuration::offsetGet($offset) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/translate5/vendor/alchemy/binary-driver/src/Alchemy/BinaryDriver/Configuration.php on line 87
[30-Nov-2023 Europe/Berlin] PHP Deprecated: Return type of Alchemy\BinaryDriver\Configuration::offsetSet($offset, $value) should either be compatible with ArrayAccess::offsetSet(mixed $offset, mixed $value): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/translate5/vendor/alchemy/binary-driver/src/Alchemy/BinaryDriver/Configuration.php on line 95
[30-Nov-2023 Europe/Berlin] PHP Deprecated: Return type of Alchemy\BinaryDriver\Configuration::offsetUnset($offset) should either be compatible with ArrayAccess::offsetUnset(mixed $offset): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/translate5/vendor/alchemy/binary-driver/src/Alchemy/BinaryDriver/Configuration.php on line 103
[30-Nov-2023 Europe/Berlin] PHP Deprecated: Return type of PHPHtmlParser\Dom\Node\Collection::offsetGet($offset) should either be compatible with ArrayAccess::offsetGet(mixed $offset): mixed, or the #[\ReturnTypeWillChange]
[30-Nov-2023 Europe/Berlin] PHP Deprecated: Return type of QueryPath\CSS\Selector::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/translate5/vendor/querypath/QueryPath/src/QueryPath/CSS/Selector.php on line 76
[30-Nov-2023 Europe/Berlin] PHP Deprecated: Return type of QueryPath\CSS\Selector::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/translate5/vendor/querypath/QueryPath/src/QueryPath/CSS/Selector.php on line 61
[30-Nov-2023 Europe/Berlin] PHP Deprecated: Return type of QueryPath\DOMQuery::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/translate5/vendor/querypath/QueryPath/src/QueryPath/DOMQuery.php on line 367
[30-Nov-2023 Europe/Berlin] PHP Deprecated: Return type of QueryPath\DOMQuery::getIterator() should either be compatible with IteratorAggregate::getIterator(): Traversable, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/translate5/vendor/querypath/QueryPath/src/QueryPath/DOMQuery.php on line 3988
[30-Nov-2023 Europe/Berlin] PHP Deprecated: Return type of QueryPath\QueryPathIterator::current() should either be compatible with IteratorIterator::current(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/translate5/vendor/querypath/QueryPath/src/QueryPath/QueryPathIterator.php on line 22
[30-Nov-2023 Europe/Berlin] PHP Deprecated: preg_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /var/www/translate5/vendor/shardj/zf1-future/library/Zend/Db/Statement.php on line 212
[30-Nov-2023 Europe/Berlin] PHP Deprecated: trim(): Passing null to parameter #1 ($string) of type string is deprecated in /var/www/translate5/vendor/querypath/QueryPath/src/QueryPath/DOMQuery.php on line 100
attribute should be used to temporarily suppress the notice in /var/www/translate5/vendor/paquettg/php-html-parser/src/PHPHtmlParser/Dom/Node/Collection.php on line 133
Attachments
Issue Links
- blocks
-
TRANSLATE-3436 Integrate GPT-4 with translate5 as translation engine
- Done
- is blocked by
-
TRANSLATE-3596 Fix PHP 8.1 warnings
- Done
-
TRANSLATE-3597 Fix PHP 8.1 warnings
- Done
-
TRANSLATE-3598 Fix PHP 8.1 warnings
- Done
- relates to
-
TRANSLATE-2740 PHP 8 is now required - support for older PHP versions is dropped
- Done
- links to
- mentioned in
-
Page Loading...