monicahq/laravel-sabre
Laravel Sabre integrates the SabreDAV server with Laravel, making it easy to add WebDAV, CalDAV, and CardDAV endpoints using Laravel routing, authentication, and configuration.
MIGRATION.md before touching composer. Bump to ^2.0, then grep the codebase for the three removed symbols: LaravelSabre::getNodes(), LaravelSabre::getPlugins(), and LaravelSabre\Exception\InvalidStateException. Any test, debug command, or health check that introspected the node tree or plugin stack through the static getters will fatal — replace it with the patterns in the migration guide (typically asserting against a real DAV request instead of the internals).composer require monicahq/laravel-sabre, publish the config (config/laravelsabre.php) for the DAV path, storage location and default plugin list. Then register your node tree and authentication callback in a service provider — this is the whole integration surface for most apps.curl -X PROPFIND) at /dav and confirm a 207 Multi-Status. Getting a 401 first is normal and actually the fastest way to prove your auth callback is wired.LaravelSabre\Sabre\Server and LaravelSabre\Sabre\Sapi are now internal. If you injected, subclassed, or mocked them, that's unsupported in 2.x — build against the public facade/config and the HTTP contract instead.Auth::guard(...)->user(), returning the principal URI (e.g. principals/users/{id}). Remember DAV clients send HTTP Basic credentials on every request — they are not session-based, so guard/session middleware won't help you here.Sabre\DAV\Browser\Plugin) behind an environment check so you can explore the tree in a browser without shipping it.PROPFIND, REPORT, PUT) and a Basic auth header, and assert on status codes and XML bodies. This is the intended replacement for the deleted getNodes()/getPlugins() assertions.InvalidStateException is gone. Code that caught it to detect "server not configured yet" needs a different signal; treat misconfiguration as a boot-time failure rather than a runtime catch.web middleware group will silently break clients with 419s. Use a dedicated route group.path becomes the Sabre base URI; mismatches (trailing slash, generated absolute URLs behind a proxy) produce principals whose hrefs don't resolve, and clients fail in confusing ways. Set trusted proxies so hrefs are scheme/host-correct.PROPFIND/REPORT with a body but no application/xml content type often yields an empty multistatus rather than an error — a classic "it works in Cyberduck, not in my client" cause.storage/ isn't writable by the web user; also check that your .gitignore/deploy excludes the DAV data directory from asset syncs.curl -u user:pass -X PROPFIND -H 'Content-Type: application/xml' --data @body.xml will diagnose most issues faster than logs; enable Sabre's own debug output only in local environments since it echoes request bodies.Sabre\Server/Sapi did not survive — reimplement those hooks as middleware or plugins.How can I help you explore Laravel packages today?