Skip to content

Commit

Permalink
Resolve Deprecation ResolveUploadTargetEvent
Browse files Browse the repository at this point in the history
  • Loading branch information
martineiber committed Oct 21, 2024
1 parent ebabc48 commit ecf7702
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"php": "~8.1.0 || ~8.2.0 || ~8.3.0",
"cbschuld/browser.php": "^1.9.6",
"phpoffice/phpspreadsheet": "^1.24 || ^2.2",
"pimcore/pimcore": "^11.3.1",
"pimcore/pimcore": "^11.5.0",
"symfony/webpack-encore-bundle": "^1.13.2"
},
"require-dev": {
Expand Down
4 changes: 3 additions & 1 deletion src/Controller/Admin/Asset/AssetController.php
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,9 @@ protected function addAsset(Request $request, Config $config): array

$this->validateManyToManyRelationAssetType($context, $filename, $sourcePath);

$event = new ResolveUploadTargetEvent($parentId, $filename, $context);
$event = new ResolveUploadTargetEvent($parentId, $filename);
$event->setArgument('context', $context);

\Pimcore::getEventDispatcher()->dispatch($event, AssetEvents::RESOLVE_UPLOAD_TARGET);
$filename = Element\Service::getValidKey($event->getFilename(), 'asset');
$parentId = $event->getParentId();
Expand Down

0 comments on commit ecf7702

Please sign in to comment.