Browse Source

Merge pull request #35911 from nextcloud/fix/workflows-8.0

chore(actions): update php min supported to 8.0
tags/v26.0.0beta1
John Molakvoæ 1 year ago
parent
commit
0459f58a03
No account linked to committer's email address

+ 1
- 1
.github/workflows/command-compile.yml View File

@@ -54,7 +54,7 @@ jobs:

steps:
- name: Checkout ${{ needs.init.outputs.head_ref }}
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
token: ${{ secrets.COMMAND_BOT_PAT }}
fetch-depth: 0

+ 2
- 2
.github/workflows/ftp.yml View File

@@ -21,14 +21,14 @@ jobs:
# do not stop on another job's failure
fail-fast: false
matrix:
php-versions: ['7.4', '8.0']
php-versions: ['8.0']
ftpd: ['proftpd', 'vsftpd', 'pure-ftpd']

name: php${{ matrix.php-versions }}-${{ matrix.ftpd }}

steps:
- name: Checkout server
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
submodules: true


+ 1
- 1
.github/workflows/lint-eslint.yml View File

@@ -20,7 +20,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Read package.json node and npm engines version
uses: skjnldsv/read-package-engines-version-actions@v1.1

+ 37
- 0
.github/workflows/lint-php-cs.yml View File

@@ -0,0 +1,37 @@
# This workflow is provided via the organization template repository
#
# https://github.com/nextcloud/.github
# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization

name: Lint

on: pull_request

permissions:
contents: read

concurrency:
group: lint-php-cs-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
lint:
runs-on: ubuntu-latest

name: php-cs

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Set up php
uses: shivammathur/setup-php@v2
with:
php-version: "8.0"
coverage: none

- name: Install dependencies
run: composer i

- name: Lint
run: composer run cs:check || ( echo "Please run `composer run cs:fix` to format your code" && exit 1 )

+ 57
- 0
.github/workflows/lint-php.yml View File

@@ -0,0 +1,57 @@
# This workflow is provided via the organization template repository
#
# https://github.com/nextcloud/.github
# https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization

name: Lint

on:
pull_request:
push:
branches:
- main
- master
- stable*

permissions:
contents: read

concurrency:
group: lint-php-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

jobs:
php-lint:
runs-on: ubuntu-latest
strategy:
matrix:
php-versions: ["8.0", "8.1", "8.2"]

name: php-lint

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Set up php ${{ matrix.php-versions }}
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
coverage: none

- name: Lint
run: composer run lint

summary:
permissions:
contents: none
runs-on: ubuntu-latest
needs: php-lint

if: always()

name: php-lint-summary

steps:
- name: Summary status
run: if ${{ needs.php-lint.result != "success" && needs.php-lint.result != "skipped" }}; then exit 1; fi

+ 0
- 42
.github/workflows/lint.yml View File

@@ -1,42 +0,0 @@
name: Lint
on: pull_request

jobs:
php-linters:
runs-on: ubuntu-latest
strategy:
matrix:
php-versions: ['7.4', '8.0', '8.1', '8.2']
name: php${{ matrix.php-versions }} lint
steps:
- name: Checkout
uses: actions/checkout@master
- name: Set up php${{ matrix.php-versions }}
uses: shivammathur/setup-php@master
with:
php-version: ${{ matrix.php-versions }}
extensions: ctype,curl,dom,fileinfo,gd,intl,json,mbstring,openssl,pdo_sqlite,posix,sqlite,xml,zip
coverage: none
- name: Lint
run: composer run lint

php-cs-fixer:
name: php-cs check
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@master
- name: Set up php
uses: shivammathur/setup-php@master
with:
php-version: 7.4
extensions: ctype,curl,dom,fileinfo,gd,intl,json,mbstring,openssl,pdo_sqlite,posix,sqlite,xml,zip
coverage: none
tools: cs2pr
- name: Install dependencies
run: composer i
- name: Run coding standards check
run: |
composer run cs:check -- --format=checkstyle | cs2pr
composer run cs:check || ( echo 'Please run `composer run cs:fix` to format your code' && exit 1 )
shell: bash

+ 4
- 4
.github/workflows/node-tests.yml View File

