diff --git a/composer.json b/composer.json index 30bda95f..70259082 100644 --- a/composer.json +++ b/composer.json @@ -17,8 +17,8 @@ "minimum-stability": "dev", "require": { "php": "~8.3.0 || ~8.4.0", + "pimcore/pimcore": "^12.0", "nesbot/carbon": "^2.72 || ^3.8.4", - "pimcore/pimcore": "^11.0.7 || ^12.0", "pimcore/personalization-bundle": "^1.0", "pimcore/google-marketing-bundle": "^1.0", "knplabs/knp-paginator-bundle": "^6.0.0", diff --git a/doc/03_Installation/01_Upgrade_Notes.md b/doc/03_Installation/01_Upgrade_Notes.md index b89c2fed..3ee51db1 100644 --- a/doc/03_Installation/01_Upgrade_Notes.md +++ b/doc/03_Installation/01_Upgrade_Notes.md @@ -3,3 +3,6 @@ #### v1.2.1 - Removed the package "rybakit/twig-deferred-extension". If you extend the twig layout from the E-Commerce Framework, please check if custom CSS/JS code added by `pimcore_head_script` and `pimcore_head_link` is still working. + +#### v2.0.0 +- `AbstractOfferToolProduct` now only accepts int as the `$id` parameter. \ No newline at end of file diff --git a/doc/19_Upgrade_Notes/README.md b/doc/19_Upgrade_Notes/README.md index d580c80c..d803d279 100644 --- a/doc/19_Upgrade_Notes/README.md +++ b/doc/19_Upgrade_Notes/README.md @@ -2,6 +2,9 @@ ## Version 2.0.0 +### [Pimcore] +- Updated to composer to Pimcore 12 due to a BC-Break for `getById()` only accepting `int` as parameter for `id`. + ### [Elasticsearch] - Removed ElasticSearchConfigInterface, use SearchConfigInterface instead. diff --git a/src/OfferTool/AbstractOfferToolProduct.php b/src/OfferTool/AbstractOfferToolProduct.php index 36ca1d03..cd5f382e 100644 --- a/src/OfferTool/AbstractOfferToolProduct.php +++ b/src/OfferTool/AbstractOfferToolProduct.php @@ -117,16 +117,8 @@ public function getOSAvailabilityInfo(?int $quantity = null): AvailabilityInterf return $this->getAvailabilitySystemImplementation()->getAvailabilityInfo($this, $quantity); } - public static function getById(int|string $id, array $params = []): ?static + public static function getById(int $id, array $params = []): ?static { - if (is_string($id)) { - trigger_deprecation( - 'pimcore/pimcore', - '11.0', - sprintf('Passing id as string to method %s is deprecated', __METHOD__) - ); - $id = is_numeric($id) ? (int) $id : 0; - } $object = DataObject::getById($id, $params); if ($object instanceof AbstractOfferToolProduct) {