Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
3 changes: 3 additions & 0 deletions doc/03_Installation/01_Upgrade_Notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
3 changes: 3 additions & 0 deletions doc/19_Upgrade_Notes/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
10 changes: 1 addition & 9 deletions src/OfferTool/AbstractOfferToolProduct.php
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down