Requirements
Ziggy 2.x requires:- Laravel 9 or higher
- PHP 8.1 or higher
Breaking Changes
Namespace Change
Note: The Composer package name (tightenco/ziggy) has not changed.
Before:
JavaScript Module Changes
Before:Vue and React Import Changes
Before:Build Changes
Ziggy 2.x provides the following builds:- Default build:
./dist/index.js- Supports all modern browsers (default when importing fromziggy-jsorvendor/tightenco/ziggy) - Legacy ES Module:
./dist/index.esm.js- Uses fewer new language features for broader compatibility - UMD build:
./dist/route.umd.js- For internal use in Ziggy’s@routesBlade directive
Method Removal
Before:PHP Internal Changes
Overriding this method is no longer supported. If you were extending this class and overridingmakeDirectory, you’ll need to find an alternative approach.
Migration Steps
Update Composer dependencies
Update your
composer.json to ensure you’re running Laravel 9+ and PHP 8.1+:Update PHP namespace imports
Replace all instances of
Tightenco\Ziggy with Tighten\Ziggy in your PHP files.Test your application
Thoroughly test all routes and navigation in your application to ensure everything works correctly.
Summary of Changes
Complete list of breaking changes
Complete list of breaking changes
- PHP namespace:
Tightenco\Ziggy→Tighten\Ziggy(Composer package name unchanged) - JavaScript exports: Default export removed, use named exports only
- Import paths: Vue/React imports moved from subpaths to root module
- Build formats: Only ES Module builds included (no CommonJS)
- Method removal:
check()method removed (usehas()instead) - Internal methods:
makeDirectorymethod ofCommandRouteGeneratoris now private - Requirements: Laravel 9+ and PHP 8.1+ required
Getting Help
If you encounter issues during the upgrade process:- Review the GitHub releases for detailed changelogs
- Check existing issues or open a new one
- Consult the Ziggy documentation for updated usage examples