@@ -16,7 +16,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Read package.json node and npm engines version
uses: skjnldsv/read-package-engines-version-actions@v1.1
@@ -31,7 +31,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Set up node ${{ needs.versions.outputs.nodeVersion }}
uses: actions/setup-node@v2
@@ -53,7 +53,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Set up node ${{ needs.versions.outputs.nodeVersion }}
uses: actions/setup-node@v2
@@ -75,7 +75,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Set up node ${{ needs.versions.outputs.nodeVersion }}
uses: actions/setup-node@v2

+ 1
- 1
.github/workflows/oci.yml View File

@@ -15,7 +15,7 @@ jobs:

strategy:
matrix:
php-versions: [ '7.4', '8.0', '8.1']
php-versions: ['8.0', '8.1']

services:
oracle:

+ 53
- 12
.github/workflows/psalm-github.yml View File

@@ -1,4 +1,4 @@
name: Psalm show github
name: Psalm

on:
pull_request:
@@ -8,21 +8,62 @@ on:
- stable*

jobs:
psalm:
name: Psalm
generate-report:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Checkout
uses: actions/checkout@v3
with:
submodules: true

- name: Set up php
uses: shivammathur/setup-php@v2
with:
submodules: recursive
php-version: '8.0'
extensions: ctype,curl,dom,fileinfo,gd,intl,json,mbstring,openssl,pdo_sqlite,posix,sqlite,xml,zip
coverage: none

- name: Composer install
run: composer i

- name: Psalm
uses: docker://vimeo/psalm-github-actions:4.9.3
# Make sure we pass and still upload the report
continue-on-error: true
run: composer run psalm -- --monochrome --no-progress --output-format=github --report=psalm.sarif

- name: Upload report to GitHub
if: always()
uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: psalm.sarif

generate-security-report:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v3
with:
composer_ignore_platform_reqs: false
report_file: results.sarif
- name: Upload Analysis results to GitHub
uses: github/codeql-action/upload-sarif@v1
submodules: true

- name: Set up php
uses: shivammathur/setup-php@v2
with:
php-version: '8.0'
extensions: ctype,curl,dom,fileinfo,gd,intl,json,mbstring,openssl,pdo_sqlite,posix,sqlite,xml,zip
coverage: none

- name: Composer install
run: composer i

- name: Psalm
# Make sure we pass and still upload the report
continue-on-error: true
run: composer run psalm -- --monochrome --no-progress --output-format=github --taint-analysis --report=psalm.sarif

- name: Upload report to GitHub
if: always()
uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: results.sarif
sarif_file: psalm.sarif

+ 0
- 28
.github/workflows/psalm-security.yml View File

@@ -1,28 +0,0 @@
name: Psalm Security Analysis

on:
pull_request:
push:
branches:
- master
- stable*

jobs:
psalm:
name: Psalm
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
submodules: recursive
- name: Psalm
uses: docker://vimeo/psalm-github-actions:4.9.3
with:
security_analysis: true
composer_ignore_platform_reqs: false
report_file: results.sarif
- name: Upload Security Analysis results to GitHub
uses: github/codeql-action/upload-sarif@v1
with:
sarif_file: results.sarif

+ 4
- 4
.github/workflows/s3-external.yml View File

@@ -21,7 +21,7 @@ jobs:
# do not stop on another job's failure
fail-fast: false
matrix:
php-versions: ['7.4', '8.0']
php-versions: ['8.0', '8.1']

name: php${{ matrix.php-versions }}-minio

@@ -36,7 +36,7 @@ jobs:

steps:
- name: Checkout server
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
submodules: true

@@ -70,7 +70,7 @@ jobs:
# do not stop on another job's failure
fail-fast: false
matrix:
php-versions: ['7.4', '8.0']
php-versions: ['8.0', '8.1']

name: php${{ matrix.php-versions }}-localstack

@@ -85,7 +85,7 @@ jobs:

steps:
- name: Checkout server
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
submodules: true


+ 1
- 1
.github/workflows/s3-primary.yml View File

@@ -30,7 +30,7 @@ jobs:

steps:
- name: Checkout server
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
submodules: true


+ 2
- 2
.github/workflows/smb-kerberos.yml View File

@@ -17,13 +17,13 @@ jobs:
strategy:
fail-fast: false
matrix:
php-versions: ['7.4', '8.0']
php-versions: ['8.0', '8.1']

