Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into chore/merge-upstr…
Browse files Browse the repository at this point in the history
…eam-master-20231228
  • Loading branch information
Christopher Szu committed Dec 28, 2023
2 parents c75d73d + a5df355 commit 46fe612
Show file tree
Hide file tree
Showing 195 changed files with 4,750 additions and 4,845 deletions.
3 changes: 2 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/tests export-ignore
/.github/ export-ignore
/tests/ export-ignore
/.gitattributes export-ignore
/.gitignore export-ignore
/.php_cs.dist export-ignore
Expand Down
15 changes: 15 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: "composer"
directory: "/"
schedule:
interval: "monthly"
- package-ecosystem: "github-actions" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "monthly"
63 changes: 63 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: continuous-integration
on:
push:
branches:
- master
- release/*
pull_request:
jobs:
unit-testing:
name: PHPUnit (PHP ${{ matrix.php-versions }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php-versions: ['7.4', '8.0', '8.1', '8.2', '8.3']
coverage: ['pcov']
code-analysis: ['no']
include:
- php-versions: '7.4'
coverage: 'none'
code-analysis: 'yes'
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup PHP, with composer and extensions
uses: shivammathur/setup-php@v2 #https://github.com/shivammathur/setup-php
with:
php-version: ${{ matrix.php-versions }}
extensions: mbstring, dom, fileinfo, mysql, redis, opcache
coverage: ${{ matrix.coverage }}
tools: composer

- name: Get composer cache directory
id: composer-cache
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT

- name: Cache composer dependencies
uses: actions/cache@v3
with:
path: ${{ steps.composer-cache.outputs.dir }}
# Use composer.json for key, if composer.lock is not committed.
# key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
restore-keys: ${{ runner.os }}-composer-

- name: Install composer dependencies
run: composer install --no-progress --prefer-dist --optimize-autoloader

- name: Code Analysis (PHP CS-Fixer)
if: matrix.code-analysis == 'yes'
run: php vendor/bin/php-cs-fixer fix --dry-run --diff

- name: Code Analysis (PHPStan)
if: matrix.code-analysis == 'yes'
run: composer phpstan

- name: Test with phpunit
run: vendor/bin/phpunit --configuration tests/phpunit.xml --coverage-clover clover.xml

- name: Code Coverage
uses: codecov/codecov-action@v3
if: matrix.coverage != 'none'
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ tests/temp
tests/.phpunit.result.cache

# Development stuff
.php_cs.cache
.php-cs-fixer.cache
15 changes: 15 additions & 0 deletions .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?php

$config = new PhpCsFixer\Config();
$config->getFinder()
->exclude('vendor')
->in(__DIR__)
->append([
__FILE__,
]);
$config->setRules([
'@PSR1' => true,
'@Symfony' => true,
]);

return $config;
12 changes: 0 additions & 12 deletions .php_cs.dist

This file was deleted.

121 changes: 118 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,121 @@ ChangeLog
* #3 Add daily occurrences to nextMonth and NextYear
* #4 Enhance fast forward speed if no count value has been given

4.5.2 (2023-01-20)
------------------

* #603: Support sabre/xml v4 (@gharlan)

4.5.1 (2022-10-09)
------------------

* #597: Remove utf8_encode to easily support PHP 8.2 (@phil-davis)

4.5.0 (2022-08-17)
------------------

* #579: Update .gitattributes (@cedric-anne)
* #561: PHP 8.1 deprecated support for null values in its APIs (@mstilkerich)
* #571: Fully ignore invalid lines (@heiglandreas)
* #564: Fix infinite loop caused by yearly with bySetPos (@liurxliu)
* #567: Endless loop problem in RRuleIterator::nextDaily (@KristofferFM)
* #466: Add support for MEMBER in a VCard (@sash04ek)
* #559: Handle Vobjects without closing tag (@sash04ek)
* #582: Fix bug in by year day (@KAYLukas)

4.4.3 (2022-07-15)
------------------

* #577: Ignore multiple same parameter-values (@heiglandreas)

4.4.2 (2022-06-24)
------------------

* #565: lowercase mailto:-addresses in getNormalizedValue() (@pk1234)
* #568: Add NICKNAME fallback for VCards without FNs (@Evengard)
* #573: Component/select: Before uppercasing $child->group, make sure it isn't null (@algernon)
* #575: Fix encoding detection on PHP 8.1 (@come-nc)

4.4.1 (2021-12-07)
------------------

#557: Fix Iterator method signatures and avoid passing null as separator for implode (PHP 8.1 support) (@come-nc)

4.4.0 (2021-11-15)
------------------

#548: Allow easier extension of the timezone guessing (@heiglandreas)

4.3.8 (2021-11-14)
------------------

* #538: fix EventIterator returns wrong end endTime (@floerke)
* #541: Reordering of the attendees is not a significant change (@floerke)
* #543: Reordering of vevent is not a significant change (@floerke)

4.3.7 (2021-11-04)
------------------

* #551: version bump that was missed in 4.3.6 (@phil-davis)

4.3.6 (2021-11-04)
------------------

* #544: Fix deprecated usages and return types on PHP 8.1 (@cedric-anne)

4.3.5 (2021-02-12)
------------------

* #523: Fix setting properties with group assignment (@mstilkerich)
* #532: Make use of until parameter in nextMonthly function (@jaircuevajunior)

4.3.4 (2021-02-04)
------------------

* #529: Reassign modified date in yearly rrule (@laoneo)
* #525: Add .gitattributes to reduce package size (@fezfez)

4.3.3 (2020-11-09)
------------------

* #519: Remove US/Pacific-New obsolete timezone (@phil-davis)

4.3.2 (2020-10-03)
------------------

* #513: Added Support for PHP 8.0 (@phil-davis)

4.3.1 (2020-07-13)
------------------

* #510: Fix an incomplete phpdoc type annotation (@mstilkerich)
* #505: Refactor unit test code for phpunit9 (@phil-davis)
* #500: Standardize CI (@phil-davis)
* #496: CI tooling changes (@JeroenVanOort)

4.3.0 (2020-01-31)
------------------

* Added support for PHP 7.4, dropped support for PHP 7.0 (@phil-davis)
* #487: Added phpstan coverage, updated testsuite for phpunit8 (@phil-davis, @JeroenVanOort)
* #495: refactored maps to use ::class notation (@JeroenVanOort)

4.2.2 (2020-01-14)
------------------

* #465: Add TZ in iTip REPLY iTip messages
* #486: Add PHONE-NUMBER value type (used for TEL in vCard 3.0)

4.2.1 (2019-12-18)
------------------

* #469, #451: fix compat with php 7.4
* #443: prevent running in indefinite loop
* #449: Preventing creating a component for a root document
* #450: Fix parse with option Forgiving with trailing equal
* #459: fixed typo in VCalendar which resulting in usage of the wrong TimeZone
* #462: Broker::parseEventForOrganizer copies DTSTAMP from $eventInfo that causes broken scheduling

4.2.0 (2019-02-19)
------------------

Expand Down Expand Up @@ -629,7 +744,7 @@ ChangeLog
* Updated: Windows timezone mapping to latest version from unicode.org
* Changed: The timezone maps are now loaded in from external files, in
lib/Sabre/VObject/timezonedata.
* Added: Fixing badly encoded URL's from google contacts vcards.
* Added: Fixing badly encoded URL's from Google contacts vcards.
* Fixed: Issue #68. Couldn't decode properties ending in a colon.
* Fixed: Issue #72. RecurrenceIterator should respect timezone in the UNTIL
clause.
Expand Down Expand Up @@ -703,7 +818,7 @@ ChangeLog
* Added: Utility to convert between 2.1, 3.0 and 4.0 vCards.
* Added: You can now add() multiple parameters to a property in one call.
* Added: Parameter::has() for easily checking if a parameter value exists.
* Added: VCard::preferred() to find a preferred email, phone number, etc for a
* Added: VCard::preferred() to find a preferred email, phone number, etc. for a
contact.
* Changed: All $duration properties are now public.
* Added: A few validators for iCalendar documents.
Expand Down Expand Up @@ -900,7 +1015,7 @@ ChangeLog
------------------

* Fixed: Microsoft re-uses their magic numbers for different timezones,
specifically id 2 for both Sarajevo and Lisbon). A workaround was added to
(specifically id 2 for both Sarajevo and Lisbon). A workaround was added to
deal with this.


Expand Down
2 changes: 1 addition & 1 deletion bin/bench_freebusygenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
echo "The process will be repeated 100 times to get accurate stats\n";
echo "\n";
echo 'Usage: '.$argv[0]." inputfile.ics\n";
exit();
exit(1);
}

list(, $inputFile) = $argv;
Expand Down
2 changes: 1 addition & 1 deletion bin/bench_manipulatevcard.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
echo 'system.';
echo "\n";
echo 'Usage: '.$argv[0]." inputfile.vcf\n";
exit();
exit;
}

list(, $inputFile) = $argv;
Expand Down
4 changes: 2 additions & 2 deletions bin/generate_vcards
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@

namespace Sabre\VObject;

// This sucks.. we have to try to find the composer autoloader. But chances
// are, we can't find it this way. So we'll do our bestest
// This sucks. we have to try to find the composer autoloader. But chances
// are, we can't find it this way. So we'll do our best.
$paths = [
__DIR__ . '/../vendor/autoload.php', // In case vobject is cloned directly
__DIR__ . '/../../../autoload.php', // In case vobject is a composer dependency.
Expand Down
2 changes: 1 addition & 1 deletion bin/generateicalendardata.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
HI
);
exit();
exit;
}

$events = 100;
Expand Down
4 changes: 2 additions & 2 deletions bin/mergeduplicates.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@

namespace Sabre\VObject;

// This sucks.. we have to try to find the composer autoloader. But chances
// are, we can't find it this way. So we'll do our bestest
// This sucks. We have to try to find the composer autoloader. But chances
// are, we can't find it this way. So we'll do our best.
$paths = [
__DIR__.'/../vendor/autoload.php', // In case vobject is cloned directly
__DIR__.'/../../../autoload.php', // In case vobject is a composer dependency.
Expand Down
2 changes: 1 addition & 1 deletion bin/rrulebench.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
echo 'system.';
echo "\n";
echo 'Usage: '.$argv[0]." inputfile.ics startdate enddate\n";
exit();
exit;
}

list(, $inputFile, $startDate, $endDate) = $argv;
Expand Down
4 changes: 2 additions & 2 deletions bin/vobject
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@

namespace Sabre\VObject;

// This sucks.. we have to try to find the composer autoloader. But chances
// are, we can't find it this way. So we'll do our bestest
// This sucks. We have to try to find the composer autoloader. But chances
// are, we can't find it this way. So we'll do our best.
$paths = [
__DIR__ . '/../vendor/autoload.php', // In case vobject is cloned directly
__DIR__ . '/../../../autoload.php', // In case vobject is a composer dependency.
Expand Down
13 changes: 7 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,16 @@
"homepage" : "http://sabre.io/vobject/",
"license" : "BSD-3-Clause",
"require" : {
"php" : "^7.1 || ^8.0",
"php" : "^7.4 || ^8.0",
"ext-mbstring" : "*",
"sabre/xml" : "^2.1"
"ext-json" : "*",
"sabre/xml" : "^3.0 || ^4.0"
},
"require-dev" : {
"friendsofphp/php-cs-fixer": "~2.17.1",
"phpunit/phpunit" : "^7.5 || ^8.5 || ^9.0",
"friendsofphp/php-cs-fixer": "^3.38",
"phpunit/phpunit" : "^9.6",
"phpunit/php-invoker" : "^2.0 || ^3.1",
"phpstan/phpstan": "^0.12"
"phpstan/phpstan": "^1.10"
},
"suggest" : {
"hoa/bench" : "If you would like to run the benchmark scripts"
Expand Down Expand Up @@ -90,7 +91,7 @@
},
"scripts": {
"phpstan": [
"phpstan analyse lib tests"
"phpstan analyse lib tests --memory-limit 1G"
],
"cs-fixer": [
"php-cs-fixer fix"
Expand Down
Loading

0 comments on commit 46fe612

Please sign in to comment.