Skip to content

Commit

Permalink
Kick ecommerce bundle requirement (#91)
Browse files Browse the repository at this point in the history
* Kick ecommerce bundle requirement - resolves #89

* add class_exists
  • Loading branch information
dvesh3 authored May 2, 2023
1 parent 33a1404 commit 30d3fa9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
3 changes: 1 addition & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@
"symfony/http-foundation": "^6.2",
"symfony/http-kernel": "^6.2",
"symfony/routing": "^6.2",
"symfony/templating": "^6.2",
"pimcore/ecommerce-framework-bundle": "^1.0"
"symfony/templating": "^6.2"
},
"conflict": {
"pimcore/pimcore": "v11.0.0-ALPHA1 || v11.0.0-ALPHA2 || v11.0.0-ALPHA3 || v11.0.0-ALPHA4 || v11.0.0-ALPHA5 || v11.0.0-ALPHA6 || v11.0.0-ALPHA7 || v11.0.0-ALPHA8 || v11.0.0-BETA1"
Expand Down
6 changes: 4 additions & 2 deletions src/ConfigElement/Value/DefaultValue.php
Original file line number Diff line number Diff line change
Expand Up @@ -112,11 +112,13 @@ public function getLabeledValue($object)

return $result;
}
if (method_exists($object, $getter) || $object instanceof DefaultMockup) {
if (method_exists($object, $getter)
|| (class_exists(DefaultMockup::class) && $object instanceof DefaultMockup)) {
$value = $object->$getter();
$def = null;

if ($object instanceof DefaultMockup || $object instanceof AbstractObject) {
if ((class_exists(DefaultMockup::class) && $object instanceof DefaultMockup)
|| $object instanceof AbstractObject) {
if ($object instanceof Concrete) {
$class = $object->getClass();
$def = $class->getFieldDefinition($this->attribute);
Expand Down

0 comments on commit 30d3fa9

Please sign in to comment.