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

Commit 70e3427

Browse files
committed
__toString()-Fix for Sonata Admin
1 parent 718f663 commit 70e3427

5 files changed

Lines changed: 10 additions & 5 deletions

File tree

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,6 @@
88

99
# Apple
1010
.DS_Store
11+
12+
# PHPStorm
13+
/.idea

Entity/Menu.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ public function getSlug()
104104

105105
public function __toString()
106106
{
107-
return $this->getName();
107+
return strval($this->getName());
108108
}
109109

110110
/**

Entity/MenuItem.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,6 +298,6 @@ public function getPosition()
298298

299299
public function __toString()
300300
{
301-
return $this->getTitle();
301+
return strval($this->getTitle());
302302
}
303303
}

Entity/Page.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,6 @@ public function getIsHome()
259259

260260
public function __toString()
261261
{
262-
return $this->getTitle();
262+
return strval($this->getTitle());
263263
}
264264
}

composer.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
{
22
"name": "devtronic/cms-bundle",
3-
"description": "A CMS Bundle for Symfony2",
4-
"version": "1.0.3",
3+
"description": "A CMS Bundle for Symfony3",
54
"type": "symfony-bundle",
65
"require": {
76
"php": ">=5.3.3",
@@ -14,6 +13,9 @@
1413
"email": "admin@developer-heaven.de"
1514
}
1615
],
16+
"suggest": {
17+
"sonata-project/admin-bundle": "For using the admins"
18+
},
1719
"minimum-stability": "stable",
1820
"autoload": {
1921
"psr-4": { "Devtronic\\CmsBundle\\": "" }

0 commit comments

Comments
 (0)