From 64b4efce6881b5f58e034fb5caa5b20feaf781cc Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Thu, 1 Aug 2013 13:42:34 +0200 Subject: [PATCH] Revert "Turn persist_once on by default" This reverts commit 6c5da4ddbc5c51cab78bda575974691cebeeb16d. --- README.md | 4 ++-- src/Nelmio/Alice/Fixtures.php | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 14e058c98..98bc6dfc8 100644 --- a/README.md +++ b/README.md @@ -65,8 +65,8 @@ with the following keys: to null to disable (defaults to 1) - logger: a callable or Psr\Log\LoggerInterface object that will receive progress information during the loading of the fixtures -- persist_once: if set to false, objects are persisted after every file is parsed, - by default everything is persisted once at the end +- persist_once: only persist objects once if multiple files are passed, by default + objects are persisted after each file ### Detailed Usage ### diff --git a/src/Nelmio/Alice/Fixtures.php b/src/Nelmio/Alice/Fixtures.php index 5d11bd7fe..c11700e2e 100644 --- a/src/Nelmio/Alice/Fixtures.php +++ b/src/Nelmio/Alice/Fixtures.php @@ -30,7 +30,7 @@ public function __construct($container, array $defaultOptions = array(), array $ 'providers' => array(), 'seed' => 1, 'logger' => null, - 'persist_once' => true, + 'persist_once' => false, ); $this->defaultOptions = array_merge($defaults, $defaultOptions); $this->processors = $processors; @@ -47,7 +47,7 @@ public function __construct($container, array $defaultOptions = array(), array $ * - seed: a seed to make sure faker generates data consistently across * runs, set to null to disable * - logger: a callable or Psr\Log\LoggerInterface object that will receive progress information - * - persist_once: if set to false, objects are persisted after every file is parsed and not once at the end + * - persist_once: only persist objects once if multiple files are passsed * @param array $processors optional array of ProcessorInterface instances */ public static function load($files, $container, array $options = array(), array $processors = array())