Skip to content

Linagora waiting merges 4.5 - #4

Open
guimard wants to merge 297 commits into
masterfrom
linagora-waiting-merges-4.5
Open

Linagora waiting merges 4.5#4
guimard wants to merge 297 commits into
masterfrom
linagora-waiting-merges-4.5

Conversation

@guimard

@guimard guimard commented Oct 14, 2025

Copy link
Copy Markdown
Member

Backport of old patches into 4.5.7

JeroenVanOort and others added 30 commits January 31, 2020 22:36
These entries should be in the developer's global .gitignore
Replace assertRegExp with assertMatchesRegularExpression in unit test
…mezone

Remove US/Pacific-New obsolete timezone
phil-davis and others added 20 commits December 9, 2024 13:10
add phpdoc return types for arrayaccess methods (fixes sabre-io#563)
chore(deps): bump codecov/codecov-action from 4 to 5
'Amsterdam, Berlin, Bern, Rom, Stockholm, Wien' => 'Europe/Berlin',
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
Before this commit processMessageReply did not work for exceptions with
a reccurent id in an other timezone than the dtstart of the master event.
@chibenwa

Copy link
Copy Markdown
Member

The failures are trivial


1) Sabre\VObject\ITip\BrokerNewEventTest::testSimpleInviteWithAlarm
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
 DTEND:20140811T230000Z\r\n
 ORGANIZER;CN=Strunk:mailto:strunk@example.org\r\n
 ATTENDEE;CN=White;PARTSTAT=NEEDS-ACTION:mailto:white@example.org\r\n
+DTSTAMP:20251014T184327Z\r\n
 BEGIN:VALARM\r\n
 TRIGGER:-PT30M\r\n
 ACTION:EMAIL\r\n

/home/runner/work/sabre-vobject/sabre-vobject/lib/PHPUnitAssertions.php:69
/home/runner/work/sabre-vobject/sabre-vobject/tests/VObject/ITip/BrokerTester.php:31
/home/runner/work/sabre-vobject/sabre-vobject/tests/VObject/ITip/BrokerNewEventTest.php:633

2) Sabre\VObject\ITip\BrokerUpdateEventTest::testSimpleInviteWithAlarm
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
 DTEND:20140811T230000Z\r\n
 ORGANIZER;CN=Strunk:mailto:strunk@example.org\r\n
 ATTENDEE;CN=White;PARTSTAT=NEEDS-ACTION:mailto:white@example.org\r\n
+DTSTAMP:20251014T184327Z\r\n
 BEGIN:VALARM\r\n
 TRIGGER:-PT30M\r\n
 ACTION:EMAIL\r\n

/home/runner/work/sabre-vobject/sabre-vobject/lib/PHPUnitAssertions.php:69
/home/runner/work/sabre-vobject/sabre-vobject/tests/VObject/ITip/BrokerTester.php:31
/home/runner/work/sabre-vobject/sabre-vobject/tests/VObject/ITip/BrokerUpdateEventTest.php:952

3) Sabre\VObject\ITip\BrokerUpdateEventTest::testLocationChange
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
 ATTENDEE;CN=Two;PARTSTAT=NEEDS-ACTION:mailto:two@example.org\r\n
 DTSTART:20140716T120000Z\r\n
 DTEND:20140716T130000Z\r\n
+DTSTAMP:20251014T184327Z\r\n
 END:VEVENT\r\n
 END:VCALENDAR\r\n
 '

/home/runner/work/sabre-vobject/sabre-vobject/lib/PHPUnitAssertions.php:69
/home/runner/work/sabre-vobject/sabre-vobject/tests/VObject/ITip/BrokerTester.php:31
/home/runner/work/sabre-vobject/sabre-vobject/tests/VObject/ITip/BrokerUpdateEventTest.php:1026

FAILURES!
Tests: 1784, Assertions: 2852, Failures: 3.

We just need to adapt those 3 tests in order to ignore DTSPAMD

The three tests were failing because DTSTAMP is now generated in the iTip messages but wasn't expected in the test assertions. Added DTSTAMP:**ANY** to the expected outputs to match the actual behavior.

Fixed tests:
- BrokerNewEventTest::testSimpleInviteWithAlarm
- BrokerUpdateEventTest::testSimpleInviteWithAlarm
- BrokerUpdateEventTest::testLocationChange

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@guimard

guimard commented Oct 14, 2025

Copy link
Copy Markdown
Member Author

[...]
We just need to adapt those 3 tests in order to ignore DTSPAMD

Done

PHP 7.1 tests were failing due to PHP CS-Fixer compatibility issues. Since PHP 7.1 is EOL, removing it from the CI pipeline.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@chibenwa

Copy link
Copy Markdown
Member

\o/ !!!

Test case for linagora/esn-sabre#50

When DTSTART is in April but RRULE specifies BYMONTH=5 (May) and
BYMONTHDAY=15, the first occurrence should be May 15, not April 15.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@chibenwa

chibenwa commented Dec 4, 2025

Copy link
Copy Markdown
Member

@guimard ci failures here...

When a YEARLY recurrence rule specifies BYMONTH (and optionally
BYMONTHDAY/BYDAY), and the DTSTART is in a different month than
those specified in BYMONTH, the first occurrence should be the
first valid date according to the rule, not the DTSTART itself.

For example, with:
- DTSTART: April 11, 2030
- RRULE: FREQ=YEARLY;BYMONTH=5;BYMONTHDAY=15

The first occurrence should be May 15, 2030 (not April 11 or April 15).

This fix modifies rewind() to check if the DTSTART is a valid
occurrence according to BYMONTH rules, and if not, advances to
the first valid occurrence.

Fixes: linagora/esn-sabre#50

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@guimard
guimard force-pushed the linagora-waiting-merges-4.5 branch from 89dfaa5 to df65b24 Compare December 4, 2025 08:07
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.