This document contains notable breaking changes and the steps required to successfully upgrade your application from 2.x to 3.0.
The @turnstileScripts directive has been removed from the package and replaced with a Blade component instead.
- @turnstileScripts
+ <x-turnstile.scripts />This syntax is now inline with the Turnstile component itself and improves the consistency of the package.
The turnstile stringified validation rule provided this package has now been removed in favor of the Turnstile rule object.
use RyanChandler\LaravelCloudflareTurnstile\Rules\Turnstile;
$request->validate([
'cf-turnstile-response' => [
'required',
- 'turnstile',
+ new Turnstile,
]
]);The Rule::turnstile() macro provided this package has now been removed in favor of the Turnstile rule object.
use RyanChandler\LaravelCloudflareTurnstile\Rules\Turnstile;
$request->validate([
'cf-turnstile-response' => [
'required',
- Rule::turnstile(),
+ new Turnstile,
]
]);TurnstileClient has been renamed to just Client.
- use RyanChandler\LaravelCloudflareTurnstile\TurnstileClient;
+ use RyanChandler\LaravelCloudflareTurnstile\Client;The Client was previously registered as a singleton, but to ensure compatibility with Octane and other single-boot lifecycles, the Client is now a scoped singleton.
This shouldn't have a huge impact on userland code, but if you're interacting with this manually there could be breaking changes in behaviour.
Be sure to thoroughly test your application code to find breaking changes.