mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-01-11 09:48:40 +00:00
fix build
This commit is contained in:
parent
f43df4c7c2
commit
6338db6631
5
.github/workflows/main.yml
vendored
5
.github/workflows/main.yml
vendored
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1 +1,3 @@
|
|||
<?phpdeclare(strict_types=1);
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user