diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index af236002f..728bbd9cc 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -225,6 +225,9 @@ jobs: extensions: mbstring, gd, zip, dom, mysql, pgsql, sqlite, imap, bcmath, redis, memcached ini-values: opcache.jit_buffer_size=256M, opcache.jit=1235, pcre.jit=1 - name: PHP linting - run: find ./ -type f -name '*.php' -print0 | xargs -0 -n1 -P4 php -l -n | (! grep -v "No syntax errors detected" ) + run: | + find ./ -type f \ + -not -path "./tests/Application/Testapp/*" \ + -name '*.php' -print0 | xargs -0 -n1 -P4 php -l -n | (! grep -v "No syntax errors detected" ) - name: Php strict run: if [[ $(grep -r -L "declare(strict_types=1);" --include=*.php --exclude={*.tpl.php,*Hooks.php,*Routes.php,*SearchCommands.php} ./) -ne "" ]]; then exit 1; fi diff --git a/Application/ApplicationManager.php b/Application/ApplicationManager.php index c9bce9eef..0784d051c 100644 --- a/Application/ApplicationManager.php +++ b/Application/ApplicationManager.php @@ -71,7 +71,6 @@ final class ApplicationManager private function loadInfo(string $appPath) : ApplicationInfo { $path = \realpath($appPath); - if ($path === false) { throw new PathException($appPath); } @@ -98,7 +97,13 @@ final class ApplicationManager $destination = \rtrim($destination, '\\/'); $source = \rtrim($source, '/\\'); - if (!\is_dir($source) || ($path = \realpath($destination)) === false || !\is_file($source . '/Admin/Installer.php')) { + if (!\is_dir(\dirname($destination))) { + Directory::create(\dirname($destination), 0755, true); + } + + if (!\is_dir($source) || ($path = \realpath($destination)) === false + || !\is_file($source . '/Admin/Installer.php') + ) { return false; } diff --git a/DataStorage/Cache/Connection/RedisCache.php b/DataStorage/Cache/Connection/RedisCache.php index 4576820b0..93d44738b 100644 --- a/DataStorage/Cache/Connection/RedisCache.php +++ b/DataStorage/Cache/Connection/RedisCache.php @@ -111,7 +111,7 @@ final class RedisCache extends ConnectionAbstract } if ($expire > 0) { - $this->con->setEx((string) $key, $expire, $this->build($value)); + $this->con->setEx((string) $key, $expire * 1000, $this->build($value)); return; } @@ -129,7 +129,7 @@ final class RedisCache extends ConnectionAbstract } if ($expire > 0) { - return $this->con->setNx((string) $key, $this->build($value), $expire); + return $this->con->setNx((string) $key, $this->build($value), $expire * 1000); } return $this->con->setNx((string) $key, $this->build($value)); @@ -207,7 +207,7 @@ final class RedisCache extends ConnectionAbstract $this->con->rename((string) $old, (string) $new); if ($expire > 0) { - $this->con->expire((string) $new, $expire); + $this->con->expire((string) $new, $expire * 1000); } } @@ -264,7 +264,7 @@ final class RedisCache extends ConnectionAbstract public function updateExpire(int | string $key, int $expire = -1) : bool { if ($expire > 0) { - $this->con->expire((string) $key, $expire); + $this->con->expire((string) $key, $expire * 1000); } return true; @@ -302,7 +302,7 @@ final class RedisCache extends ConnectionAbstract } if ($this->con->exists((string) $key) > 0) { - $this->set((string) $key, $value, $expire); + $this->set((string) $key, $value, $expire * 1000); return true; } diff --git a/tests/Application/MissingInfo/Admin/Installer.php b/tests/Application/MissingInfo/Admin/Installer.php index e71ac26b3..174d7fd70 100644 --- a/tests/Application/MissingInfo/Admin/Installer.php +++ b/tests/Application/MissingInfo/Admin/Installer.php @@ -1 +1,3 @@ -