diff --git a/src/DbAutoProperties.php b/src/DbAutoProperties.php index 66d3a11..19aeaa9 100644 --- a/src/DbAutoProperties.php +++ b/src/DbAutoProperties.php @@ -19,7 +19,7 @@ namespace danog\AsyncOrm; use danog\AsyncOrm\Annotations\OrmMappedArray; -use danog\AsyncOrm\Internal\Driver\CachedArray; +use danog\AsyncOrm\Driver\CachedArray; use danog\AsyncOrm\Settings\DriverSettings; use danog\AsyncOrm\Settings\Mysql; use ReflectionClass; diff --git a/src/Internal/Driver/CachedArray.php b/src/Driver/CachedArray.php similarity index 96% rename from src/Internal/Driver/CachedArray.php rename to src/Driver/CachedArray.php index 5e908a2..c73ea3c 100644 --- a/src/Internal/Driver/CachedArray.php +++ b/src/Driver/CachedArray.php @@ -16,10 +16,9 @@ * @link https://daniil.it/AsyncOrm AsyncOrm documentation */ -namespace danog\AsyncOrm\Internal\Driver; +namespace danog\AsyncOrm\Driver; use danog\AsyncOrm\DbArray; -use danog\AsyncOrm\Driver\MemoryArray; use danog\AsyncOrm\FieldConfig; use danog\AsyncOrm\Internal\Containers\CacheContainer; use Traversable; @@ -27,8 +26,6 @@ use Traversable; /** * Array caching proxy. * - * @internal - * * @template TKey as array-key * @template TValue * diff --git a/src/FieldConfig.php b/src/FieldConfig.php index 140cb23..b6cbfdf 100644 --- a/src/FieldConfig.php +++ b/src/FieldConfig.php @@ -3,7 +3,7 @@ namespace danog\AsyncOrm; use AssertionError; -use danog\AsyncOrm\Internal\Driver\CachedArray; +use danog\AsyncOrm\Driver\CachedArray; use danog\AsyncOrm\Internal\Driver\ObjectArray; use danog\AsyncOrm\Serializer\Json; use danog\AsyncOrm\Settings\DriverSettings; diff --git a/tests/OrmTest.php b/tests/OrmTest.php index f9eb91d..4b7fcf3 100644 --- a/tests/OrmTest.php +++ b/tests/OrmTest.php @@ -23,9 +23,9 @@ use Amp\Process\Process; use Amp\Redis\RedisConfig; use AssertionError; use danog\AsyncOrm\DbObject; +use danog\AsyncOrm\Driver\CachedArray; use danog\AsyncOrm\Driver\MemoryArray; use danog\AsyncOrm\FieldConfig; -use danog\AsyncOrm\Internal\Driver\CachedArray; use danog\AsyncOrm\Internal\Driver\ObjectArray; use danog\AsyncOrm\KeyType; use danog\AsyncOrm\Serializer\Igbinary; @@ -66,15 +66,15 @@ final class OrmTest extends TestCase private static bool $configured = false; public static function setUpBeforeClass(): void { - touch('/tmp/async-orm-test'); - $lockFile = fopen('/tmp/async-orm-test', 'r+'); - flock($lockFile, LOCK_EX); - if (fgets($lockFile) === 'done') { - flock($lockFile, LOCK_UN); + \touch('/tmp/async-orm-test'); + $lockFile = \fopen('/tmp/async-orm-test', 'r+'); + \flock($lockFile, LOCK_EX); + if (\fgets($lockFile) === 'done') { + \flock($lockFile, LOCK_UN); return; } self::$configured = true; - fwrite($lockFile, "done\n"); + \fwrite($lockFile, "done\n"); $f = []; foreach (['redis' => 6379, 'mariadb' => 3306, 'postgres' => 5432] as $image => $port) { @@ -106,12 +106,12 @@ final class OrmTest extends TestCase } } - flock($lockFile, LOCK_UN); + \flock($lockFile, LOCK_UN); } public static function tearDownAfterClass(): void { if (self::$configured) { - unlink('/tmp/async-orm-test'); + \unlink('/tmp/async-orm-test'); } } private static function waitForStartup(ReadableStream $f): bool