Skip to content

Commit

Permalink
run psalm only against master as the app is shipped
Browse files Browse the repository at this point in the history
Signed-off-by: Robin Appelman <[email protected]>
  • Loading branch information
icewind1991 committed Jun 22, 2023
1 parent fde3166 commit f778fdf
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 7 deletions.
1 change: 1 addition & 0 deletions .github/workflows/phpunit-mysql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/psalm-matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
8 changes: 4 additions & 4 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/Listener/LogListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion lib/Log/Console.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
16 changes: 16 additions & 0 deletions tests/stubs/stub.phpstub
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
}
}
}

0 comments on commit f778fdf

Please sign in to comment.