You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
\Pimcore\Model\DataObject\Fieldcollection\Data\FilterSelectClsStoreAttributes::getField() return type is compatible with getField() return type in its parent class.
Actual behavior
With opcache preloading enabled, the following error prevents php-fpm from starting:
PHP Fatal error: Declaration of Pimcore\Model\DataObject\Fieldcollection\Data\FilterSelectClsStoreAttributes::getField(): ?Pimcore\Bundle\EcommerceFrameworkBundle\CoreExtensions\ObjectData\IndexFieldSelection must be compatible with Pimcore\Bundle\EcommerceFrameworkBundle\Model\CategoryFilterDefinitionType::getField(): string in /var/www/html/var/classes/DataObject/Fieldcollection/Data/FilterSelectClsStoreAttributes.php on line 63
Definition of FilterSelectClsStoreAttributes::getField() is compatible with \Pimcore\Bundle\EcommerceFrameworkBundle\Model\AbstractFilterDefinitionType::getField(), which is the parent of CategoryFilterDefinitionType.
We either need to change the parent type of FilterSelectClsStoreAttributes to AbstractFilterDefinitionType or change the return type of CategoryFilterDefinitionType::getField() to include IndexFieldSelection also.
Steps to reproduce
Install pimcore with ecommerce-framework-bundle. Rebuild php classes: bin/console pimcore:build:classes and inspect generated \Pimcore\Model\DataObject\Fieldcollection\Data\FilterSelectClsStoreAttributes::getField() method.
The text was updated successfully, but these errors were encountered:
yariksheptykin
changed the title
[Bug]: Mismatching return types in `...\Fieldcollection\Data\FilterSelectClsStoreAttributes::getField()
[Bug]: Mismatching return type in `...\Fieldcollection\Data\FilterSelectClsStoreAttributes::getField()
May 22, 2024
Thanks a lot for reporting the issue. We did not consider the issue as "Pimcore:Priority", "Pimcore:ToDo" or "Pimcore:Backlog", so we're not going to work on that anytime soon. Please create a pull request to fix the issue if this is a bug report. We'll then review it as quickly as possible. If you're interested in contributing a feature, please contact us first here before creating a pull request. We'll then decide whether we'd accept it or not. Thanks for your understanding.
Expected behavior
\Pimcore\Model\DataObject\Fieldcollection\Data\FilterSelectClsStoreAttributes::getField()
return type is compatible withgetField()
return type in its parent class.Actual behavior
With opcache preloading enabled, the following error prevents php-fpm from starting:
FilterSelectClsStoreAttributes
is defined insrc/Resources/install/fieldcollection_sources/fieldcollection_FilterSelectClsStoreAttributes_export.json
.The property
field
is defined asIndexFieldSelection
in the json file.The parent class for
FilterSelectClsStoreAttributes
isCategoryFilterDefinitionType
.CategoryFilterDefinitionType::getField()
returns string, which is incompatible withFilterSelectClsStoreAttributes::getField()
return type.Definition of
FilterSelectClsStoreAttributes::getField()
is compatible with\Pimcore\Bundle\EcommerceFrameworkBundle\Model\AbstractFilterDefinitionType::getField()
, which is the parent ofCategoryFilterDefinitionType
.We either need to change the parent type of
FilterSelectClsStoreAttributes
toAbstractFilterDefinitionType
or change the return type ofCategoryFilterDefinitionType::getField()
to includeIndexFieldSelection
also.Steps to reproduce
Install pimcore with ecommerce-framework-bundle. Rebuild php classes:
bin/console pimcore:build:classes
and inspect generated\Pimcore\Model\DataObject\Fieldcollection\Data\FilterSelectClsStoreAttributes::getField()
method.The text was updated successfully, but these errors were encountered: