Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add dependancies audit #100

Open
wants to merge 120 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
120 commits
Select commit Hold shift + click to select a range
dde2b5c
Fix bug in by year day
KAYLukas Nov 28, 2018
e980e28
Change composer name
valentinbonneaud Sep 10, 2019
bbb9eb6
Merge pull request #1 from ProtonMail/feat/update-composer
valentinbonneaud Sep 10, 2019
0c57be3
Merge pull request #2 from ProtonMail/fix/by-year-day
valentinbonneaud Sep 10, 2019
2b27d82
Add daily occurences to nextMonth and NextYear (#3)
valentinbonneaud Sep 10, 2019
ab366e1
Enhance fastforward speed if no `count` value has been given (#4)
valentinbonneaud Sep 10, 2019
af51976
Update README (#5)
valentinbonneaud Sep 10, 2019
be709bc
Add FastForward Before (#6)
valentinbonneaud Jan 24, 2020
d78a3ac
Add fastForwardToEnd (#7)
valentinbonneaud Jan 24, 2020
1889acd
Remove timing test in case of count (#8)
valentinbonneaud Jan 27, 2020
d0d4498
Update changelog (#9)
valentinbonneaud Jan 27, 2020
7933fc2
Fix phpstan (#10)
ThHareau Jan 29, 2020
647533a
FREQ is mandatory in the RRule (#11)
valentinbonneaud Jan 30, 2020
2fe3a9a
Add test on BYMONTHDAY (#12)
valentinbonneaud Jan 30, 2020
0a003c7
Fix counter when fast forward before (#13)
valentinbonneaud Feb 11, 2020
1c89b54
Add extra timezones support (#14)
valentinbonneaud May 20, 2020
ca647a2
Correct typo in changelog
valentinbonneaud May 20, 2020
b16c3e7
Expose RRULE properties from RRuleIterator (#15)
bcaller Jul 22, 2020
10a03a8
Merge upstream (#16)
bcaller Jul 28, 2020
f290360
Merge upstream changes up to 4.3.3 (#18)
valentinbonneaud Nov 18, 2020
e125596
Throw exception when getting invalid timezone (#17)
liurxliu Nov 23, 2020
6507b3d
Update changelog for release 4.4.0 (#19)
valentinbonneaud Nov 23, 2020
bee705a
Validate count and until property (#20)
liurxliu Jan 18, 2021
5e572e2
Prepare changelog for 4.4.1 (#21)
valentinbonneaud Jan 18, 2021
57b05a4
Add microsoft timezone map (#23)
liurxliu Jul 15, 2021
0380546
Prepare 4.4.2 release (#24)
valentinbonneaud Jul 15, 2021
f9055e0
[Calendar] Fix duplicate value (#25)
liurxliu Oct 4, 2021
b87d007
[Calendar] Add php unsupport timezone
Sep 27, 2021
fb68d5a
Update changelog for 4.5.1
valentinbonneaud Oct 4, 2021
79a8073
Add FR Europe localized timezone
valentinbonneaud Oct 25, 2021
97e52d0
Merge pull request #28 from ProtonMail/fix/exchange-tzid-local
liurxliu Oct 29, 2021
1b109b0
Fix timezones starting with slash
giuseppe-arcuti Nov 1, 2021
0750ed7
Fix EDT timezone
giuseppe-arcuti Nov 1, 2021
fe6cf8e
Use Manaus tz
valentinbonneaud Nov 4, 2021
3e3131c
Release of 4.6.1
valentinbonneaud Nov 4, 2021
ea0bcee
Add github actions
valentinbonneaud Nov 4, 2021
a1a3a76
Add coverage
valentinbonneaud Nov 4, 2021
c26e2d4
Fix tests badge
valentinbonneaud Nov 4, 2021
1424b38
Merge upstream commits (#34)
giuseppe-arcuti Dec 15, 2021
0251b1f
Upgrade action codecov
valentinbonneaud Dec 15, 2021
4d357a6
Add php8.0 in tests
valentinbonneaud Dec 15, 2021
814f4b8
Merge upstream commits (#36)
valentinbonneaud Dec 15, 2021
a5a5847
Prepare release 4.7.0 (#38)
valentinbonneaud Dec 15, 2021
7fdf3bb
Support lowercase timezones (#39)
giuseppe-arcuti Jan 10, 2022
8e3e2ad
Prepare release 4.7.1 (#40)
giuseppe-arcuti Jan 11, 2022
059aabc
Add missing microsoft timezones and test with confluence file (#41)
giuseppe-arcuti Jan 21, 2022
eaba674
Prepare release 4.7.2 (#43)
giuseppe-arcuti Jan 21, 2022
5479bba
[Calendar] Fix unfolding issue (#42)
liurxliu Feb 10, 2022
9ab83bb
4.8.0 release (#44)
valentinbonneaud Feb 10, 2022
2013799
Update readme to mention fork (#45)
valentinbonneaud Feb 10, 2022
9a298f9
[Calendar] Support UTC-05:00 timezone (#46)
liurxliu Feb 14, 2022
587dd4c
4.9.0 release
Feb 15, 2022
bf3b4c2
Merge pull request #47 from ProtonMail/feat/4.9.0
liurxliu Feb 15, 2022
786c731
Block invalid combinations of FREQ with BY rules (#48)
giuseppe-arcuti Mar 8, 2022
13cbb28
4.10.0 release (#49)
giuseppe-arcuti Mar 8, 2022
f2d3f95
Add LowercaseTimezoneIdentifier (#50)
liurxliu Apr 22, 2022
7d6cba6
4.11.0 release
Apr 22, 2022
5e4d88d
Merge pull request #51 from ProtonMail/release/4.11.0
liurxliu Apr 22, 2022
0ed2875
[Calendar] Add FindFromOutlookCities timezone finder (#52)
liurxliu May 4, 2022
fcf1ee2
4.12.0 release
May 5, 2022
c3ac3c8
Merge pull request #53 from ProtonMail/release/4.12.0
liurxliu May 5, 2022
623bd9a
[Calendar] Handle version timezone (#58)
liurxliu May 26, 2022
a165030
Feat/merge upstream 2022 05 (#56)
May 26, 2022
b1770c9
prepare release 4.13.0
May 27, 2022
16d4f04
Merge pull request #59 from ProtonMail/release/4.13.0
May 27, 2022
1f66ae1
[Calendar] Add FindFromOffsetName (#54)
liurxliu May 30, 2022
9f37c06
prepare release 4.14.0
May 31, 2022
344f7a9
Merge pull request #60 from ProtonMail/release/4.14.0
liurxliu May 31, 2022
ee3e095
[Calendar] Handle customized timezone (#57)
liurxliu Jun 22, 2022
c1783c0
release 4.15.0
Jun 23, 2022
7edff03
Merge pull request #62 from ProtonMail/release/4.15.0
liurxliu Jun 23, 2022
665b0ad
Fix customized timezone guesser (#63)
giuseppe-arcuti Jul 6, 2022
5cde481
release 4.16.0 (#64)
giuseppe-arcuti Jul 6, 2022
0b93c0b
[Calendar] Replace Godthab timezone (#65)
liurxliu Jul 28, 2022
0c4c6a9
release 4.17.0
Jul 29, 2022
f617dad
Merge pull request #66 from ProtonMail/release/4.17.0
liurxliu Jul 29, 2022
ec72aea
Add mapping for CDT timezone
Aug 30, 2022
f4a015f
prepare release 4.18.0
Sep 1, 2022
67a745b
Merge pull request #70 from ProtonMail/release/4.18.0
Sep 1, 2022
9aad44d
Deprecate Enderbury timezone (#72)
valentinbonneaud Dec 21, 2022
013a7db
Release 4.19.0 (#73)
giuseppe-arcuti Dec 21, 2022
8a6ec13
handle null tzid
Dec 23, 2022
8be46c0
Merge pull request #74 from ProtonMail/fix/calbe-2028
Dec 23, 2022
7359e88
Release 4.20.0
Dec 23, 2022
7ff09ae
Merge pull request #75 from ProtonMail/release/4.20.0
Dec 23, 2022
da41cb5
Add timezone mapping for PST
Dec 27, 2022
2a7d579
Merge pull request #76 from ProtonMail/feat/add-timezone-mapping-for-pst
Dec 28, 2022
6328936
Release 4.21.0
Dec 28, 2022
13cbb27
Merge pull request #77 from ProtonMail/release/4.21.0
Dec 28, 2022
c948d71
Add DeprecatedTimezoneIdentifier (#80)
valentinbonneaud Mar 1, 2023
8525bea
Release 4.22.0 (#81)
valentinbonneaud Mar 1, 2023
40bf3d9
Redirect Europe/Kyiv timezone
Mar 14, 2023
9b2bf1e
Merge pull request #82 from ProtonMail/feat/handle-migration-tz
liurxliu Apr 13, 2023
f894aab
Release 4.23.0
Apr 13, 2023
d7c313f
Merge pull request #84 from ProtonMail/release/4.23.0
liurxliu Apr 13, 2023
2371b9d
[Calendar][CALBE-2290][Feat] added whitelist for illegal values in pa…
May 5, 2023
aba1a70
Update tests/VObject/InvalidValueParamTest.php
Jun 16, 2023
b7195f2
Merge pull request #87 from ProtonMail/calbe2290
Jun 19, 2023
3a8c783
Release 4.24.0
Jun 19, 2023
4286aa1
Merge pull request #88 from ProtonMail/release/4.24.0
Jun 19, 2023
af9a85f
Move America/Yellowknife to deprecated (#89)
giuseppe-arcuti Jun 26, 2023
72c81a9
Release 4.25 (#90)
giuseppe-arcuti Jun 26, 2023
7391033
[INBE-269][Fix] drop malformed or illegal VALUE parameter
Nov 7, 2023
b3e2b2b
Merge pull request #92 from ProtonMail/fix/invalid-value-in-location-…
Nov 30, 2023
5ad0f8a
Release 4.26.0
Nov 30, 2023
8e9bf00
Merge pull request #93 from ProtonMail/release/4.26.0
Dec 1, 2023
0d82bc5
Add support for gulf standard time
Dec 18, 2023
136b453
Merge pull request #94 from ProtonMail/feat/add-support-for-gulf-stan…
Dec 18, 2023
cd8741f
Release 4.27.0
Dec 18, 2023
ea9b751
Merge pull request #95 from ProtonMail/release/4.27.0
Dec 18, 2023
56c6efd
use dubai instead of muscat
Dec 19, 2023
8e8b925
Merge pull request #96 from ProtonMail/feat/use-dubai-instead-of-muscat
Dec 19, 2023
883dff5
Release 4.28.0
Dec 19, 2023
c75d73d
Merge pull request #97 from ProtonMail/release/4.28.0
Dec 19, 2023
8639abe
Merge remote-tracking branch 'upstream/master' into chore/merge-upstr…
Dec 28, 2023
1a90852
make test pass from both sides
Dec 29, 2023
7f45c30
Merge pull request #98 from ProtonMail/chore/merge-upstream-master-20…
Dec 29, 2023
5c0f701
Release 4.29.0
Dec 29, 2023
a9edab8
Merge pull request #99 from ProtonMail/release/4.29.0
Dec 29, 2023
f5ef6df
Add dependancies audit
Apr 10, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@
/.gitattributes export-ignore
/.gitignore export-ignore
/.php_cs.dist export-ignore
/.travis.yml export-ignore
/CHANGELOG.md export-ignore
/phpstan.neon export-ignore
43 changes: 43 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,46 @@ jobs:
- name: Code Coverage
uses: codecov/codecov-action@v3
if: matrix.coverage != 'none'
dependencies-audit:
name: Dependencies audit (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: Composer audit
run: composer audit
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-fixer.cache
.php-cs-fixer.cache
156 changes: 156 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,162 @@
ChangeLog
=========

4.29.0 (2023-12-29)
-------------------
* #98 Chore/merge upstream master 20231228

4.28.0 (2023-12-19)
-------------------
* #96 use dubai instead of muscat

4.27.0 (2023-12-18)
-------------------
* #94 Add support for gulf standard time

4.26.0 (2023-11-30)
-------------------
* #92 Drop malformed or illegal VALUE parameter

4.25.0 (2023-06-26)
-------------------
* #89 Move America/Yellowknife to deprecated

4.24.0 (2023-06-19)
-------------------
* #87 Added whitelist for illegal values in parameter

4.23.0 (2023-04-13)
-------------------
* #82 Modify TZID value for migration timezones

4.22.0 (2023-03-01)
-------------------
* #80 Allow newly deprecated timezones

4.21.0 (2022-12-28)
-------------------
* #76 Add mapping for PST timezone

4.20.0 (2022-12-23)
-------------------
* #74 Handle null tzid

4.19.0 (2022-12-21)
-------------------
* #72 Deprecate Enderbury timezone

4.18.0 (2022-09-01)
-------------------
* #69 Add mapping for CDT timezone

4.17.0 (2022-07-29)
-------------------
* #65 [Calendar] Replace Godthab timezone

4.16.0 (2022-07-06)
-------------------
* #63 Fix customized timezone guesser

4.15.0 (2022-06-23)
-------------------
* #57 Handle customized timezone

4.14.0 (2022-05-31)
-------------------
* #54 Add FindFromOffsetName

4.13.0 (2022-05-27)
-------------------
* #56 Merge upstream changes from sabre-io/vobject@a595790 into protonlabs/vobject
* #58 Handle version timezone

4.12.0 (2022-05-05)
-------------------
* #52 Add FindFromOutlookCities timezone finder

4.11.0 (2022-04-22)
-------------------
* #50 Add lowercase timezone finder

4.10.0 (2022-03-08)
-------------------
* #48 Block invalid combinations of FREQ with BY rules

4.9.0 (2022-02-15)
------------------
* #46 Add support UTC-05:00 timezone

4.8.0 (2022-02-10)
------------------
* #42 Add option to fix unfolding issues in ICS

4.7.2 (2022-01-21)
------------------
* #41 Add missing microsoft timezones and test with confluence file

4.7.1 (2022-01-10)
------------------
* #39 Add support for lowercase timezones

4.7.0 (2021-12-15)
------------------
* #34 Merge upstream changes from sabre-io/vobject:4.4.0 into protonlabs/vobject
* #36 Merge upstream changes from sabre-io/vobject:4.4.1 into protonlabs/vobject

4.6.1 (2021-11-04)
------------------
* #29 Fix timezone name prefixed with /
* #30 Missing EDT TZID conversion

4.5.1 (2021-10-11)
------------------
* #25 Fix duplicate value
* #26 Add php unsupport timezone

4.4.2 (2021-07-15)
------------------
* #23 Add microsoft timezone map

4.4.1 (2021-01-18)
------------------
* #19 Validate count and until property

4.4.0 (2020-11-23)
------------------

* #18 Merge upstream changes from sabre-io/vobject:4.3.3 into protonlabs/vobject
* #17 Throw exception when getting invalid timezone

4.3.4 (2020-07-27)
------------------

* #16 Merge upstream changes from sabre-io/vobject:4.3.1 into protonlabs/vobject

4.3.3 (2020-07-22)
------------------

* #15 Expose RRULE properties

4.3.2 (2020-05-20)
------------------

* #14 Add timezones data mapping.

4.3.1 (2020-01-27)
------------------

* #6 Add FastForward Before
* #7 Add FastForward to end
* #11 FREQ is mandatory in the RRule
* #12 Validate BYMONTHDAY

4.2.1 (2019-09-10)
------------------

* #2 Fix bug in by year day
* #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)
------------------

Expand Down
25 changes: 7 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
sabre/vobject
protonlabs/vobject
=============
![Build Status](https://github.com/ProtonMail/vobject/actions/workflows/actions.yml/badge.svg)
[![codecov](https://codecov.io/gh/ProtonMail/vobject/branch/master/graph/badge.svg?token=ARcwkxCKZn)](https://codecov.io/gh/ProtonMail/vobject)

Forked from [sabre/vobject](https://github.com/sabre-io/vobject).

The VObject library allows you to easily parse and manipulate [iCalendar](https://tools.ietf.org/html/rfc5545)
and [vCard](https://tools.ietf.org/html/rfc6350) objects using PHP.
Expand All @@ -12,12 +16,12 @@ Installation

Make sure you have [Composer][1] installed, and then run:

composer require sabre/vobject "^4.0"
composer require protonlabs/vobject "^4.0"

This package requires PHP 5.5. If you need the PHP 5.3/5.4 version of this package instead, use:


composer require sabre/vobject "^3.4"
composer require protonlabs/vobject "^3.4"


Usage
Expand All @@ -27,21 +31,6 @@ Usage
* [Working with iCalendar](http://sabre.io/vobject/icalendar/)



Build status
------------

| branch | status |
| ------ | ------ |
| master | [![Build Status](https://travis-ci.org/sabre-io/vobject.svg?branch=master)](https://travis-ci.org/sabre-io/vobject) |
| 3.5 | [![Build Status](https://travis-ci.org/sabre-io/vobject.svg?branch=3.5)](https://travis-ci.org/sabre-io/vobject) |
| 3.4 | [![Build Status](https://travis-ci.org/sabre-io/vobject.svg?branch=3.4)](https://travis-ci.org/sabre-io/vobject) |
| 3.1 | [![Build Status](https://travis-ci.org/sabre-io/vobject.svg?branch=3.1)](https://travis-ci.org/sabre-io/vobject) |
| 2.1 | [![Build Status](https://travis-ci.org/sabre-io/vobject.svg?branch=2.1)](https://travis-ci.org/sabre-io/vobject) |
| 2.0 | [![Build Status](https://travis-ci.org/sabre-io/vobject.svg?branch=2.0)](https://travis-ci.org/sabre-io/vobject) |



Support
-------

Expand Down
19 changes: 19 additions & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
comment:
layout: "reach, diff, flags, files"
behavior: default
require_changes: false

coverage:
range: "70..100"
round: down
precision: 2
status:
project:
default:
# basic
target: 95%
threshold: 0%
# advanced settings
if_ci_failed: error
informational: false
only_pulls: false
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "sabre/vobject",
"name": "protonlabs/vobject",
"description" : "The VObject library for PHP allows you to easily parse and manipulate iCalendar and vCard objects",
"keywords" : [
"iCalendar",
Expand Down
2 changes: 1 addition & 1 deletion lib/Component.php
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ protected function getDefaults(): array
*
* $event = $calendar->VEVENT;
*
* @return Property|Component
* @return Property|Component|null
*/
public function __get(string $name): ?Node
{
Expand Down
9 changes: 6 additions & 3 deletions lib/Document.php
Original file line number Diff line number Diff line change
Expand Up @@ -191,9 +191,12 @@ public function createProperty(string $name, $value = null, array $parameters =
if (is_null($class)) {
// If a VALUE parameter is supplied, we should use that.
if (isset($parameters['VALUE'])) {
$class = $this->getClassNameForPropertyValue($parameters['VALUE']);
if (is_null($class)) {
throw new InvalidDataException('Unsupported VALUE parameter for '.$name.' property. You supplied "'.$parameters['VALUE'].'"');
if (is_string($parameters['VALUE'])) {
$class = $this->getClassNameForPropertyValue($parameters['VALUE']);
}
if (is_null($class)) { // VALUE is malformed or illegal, drop it
unset($parameters['VALUE']);
$class = $this->getClassNameForPropertyName($name);
}
} else {
$class = $this->getClassNameForPropertyName($name);
Expand Down
1 change: 1 addition & 0 deletions lib/Parameter.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ class Parameter extends Node
*/
public function __construct(Document $root, ?string $name, $value = null)
{
$this->name = is_null($name) ? '' : strtoupper($name);
$this->root = $root;
if (is_null($name)) {
$this->noName = true;
Expand Down
22 changes: 20 additions & 2 deletions lib/Parser/MimeDir.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
use Sabre\VObject\Node;
use Sabre\VObject\ParseException;
use Sabre\VObject\Property;
use Sabre\VObject\Reader;

/**
* MimeDir parser.
Expand Down Expand Up @@ -206,15 +207,32 @@ protected function parseLine(string $line)
}
$component = $this->root->createComponent(\substr($line, 6), [], false);

$prevNode = null;
while (true) {
// Reading until we hit END:
$line = $this->readLine();
if ('END:' === strtoupper(\substr($line, 0, 4))) {
break;
}
$result = $this->parseLine($line);
try {
$result = $this->parseLine($line);
} catch (\Exception $e) {
if (isset($prevNode)
&& $e instanceof ParseException && str_contains($e->getMessage(), 'Invalid Mimedir file. Line starting at')
&& ($this->options & Reader::OPTION_FIX_UNFOLDING)
) {
// Fix unfolding
$component->remove($prevNode);
$value = $prevNode->getValue().' '.$line.PHP_EOL;
$prevNode->offsetSet('VALUE', $value);
$prevNode->setValue($value);
$component->add($prevNode);
continue;
}
throw $e;
}
if ($result) {
$component->add($result);
$prevNode = $component->add($result);
}
}

Expand Down
Loading
Loading