Merge branch '4.3' into 4.4
* 4.3: fix merge
This commit is contained in:
commit
41e452a906
@ -4,8 +4,7 @@ CHANGELOG
|
||||
4.4.0
|
||||
-----
|
||||
|
||||
* [DEPRECATION] The `XmlEncoder::TYPE_CASE_ATTRIBUTES` constant is deprecated.
|
||||
Use `XmlEncoder::TYPE_CAST_ATTRIBUTES` instead
|
||||
* deprecated the `XmlEncoder::TYPE_CASE_ATTRIBUTES` constant, use `XmlEncoder::TYPE_CAST_ATTRIBUTES` instead
|
||||
|
||||
4.3.0
|
||||
-----
|
||||
|
@ -35,7 +35,7 @@ class CsvEncoder implements EncoderInterface, DecoderInterface
|
||||
private $defaultContext = [
|
||||
self::DELIMITER_KEY => ',',
|
||||
self::ENCLOSURE_KEY => '"',
|
||||
self::ESCAPE_CHAR_KEY => '\\',
|
||||
self::ESCAPE_CHAR_KEY => '',
|
||||
self::ESCAPE_FORMULAS_KEY => false,
|
||||
self::HEADERS_KEY => [],
|
||||
self::KEY_SEPARATOR_KEY => '.',
|
||||
@ -47,10 +47,6 @@ class CsvEncoder implements EncoderInterface, DecoderInterface
|
||||
*/
|
||||
public function __construct($defaultContext = [], string $enclosure = '"', string $escapeChar = '', string $keySeparator = '.', bool $escapeFormulas = false)
|
||||
{
|
||||
if ('' === $escapeChar && \PHP_VERSION_ID < 70400) {
|
||||
$escapeChar = '\\';
|
||||
}
|
||||
|
||||
if (!\is_array($defaultContext)) {
|
||||
@trigger_error('Passing configuration options directly to the constructor is deprecated since Symfony 4.2, use the default context instead.', E_USER_DEPRECATED);
|
||||
|
||||
@ -64,6 +60,10 @@ class CsvEncoder implements EncoderInterface, DecoderInterface
|
||||
}
|
||||
|
||||
$this->defaultContext = array_merge($this->defaultContext, $defaultContext);
|
||||
|
||||
if (\PHP_VERSION_ID < 70400 && '' === $this->defaultContext[self::ESCAPE_CHAR_KEY]) {
|
||||
$this->defaultContext[self::ESCAPE_CHAR_KEY] = '\\';
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user