Permalink
Browse files

Don't complain about pre-replaced YAML fixture relations

  • Loading branch information...
1 parent aa3b358 commit 9ffd25225ea5c076130a02abf13d108f09bbcdb5 @chillu chillu committed Dec 17, 2012
Showing with 3 additions and 2 deletions.
  1. +3 −2 dev/FixtureBlueprint.php
@@ -129,8 +129,9 @@ public function createObject($identifier, $data = null, $fixtures = null) {
$parsedItems = array();
$items = preg_split('/ *, */',trim($fieldVal));
foreach($items as $item) {
- // Check for correct format: =><relationname>.<identifier>
- if(!preg_match('/^=>[^\.]+\.[^\.]+/', $item)) {
+ // Check for correct format: =><relationname>.<identifier>.
+ // Ignore if the item has already been replaced with a numeric DB identifier
+ if(!is_numeric($item) && !preg_match('/^=>[^\.]+\.[^\.]+/', $item)) {
throw new InvalidArgumentException(sprintf(
'Invalid format for relation "%s" on class "%s" ("%s")',
$fieldName,

0 comments on commit 9ffd252

Please sign in to comment.