name: php${{ matrix.php-versions }}-${{ matrix.ftpd }}

steps:
- name: Checkout server
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
submodules: true
- name: Pull images

+ 60
- 53
.github/workflows/static-code-analysis.yml View File

@@ -1,56 +1,63 @@
name: Static code analysis
name: Psalm static code analysis

on: [pull_request]
on:
pull_request:

jobs:
static-code-analysis:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Checkout submodules
shell: bash
run: |
auth_header="$(git config --local --get http.https://github.com/.extraheader)"
git submodule sync --recursive
git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive --depth=1
- name: Set up php7.4
uses: shivammathur/setup-php@master
with:
php-version: 7.4
extensions: ctype,curl,dom,fileinfo,gd,intl,json,mbstring,openssl,pdo_sqlite,posix,sqlite,xml,zip
coverage: none
- name: Composer install
run: composer i
- name: Psalm
run: composer run psalm -- --monochrome --no-progress --output-format=github --update-baseline || ( git diff -- . ':!lib/composer' && exit 1 )
- name: Check diff
run: git diff -- . ':!lib/composer'
- name: Show potential changes in Psalm baseline
run: |
bash -c "[[ ! \"`git status --porcelain build/psalm-baseline.xml`\" ]] || ( echo 'Uncommited changes in Psalm baseline' && git status && git diff build/psalm-baseline.xml)"

static-code-analysis-ocp:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Checkout submodules
shell: bash
run: |
auth_header="$(git config --local --get http.https://github.com/.extraheader)"
git submodule sync --recursive
git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive --depth=1
- name: Set up php7.4
uses: shivammathur/setup-php@master
with:
php-version: 7.4
extensions: ctype,curl,dom,fileinfo,gd,intl,json,mbstring,openssl,pdo_sqlite,posix,sqlite,xml,zip
coverage: none
- name: Composer install
run: composer i
- name: Psalm
run: composer run psalm -- -c psalm-ocp.xml --monochrome --no-progress --output-format=github --update-baseline || ( git diff -- . ':!lib/composer' && exit 1 )
- name: Check diff
run: git diff -- . ':!lib/composer'
- name: Show potential changes in Psalm baseline
run: |
bash -c "[[ ! \"`git status --porcelain build/psalm-baseline-ocp.xml`\" ]] || ( echo 'Uncommited changes in Psalm baseline' && git status && git diff build/psalm-baseline.xml)"
static-code-analysis:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: true

- name: Set up php
uses: shivammathur/setup-php@v2
with:
php-version: '8.0'
extensions: ctype,curl,dom,fileinfo,gd,intl,json,mbstring,openssl,pdo_sqlite,posix,sqlite,xml,zip
coverage: none

- name: Composer install
run: composer i

- name: Psalm
run: composer run psalm -- --monochrome --no-progress --output-format=github --update-baseline || ( git diff -- . ':!lib/composer' && exit 1 )

- name: Check diff
run: git diff -- . ':!lib/composer'

- name: Show potential changes in Psalm baseline
run: |
bash -c "[[ ! \"`git status --porcelain build/psalm-baseline.xml`\" ]] || ( echo 'Uncommited changes in Psalm baseline' && git status && git diff build/psalm-baseline.xml)"

static-code-analysis-ocp:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: true

- name: Set up php
uses: shivammathur/setup-php@v2
with:
php-version: '8.0'
extensions: ctype,curl,dom,fileinfo,gd,intl,json,mbstring,openssl,pdo_sqlite,posix,sqlite,xml,zip
coverage: none

- name: Composer install
run: composer i

- name: Psalm
run: composer run psalm -- -c psalm-ocp.xml --monochrome --no-progress --output-format=github --update-baseline || ( git diff -- . ':!lib/composer' && exit 1 )

- name: Check diff
run: git diff -- . ':!lib/composer'

- name: Show potential changes in Psalm baseline
run: |
bash -c "[[ ! \"`git status --porcelain build/psalm-baseline-ocp.xml`\" ]] || ( echo 'Uncommited changes in Psalm baseline' && git status && git diff build/psalm-baseline.xml)"

