Skip to content

Commit

Permalink
Merge pull request #1296 from phil-davis/test-php-8.0
Browse files Browse the repository at this point in the history
Test with PHP8.0
  • Loading branch information
phil-davis authored Oct 4, 2020
2 parents 7101bbe + 9769bf1 commit d3ea589
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 5 deletions.
19 changes: 16 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,28 @@ env:
- SABRE_MYSQLUSER="root"
- SABRE_MYSQLPASS=""
- SABRE_MYSQLDSN="mysql:host=127.0.0.1;dbname=sabredav_test"
- RUN_PHPCSFIXER="TRUE"
- RUN_PHPUNIT="TRUE"
- RUN_PHPSTAN="FALSE"
matrix:
- PREFER_LOWEST="" TEST_DEPS="" REPORT_COVERAGE="TRUE" WITH_COVERAGE="--coverage-clover=coverage.xml"
- PREFER_LOWEST="--prefer-lowest" TEST_DEPS="tests/Sabre/" REPORT_COVERAGE="FALSE" WITH_COVERAGE=""

matrix:
include:
- name: 'PHP8'
dist: focal
php: nightly
addons:
postgresql: '12'
env:
- RUN_PHPCSFIXER="FALSE"
- REPORT_COVERAGE="FALSE"
- name: 'PHPStan'
php: 7.4
env:
- RUN_PHPCSFIXER="FALSE"
- RUN_PHPUNIT="FALSE"
- RUN_PHPSTAN="TRUE"
- REPORT_COVERAGE="FALSE"
- name: 'Test with streaming propfind'
Expand All @@ -43,15 +55,16 @@ before_script:
- mysql -u root -h 127.0.0.1 -e 'create database sabredav_test'
- psql -c "create database sabredav_test" -U postgres
- psql -c "create user sabredav with PASSWORD 'sabredav';GRANT ALL PRIVILEGES ON DATABASE sabredav_test TO sabredav" -U postgres
- if [ $RUN_PHPCSFIXER == "FALSE" ]; then composer remove --dev friendsofphp/php-cs-fixer; fi
- composer update $PREFER_LOWEST

addons:
postgresql: "9.5"

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

after_success:
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
}
],
"require": {
"php": "^7.1.0",
"php": "^7.1.0 || ^8.0",
"sabre/vobject": "^4.2.1",
"sabre/event" : "^5.0",
"sabre/xml" : "^2.0.1",
Expand Down
2 changes: 1 addition & 1 deletion lib/CalDAV/Schedule/Plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -609,7 +609,7 @@ public function getSupportedPrivilegeSet(INode $node, array &$supportedPrivilege
* @param bool $modified a marker to indicate that the original object
* modified by this process
*/
protected function processICalendarChange($oldObject = null, VCalendar $newObject, array $addresses, array $ignore = [], &$modified = false)
protected function processICalendarChange($oldObject, VCalendar $newObject, array $addresses, array $ignore = [], &$modified = false)
{
$broker = new ITip\Broker();
$messages = $broker->parseEvent($newObject, $addresses, $oldObject);
Expand Down

0 comments on commit d3ea589

Please sign in to comment.