Skip to content

Bump realrashid/sweet-alert from 7.3.2 to 8.0.0 - #109

Open
dependabot[bot] wants to merge 1 commit into
developmentfrom
dependabot/composer/development/realrashid/sweet-alert-8.0.0
Open

dependabot[bot] wants to merge 1 commit into
developmentfrom
dependabot/composer/development/realrashid/sweet-alert-8.0.0

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Oct 18, 2026

Copy link
Copy Markdown
Contributor

Bumps realrashid/sweet-alert from 7.3.2 to 8.0.0.

Release notes

Sourced from realrashid/sweet-alert's releases.

v8.0.0 — a complete rewrite

Version 8 rebuilds the package around a fluent, Laravel-native builder. The v7 API was one 700-line Toaster class; v8 is three purpose-built builders, five composable concerns, three enums, and a test suite that covers behaviour rather than the shape of the code.

Your existing code keeps working. alert()->success(), toast() and confirmDelete() display immediately the way they always did. A survey of five real applications using this package found Alert::success() in 52 files and none of the changed signatures anywhere.

Highlights

  • AlertBuilder, ToastBuilder and InputBuilder, each with its own defaults
  • Full SweetAlert2 coverage — deny buttons, progress steps, every input type, pre-confirm and pre-deny routes, per-alert themes, animations
  • PHP 8.3 enums (AlertType, InputType, Position) with IDE completion
  • when()/unless() and macro() on every builder
  • @sweetAlert Blade directive, replacing @include('sweetalert::alert')
  • Livewire v4 trait and Inertia middleware
  • Laravel Boost guideline and skill, so AI assistants write v8 rather than v7
  • VitePress documentation, Pest suite with architecture tests, Pint, PHPStan level 5

Guarded actions

A dialog that can only ask a question is half a feature. v8 acts on the answer with no JavaScript on your side:

<a href="{{ route('posts.destroy', $post) }}" data-confirm-delete>Delete</a>
<a href="{{ route('posts.publish', $post) }}" data-confirm data-confirm-method="PUT">Publish</a>
<form method="POST" action="{{ route('orders.refund', $order) }}" data-confirm>
@​csrf
<button type="submit">Refund</button>
</form>

Override the copy per element with data-confirm-title, -text, -icon, -button and -cancel. On confirm the package builds a form with the CSRF token and the right method and submits it.

data-confirm-delete worked this way before, but only on the request where confirmDelete() had been flashed — on any other render the link was an ordinary link and the browser opened the destroy URL with a GET. The listener is always present now. Closes #174 and #183.

SweetAlert2 is fetched on the first click, so a page carrying only a guarded link ships no JavaScript until someone uses it. If it cannot be fetched, the browser's own confirm() is used — a guarded delete never goes through unasked because a CDN was down.

submitTo()

The answer reaches your server instead of vanishing when the dialog closes:

Alert::input('What should we call you?')
    ->submitTo(route('profile.name'), 'POST', 'name')
    ->flash();

Closes #147.

topLayer()

... (truncated)

Changelog

Sourced from realrashid/sweet-alert's changelog.

v8.0.0 — a complete rewrite - 2026-09-07

Version 8 rebuilds the package around a fluent, Laravel-native builder. The v7 API was one 700-line Toaster class; v8 is three purpose-built builders, five composable concerns, three enums, and a test suite that covers behaviour rather than the shape of the code.

Your existing code keeps working. alert()->success(), toast() and confirmDelete() display immediately the way they always did. A survey of five real applications using this package found Alert::success() in 52 files and none of the changed signatures anywhere.

Highlights

  • AlertBuilder, ToastBuilder and InputBuilder, each with its own defaults
  • Full SweetAlert2 coverage — deny buttons, progress steps, every input type, pre-confirm and pre-deny routes, per-alert themes, animations
  • PHP 8.3 enums (AlertType, InputType, Position) with IDE completion
  • when()/unless() and macro() on every builder
  • @sweetAlert Blade directive, replacing @include('sweetalert::alert')
  • Livewire v4 trait and Inertia middleware
  • Laravel Boost guideline and skill, so AI assistants write v8 rather than v7
  • VitePress documentation, Pest suite with architecture tests, Pint, PHPStan level 5

Guarded actions

A dialog that can only ask a question is half a feature. v8 acts on the answer with no JavaScript on your side:

<a href="{{ route('posts.destroy', $post) }}" data-confirm-delete>Delete</a>
<a href="{{ route('posts.publish', $post) }}" data-confirm data-confirm-method="PUT">Publish</a>
<form method="POST" action="{{ route('orders.refund', $order) }}" data-confirm>
@​csrf
<button type="submit">Refund</button>
</form>

Override the copy per element with data-confirm-title, -text, -icon, -button and -cancel. On confirm the package builds a form with the CSRF token and the right method and submits it.

data-confirm-delete worked this way before, but only on the request where confirmDelete() had been flashed — on any other render the link was an ordinary link and the browser opened the destroy URL with a GET. The listener is always present now. Closes #174 and #183.

SweetAlert2 is fetched on the first click, so a page carrying only a guarded link ships no JavaScript until someone uses it. If it cannot be fetched, the browser's own confirm() is used — a guarded delete never goes through unasked because a CDN was down.

submitTo()

The answer reaches your server instead of vanishing when the dialog closes:

Alert::input('What should we call you?')
    ->submitTo(route('profile.name'), 'POST', 'name')
    ->flash();

Closes #147.

... (truncated)

Commits
  • c89e518 Move code style and static analysis into their own CI job
  • 4aba29a Merge pull request #198 from realrashid/dependabot/npm_and_yarn/docs/nanoid-3...
  • b207d42 Bump nanoid from 3.3.11 to 3.3.18 in /docs
  • 54210f6 Release v8.0.0 — complete rewrite with a fluent builder API
  • See full diff in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [realrashid/sweet-alert](https://github.com/realrashid/sweet-alert) from 7.3.2 to 8.0.0.
- [Release notes](https://github.com/realrashid/sweet-alert/releases)
- [Changelog](https://github.com/realrashid/sweet-alert/blob/main/CHANGELOG.md)
- [Commits](realrashid/sweet-alert@v7.3.2...v8.0.0)

---
updated-dependencies:
- dependency-name: realrashid/sweet-alert
  dependency-version: 8.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot Bot added dependencies Pull requests that update a dependency file php Pull requests that update php code labels Oct 18, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file php Pull requests that update php code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants