Skip to content
LaravelBlog

spatie/laravel-google-calendar: Laravel 13 support and a refreshed, PHP 8.5-ready test matrix

spatie/laravel-google-calendar now supports Laravel 13, with the CI matrix refreshed to PHP 8.2–8.5 and Laravel 10–13. The changes are additive, so upgrading from 3.8.4 requires no code or config changes.

LaravelBlogBot
LaravelBlogBot , 4 mins read

Contributed by freekmurze

This release prepares spatie/laravel-google-calendar for the next Laravel version. The runtime constraint on illuminate/support gains ^13.0, the development toolchain is refreshed (Testbench 11, PHPUnit 12, Pest 4), and the continuous integration matrix now verifies the package against PHP 8.2 through 8.5 paired with Laravel 10 through 13. Notably, there are no changes to the package's source code: the public API, the config file, and the service provider are all untouched. If you are upgrading from 3.8.4 on Laravel 10, 11, or 12, this is a drop-in update.

What changed in the dependency constraints

The composer.json changes are purely additive:

  • illuminate/support now allows ^13.0 alongside all previous ranges.
  • orchestra/testbench gains ^11.0 in the dev requirements, matching Laravel 13.
  • phpunit/phpunit gains ^12.0 in the dev requirements.

The PHP constraint (^7.2|^8.0), the google/apiclient requirement, and the Carbon constraint are unchanged. Because only new upper bounds were added, Composer resolution for an existing Laravel 10, 11, or 12 application produces exactly the same result as before. Nothing was removed or tightened.

One nuance worth knowing: the Composer constraints still technically permit very old combinations, but the CI matrix only exercises modern ones now. Older PHP and Laravel versions dropped out of the test workflow, so while they may still install, they are no longer actively verified by the package's test suite.

What the new test matrix verifies

The GitHub Actions workflow was rebuilt around four PHP versions (8.2, 8.3, 8.4, and 8.5) and four Laravel branches (10, 11, 12, and 13), with explicit Testbench mappings for each Laravel version. Two combinations are excluded: Laravel 13 on PHP 8.2, and Laravel 10 on PHP 8.5. In practice this tells you that Laravel 13 targets PHP 8.3 and newer, and that Laravel 10 predates PHP 8.5 support.

Adding Laravel 13 to the matrix before the framework's release matters because the calendar package depends on framework internals (illuminate/support) and Carbon. Validating every supported combination in CI means that by the time you upgrade your application to Laravel 13, the package has already been proven to work there — including PHP 8.5, which the matrix now covers for the first time.

Upgrading from 3.8.4

For application developers, the upgrade is a routine Composer update:

composer update spatie/laravel-google-calendar

No configuration or code changes are required. Everything you already use — the Event model, the GoogleCalendar facade, quick-create helpers, and the google-calendar.php config file — behaves exactly as in 3.8.4. For example, this code is unaffected by the release:

use Spatie\GoogleCalendar\Event;
use Carbon\Carbon;

$event = new Event;
$event->name = 'Quarterly review';
$event->startDateTime = Carbon::parse('2026-03-15 09:00');
$event->endDateTime = Carbon::parse('2026-03-15 10:30');
$event->save();

If you plan to move your application to Laravel 13 when it ships, make sure your PHP version is 8.3 or newer, then update the package as part of the same composer update run. The broadened constraints mean the same package version covers you across the whole Laravel 10–13 range, so you will not need a package upgrade again when the framework bump happens.

Under the hood: test suite modernization

The remaining changes are contributor-facing but explain why the release is safe. PHPUnit 12 no longer discovers tests annotated with doc-comment metadata, so every test in the suite was converted from the old /** @test */ style to the PHP attribute equivalent:

// Before
/** @test */
public function it_can_set_a_start_date() { /* ... */ }

// After
use PHPUnit\Framework\Attributes\Test;

#[Test]
public function it_can_set_a_start_date() { /* ... */ }

This conversion, together with the Testbench 11 and PHPUnit 12 additions, is what lets the suite run green on Laravel 13 and PHP 8.5. Coverage warnings were also cleaned up as part of the tooling refresh.

Takeaways

  • Laravel 13 support was added by extending constraints; nothing existing was removed or broken.
  • Upgrading from 3.8.4 requires no code or config changes on Laravel 10–12.
  • The officially tested matrix is now PHP 8.2–8.5 × Laravel 10–13; Laravel 13 pairs with PHP 8.3+.
  • A single package version now spans the full supported Laravel range, so no further upgrade is needed when you adopt Laravel 13.
  • Contributors should note the test suite now uses PHPUnit 12 #[Test] attributes instead of docblock annotations.

Sources

Related Articles