From ebb1a0cdeae49e8a60989b73c644a03952cf19e7 Mon Sep 17 00:00:00 2001 From: mattamon Date: Fri, 14 Feb 2025 07:55:25 +0100 Subject: [PATCH 1/4] Only accept int now --- src/OfferTool/AbstractOfferToolProduct.php | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) 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) { From faad554fe7aada2cf3e5257e21114da2510527f2 Mon Sep 17 00:00:00 2001 From: mattamon Date: Fri, 14 Feb 2025 07:56:44 +0100 Subject: [PATCH 2/4] Update docs --- doc/03_Installation/01_Upgrade_Notes.md | 3 +++ 1 file changed, 3 insertions(+) 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 From 486b659f66f8445aaeee77e8a627d4274e07c5ba Mon Sep 17 00:00:00 2001 From: mattamon Date: Tue, 18 Feb 2025 09:44:09 +0100 Subject: [PATCH 3/4] Update composer --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 7af10244..59a0995b 100644 --- a/composer.json +++ b/composer.json @@ -17,7 +17,7 @@ "minimum-stability": "dev", "require": { "php": "~8.3.0 || ~8.4.0", - "pimcore/pimcore": "^11.0.7 || ^12.0", + "pimcore/pimcore": "^12.0", "pimcore/personalization-bundle": "^1.0", "pimcore/google-marketing-bundle": "^1.0", "knplabs/knp-paginator-bundle": "^6.0.0", From a32f174217c80ca2088baadb162a08c54875fa58 Mon Sep 17 00:00:00 2001 From: mattamon Date: Tue, 18 Feb 2025 09:50:44 +0100 Subject: [PATCH 4/4] Update docs --- doc/19_Upgrade_Notes/README.md | 3 +++ 1 file changed, 3 insertions(+) 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.