+ 2
- 2
.github/workflows/update-psalm-baseline.yml View File

@@ -22,10 +22,10 @@ jobs:
ref: ${{ matrix.branches }}
submodules: true

- name: Set up php7.4
- name: Set up php
uses: shivammathur/setup-php@v2
with:
php-version: 7.4
php-version: '8.0'
extensions: ctype,curl,dom,fileinfo,gd,intl,json,mbstring,openssl,pdo_sqlite,posix,sqlite,xml,zip
coverage: none


+ 5
- 6
apps/dav/lib/CalDAV/Reminder/NotificationProvider/EmailProvider.php View File

@@ -35,10 +35,10 @@ use DateTime;
use OCP\IConfig;
use OCP\IL10N;
use OCP\IURLGenerator;
use OCP\IUser;
use OCP\L10N\IFactory as L10NFactory;
use OCP\Mail\IEMailTemplate;
use OCP\Mail\IMailer;
use OCP\IUser;
use Psr\Log\LoggerInterface;
use Sabre\VObject;
use Sabre\VObject\Component\VEvent;
@@ -51,7 +51,6 @@ use Sabre\VObject\Property;
* @package OCA\DAV\CalDAV\Reminder\NotificationProvider
*/
class EmailProvider extends AbstractProvider {

/** @var string */
public const NOTIFICATION_TYPE = 'EMAIL';

@@ -77,7 +76,7 @@ class EmailProvider extends AbstractProvider {
*/
public function send(VEvent $vevent,
string $calendarDisplayName,
array $principalEmailAddresses,
array $principalEmailAddresses,
array $users = []):void {
$fallbackLanguage = $this->getFallbackLanguage();

@@ -202,7 +201,7 @@ class EmailProvider extends AbstractProvider {

$organizerEMail = substr($organizer->getValue(), 7);

if ($organizerEMail === false || !$this->mailer->validateMailAddress($organizerEMail)) {
if (!$this->mailer->validateMailAddress($organizerEMail)) {
return null;
}

@@ -273,7 +272,7 @@ class EmailProvider extends AbstractProvider {
foreach ($emailAddressesOfDelegates as $addressesOfDelegate) {
if (strcasecmp($addressesOfDelegate, 'mailto:') === 0) {
$delegateEmail = substr($addressesOfDelegate, 7);
if ($delegateEmail !== false && $this->mailer->validateMailAddress($delegateEmail)) {
if ($this->mailer->validateMailAddress($delegateEmail)) {
$emailAddresses[$delegateEmail] = [];
}
}
@@ -333,7 +332,7 @@ class EmailProvider extends AbstractProvider {
return null;
}
$attendeeEMail = substr($attendee->getValue(), 7);
if ($attendeeEMail === false || !$this->mailer->validateMailAddress($attendeeEMail)) {
if (!$this->mailer->validateMailAddress($attendeeEMail)) {
return null;
}


+ 15
- 21
apps/dav/lib/CalDAV/Schedule/IMipPlugin.php View File

@@ -71,7 +71,6 @@ use Sabre\VObject\Recur\EventIterator;
* @license http://sabre.io/license/ Modified BSD License
*/
class IMipPlugin extends SabreIMipPlugin {

/** @var string */
private $userId;

@@ -138,7 +137,6 @@ class IMipPlugin extends SabreIMipPlugin {
* @return void
*/
public function schedule(Message $iTipMessage) {

// Not sending any emails if the system considers the update
// insignificant.
if (!$iTipMessage->significantChange) {
@@ -168,7 +166,7 @@ class IMipPlugin extends SabreIMipPlugin {
// Strip off mailto:
$sender = substr($iTipMessage->sender, 7);
$recipient = substr($iTipMessage->recipient, 7);
if ($recipient === false || !$this->mailer->validateMailAddress($recipient)) {
if (!$this->mailer->validateMailAddress($recipient)) {
// Nothing to send if the recipient doesn't have a valid email address
$iTipMessage->scheduleStatus = '5.0; EMail delivery failed';
return;
@@ -224,11 +222,8 @@ class IMipPlugin extends SabreIMipPlugin {

$message = $this->mailer->createMessage()
->setFrom([$fromEMail => $fromName])
->setTo([$recipient => $recipientName]);

if ($sender !== false) {
$message->setReplyTo([$sender => $senderName]);
}
->setTo([$recipient => $recipientName])
->setReplyTo([$sender => $senderName]);

$template = $this->mailer->createEMailTemplate('dav.calendarInvite.' . $method, $data);
$template->addHeader();
@@ -240,7 +235,6 @@ class IMipPlugin extends SabreIMipPlugin {

// Only add response buttons to invitation requests: Fix Issue #11230
if (($method == self::METHOD_REQUEST) && $this->getAttendeeRsvpOrReqForParticipant($attendee)) {

/*
** Only offer invitation accept/reject buttons, which link back to the
** nextcloud server, to recipients who can access the nextcloud server via
@@ -530,25 +524,25 @@ class IMipPlugin extends SabreIMipPlugin {
private function addBulletList(IEMailTemplate $template, IL10N $l10n, $vevent) {
if ($vevent->SUMMARY) {
$template->addBodyListItem($vevent->SUMMARY, $l10n->t('Title:'),
$this->getAbsoluteImagePath('caldav/title.png'),'','',self::IMIP_INDENT);
$this->getAbsoluteImagePath('caldav/title.png'), '', '', self::IMIP_INDENT);
}
$meetingWhen = $this->generateWhenString($l10n, $vevent);
if ($meetingWhen) {
$template->addBodyListItem($meetingWhen, $l10n->t('Time:'),
$this->getAbsoluteImagePath('caldav/time.png'),'','',self::IMIP_INDENT);
$this->getAbsoluteImagePath('caldav/time.png'), '', '', self::IMIP_INDENT);
}
if ($vevent->LOCATION) {
$template->addBodyListItem($vevent->LOCATION, $l10n->t('Location:'),
$this->getAbsoluteImagePath('caldav/location.png'),'','',self::IMIP_INDENT);
$this->getAbsoluteImagePath('caldav/location.png'), '', '', self::IMIP_INDENT);
}
if ($vevent->URL) {
$url = $vevent->URL->getValue();
$template->addBodyListItem(sprintf('<a href="%s">%s</a>',
htmlspecialchars($url),
htmlspecialchars($url)),
htmlspecialchars($url),
htmlspecialchars($url)),
$l10n->t('Link:'),
$this->getAbsoluteImagePath('caldav/link.png'),
$url,'',self::IMIP_INDENT);
$url, '', self::IMIP_INDENT);
}

$this->addAttendees($template, $l10n, $vevent);
@@ -556,7 +550,7 @@ class IMipPlugin extends SabreIMipPlugin {
/* Put description last, like an email body, since it can be arbitrarily long */
if ($vevent->DESCRIPTION) {
$template->addBodyListItem($vevent->DESCRIPTION->getValue(), $l10n->t('Description:'),
$this->getAbsoluteImagePath('caldav/description.png'),'','',self::IMIP_INDENT);
$this->getAbsoluteImagePath('caldav/description.png'), '', '', self::IMIP_INDENT);
}
}

@@ -586,7 +580,7 @@ class IMipPlugin extends SabreIMipPlugin {
/** @var Property\ICalendar\CalAddress $organizer */
$organizer = $vevent->ORGANIZER;
$organizerURI = $organizer->getNormalizedValue();
[$scheme,$organizerEmail] = explode(':',$organizerURI,2); # strip off scheme mailto:
[$scheme,$organizerEmail] = explode(':', $organizerURI, 2); # strip off scheme mailto:
/** @var string|null $organizerName */
$organizerName = isset($organizer['CN']) ? $organizer['CN'] : null;
$organizerHTML = sprintf('<a href="%s">%s</a>',
@@ -603,7 +597,7 @@ class IMipPlugin extends SabreIMipPlugin {
}
$template->addBodyListItem($organizerHTML, $l10n->t('Organizer:'),
$this->getAbsoluteImagePath('caldav/organizer.png'),
$organizerText,'',self::IMIP_INDENT);
$organizerText, '', self::IMIP_INDENT);
}

$attendees = $vevent->select('ATTENDEE');
@@ -615,7 +609,7 @@ class IMipPlugin extends SabreIMipPlugin {
$attendeesText = [];
foreach ($attendees as $attendee) {
$attendeeURI = $attendee->getNormalizedValue();
[$scheme,$attendeeEmail] = explode(':',$attendeeURI,2); # strip off scheme mailto:
[$scheme,$attendeeEmail] = explode(':', $attendeeURI, 2); # strip off scheme mailto:
$attendeeName = isset($attendee['CN']) ? $attendee['CN'] : null;
$attendeeHTML = sprintf('<a href="%s">%s</a>',
htmlspecialchars($attendeeURI),
@@ -630,9 +624,9 @@ class IMipPlugin extends SabreIMipPlugin {
array_push($attendeesText, $attendeeText);
}

$template->addBodyListItem(implode('<br/>',$attendeesHTML), $l10n->t('Attendees:'),
$template->addBodyListItem(implode('<br/>', $attendeesHTML), $l10n->t('Attendees:'),
$this->getAbsoluteImagePath('caldav/attendees.png'),
implode("\n",$attendeesText),'',self::IMIP_INDENT);
implode("\n", $attendeesText), '', self::IMIP_INDENT);
}

/**

+ 1
- 1
apps/encryption/lib/Crypto/Crypt.php View File

@@ -160,7 +160,7 @@ class Crypt {
/**
* Generates a new private key
*
* @return resource
* @return \OpenSSLAsymmetricKey|false
*/
public function getOpenSSLPKey() {
$config = $this->getOpenSSLConfig();

+ 0
- 3
apps/files_external/lib/Lib/Storage/SFTPReadStream.php View File

@@ -136,9 +136,6 @@ class SFTPReadStream implements File {

$data = substr($this->buffer, 0, $count);
$this->buffer = substr($this->buffer, $count);
if ($this->buffer === false) {
$this->buffer = '';
}
$this->readPosition += strlen($data);

return $data;

+ 0
- 6
build/psalm-baseline.xml View File

@@ -578,15 +578,9 @@
</UndefinedInterfaceMethod>
</file>
<file src="apps/dav/lib/Controller/InvitationResponseController.php">
<InvalidScalarArgument occurrences="1">
<code>$guests</code>
</InvalidScalarArgument>
<UndefinedPropertyAssignment occurrences="1">
<code>$vEvent-&gt;DTSTAMP</code>
</UndefinedPropertyAssignment>
<UndefinedPropertyFetch occurrences="1">
<code>$vEvent-&gt;{'ATTENDEE'}</code>
</UndefinedPropertyFetch>
</file>
<file src="apps/dav/lib/DAV/CustomPropertiesBackend.php">
<InvalidArgument occurrences="1">

+ 23
- 27
core/Command/Log/Manage.php View File

@@ -141,18 +141,18 @@ class Manage extends Command implements CompletionAwareInterface {
protected function convertLevelString($level) {
$level = strtolower($level);
switch ($level) {
case 'debug':
return 0;
case 'info':
return 1;
case 'warning':
case 'warn':
return 2;
case 'error':
case 'err':
return 3;
case 'fatal':
return 4;
case 'debug':
return 0;
case 'info':
return 1;
case 'warning':
case 'warn':
return 2;
case 'error':
case 'err':
return 3;
case 'fatal':
return 4;
}
throw new \InvalidArgumentException('Invalid log level string');
}
@@ -164,16 +164,16 @@ class Manage extends Command implements CompletionAwareInterface {
*/
protected function convertLevelNumber($levelNum) {
switch ($levelNum) {
case 0:
return 'Debug';
case 1:
return 'Info';
case 2:
return 'Warning';
case 3:
return 'Error';
case 4:
return 'Fatal';
case 0:
return 'Debug';
case 1:
return 'Info';
case 2:
return 'Warning';
case 3:
return 'Error';
case 4:
return 'Fatal';
}
throw new \InvalidArgumentException('Invalid log level number');
}
@@ -189,11 +189,7 @@ class Manage extends Command implements CompletionAwareInterface {
} elseif ($optionName === 'level') {
return ['debug', 'info', 'warning', 'error', 'fatal'];
} elseif ($optionName === 'timezone') {
$identifier = \DateTimeZone::listIdentifiers();
if ($identifier === false) {
return [];
}
return $identifier;
return \DateTimeZone::listIdentifiers();
}
return [];
}

Loading…
Cancel
Save