Skip to content

Commit

Permalink
Merge 86bd00b into 92684fb
Browse files Browse the repository at this point in the history
  • Loading branch information
hyrsky authored Nov 20, 2023
2 parents 92684fb + 86bd00b commit 5d15141
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 13 deletions.
17 changes: 17 additions & 0 deletions helfi_azure_fs.install
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?php

/**
* @file
* Contains helfi azure fs install hook implementations.
*/

declare(strict_types = 1);

/**
* Uninstall flysystem_azure module.
*/
function helfi_azure_fs_update_90201() {
\Drupal::service('module_installer')->uninstall([
'flysystem_azure',
]);
}
6 changes: 0 additions & 6 deletions src/AzureFileSystem.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,6 @@ public function __construct(
) {
$this->skipFsOperations = $settings::get('is_azure', FALSE);

// @todo Keep this backward compatible in case someone is not using
// the latest platform. Remove in 2.x release.
if (!$this->skipFsOperations) {
$this->skipFsOperations = (bool) getenv('OPENSHIFT_BUILD_NAMESPACE');
}

parent::__construct($streamWrapperManager, $settings, $logger);
}

Expand Down
7 changes: 0 additions & 7 deletions tests/src/Unit/AzureFileSystemTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,6 @@ public function testChmodSkipFsOperations(array $structure, string $uri) : void

$fs = $this->getSut($decorated, new Settings(['is_azure' => TRUE]));
$this->assertTrue($fs->chmod($uri));

// Test backward compatibility settings.
putenv('OPENSHIFT_BUILD_NAMESPACE=123');
$fs = $this->getSut($decorated, new Settings([]));
$this->assertTrue($fs->chmod($uri));
}

/**
Expand All @@ -70,8 +65,6 @@ public function testSkipOperationsFallback(array $structure, string $uri) : void
vfsStream::setup('dir');
vfsStream::create($structure);

// Make sure BC setting is not set.
putenv('OPENSHIFT_BUILD_NAMESPACE=');
// Make sure decorated service is called when 'skipFsOperations'
// is disabled.
$decorated = $this->prophesize(FileSystemInterface::class);
Expand Down

0 comments on commit 5d15141

Please sign in to comment.