Skip to content

Commit

Permalink
Merge branch '2.4-develop' of https://github.com/mage-os/mirror-magento2
Browse files Browse the repository at this point in the history
 into 2.4-develop
  • Loading branch information
mage-os-ci committed Sep 4, 2024
2 parents 4628e29 + 672a2e6 commit b2c69d9
Show file tree
Hide file tree
Showing 14 changed files with 312 additions and 212 deletions.
4 changes: 2 additions & 2 deletions app/code/Magento/AwsS3/Test/Unit/Driver/AwsS3Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -439,8 +439,8 @@ public function testSearchDirectory(): void
$this->metadataProviderMock->expects(self::any())->method('getMetadata')
->willReturnMap([
['path', ['type' => AwsS3::TYPE_DIR]],
['path/1', ['type' => AwsS3::TYPE_FILE]],
['path/2', ['type' => AwsS3::TYPE_FILE]],
['path/1', ['type' => AwsS3::TYPE_DIR]],
['path/2', ['type' => AwsS3::TYPE_DIR]],
]);
$this->adapterMock->expects(self::atLeastOnce())->method('listContents')
->willReturn(new \ArrayIterator($subPaths));
Expand Down
40 changes: 24 additions & 16 deletions app/code/Magento/RemoteStorage/Driver/Adapter/CachedAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public function __construct(
}

/**
* {@inheritdoc}
* @inheritdoc
*/
public function write(string $path, string $contents, Config $config): void
{
Expand All @@ -63,7 +63,7 @@ public function write(string $path, string $contents, Config $config): void
}

/**
* {@inheritdoc}
* @inheritdoc
*/
public function writeStream(string $path, $contents, Config $config): void
{
Expand All @@ -76,7 +76,7 @@ public function writeStream(string $path, $contents, Config $config): void
}

/**
* {@inheritdoc}
* @inheritdoc
*/
public function move(string $source, string $destination, Config $config): void
{
Expand All @@ -85,7 +85,7 @@ public function move(string $source, string $destination, Config $config): void
}

/**
* {@inheritdoc}
* @inheritdoc
*/
public function copy(string $source, string $destination, Config $config): void
{
Expand All @@ -94,7 +94,7 @@ public function copy(string $source, string $destination, Config $config): void
}

/**
* {@inheritdoc}
* @inheritdoc
*/
public function delete(string $path): void
{
Expand All @@ -103,7 +103,7 @@ public function delete(string $path): void
}

/**
* {@inheritdoc}
* @inheritdoc
*/
public function deleteDirectory(string $path): void
{
Expand All @@ -112,7 +112,7 @@ public function deleteDirectory(string $path): void
}

/**
* {@inheritdoc}
* @inheritdoc
*/
public function createDirectory(string $path, Config $config): void
{
Expand All @@ -123,7 +123,7 @@ public function createDirectory(string $path, Config $config): void
}

/**
* {@inheritdoc}
* @inheritdoc
*/
public function setVisibility(string $path, string $visibility): void
{
Expand All @@ -132,7 +132,7 @@ public function setVisibility(string $path, string $visibility): void
}

/**
* {@inheritdoc}
* @inheritdoc
*/
public function fileExists(string $path): bool
{
Expand Down Expand Up @@ -165,31 +165,31 @@ public function fileExists(string $path): bool
}

/**
* {@inheritdoc}
* @inheritdoc
*/
public function read(string $path): string
{
return $this->adapter->read($path);
}

/**
* {@inheritdoc}
* @inheritdoc
*/
public function readStream(string $path)
{
return $this->adapter->readStream($path);
}

/**
* {@inheritdoc}
* @inheritdoc
*/
public function listContents(string $path, bool $deep): iterable
{
return $this->adapter->listContents($path, $deep);
}

/**
* {@inheritdoc}
* @inheritdoc
*/
public function fileSize(string $path): FileAttributes
{
Expand All @@ -198,7 +198,7 @@ public function fileSize(string $path): FileAttributes
}

/**
* {@inheritdoc}
* @inheritdoc
*/
public function mimeType(string $path): FileAttributes
{
Expand All @@ -207,7 +207,7 @@ public function mimeType(string $path): FileAttributes
}

/**
* {@inheritdoc}
* @inheritdoc
*/
public function lastModified(string $path): FileAttributes
{
Expand All @@ -216,11 +216,19 @@ public function lastModified(string $path): FileAttributes
}

/**
* {@inheritdoc}
* @inheritdoc
*/
public function visibility(string $path): FileAttributes
{
$result = $this->metadataProvider->getMetadata($path);
return new FileAttributes($path, null, $result['visibility']);
}

/**
* @inheritdoc
*/
public function directoryExists(string $path): bool
{
return $this->adapter->directoryExists($path);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public function __construct(
private function isDirectory($path): bool
{
try {
return iterator_count($this->adapter->listContents($path, false)) > 0;
return $this->adapter->directoryExists($path);
} catch (\Throwable $e) {
// catch closed iterator
return false;
Expand Down
1 change: 1 addition & 0 deletions app/etc/di.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1858,6 +1858,7 @@
<arguments>
<argument name="supportedVersionPatterns" xsi:type="array">
<item name="MySQL-8" xsi:type="string">^8\.0\.</item>
<item name="MySQL-8.4" xsi:type="string">^8\.4\.</item>
<item name="MySQL-5.7" xsi:type="string">^5\.7\.</item>
<item name="MariaDB-(10.2-10.6)" xsi:type="string">^10\.[2-6]\.</item>
</argument>
Expand Down
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"colinmollenhour/cache-backend-file": "^1.4",
"colinmollenhour/cache-backend-redis": "^1.16",
"colinmollenhour/credis": "^1.15",
"colinmollenhour/php-redis-session-abstract": "^1.5",
"colinmollenhour/php-redis-session-abstract": "^2.0",
"composer/composer": "^2.0, !=2.2.16",
"elasticsearch/elasticsearch": "~7.17.0 || ~8.5.0",
"ezyang/htmlpurifier": "^4.17",
Expand Down Expand Up @@ -66,8 +66,8 @@
"laminas/laminas-stdlib": "^3.11",
"laminas/laminas-uri": "^2.9",
"laminas/laminas-validator": "^2.23",
"league/flysystem": "^2.4",
"league/flysystem-aws-s3-v3": "^2.4",
"league/flysystem": "^3.0",
"league/flysystem-aws-s3-v3": "^3.0",
"magento/composer": "^1.10.0-beta1",
"magento/composer-dependency-version-audit-plugin": "^0.1",
"magento/magento-composer-installer": ">=0.4.0",
Expand Down
Loading

0 comments on commit b2c69d9

Please sign in to comment.