Skip to content

Merge upstream sabre-io/vobject 5.0.0 - #118

Merged
willaix merged 34 commits into
masterfrom
merge-upstream-5.0.0
Sep 30, 2026
Merged

willaix merged 34 commits into
masterfrom
merge-upstream-5.0.0

Conversation

@willaix

@willaix willaix commented Sep 30, 2026

Copy link
Copy Markdown

What

Syncs our fork with upstream sabre-io/vobject 5.0.0 (2026-07-07). This is a breaking release:

  • PHP 8.2+ is required (PHP 7.4, 8.0 and 8.1 are dropped)
  • Parameter and return types are declared across the codebase, so callers must pass the correct types
  • The test toolchain moves to PHPUnit 11, PHPStan strict rules and Rector

Our previous sync (#116) linked our history to upstream's, so git only had to compare changes since 4.6.0. The merge had 5 conflicts.

Commits

  1. a6e164cf Merge upstream 5.0.0. Conflict resolution only:
    • RRuleIterator: keeps our yearlySkipUpperLimit constructor parameter, the fast-forward helpers and the [day, hour, minute, second] occurrences, on top of upstream's promoted $startDate, strict comparisons and
      $selectedOccurrence. The occurrence comparison moves into isOccurrenceAfter().
    • RRuleIteratorTest: keeps our version where it conflicted (see follow-ups).
    • TimeZoneUtilTest: keeps our tests and the Europe/Kyiv filter, in upstream's PHPUnit 11 form.
    • Version.php stays at 4.35.0. The bump comes in the release PR.
  2. 32c942b3, 3473176c are cherry-picks of upstream chore: apply rector IfToNullCoalescingAssignRector rule sabre-io/vobject#787, made after 5.0.0. Upstream 5.0.0 fails the current Rector check, and chore: apply rector IfToNullCoalescingAssignRector rule sabre-io/vobject#787 is upstream's fix for it.
  3. 3b084ae5 Adapt Proton code to 5.x tooling. No behaviour change intended:
    • Tests: static data providers, DataProvider attributes, self::assert*
    • RRuleIterator: readonly promoted $yearlySkipUpperLimit, match for the frequency coefficient, integer tuple comparison when sorting occurrences, and ruleValuesOrCurrent() instead of short ternaries
    • GuessFromCustomizedTimeZone: explicit checks on getTransitions(), which returns array|false

To see exactly how each conflict was resolved:

  git show --remerge-diff a6e164cf

Testing

Run locally on PHP 8.4, the same checks as CI:

  • vendor/bin/phpunit --configuration tests/phpunit.xml: 3282 tests pass, 1 skipped
  • composer phpstan: no errors
  • vendor/bin/rector process --dry-run: no changes
  • php-cs-fixer: no changes

PHPUnit reports 56 deprecations (metadata in doc comments). 53 of them are in upstream's own tests at 5.0.0, which upstream has since fixed (sabre-io#788). They only become errors with PHPUnit 12.

Follow-ups (not in this PR)

  • Summer-time handling for monthly/yearly recurrences. Upstream's monthly and yearly DST-transition tests fail against our iterator. It sets the time from the occurrence directly, which skips upstream's summer-time fix. This has
    been the case since 4.31 and this PR doesn't change it. It will get its own PR, together with bringing back upstream's DST tests adapted to our parse() test helper.
  • Upstream master after 5.0.0: a CI action bump, failOnDeprecation, and a PHP 8.5 deprecation fix in VCard. These come with the next sync.

Merging and release

  • ⚠️ Merge with "Create a merge commit". Do not squash, so upstream's history stays part of ours.
  • A follow-up PR release/5.0.0 will bump the version and add a changelog entry calling out the breaking changes.
  • Consumers: projects using this package must run PHP 8.2+ before moving to ^5.0. Until then they stay on ^4.35.

phil-davis and others added 30 commits June 11, 2026 14:19
And adjust the related unit test testConvertDefaultFormats so that
it handles the PHP warning that is emitted by fopen.

The Cli code catches InvalidDataException and exits with status 2,
which is what was always expected by the unit test code. So this
should preserve the real behavior.

The test changes are necessary because PHPunit11 now exposes the
PHP warning coming from fopen. So we catch and expect that in an
error handler in the test.
Modifiers at the end of a regex should not have whitespace before them.
Change "# xi" to just "#xi".

Date format "t" returns a string that is the numbers of days in the month.
Explicitly cast it to int when using it in a calculation.

These were two minor things pointed out by my editor.
Existing tests will cover the changes here. There is no actual
bug being fixed.
Bumps [actions/cache](https://github.com/actions/cache) from 5.0.5 to 6.1.0.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](actions/cache@27d5ce7...55cc834)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-version: 6.1.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [actions/checkout](https://github.com/actions/checkout) from 6.0.3 to 7.0.0.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](actions/checkout@df4cb1c...9c091bb)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: 7.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Bumps [shivammathur/setup-php](https://github.com/shivammathur/setup-php) from 2.37.1 to 2.37.2.
- [Release notes](https://github.com/shivammathur/setup-php/releases)
- [Commits](shivammathur/setup-php@7c071df...f3e473d)

---
updated-dependencies:
- dependency-name: shivammathur/setup-php
  dependency-version: 2.37.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
…ns/actions/cache-6.1.0

chore(deps): bump actions/cache from 5.0.5 to 6.1.0
…ns/actions/checkout-7.0.0

chore(deps): bump actions/checkout from 6.0.3 to 7.0.0
…ns/shivammathur/setup-php-2.37.2

chore(deps): bump shivammathur/setup-php from 2.37.1 to 2.37.2
When serializing PERIOD values to JSON (for jCal format), preserve the 'Z'
timezone indicator for UTC datetimes. This ensures FREEBUSY periods maintain
explicit UTC designation, avoiding timezone ambiguity.

Without this change:
  FREEBUSY:20120226T230000Z/20120226T230000Z
  => serializes to: ["2012-02-26T23:00:00", "2012-02-26T23:00:00"]

With this change:
  FREEBUSY:20120226T230000Z/20120226T230000Z
  => serializes to: ["2012-02-26T23:00:00Z", "2012-02-26T23:00:00Z"]

This behavior is consistent with RFC 5545 which requires UTC times to be
designated with the 'Z' suffix.

Related: sabre-io#411
feat: preserve UTC 'Z' indicator in Period JSON serialization
William Gotti and others added 4 commits September 30, 2026 15:22
Upstream 5.0.0 requires PHP 8.2, declares parameter and return types
across the codebase and moves the test suite to PHPUnit 11.

Conflict resolution:
- RRuleIterator: keeps our yearlySkipUpperLimit constructor parameter,
  fast-forward helpers and [day, hour, minute, second] occurrences, on
  top of upstream's promoted $startDate, strict comparisons and
  $selectedOccurrence. The occurrence comparison moves into
  isOccurrenceAfter() so each branch sets $selectedOccurrence once.
- RRuleIteratorTest: keeps our version of the conflicting sections.
  Upstream's DST transition tests stay out, as before: they call parse()
  with upstream's signature, and the monthly/yearly ones fail on our
  iterator (follow-up).
- TimeZoneUtilTest: keeps our tests and the Europe/Kyiv filter, with
  upstream's DataProvider attribute and arrow functions.
- Version stays 4.35.0; the bump is left to the release PR.
…om rector

Signed-off-by: Phillip Davis <phil@jankaritech.com>
(cherry picked from commit 4a3e8c9)
And require ar least rector 2.6

Signed-off-by: Phillip Davis <phil@jankaritech.com>
(cherry picked from commit cd2fa3b)
Brings the fork-specific code in line with the upstream 5.0.0 toolchain
(PHPUnit 11, PHPStan strict rules, Rector, php-cs-fixer):
- tests: static data providers, DataProvider attributes and
  self::assert* calls
- RRuleIterator: promoted readonly $yearlySkipUpperLimit, match for the
  frequency coefficient, integer tuple comparison when sorting
  occurrences, and ruleValuesOrCurrent() instead of short ternaries
- GuessFromCustomizedTimeZone: explicit checks on getTransitions(),
  which returns array|false

No behaviour change intended; the full test suite passes.
@willaix
willaix merged commit 7edcf3a into master Sep 30, 2026
4 checks passed
@willaix willaix mentioned this pull request Sep 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants