Skip to content
This repository was archived by the owner on Sep 16, 2021. It is now read-only.

Commit d1a248d

Browse files
committed
allow more things to be nullable to avoid problems when phpcr-odm starts to properly validate
1 parent 0a9d0ef commit d1a248d

File tree

4 files changed

+10
-8
lines changed

4 files changed

+10
-8
lines changed

Model/MenuNode.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,9 @@ class MenuNode extends MenuNodeBase implements
3737
protected $linkType;
3838

3939
/**
40-
* @var mixed
40+
* The content this menu item points to.
41+
*
42+
* @var object
4143
*/
4244
protected $content;
4345

Model/MenuNodeBase.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ class MenuNodeBase implements NodeInterface
101101
*
102102
* @var array
103103
*/
104-
protected $extras;
104+
protected $extras = array();
105105

106106
/**
107107
* Parameters to use when generating the route.

Resources/config/doctrine-model/MenuNode.phpcr.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@
1515
<reference-one name="content" property="menuContent"/>
1616

1717
<field name="label" type="string" translated="true"/>
18-
<field name="uri" type="string" translated="true"/>
19-
<field name="linkType" type="string"/>
18+
<field name="uri" type="string" translated="true" nullable="true"/>
19+
<field name="linkType" type="string" nullable="true"/>
2020
<field name="publishable" type="boolean"/>
21-
<field name="publishStartDate" type="date"/>
22-
<field name="publishEndDate" type="date"/>
21+
<field name="publishStartDate" type="date" nullable="true"/>
22+
<field name="publishEndDate" type="date" nullable="true"/>
2323

2424
</mapped-superclass>
2525

Resources/config/doctrine-model/MenuNodeBase.phpcr.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
<parent-document name="parent"/>
1717

1818
<field name="label" type="string"/>
19-
<field name="uri" type="string"/>
20-
<field name="route" type="string"/>
19+
<field name="uri" type="string" nullable="true"/>
20+
<field name="route" type="string" nullable="true"/>
2121
<field name="routeAbsolute" type="boolean"/>
2222
<field name="display" type="boolean"/>
2323
<field name="displayChildren" type="boolean"/>

0 commit comments

Comments
 (0)