{"id":29012529,"url":"https://github.com/pentiminax/ux-sweet-alert","last_synced_at":"2026-02-18T18:04:39.518Z","repository":{"id":300634800,"uuid":"973150935","full_name":"pentiminax/ux-sweet-alert","owner":"pentiminax","description":"SweetAlert2 integration for Symfony","archived":false,"fork":false,"pushed_at":"2026-02-11T15:06:25.000Z","size":250,"stargazers_count":24,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-02-11T23:16:02.165Z","etag":null,"topics":["javascript","sweetalert2","symfony-bundle","symfony-ux","ux"],"latest_commit_sha":null,"homepage":"https://pentiminax.github.io/ux-sweet-alert/","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pentiminax.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2025-04-26T11:22:00.000Z","updated_at":"2026-02-11T15:05:39.000Z","dependencies_parsed_at":"2026-02-11T17:06:19.036Z","dependency_job_id":null,"html_url":"https://github.com/pentiminax/ux-sweet-alert","commit_stats":null,"previous_names":["pentiminax/ux-sweet-alert"],"tags_count":36,"template":false,"template_full_name":null,"purl":"pkg:github/pentiminax/ux-sweet-alert","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pentiminax%2Fux-sweet-alert","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pentiminax%2Fux-sweet-alert/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pentiminax%2Fux-sweet-alert/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pentiminax%2Fux-sweet-alert/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pentiminax","download_url":"https://codeload.github.com/pentiminax/ux-sweet-alert/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pentiminax%2Fux-sweet-alert/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29588778,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-18T16:55:40.614Z","status":"ssl_error","status_checked_at":"2026-02-18T16:55:37.558Z","response_time":162,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["javascript","sweetalert2","symfony-bundle","symfony-ux","ux"],"created_at":"2025-06-25T19:00:59.139Z","updated_at":"2026-02-18T18:04:39.502Z","avatar_url":"https://github.com/pentiminax.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# UX SweetAlert\n\nUX SweetAlert is a Symfony bundle that integrates the SweetAlert2 library into your Symfony applications. It provides PHP helpers and a Stimulus controller to easily display alerts and toast notifications.\n\n## Requirements\n\n- PHP 8.2 or higher\n- Symfony StimulusBundle\n- Composer\n\n## Installation\n\nInstall the library via Composer:\n\n```bash\ncomposer require pentiminax/ux-sweet-alert\n```\n\n## Basic usage\n\nTo automatically display toasts and alerts in your templates, add the following Twig function in your base.html.twig (or the layout file):\n\n```twig\n{{ ux_sweet_alert_scripts() }}\n```\n\n## Alerts\n\nInject the AlertManagerInterface and use the helper methods to create alerts:\n\n```php\nuse Pentiminax\\UX\\SweetAlert\\AlertManagerInterface;\n\n#[Route('/', name: 'app_homepage')]\npublic function index(AlertManagerInterface $alertManager): Response\n{\n    $alertManager-\u003esuccess(\n        title: 'Update Successful',\n        text: 'Your settings have been saved.'\n    );\n\n    return $this-\u003eredirectToRoute('dashboard');\n}\n```\n\n## Toasts\n\nUse the `AlertManagerInterface` service with the `toast()` method to create toast notifications:\n\n```php\nuse Pentiminax\\UX\\SweetAlert\\AlertManagerInterface;\nuse Pentiminax\\UX\\SweetAlert\\Enum\\Position;\n\nclass HomeController extends AbstractController\n{\n    #[Route('/', name: 'app_homepage')]\n    public function index(AlertManagerInterface $alertManager): Response\n    {\n       $alertManager-\u003etoast(\n            title: 'title',\n            text: 'text',\n            position: Position::TOP_END,\n            timer: 3000,\n            timerProgressBar: true\n        );\n\n        return $this-\u003erender('home/index.html.twig');\n    }\n}\n```\n\n## Documentation\n\n- [Online documentation](https://pentiminax.github.io/ux-sweet-alert/)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpentiminax%2Fux-sweet-alert","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpentiminax%2Fux-sweet-alert","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpentiminax%2Fux-sweet-alert/lists"}