Skip to content

Commit da70622

Browse files
authored
Merge pull request #61140 from nextcloud/fix/fix-deprecations-in-tests
Fix deprecations in tests
2 parents c882abf + d8a6ab5 commit da70622

54 files changed

Lines changed: 211 additions & 290 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/phpunit-mariadb.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ jobs:
104104
ini-file: development
105105
ini-values: disable_functions=""
106106
env:
107+
fail-fast: true
107108
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
108109

109110
- name: Set up dependencies

.github/workflows/phpunit-memcached.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ jobs:
8888
ini-file: development
8989
ini-values: disable_functions=""
9090
env:
91+
fail-fast: true
9192
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
9293

9394
- name: Set up dependencies

.github/workflows/phpunit-mysql-sharding.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ jobs:
5656
strategy:
5757
fail-fast: false
5858
matrix:
59-
php-versions: ['8.2']
60-
mysql-versions: ['8.4']
59+
php-versions: ["8.2"]
60+
mysql-versions: ["8.4"]
6161

6262
name: Sharding - MySQL ${{ matrix.mysql-versions }} (PHP ${{ matrix.php-versions }}) - database tests
6363

@@ -137,6 +137,7 @@ jobs:
137137
ini-file: development
138138
ini-values: disable_functions=""
139139
env:
140+
fail-fast: true
140141
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
141142

142143
- name: Set up dependencies

.github/workflows/phpunit-mysql.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ jobs:
104104
ini-file: development
105105
ini-values: disable_functions=""
106106
env:
107+
fail-fast: true
107108
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
108109

109110
- name: Set up dependencies

.github/workflows/phpunit-nodb.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,9 @@ jobs:
5959
strategy:
6060
fail-fast: false
6161
matrix:
62-
php-versions: ['8.3', '8.4', '8.5']
62+
php-versions: ["8.3", "8.4", "8.5"]
6363
include:
64-
- php-versions: '8.2'
64+
- php-versions: "8.2"
6565
coverage: ${{ github.event_name != 'pull_request' }}
6666

6767
name: No DB unit tests (PHP ${{ matrix.php-versions }})
@@ -86,12 +86,13 @@ jobs:
8686
with:
8787
php-version: ${{ matrix.php-versions }}
8888
# https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html#prerequisites-for-manual-installation
89-
extensions: bz2, ctype, curl, dom, fileinfo, gd, iconv, imagick, intl, json, libxml, mbstring, openssl, pcntl, posix, redis, session, simplexml, xmlreader, xmlwriter, zip, zlib, sqlite, pdo_sqlite
89+
extensions: apcu, bz2, ctype, curl, dom, fileinfo, gd, iconv, imagick, intl, json, libxml, mbstring, openssl, pcntl, pdo_sqlite, posix, redis, session, simplexml, sqlite, xmlreader, xmlwriter, zip, zlib
9090
coverage: ${{ matrix.coverage && 'xdebug' || 'none' }}
9191
ini-file: development
9292
# Required for tests that use pcntl
9393
ini-values: disable_functions=""
9494
env:
95+
fail-fast: true
9596
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
9697

9798
- name: Set up dependencies
@@ -106,7 +107,7 @@ jobs:
106107
php -f tests/enable_all.php
107108
108109
- name: PHPUnit nodb testsuite
109-
run: composer run test -- --exclude-group DB --exclude-group SLOWDB --log-junit junit.xml ${{ matrix.coverage && '--coverage-clover ./clover.nodb.xml' || '' }}
110+
run: composer run test -- --exclude-group DB --exclude-group SLOWDB --exclude-group Memcached --exclude-group PRIMARY-swift --exclude-group PRIMARY-s3 --exclude-group PRIMARY-azure --log-junit junit.xml ${{ matrix.coverage && '--coverage-clover ./clover.nodb.xml' || '' }}
110111

111112
- name: Upload nodb code coverage
112113
if: ${{ !cancelled() && matrix.coverage }}

.github/workflows/phpunit-object-store-primary.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ jobs:
4949
strategy:
5050
fail-fast: false
5151
matrix:
52-
php-versions: ['8.2']
53-
key: ['s3', 's3-multibucket']
52+
php-versions: ["8.2"]
53+
key: ["s3", "s3-multibucket"]
5454

5555
name: php${{ matrix.php-versions }}-${{ matrix.key }}-minio
5656

@@ -84,6 +84,7 @@ jobs:
8484
php-version: ${{ matrix.php-versions }}
8585
extensions: bz2, ctype, curl, dom, fileinfo, gd, iconv, intl, json, libxml, mbstring, openssl, pcntl, posix, redis, session, simplexml, xmlreader, xmlwriter, zip, zlib, sqlite, pdo_sqlite
8686
env:
87+
fail-fast: true
8788
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
8889

8990
- name: Set up Nextcloud
@@ -113,10 +114,9 @@ jobs:
113114
docker ps -a
114115
docker ps -aq | while read container ; do IMAGE=$(docker inspect --format='{{.Config.Image}}' $container); echo $IMAGE; docker logs $container; echo "\n\n" ; done
115116
116-
117117
object-store-primary-summary:
118118
runs-on: ubuntu-latest-low
119-
needs: [changes,object-store-primary-tests-minio]
119+
needs: [changes, object-store-primary-tests-minio]
120120

121121
if: always()
122122

.github/workflows/phpunit-oci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ jobs:
111111
ini-file: development
112112
ini-values: disable_functions=""
113113
env:
114+
fail-fast: true
114115
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
115116

116117
- name: Set up dependencies

.github/workflows/phpunit-pgsql.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ jobs:
107107
ini-file: development
108108
ini-values: disable_functions=""
109109
env:
110+
fail-fast: true
110111
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
111112

112113
- name: Set up dependencies

.github/workflows/phpunit-sqlite.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ jobs:
9090
ini-file: development
9191
ini-values: disable_functions=""
9292
env:
93+
fail-fast: true
9394
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
9495

9596
- name: Set up dependencies
@@ -110,7 +111,7 @@ jobs:
110111
run: ./occ app:list && echo "======= System config =======" && ./occ config:list system
111112

112113
- name: PHPUnit database tests
113-
run: composer run test:db -- --log-junit junit.xml ${{ matrix.coverage && '--coverage-clover ./clover.db.xml' || '' }} tests/lib/Preview/PostscriptTest.php
114+
run: composer run test:db -- --log-junit junit.xml ${{ matrix.coverage && '--coverage-clover ./clover.db.xml' || '' }}
114115

115116
- name: Upload db code coverage
116117
if: ${{ !cancelled() && matrix.coverage }}

apps/dav/lib/CardDAV/AddressBookImpl.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,10 @@ public function __construct(
4141
/**
4242
* @return string defining the technical unique key
4343
* @since 5.0.0
44+
* @since 35.0.0 Typed return type
4445
*/
4546
#[\Override]
46-
public function getKey() {
47+
public function getKey(): string {
4748
return (string)$this->addressBookInfo['id'];
4849
}
4950

0 commit comments

Comments
 (0)