diff --git a/.github/workflows/phpunit-mysql.yml b/.github/workflows/phpunit-mysql.yml index 33799c874..39234a132 100644 --- a/.github/workflows/phpunit-mysql.yml +++ b/.github/workflows/phpunit-mysql.yml @@ -58,6 +58,7 @@ jobs: - name: Enable ONLY_FULL_GROUP_BY MySQL option run: | + sleep 5 echo "SET GLOBAL sql_mode=(SELECT CONCAT(@@sql_mode,',ONLY_FULL_GROUP_BY'));" | mysql -h 127.0.0.1 -P 4444 -u root -prootpassword echo "SELECT @@sql_mode;" | mysql -h 127.0.0.1 -P 4444 -u root -prootpassword diff --git a/.github/workflows/psalm-matrix.yml b/.github/workflows/psalm-matrix.yml index 192fcc135..c3fa781d6 100644 --- a/.github/workflows/psalm-matrix.yml +++ b/.github/workflows/psalm-matrix.yml @@ -24,7 +24,7 @@ jobs: # do not stop on another job's failure fail-fast: false matrix: - ocp-version: [ 'dev-master', 'dev-stable27', 'dev-stable26', 'dev-stable25'] + ocp-version: [ 'dev-master' ] name: Nextcloud ${{ matrix.ocp-version }} steps: diff --git a/composer.lock b/composer.lock index ef98d4769..41aecef13 100644 --- a/composer.lock +++ b/composer.lock @@ -872,12 +872,12 @@ "source": { "type": "git", "url": "https://github.com/nextcloud-deps/ocp.git", - "reference": "0a896dafb2730c6d8970655e6b2147a0441bbca9" + "reference": "741af8fa43ecdcebfe6d43e6583957ac616cc964" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nextcloud-deps/ocp/zipball/0a896dafb2730c6d8970655e6b2147a0441bbca9", - "reference": "0a896dafb2730c6d8970655e6b2147a0441bbca9", + "url": "https://api.github.com/repos/nextcloud-deps/ocp/zipball/741af8fa43ecdcebfe6d43e6583957ac616cc964", + "reference": "741af8fa43ecdcebfe6d43e6583957ac616cc964", "shasum": "" }, "require": { @@ -909,7 +909,7 @@ "issues": "https://github.com/nextcloud-deps/ocp/issues", "source": "https://github.com/nextcloud-deps/ocp/tree/master" }, - "time": "2023-06-04T00:45:21+00:00" + "time": "2023-06-21T00:39:26+00:00" }, { "name": "nikic/php-parser", diff --git a/lib/Listener/LogListener.php b/lib/Listener/LogListener.php index 02e25fbcb..6017082bf 100644 --- a/lib/Listener/LogListener.php +++ b/lib/Listener/LogListener.php @@ -35,7 +35,7 @@ class LogListener implements IEventListener { private ?Console $console; public function __construct(Formatter $formatter, SystemConfig $config) { - if (\OC_CONSOLE) { + if (defined('OC_CONSOLE') && \OC_CONSOLE) { $level = getenv('OCC_LOG'); if ($level) { $terminal = new Terminal(); diff --git a/lib/Log/Console.php b/lib/Log/Console.php index c229d4121..7e6a544cc 100644 --- a/lib/Log/Console.php +++ b/lib/Log/Console.php @@ -42,7 +42,7 @@ public function __construct(Formatter $formatter, SystemConfig $config, string $ $this->terminalWidth = $terminalWidth; } - public function log(int $level, string $app, $entry) { + public function log(int $level, string $app, array $entry) { if ($level >= $this->level) { $messageWidth = $this->terminalWidth - 8 - 18 - 6; diff --git a/tests/stubs/stub.phpstub b/tests/stubs/stub.phpstub index f57424fad..3a9e46c74 100644 --- a/tests/stubs/stub.phpstub +++ b/tests/stubs/stub.phpstub @@ -32,3 +32,19 @@ namespace OC\Core\Command { class InterruptedException extends \Exception { } } + +namespace OC { + class SystemConfig { + } +} + +namespace OC\Log { + use OC\SystemConfig; + + public function __construct(SystemConfig $config) { + } + class LogDetails { + public function logDetails(string $app, $message, int $level): array { + } + } +}