Skip to content

Commit

Permalink
D9 compatibility fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Christian Fritsch committed Oct 27, 2022
1 parent 419ae40 commit 080a7cc
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion modules/dcx_article_import/src/Form/ArticleImportForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class ArticleImportForm extends FormBase {
* The dcx client service.
* @param \Drupal\dcx_migration\DcxImportServiceInterface $dcx_import_service
* The import service.
* @param \Drupal\user\PrivateTempStoreFactory $temp_store_factory
* @param \Drupal\Core\TempStore\PrivateTempStoreFactory $temp_store_factory
* The temp store factory.
* @param \Drupal\Core\Session\AccountProxyInterface $user_account
* The current user.
Expand Down
2 changes: 1 addition & 1 deletion modules/dcx_dropzone_ui/dcx_dropzone_ui.info.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: DC-X Dropzone UI
type: module
description: 'Dropzone Element for DCX DnD'
core: '8.x'
core_version_requirement: ^8 || ^9
package: dcx
dependencies:
- dcx_integration:dcx_migration
2 changes: 1 addition & 1 deletion modules/dcx_entity_browser/dcx_entity_browser.info.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: DC-X Entity Browser
type: module
description: 'Entity Browser integration for dcx'
core: '8.x'
core_version_requirement: ^8 || ^9
package: dcx

dependencies:
Expand Down
2 changes: 1 addition & 1 deletion modules/dcx_migration/dcx_migration.info.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: DC-X Migration
type: module
description: 'Migration of data from DC-X digital asset management.'
core: '8.x'
core_version_requirement: ^8 || ^9
package: dcx
dependencies:
- dcx_integration:dcx_integration
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,10 +125,13 @@ public function transform($value, MigrateExecutableInterface $migrate_executable
$tmp_name = tempnam('temp://', 'dcx-');
file_put_contents($tmp_name, $file_data);

/** @var \Drupal\Core\StreamWrapper\StreamWrapperManagerInterface $stream_wrapper_manager */
$stream_wrapper_manager = \Drupal::service('stream_wrapper_manager');

// Copy tempfile to destination, make sure to use canonical file uri.
$uri = $this->fileSystem->copy(
$tmp_name,
file_stream_wrapper_uri_normalize($destination_uri . DIRECTORY_SEPARATOR . $file_name),
$stream_wrapper_manager->normalizeUri($destination_uri . DIRECTORY_SEPARATOR . $file_name),
FileSystemInterface::EXISTS_RENAME
);

Expand Down
2 changes: 1 addition & 1 deletion modules/dcx_unpublish_media/dcx_unpublish_media.info.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: DC-X Unpublish Media
type: module
description: 'Handels the behavior if a media is unpublished'
core: '8.x'
core_version_requirement: ^8 || ^9
package: dcx
dependencies:
- drupal:media (>= 8.4)
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public static function getSubscribedEvents() {
/**
* This method is called whenever the kernel.request event is dispatched.
*
* @param \Symfony\Component\EventDispatcher\Event $event
* @param \Symfony\Contracts\EventDispatcher\Event $event
* Kernel request event.
*/
public function kernelRequest(Event $event) {
Expand Down

0 comments on commit 080a7cc

Please sign in to comment.