Skip to content

Commit d3ea589

Browse files
authored
Merge pull request #1296 from phil-davis/test-php-8.0
Test with PHP8.0
2 parents 7101bbe + 9769bf1 commit d3ea589

File tree

3 files changed

+18
-5
lines changed

3 files changed

+18
-5
lines changed

.travis.yml

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,28 @@ env:
1616
- SABRE_MYSQLUSER="root"
1717
- SABRE_MYSQLPASS=""
1818
- SABRE_MYSQLDSN="mysql:host=127.0.0.1;dbname=sabredav_test"
19+
- RUN_PHPCSFIXER="TRUE"
20+
- RUN_PHPUNIT="TRUE"
1921
- RUN_PHPSTAN="FALSE"
2022
matrix:
2123
- PREFER_LOWEST="" TEST_DEPS="" REPORT_COVERAGE="TRUE" WITH_COVERAGE="--coverage-clover=coverage.xml"
2224
- PREFER_LOWEST="--prefer-lowest" TEST_DEPS="tests/Sabre/" REPORT_COVERAGE="FALSE" WITH_COVERAGE=""
2325

2426
matrix:
2527
include:
28+
- name: 'PHP8'
29+
dist: focal
30+
php: nightly
31+
addons:
32+
postgresql: '12'
33+
env:
34+
- RUN_PHPCSFIXER="FALSE"
35+
- REPORT_COVERAGE="FALSE"
2636
- name: 'PHPStan'
2737
php: 7.4
2838
env:
39+
- RUN_PHPCSFIXER="FALSE"
40+
- RUN_PHPUNIT="FALSE"
2941
- RUN_PHPSTAN="TRUE"
3042
- REPORT_COVERAGE="FALSE"
3143
- name: 'Test with streaming propfind'
@@ -43,15 +55,16 @@ before_script:
4355
- mysql -u root -h 127.0.0.1 -e 'create database sabredav_test'
4456
- psql -c "create database sabredav_test" -U postgres
4557
- psql -c "create user sabredav with PASSWORD 'sabredav';GRANT ALL PRIVILEGES ON DATABASE sabredav_test TO sabredav" -U postgres
58+
- if [ $RUN_PHPCSFIXER == "FALSE" ]; then composer remove --dev friendsofphp/php-cs-fixer; fi
4659
- composer update $PREFER_LOWEST
4760

4861
addons:
4962
postgresql: "9.5"
5063

5164
script:
52-
- if [ $RUN_PHPSTAN == "FALSE" ]; then php vendor/bin/php-cs-fixer fix --dry-run --diff; fi
53-
- if [ $RUN_PHPSTAN == "FALSE" ]; then php vendor/bin/phpunit --configuration tests/phpunit.xml $WITH_COVERAGE $TEST_DEPS; fi
54-
- if [ $RUN_PHPSTAN == "FALSE" ]; then rm -f ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini; fi
65+
- if [ $RUN_PHPCSFIXER == "TRUE" ]; then php vendor/bin/php-cs-fixer fix --dry-run --diff; fi
66+
- if [ $RUN_PHPUNIT == "TRUE" ]; then php vendor/bin/phpunit --configuration tests/phpunit.xml $WITH_COVERAGE $TEST_DEPS; fi
67+
- if [ $RUN_PHPUNIT == "TRUE" ]; then rm -f ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini; fi
5568
- if [ $RUN_PHPSTAN == "TRUE" ]; then composer phpstan; fi
5669

5770
after_success:

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
}
1515
],
1616
"require": {
17-
"php": "^7.1.0",
17+
"php": "^7.1.0 || ^8.0",
1818
"sabre/vobject": "^4.2.1",
1919
"sabre/event" : "^5.0",
2020
"sabre/xml" : "^2.0.1",

lib/CalDAV/Schedule/Plugin.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -609,7 +609,7 @@ public function getSupportedPrivilegeSet(INode $node, array &$supportedPrivilege
609609
* @param bool $modified a marker to indicate that the original object
610610
* modified by this process
611611
*/
612-
protected function processICalendarChange($oldObject = null, VCalendar $newObject, array $addresses, array $ignore = [], &$modified = false)
612+
protected function processICalendarChange($oldObject, VCalendar $newObject, array $addresses, array $ignore = [], &$modified = false)
613613
{
614614
$broker = new ITip\Broker();
615615
$messages = $broker->parseEvent($newObject, $addresses, $oldObject);

0 commit comments

Comments
 (0)