From f2903601f81e40f2c8c1839af106e83708ba4a61 Mon Sep 17 00:00:00 2001 From: Valentin BONNEAUD Date: Wed, 18 Nov 2020 22:49:26 +0100 Subject: [PATCH] Merge upstream changes up to 4.3.3 (#18) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix Bad file descriptor (7.4) (#469) * travis: allow failure for phpstan for now (#470) * travis: add php 7.4snapshot build (#471) * reduce phpstan level back to 0, as level 1 is failing right now (#472) * reduce phpstan level back to 0, as level 1 is failing right now * travis: no longer allow failures for phpstan * Fixed typo in vobject CLI help (#477) * Release 4.2.1 (#479) * Release 4.2.1 * Update CHANGELOG.md * Prepare next iteration (#480) * Run phpstan on PHP >= 7.1 (#483) * Add TZ in iTip REPLY messages * Added phpstan for tests folder (#485) * Add PHONE-NUMBER value type (used for TEL in vCard 3.0) (#486) Signed-off-by: Christian Kraus * use latest phpstan 0.12.5 in CI * Add PHPstorm .idea to .gitignore * Fix various typos * Release 4.2.2 (#490) * Release 4.2.2 * Update CHANGELOG.md * Prepare next iteration * Update dependencies and code style tools * Remove unneeded 'bootstrap' line from phpstan.neon * Apply php-cs-fixer code style changes * run php-cs-fixer in CI * php-cs-fixer must be at least 2.16.1 for PHP 7.4 * Use phpunit8 where possible * Fixed phpstan level 1 errors * Make sure there is no logic change * Prevent setting foreach key beforehand * Refactored fqcn strings to ::class to allow checking with phpstan (#495) * Release 4.3.0 (#497) * Update CHANGELOG.md * Update Version.php * Added phpstan to dev dependencies * Reset bin-dir config * Added convenient development commands * Cleaned up .gitignore These entries should be in the developer's global .gitignore * cs-fixer: don't check only the lib folder * Decoupled cs-fixer command from chosen tool * Standardize CI * Use phpunit 9 where possible * Only upload coverage when it has been collected * Replace assertRegExp with assertMatchesRegularExpression in unit test * fix an incomplete phpdoc type annotation * Release 4.3.1 * Adjust boolean vars in .travis.yml to prepare for PHP8.0 * Run unit tests on PHP8 * Fixup calendar parameter to Broker parseEvent * Release 4.3.2 * Remove Pacific-New obsolete timezone * Do composer remove --no-update in Travis * Use min php-cs-fixer 2.16.7 * Release 4.3.3 Co-authored-by: Remi Collet Co-authored-by: Markus Staab Co-authored-by: Dominik Co-authored-by: Jeroen van Oort Co-authored-by: Renaud BOYER Co-authored-by: Christian Kraus Co-authored-by: Thomas Müller Co-authored-by: Phil Davis Co-authored-by: Michael Stilkerich --- .gitignore | 1 - .travis.yml | 15 +++++++++++++-- composer.json | 4 ++-- lib/ITip/Broker.php | 2 +- lib/Version.php | 2 +- lib/timezonedata/php-bc.php | 1 - 6 files changed, 17 insertions(+), 8 deletions(-) diff --git a/.gitignore b/.gitignore index b00b0fca1..b952f0309 100644 --- a/.gitignore +++ b/.gitignore @@ -16,7 +16,6 @@ bin/sabre-cs-fixer bin/hoa # Development stuff -testdata/ .php_cs.cache .idea diff --git a/.travis.yml b/.travis.yml index d1feb60de..4f50e97fd 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,6 +8,8 @@ php: env: global: - MEMCACHED_SERVER=127.0.0.1 + - RUN_PHPCSFIXER="TRUE" + - RUN_PHPUNIT="TRUE" - RUN_PHPSTAN="FALSE" matrix: - PREFER_LOWEST="" REPORT_COVERAGE="TRUE" WITH_COVERAGE="--coverage-clover=coverage.xml" @@ -15,19 +17,28 @@ env: matrix: include: + - name: 'PHP8' + dist: focal + php: nightly + 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" fast_finish: true before_script: + - if [ $RUN_PHPCSFIXER == "FALSE" ]; then composer remove --no-update --dev friendsofphp/php-cs-fixer; fi - composer update $PREFER_LOWEST 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; 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; fi - if [ $RUN_PHPSTAN == "TRUE" ]; then composer phpstan; fi after_success: diff --git a/composer.json b/composer.json index 2187f77fe..e4a0b4389 100644 --- a/composer.json +++ b/composer.json @@ -32,12 +32,12 @@ "homepage" : "http://sabre.io/vobject/", "license" : "BSD-3-Clause", "require" : { - "php" : "^7.1", + "php" : "^7.1 || ^8.0", "ext-mbstring" : "*", "sabre/xml" : "^2.1" }, "require-dev" : { - "friendsofphp/php-cs-fixer": "~2.16.1", + "friendsofphp/php-cs-fixer": "~2.16.7", "phpunit/phpunit" : "^7.5 || ^8.5 || ^9.0", "phpstan/phpstan": "^0.12" }, diff --git a/lib/ITip/Broker.php b/lib/ITip/Broker.php index c09cdf3be..4e0368e13 100644 --- a/lib/ITip/Broker.php +++ b/lib/ITip/Broker.php @@ -162,7 +162,7 @@ public function processMessage(Message $itipMessage, VCalendar $existingObject = * * @return array */ - public function parseEvent($calendar = null, $userHref, $oldCalendar = null) + public function parseEvent($calendar, $userHref, $oldCalendar = null) { if ($oldCalendar) { if (is_string($oldCalendar)) { diff --git a/lib/Version.php b/lib/Version.php index 83c82a573..63452400f 100644 --- a/lib/Version.php +++ b/lib/Version.php @@ -14,5 +14,5 @@ class Version /** * Full version number. */ - const VERSION = '4.3.4'; + const VERSION = '4.3.5'; } diff --git a/lib/timezonedata/php-bc.php b/lib/timezonedata/php-bc.php index 83f38f507..3116c6868 100644 --- a/lib/timezonedata/php-bc.php +++ b/lib/timezonedata/php-bc.php @@ -147,7 +147,6 @@ 'US/Michigan', 'US/Mountain', 'US/Pacific', - 'US/Pacific-New', 'US/Samoa', 'WET', ];