From 96dbd06b7534f0dd5be003372658ff9b73b63479 Mon Sep 17 00:00:00 2001 From: Tchama Date: Fri, 7 Aug 2020 14:10:38 +0200 Subject: [PATCH] WIP adapt fixtures script for sf4 --- DataFixtures/ORM/LoadOption.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/DataFixtures/ORM/LoadOption.php b/DataFixtures/ORM/LoadOption.php index 9dd9a5aaf..0051dbb83 100644 --- a/DataFixtures/ORM/LoadOption.php +++ b/DataFixtures/ORM/LoadOption.php @@ -23,6 +23,7 @@ use Doctrine\Common\DataFixtures\AbstractFixture; use Doctrine\Common\DataFixtures\OrderedFixtureInterface; use Chill\CustomFieldsBundle\Entity\CustomFieldLongChoice\Option; +error_reporting(0); /** * Load some Options * @@ -131,6 +132,18 @@ class LoadOption extends AbstractFixture implements OrderedFixtureInterface foreach ($companiesParents as $text) { + + // sf4 check: erreur non résolue ici avec $text: In PDOStatement.php line 81: Notice: Array to string conversion + // + // et avec error_reporting(0): + + // An exception occurred while executing 'INSERT INTO custom_field_long_choice_options (id, key, text, internal_key, active, parent_id) VALUES (?, ?, ?, ?, ?, ?)' with params [1304, "company", { + // "fr":"Grandes Entreprises","nl":"Grotes Bedrijven","en":"Big Companies"}, "", 1, null]: + // + // SQLSTATE[22P02]: Invalid text representation: 7 ERROR: invalid input syntax for type json + // DETAIL: Token "Array" is invalid. + // CONTEXT: JSON data, line 1: Array + $parent = (new Option()) ->setText($text) ->setKey('company')