diff --git a/.github/workflows/unit-tests.yaml b/.github/workflows/unit-tests.yaml
index d79c21792be..eb066f4a202 100644
--- a/.github/workflows/unit-tests.yaml
+++ b/.github/workflows/unit-tests.yaml
@@ -68,8 +68,8 @@ jobs:
echo PHPUNIT='vendor/bin/simple-phpunit' >> $GITHUB_ENV
[ 'lowest' = '${{ matrix.dependency-version }}' ] && export SYMFONY_DEPRECATIONS_HELPER=weak
- # Swup and Typed have no tests, Turbo has its own workflow file
- EXCLUDED_PACKAGES="Typed|Swup|Turbo"
+ # Typed has no tests, Turbo has its own workflow file
+ EXCLUDED_PACKAGES="Typed|Turbo"
# Exclude deprecated packages when testing against lowest dependencies
if [ "${{ matrix.dependency-version }}" = "lowest" ]; then
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 12a333d71d9..a88a4478daf 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -4,14 +4,6 @@ settings:
autoInstallPeers: true
excludeLinksFromLockfile: false
-overrides:
- '@swup/plugin>@swup/browserslist-config': link:node_modules/.ignored
- '@swup/plugin>@swup/prettier-config': link:node_modules/.ignored
- '@swup/plugin>microbundle': link:node_modules/.ignored
- '@swup/plugin>prettier': link:node_modules/.ignored
- '@swup/plugin>shelljs': link:node_modules/.ignored
- '@swup/plugin>shelljs-live': link:node_modules/.ignored
-
packageExtensionsChecksum: sha256-WAjVn6fGcTN4WZY3qf7RaCWK/tjZAB60w1JyC1Mc7SA=
importers:
@@ -523,51 +515,6 @@ importers:
specifier: ^3.2.4
version: 3.2.4(@types/node@22.16.5)(@vitest/browser@3.2.4)(jsdom@26.1.0)(lightningcss@1.30.1)(msw@2.10.4(@types/node@22.16.5)(typescript@5.8.3))(terser@5.43.1)
- src/Swup/assets:
- devDependencies:
- '@hotwired/stimulus':
- specifier: ^3.0.0
- version: 3.2.2
- '@swup/debug-plugin':
- specifier: ^3.0
- version: 3.0.0(swup@3.1.1)
- '@swup/fade-theme':
- specifier: ^1.0
- version: 1.0.5
- '@swup/forms-plugin':
- specifier: ^2.0
- version: 2.0.1(swup@3.1.1)
- '@swup/slide-theme':
- specifier: ^1.0
- version: 1.0.5
- '@testing-library/dom':
- specifier: ^10.4.0
- version: 10.4.0
- '@testing-library/jest-dom':
- specifier: ^6.6.3
- version: 6.6.3
- '@testing-library/user-event':
- specifier: ^14.6.1
- version: 14.6.1(@testing-library/dom@10.4.0)
- jsdom:
- specifier: ^26.1.0
- version: 26.1.0
- swup:
- specifier: ^3.0
- version: 3.1.1
- tslib:
- specifier: ^2.8.1
- version: 2.8.1
- tsx:
- specifier: ^4.20.3
- version: 4.20.3
- typescript:
- specifier: ^5.8.3
- version: 5.8.3
- vitest:
- specifier: ^3.2.4
- version: 3.2.4(@types/node@22.16.5)(@vitest/browser@3.2.4)(jsdom@26.1.0)(lightningcss@1.30.1)(msw@2.10.4(@types/node@22.16.5)(typescript@5.8.3))(terser@5.43.1)
-
src/TogglePassword/assets:
devDependencies:
'@hotwired/stimulus':
@@ -1458,29 +1405,6 @@ packages:
svelte: ^3.54.0 || ^4.0.0 || ^5.0.0-next.0
vite: ^4.0.0
- '@swup/debug-plugin@3.0.0':
- resolution: {integrity: sha512-DypHXHcDUgAT/44mVTtHJiUe7ZBwqp1PBj/WsIJdnoX7WGMGrgpwZVguJa4YiKgbux5grGSCSNDnPTx2/EL3Nw==}
- peerDependencies:
- swup: ^3.0.0
-
- '@swup/fade-theme@1.0.5':
- resolution: {integrity: sha512-9PwC7UmW0RZ5eda+JtWz0z0H3kWWW4Ir3fnEnQOLwdS5p+nrvrLGQM3WjUR/kFIuAsU6K40Ty99gtoW6spWYSA==}
-
- '@swup/forms-plugin@2.0.1':
- resolution: {integrity: sha512-gVpyFZfV5NVU7qWJmxbNVBVHC142hSt/sEMJrUwV84vBcw8vbiE4QVGt0IoOgBDxlWz5kwu7SSR1IOdQPn8zwQ==}
- peerDependencies:
- swup: ^3.0.0
-
- '@swup/plugin@2.0.3':
- resolution: {integrity: sha512-FvieiuqSRMw0uKdWnHJ/aI+vDB9Yg91GFr2XqRNAn0G4du5uGefr85i89AolhRVAGGqZa5U9gZSZ2yfhJ22l3Q==}
- hasBin: true
-
- '@swup/slide-theme@1.0.5':
- resolution: {integrity: sha512-0xxqtURSMDScjLMRdNjtxzo8NGCPcmp6VXrQcxIQzQDSAvwNnP8Zw871C+FSL1EMe8OhAzWAP3E3x9vzH+iLHg==}
-
- '@swup/theme@1.0.7':
- resolution: {integrity: sha512-OINEaf34fYs90l7/YUUKfOf+paY7/FDhOBLwYxrD0w1OjBiItZpw3N+ATA/QklJwmoUu3KkDFOaQG0zT4KxmmA==}
-
'@symfony/stimulus-bridge@4.0.1':
resolution: {integrity: sha512-+/kSQ4qFXMbZS+HjkhzOxwdN+60pMev7kzzDpQV/Tdm/iIWoxx5GDsVcdLaBb2783BVQHyrBP72JerF2SXTbTg==}
engines: {node: ^18.12.0 || ^20.0.0 || >=22.0}
@@ -1800,10 +1724,6 @@ packages:
resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==}
engines: {node: '>=10'}
- chalk@5.4.1:
- resolution: {integrity: sha512-zgVZuo2WcZgfUEmsn6eO3kINexW8RAE4maiQ8QNs8CtpPCSyMiYsULR3HQYkm3w8FIA3SberyMJMSldGsW+U3w==}
- engines: {node: ^12.17.0 || ^14.13 || >=16.0.0}
-
chart.js@4.5.0:
resolution: {integrity: sha512-aYeC/jDgSEx8SHWZvANYMioYMZ2KX02W6f6uVfyteuCGcadDLcYVHdfdygsTQkQ4TKn5lghoojAsPj5pu0SnvQ==}
engines: {pnpm: '>=8'}
@@ -1920,9 +1840,6 @@ packages:
resolution: {integrity: sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==}
engines: {node: '>=0.4.0'}
- delegate-it@6.2.1:
- resolution: {integrity: sha512-3/P/rwj+zal/99EEml7y1+bXjBY+Wok/WSg0EngWAtdvHK6iKTPbABQE84RyyRfR0Fmejs93BrkZQWlgyeWuFQ==}
-
dequal@2.0.3:
resolution: {integrity: sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==}
engines: {node: '>=6'}
@@ -2371,10 +2288,6 @@ packages:
resolution: {integrity: sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==}
engines: {node: '>=0.10.0'}
- opencollective-postinstall@2.0.3:
- resolution: {integrity: sha512-8AV/sCtuzUeTo8gQK5qDZzARrulB3egtLzFgteqB2tcT4Mw7B8Kt7JcDHmltjz6FOAHsvTevk70gZEbhM4ZS9Q==}
- hasBin: true
-
outvariant@1.4.3:
resolution: {integrity: sha512-+Sl2UErvtsoajRDKCE5/dBz4DIvHXQQnAxtQTF04OJxY0+DyZXSo5P5Bb7XYWOh81syohlYL24hbDwxedPUJCA==}
@@ -2576,6 +2489,7 @@ packages:
source-map@0.8.0-beta.0:
resolution: {integrity: sha512-2ymg6oRBpebeZi9UUNsgQ89bhx01TcTkmNTGnNO88imTmbSgy4nfujrgVEFKWpMTEGA11EDkTt7mqObTPdigIA==}
engines: {node: '>= 8'}
+ deprecated: The work that was done in this beta branch won't be included in future versions
stackback@0.0.2:
resolution: {integrity: sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==}
@@ -2632,9 +2546,6 @@ packages:
resolution: {integrity: sha512-eeEgGc2DtiUil5ANdtd8vPwt9AgaMdnuUFnPft9F5oMvU/FHu5IHFic+p1dR/UOB7XU2mX2yHW+NcTch4DCh5Q==}
engines: {node: '>=16'}
- swup@3.1.1:
- resolution: {integrity: sha512-fO8ID/SOYTCl5/Cm45rG3wFBFbrxnjeJ+S9q3eKJL1l3pjl6QUCZNqB4Tid4H0eQXlZv5dNDj4KD3AwWK5Il4w==}
-
symbol-tree@3.2.4:
resolution: {integrity: sha512-9QNk5KwDF+Bvz+PyObkmSYjI5ksVUYtjW7AU22r2NKcfLJcXp96hkDWU3+XndOsUb+AQ9QhfzfCT2O+CNWT5Tw==}
@@ -2746,9 +2657,6 @@ packages:
resolution: {integrity: sha512-TeTSQ6H5YHvpqVwBRcnLDCBnDOHWYu7IvGbHT6N8AOymcr9PJGjc1GTtiWZTYg0NCgYwvnYWEkVChQAr9bjfwA==}
engines: {node: '>=16'}
- typed-query-selector@2.12.0:
- resolution: {integrity: sha512-SbklCd1F0EiZOyPiW192rrHZzZ5sBijB6xM+cpmrwDqObvdtunOHHIk9fCGsoK5JVIYXoyEp4iEdE3upFH3PAg==}
-
typed.js@2.1.0:
resolution: {integrity: sha512-bDuXEf7YcaKN4g08NMTUM6G90XU25CK3bh6U0THC/Mod/QPKlEt9g/EjvbYB8x2Qwr2p6J6I3NrsoYaVnY6wsQ==}
@@ -3537,37 +3445,6 @@ snapshots:
transitivePeerDependencies:
- supports-color
- '@swup/debug-plugin@3.0.0(swup@3.1.1)':
- dependencies:
- '@swup/plugin': 2.0.3
- swup: 3.1.1
-
- '@swup/fade-theme@1.0.5':
- dependencies:
- '@swup/theme': 1.0.7
-
- '@swup/forms-plugin@2.0.1(swup@3.1.1)':
- dependencies:
- '@swup/plugin': 2.0.3
- swup: 3.1.1
-
- '@swup/plugin@2.0.3':
- dependencies:
- '@swup/browserslist-config': link:node_modules/.ignored
- '@swup/prettier-config': link:node_modules/.ignored
- chalk: 5.4.1
- microbundle: link:node_modules/.ignored
- prettier: link:node_modules/.ignored
- shelljs: link:node_modules/.ignored
- shelljs-live: link:node_modules/.ignored
- swup: 3.1.1
-
- '@swup/slide-theme@1.0.5':
- dependencies:
- '@swup/theme': 1.0.7
-
- '@swup/theme@1.0.7': {}
-
'@symfony/stimulus-bridge@4.0.1(@hotwired/stimulus@3.2.2)':
dependencies:
'@hotwired/stimulus': 3.2.2
@@ -3947,8 +3824,6 @@ snapshots:
ansi-styles: 4.3.0
supports-color: 7.2.0
- chalk@5.4.1: {}
-
chart.js@4.5.0:
dependencies:
'@kurkle/color': 0.3.4
@@ -4052,10 +3927,6 @@ snapshots:
delayed-stream@1.0.0: {}
- delegate-it@6.2.1:
- dependencies:
- typed-query-selector: 2.12.0
-
dequal@2.0.3: {}
detect-libc@2.0.4: {}
@@ -4514,8 +4385,6 @@ snapshots:
object-assign@4.1.1: {}
- opencollective-postinstall@2.0.3: {}
-
outvariant@1.4.3:
optional: true
@@ -4793,11 +4662,6 @@ snapshots:
magic-string: 0.30.17
periscopic: 3.1.0
- swup@3.1.1:
- dependencies:
- delegate-it: 6.2.1
- opencollective-postinstall: 2.0.3
-
symbol-tree@3.2.4: {}
terser@5.43.1:
@@ -4913,8 +4777,6 @@ snapshots:
type-fest@4.41.0:
optional: true
- typed-query-selector@2.12.0: {}
-
typed.js@2.1.0: {}
typescript@5.8.3: {}
diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml
index a1022355c19..e455a32e4a5 100644
--- a/pnpm-workspace.yaml
+++ b/pnpm-workspace.yaml
@@ -4,14 +4,6 @@ packages:
linkWorkspacePackages: true
-overrides:
- '@swup/plugin>@swup/browserslist-config': link:node_modules/.ignored
- '@swup/plugin>@swup/prettier-config': link:node_modules/.ignored
- '@swup/plugin>microbundle': link:node_modules/.ignored
- '@swup/plugin>prettier': link:node_modules/.ignored
- '@swup/plugin>shelljs': link:node_modules/.ignored
- '@swup/plugin>shelljs-live': link:node_modules/.ignored
-
packageExtensions:
'@symfony/ux-google-map':
dependencies:
diff --git a/src/Swup/.gitattributes b/src/Swup/.gitattributes
deleted file mode 100644
index 3c8401b61de..00000000000
--- a/src/Swup/.gitattributes
+++ /dev/null
@@ -1,5 +0,0 @@
-/.git* export-ignore
-/.symfony.bundle.yaml export-ignore
-/assets/src export-ignore
-/assets/test export-ignore
-/doc export-ignore
diff --git a/src/Swup/.github/PULL_REQUEST_TEMPLATE.md b/src/Swup/.github/PULL_REQUEST_TEMPLATE.md
deleted file mode 100644
index df3b474b452..00000000000
--- a/src/Swup/.github/PULL_REQUEST_TEMPLATE.md
+++ /dev/null
@@ -1,8 +0,0 @@
-Please do not submit any Pull Requests here. They will be closed.
----
-
-Please submit your PR here instead:
-https://github.com/symfony/ux
-
-This repository is what we call a "subtree split": a read-only subset of that main repository.
-We're looking forward to your PR there!
diff --git a/src/Swup/.github/workflows/close-pull-request.yml b/src/Swup/.github/workflows/close-pull-request.yml
deleted file mode 100644
index 57e4e3fb074..00000000000
--- a/src/Swup/.github/workflows/close-pull-request.yml
+++ /dev/null
@@ -1,20 +0,0 @@
-name: Close Pull Request
-
-on:
- pull_request_target:
- types: [opened]
-
-jobs:
- run:
- runs-on: ubuntu-latest
- steps:
- - uses: superbrothers/close-pull-request@v3
- with:
- comment: |
- Thanks for your Pull Request! We love contributions.
-
- However, you should instead open your PR on the main repository:
- https://github.com/symfony/ux
-
- This repository is what we call a "subtree split": a read-only subset of that main repository.
- We're looking forward to your PR there!
diff --git a/src/Swup/.gitignore b/src/Swup/.gitignore
deleted file mode 100644
index 2cc9f0231c3..00000000000
--- a/src/Swup/.gitignore
+++ /dev/null
@@ -1,5 +0,0 @@
-/assets/node_modules/
-/vendor/
-/composer.lock
-/phpunit.xml
-/.phpunit.result.cache
diff --git a/src/Swup/.symfony.bundle.yaml b/src/Swup/.symfony.bundle.yaml
deleted file mode 100644
index 6d9a74acb76..00000000000
--- a/src/Swup/.symfony.bundle.yaml
+++ /dev/null
@@ -1,3 +0,0 @@
-branches: ["2.x"]
-maintained_branches: ["2.x"]
-doc_dir: "doc"
diff --git a/src/Swup/CHANGELOG.md b/src/Swup/CHANGELOG.md
deleted file mode 100644
index 0598d4df539..00000000000
--- a/src/Swup/CHANGELOG.md
+++ /dev/null
@@ -1,54 +0,0 @@
-# CHANGELOG
-
-## 2.29.0
-
-- Add Symfony 8 support
-
-## 2.26.0
-
-- Deprecate the package
-
-## 2.13.2
-
-- Revert "Change JavaScript package to `type: module`"
-
-## 2.13.0
-
-- Change JavaScript package to `type: module`
-
-## 2.9.0
-
-- A SwupBundle was added - which allows for integration with symfony/asset-mapper.
-
-- Add support for symfony/asset-mapper
-
-## 2.7.0
-
-- The JavaScript events now bubble up.
-
-- Add `assets/src` to `.gitattributes` to exclude source TypeScript files from
- installing.
-
-- TypeScript types are now included.
-
-## 2.6.0
-
-- [BC BREAK] The `assets/` directory was moved from `Resources/assets/` to `assets/`. Make
- sure the path in your `package.json` file is updated accordingly.
-
-## 2.0
-
-- Support for `stimulus` version 2 was removed and support for `@hotwired/stimulus`
- version 3 was added. See the [@symfony/stimulus-bridge CHANGELOG](https://github.com/symfony/stimulus-bridge/blob/main/CHANGELOG.md#300)
- for more details.
-- All options were changed from `data-` attributes to Stimulus values. See
- The README for updated instructions.
-- Added a new `swup:pre-connect` event.
-- Support added for Symfony 6.
-
-## 1.3
-
-- [DEPENDENCY CHANGE] `swup` (and a few themes/plugins) is no longer included
- automatically (#93), but `symfony/flex` will automatically add all the
- required libraries your `package.json` file when upgrading. Additionally
- `symfony/flex` 1.13 or higher is now required if installed.
diff --git a/src/Swup/LICENSE b/src/Swup/LICENSE
deleted file mode 100644
index 0ed3a246553..00000000000
--- a/src/Swup/LICENSE
+++ /dev/null
@@ -1,19 +0,0 @@
-Copyright (c) 2020-present Fabien Potencier
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is furnished
-to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
diff --git a/src/Swup/README.md b/src/Swup/README.md
deleted file mode 100644
index 63d9d6522ac..00000000000
--- a/src/Swup/README.md
+++ /dev/null
@@ -1,141 +0,0 @@
-# Symfony UX Swup
-
-> [!WARNING]
-> **Deprecated**: This package has been **deprecated** in 2.x and will be removed in the next major version.
-
-To keep the same functionality in your Symfony application, follow these migration steps:
-
-1. Install the `swup` library and its plugins:
-
-```bash
-# If using Symfony AssetMapper:
-php bin/console importmap:require swup @swup/fade-theme @swup/slide-theme @swup/forms-plugin @swup/debug-plugin
-
-# If using NPM (e.g.: with Webpack Encore):
-npm install swup @swup/fade-theme @swup/slide-theme @swup/forms-plugin @swup/debug-plugin
-```
-
-2. Add the following code to your app:
-
-assets/controllers/swup_controller.js
-
-```javascript
-import { Controller } from '@hotwired/stimulus';
-import Swup from 'swup';
-import SwupFadeTheme from '@swup/fade-theme';
-import SwupSlideTheme from '@swup/slide-theme';
-import SwupFormsPlugin from '@swup/forms-plugin';
-import SwupDebugPlugin from '@swup/debug-plugin';
-
-export default class extends Controller {
- static values = {
- containers: Array,
- mainElement: String,
- animateHistoryBrowsing: Boolean,
- animationSelector: String,
- cache: Boolean,
- linkSelector: String,
- theme: String,
- debug: Boolean,
- };
-
- connect() {
- const dataContainers = this.containersValue;
- const mainElement = this.mainElementValue || dataContainers[0] || '#swup';
- const allElements = [mainElement].concat(dataContainers);
- const containersList = allElements.filter((item, index) => {
- return allElements.indexOf(item) === index;
- });
-
- const options = {
- containers: containersList,
- plugins: [
- 'slide' === this.themeValue
- ? new SwupSlideTheme({ mainElement: mainElement })
- : new SwupFadeTheme({ mainElement: mainElement }),
- new SwupFormsPlugin(),
- ],
- };
-
- if (this.hasMainElementValue) {
- options.mainElement = this.mainElementValue;
- }
-
- if (this.hasAnimateHistoryBrowsingValue) {
- options.animateHistoryBrowsing = this.animateHistoryBrowsingValue;
- }
- if (this.hasAnimationSelectorValue) {
- options.animationSelector = this.animationSelectorValue;
- }
- if (this.hasCacheValue) {
- options.cache = this.cacheValue;
- }
- if (this.hasLinkSelectorValue) {
- options.linkSelector = this.linkSelectorValue;
- }
- if (this.debugValue) {
- options.plugins.push(new SwupDebugPlugin());
- }
-
- this.dispatchEvent('pre-connect', { options });
- const swup = new Swup(options);
- this.dispatchEvent('connect', { swup, options });
- }
-
- dispatchEvent(name, payload) {
- this.dispatch(name, { detail: payload, prefix: 'swup' });
- }
-}
-```
-
-
-
-3. Replace the `symfony--ux-swup` occurrences in your templates with `swup`, for example:
-
-```diff
--
-+
-```
-
-4. Remove `symfony/ux-swup` from your dependencies:
-
-```bash
-composer remove symfony/ux-swup
-```
-
-You're done!
-
----
-
-Symfony UX Swup is a Symfony bundle integrating [Swup](https://swup.js.org/) in
-Symfony applications. It is part of [the Symfony UX initiative](https://ux.symfony.com/).
-
-Swup is a complete and easy to use page transition library for Web applications. It creates
-a Single Page Application feel to Web applications without having to change anything on the server
-and without bringing the complexity of a React/Vue/Angular application.
-
-**This repository is a READ-ONLY sub-tree split**. See
-https://github.com/symfony/ux to create issues or submit pull requests.
-
-## Sponsor
-
-The Symfony UX packages are [backed][1] by [Mercure.rocks][2].
-
-Create real-time experiences in minutes! Mercure.rocks provides a realtime API service
-that is tightly integrated with Symfony: create UIs that update in live with UX Turbo,
-send notifications with the Notifier component, expose async APIs with API Platform and
-create low level stuffs with the Mercure component. We maintain and scale the complex
-infrastructure for you!
-
-Help Symfony by [sponsoring][3] its development!
-
-## Resources
-
-- [Documentation](https://symfony.com/bundles/ux-swup/current/index.html)
-- [Report issues](https://github.com/symfony/ux/issues) and
- [send Pull Requests](https://github.com/symfony/ux/pulls)
- in the [main Symfony UX repository](https://github.com/symfony/ux)
-
-[1]: https://symfony.com/backers
-[2]: https://mercure.rocks
-[3]: https://symfony.com/sponsor
diff --git a/src/Swup/assets/LICENSE b/src/Swup/assets/LICENSE
deleted file mode 100644
index 0ed3a246553..00000000000
--- a/src/Swup/assets/LICENSE
+++ /dev/null
@@ -1,19 +0,0 @@
-Copyright (c) 2020-present Fabien Potencier
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is furnished
-to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
diff --git a/src/Swup/assets/README.md b/src/Swup/assets/README.md
deleted file mode 100644
index d451b6ca9db..00000000000
--- a/src/Swup/assets/README.md
+++ /dev/null
@@ -1,24 +0,0 @@
-# @symfony/ux-swup
-
-JavaScript assets of the [symfony/ux-swup](https://packagist.org/packages/symfony/ux-swup) PHP package.
-
-## Installation
-
-This npm package is **reserved for advanced users** who want to decouple their JavaScript dependencies from their PHP dependencies (e.g., when building Docker images, running JavaScript-only pipelines, etc.).
-
-We **strongly recommend not installing this package directly**, but instead install the PHP package [symfony/ux-swup](https://packagist.org/packages/symfony/ux-swup) in your Symfony application with [Flex](https://github.com/symfony/flex) enabled.
-
-If you still want to install this package directly, please make sure its version exactly matches [symfony/ux-swup](https://packagist.org/packages/symfony/ux-swup) PHP package version:
-```shell
-composer require symfony/ux-swup:2.23.0
-npm add @symfony/ux-swup@2.23.0
-```
-
-**Tip:** Your `package.json` file will be automatically modified by [Flex](https://github.com/symfony/flex) when installing or upgrading a PHP package. To prevent this behavior, ensure to **use at least Flex 1.22.0 or 2.5.0**, and run `composer config extra.symfony.flex.synchronize_package_json false`.
-
-## Resources
-
-- [Documentation](https://symfony.com/bundles/ux-swup/current/index.html)
-- [Report issues](https://github.com/symfony/ux/issues) and
- [send Pull Requests](https://github.com/symfony/ux/pulls)
- in the [main Symfony UX repository](https://github.com/symfony/ux)
diff --git a/src/Swup/assets/dist/controller.d.ts b/src/Swup/assets/dist/controller.d.ts
deleted file mode 100644
index 9141e61f773..00000000000
--- a/src/Swup/assets/dist/controller.d.ts
+++ /dev/null
@@ -1,31 +0,0 @@
-import { Controller } from '@hotwired/stimulus';
-
-declare class export_default extends Controller {
- readonly animateHistoryBrowsingValue: boolean;
- readonly hasAnimateHistoryBrowsingValue: boolean;
- readonly animationSelectorValue: string;
- readonly hasAnimationSelectorValue: boolean;
- readonly cacheValue: boolean;
- readonly hasCacheValue: boolean;
- readonly containersValue: string[];
- readonly mainElementValue: string;
- readonly hasMainElementValue: boolean;
- readonly linkSelectorValue: string;
- readonly hasLinkSelectorValue: boolean;
- readonly themeValue: string;
- readonly debugValue: boolean;
- static values: {
- animateHistoryBrowsing: BooleanConstructor;
- animationSelector: StringConstructor;
- cache: BooleanConstructor;
- containers: ArrayConstructor;
- linkSelector: StringConstructor;
- theme: StringConstructor;
- debug: BooleanConstructor;
- mainElement: StringConstructor;
- };
- connect(): void;
- private dispatchEvent;
-}
-
-export { export_default as default };
diff --git a/src/Swup/assets/dist/controller.js b/src/Swup/assets/dist/controller.js
deleted file mode 100644
index 278bd659a75..00000000000
--- a/src/Swup/assets/dist/controller.js
+++ /dev/null
@@ -1,62 +0,0 @@
-// src/controller.ts
-import { Controller } from "@hotwired/stimulus";
-import SwupDebugPlugin from "@swup/debug-plugin";
-import SwupFadeTheme from "@swup/fade-theme";
-import SwupFormsPlugin from "@swup/forms-plugin";
-import SwupSlideTheme from "@swup/slide-theme";
-import Swup from "swup";
-var controller_default = class extends Controller {
- connect() {
- const dataContainers = this.containersValue;
- const mainElement = this.mainElementValue || dataContainers[0] || "#swup";
- const allElements = [mainElement].concat(dataContainers);
- const containersList = allElements.filter((item, index) => {
- return allElements.indexOf(item) === index;
- });
- const options = {
- containers: containersList,
- plugins: [
- "slide" === this.themeValue ? new SwupSlideTheme({ mainElement }) : new SwupFadeTheme({ mainElement }),
- new SwupFormsPlugin()
- ]
- };
- if (this.hasMainElementValue) {
- options.mainElement = this.mainElementValue;
- }
- if (this.hasAnimateHistoryBrowsingValue) {
- options.animateHistoryBrowsing = this.animateHistoryBrowsingValue;
- }
- if (this.hasAnimationSelectorValue) {
- options.animationSelector = this.animationSelectorValue;
- }
- if (this.hasCacheValue) {
- options.cache = this.cacheValue;
- }
- if (this.hasLinkSelectorValue) {
- options.linkSelector = this.linkSelectorValue;
- }
- if (this.debugValue) {
- options.plugins.push(new SwupDebugPlugin());
- }
- this.dispatchEvent("pre-connect", { options });
- const swup = new Swup(options);
- this.dispatchEvent("connect", { swup, options });
- }
- dispatchEvent(name, payload) {
- this.dispatch(name, { detail: payload, prefix: "swup" });
- }
-};
-controller_default.values = {
- animateHistoryBrowsing: Boolean,
- animationSelector: String,
- cache: Boolean,
- containers: Array,
- linkSelector: String,
- // custom values
- theme: String,
- debug: Boolean,
- mainElement: String
-};
-export {
- controller_default as default
-};
diff --git a/src/Swup/assets/package.json b/src/Swup/assets/package.json
deleted file mode 100644
index c6e81cd8e2f..00000000000
--- a/src/Swup/assets/package.json
+++ /dev/null
@@ -1,66 +0,0 @@
-{
- "name": "@symfony/ux-swup",
- "description": "Swup integration for Symfony",
- "license": "MIT",
- "version": "2.29.1",
- "keywords": [
- "symfony-ux"
- ],
- "homepage": "https://ux.symfony.com/swup",
- "repository": "https://github.com/symfony/ux-swup",
- "type": "module",
- "files": [
- "dist"
- ],
- "main": "dist/controller.js",
- "types": "dist/controller.d.ts",
- "scripts": {
- "build": "tsx ../../../bin/build_package.ts .",
- "watch": "tsx ../../../bin/build_package.ts . --watch",
- "test": "../../../bin/test_package.sh .",
- "check": "biome check",
- "ci": "biome ci"
- },
- "symfony": {
- "controllers": {
- "swup": {
- "main": "dist/controller.js",
- "webpackMode": "eager",
- "fetch": "eager",
- "enabled": true
- }
- },
- "importmap": {
- "@swup/fade-theme": "^1.0",
- "@swup/slide-theme": "^1.0",
- "@swup/forms-plugin": "^2.0",
- "@swup/debug-plugin": "^3.0",
- "swup": "^3.0",
- "@hotwired/stimulus": "^3.0.0"
- }
- },
- "peerDependencies": {
- "@hotwired/stimulus": "^3.0.0",
- "@swup/debug-plugin": "^3.0",
- "@swup/fade-theme": "^1.0",
- "@swup/forms-plugin": "^2.0",
- "@swup/slide-theme": "^1.0",
- "swup": "^3.0"
- },
- "devDependencies": {
- "@hotwired/stimulus": "^3.0.0",
- "@swup/debug-plugin": "^3.0",
- "@swup/fade-theme": "^1.0",
- "@swup/forms-plugin": "^2.0",
- "@swup/slide-theme": "^1.0",
- "@testing-library/dom": "^10.4.0",
- "@testing-library/jest-dom": "^6.6.3",
- "@testing-library/user-event": "^14.6.1",
- "jsdom": "^26.1.0",
- "swup": "^3.0",
- "tslib": "^2.8.1",
- "tsx": "^4.20.3",
- "typescript": "^5.8.3",
- "vitest": "^3.2.4"
- }
-}
diff --git a/src/Swup/assets/src/controller.ts b/src/Swup/assets/src/controller.ts
deleted file mode 100644
index 753079eb130..00000000000
--- a/src/Swup/assets/src/controller.ts
+++ /dev/null
@@ -1,93 +0,0 @@
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-import { Controller } from '@hotwired/stimulus';
-import SwupDebugPlugin from '@swup/debug-plugin';
-import SwupFadeTheme from '@swup/fade-theme';
-import SwupFormsPlugin from '@swup/forms-plugin';
-import SwupSlideTheme from '@swup/slide-theme';
-import Swup from 'swup';
-
-export default class extends Controller {
- declare readonly animateHistoryBrowsingValue: boolean;
- declare readonly hasAnimateHistoryBrowsingValue: boolean;
- declare readonly animationSelectorValue: string;
- declare readonly hasAnimationSelectorValue: boolean;
- declare readonly cacheValue: boolean;
- declare readonly hasCacheValue: boolean;
- declare readonly containersValue: string[];
- declare readonly mainElementValue: string;
- declare readonly hasMainElementValue: boolean;
- declare readonly linkSelectorValue: string;
- declare readonly hasLinkSelectorValue: boolean;
- declare readonly themeValue: string;
- declare readonly debugValue: boolean;
-
- static values = {
- animateHistoryBrowsing: Boolean,
- animationSelector: String,
- cache: Boolean,
- containers: Array,
- linkSelector: String,
-
- // custom values
- theme: String,
- debug: Boolean,
- mainElement: String,
- };
-
- connect() {
- const dataContainers = this.containersValue;
- const mainElement = this.mainElementValue || dataContainers[0] || '#swup';
- const allElements = [mainElement].concat(dataContainers);
- const containersList = allElements.filter((item, index) => {
- return allElements.indexOf(item) === index;
- });
-
- const options: any = {
- containers: containersList,
- plugins: [
- 'slide' === this.themeValue
- ? new SwupSlideTheme({ mainElement: mainElement })
- : new SwupFadeTheme({ mainElement: mainElement }),
- new SwupFormsPlugin(),
- ],
- };
-
- if (this.hasMainElementValue) {
- options.mainElement = this.mainElementValue;
- }
-
- if (this.hasAnimateHistoryBrowsingValue) {
- options.animateHistoryBrowsing = this.animateHistoryBrowsingValue;
- }
- if (this.hasAnimationSelectorValue) {
- options.animationSelector = this.animationSelectorValue;
- }
- if (this.hasCacheValue) {
- options.cache = this.cacheValue;
- }
- if (this.hasLinkSelectorValue) {
- options.linkSelector = this.linkSelectorValue;
- }
- if (this.debugValue) {
- options.plugins.push(new SwupDebugPlugin());
- }
-
- this.dispatchEvent('pre-connect', { options });
-
- const swup = new Swup(options);
-
- this.dispatchEvent('connect', { swup, options });
- }
-
- private dispatchEvent(name: string, payload: any) {
- this.dispatch(name, { detail: payload, prefix: 'swup' });
- }
-}
diff --git a/src/Swup/assets/src/index.d.ts b/src/Swup/assets/src/index.d.ts
deleted file mode 100644
index 784797fca74..00000000000
--- a/src/Swup/assets/src/index.d.ts
+++ /dev/null
@@ -1,5 +0,0 @@
-declare module 'swup';
-declare module '@swup/debug-plugin';
-declare module '@swup/forms-plugin';
-declare module '@swup/fade-theme';
-declare module '@swup/slide-theme';
diff --git a/src/Swup/assets/test/controller.test.ts b/src/Swup/assets/test/controller.test.ts
deleted file mode 100644
index 8805a0a6234..00000000000
--- a/src/Swup/assets/test/controller.test.ts
+++ /dev/null
@@ -1,212 +0,0 @@
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-import { Application, Controller } from '@hotwired/stimulus';
-import { getByTestId, waitFor } from '@testing-library/dom';
-import { afterEach, describe, expect, it } from 'vitest';
-import { clearDOM, mountDOM } from '../../../../test/stimulus-helpers';
-import SwupController from '../src/controller';
-
-let actualSwupOptions: any = null;
-
-// Controller used to check the actual controller was properly booted
-class CheckController extends Controller {
- connect() {
- this.element.addEventListener('swup:pre-connect', (event) => {
- actualSwupOptions = event.detail.options;
- });
-
- this.element.addEventListener('swup:connect', () => {
- this.element.classList.add('connected');
- });
- }
-}
-
-const startStimulus = () => {
- const application = Application.start();
- application.register('check', CheckController);
- application.register('swup', SwupController);
-};
-
-describe('SwupController', () => {
- afterEach(() => {
- clearDOM();
- actualSwupOptions = null;
- });
-
- it('connect', async () => {
- const container = mountDOM(`
-
-
- Symfony UX
-
-
-
-
-
- `);
- const bodyElement = getByTestId(container, 'body');
- expect(bodyElement).not.toHaveClass('connected');
-
- startStimulus();
- await waitFor(() => expect(bodyElement).toHaveClass('connected'));
- expect(actualSwupOptions.containers).toEqual(['#swup', '#nav']);
- expect(actualSwupOptions.linkSelector).toBe('a');
- expect(actualSwupOptions.animationSelector).toBe('[transition-*]');
- expect(actualSwupOptions.cache).toBe(true);
- expect(actualSwupOptions.animateHistoryBrowsing).toBe(true);
- });
-
- it('neither main element nor containers provided', async () => {
- const container = mountDOM(`
-
-
- Symfony UX
-
-
-
-
-
- `);
- const bodyElement = getByTestId(container, 'body');
- expect(bodyElement).not.toHaveClass('connected');
-
- startStimulus();
- await waitFor(() => expect(bodyElement).toHaveClass('connected'));
- expect(actualSwupOptions.mainElement).toEqual(undefined);
- expect(actualSwupOptions.containers).toEqual(['#swup']);
- });
-
- it('only data-main-element is provided,', async () => {
- const container = mountDOM(`
-
-
- Symfony UX
-
-
-
-
-
- `);
- const bodyElement = getByTestId(container, 'body');
- expect(bodyElement).not.toHaveClass('connected');
-
- startStimulus();
- await waitFor(() => expect(bodyElement).toHaveClass('connected'));
- expect(actualSwupOptions.mainElement).toEqual('#main');
- expect(actualSwupOptions.containers).toEqual(['#main']);
- });
-
- it('only data-containers provided', async () => {
- const container = mountDOM(`
-
-
- Symfony UX
-
-
-
-
-
- `);
- const bodyElement = getByTestId(container, 'body');
- expect(bodyElement).not.toHaveClass('connected');
-
- startStimulus();
- await waitFor(() => expect(bodyElement).toHaveClass('connected'));
- expect(actualSwupOptions.mainElement).toEqual(undefined);
- expect(actualSwupOptions.containers).toEqual(['#swup', '#nav']);
- });
-
- it('data-main-element and data-containers are provided,', async () => {
- const container = mountDOM(`
-
-
- Symfony UX
-
-
-
-
-
- `);
- const bodyElement = getByTestId(container, 'body');
- expect(bodyElement).not.toHaveClass('connected');
-
- startStimulus();
- await waitFor(() => expect(bodyElement).toHaveClass('connected'));
- expect(actualSwupOptions.mainElement).toEqual('#main');
- expect(actualSwupOptions.containers).toEqual(['#main', '#swup', '#nav']);
- });
-});
diff --git a/src/Swup/composer.json b/src/Swup/composer.json
deleted file mode 100644
index 7b98214ca7b..00000000000
--- a/src/Swup/composer.json
+++ /dev/null
@@ -1,35 +0,0 @@
-{
- "name": "symfony/ux-swup",
- "type": "symfony-bundle",
- "description": "Swup integration for Symfony",
- "keywords": [
- "symfony-ux"
- ],
- "homepage": "https://symfony.com",
- "license": "MIT",
- "authors": [
- {
- "name": "Titouan Galopin",
- "email": "galopintitouan@gmail.com"
- },
- {
- "name": "Symfony Community",
- "homepage": "https://symfony.com/contributors"
- }
- ],
- "autoload": {
- "psr-4": {
- "Symfony\\UX\\Swup\\": "src/"
- }
- },
- "conflict": {
- "symfony/flex": "<1.13"
- },
- "extra": {
- "thanks": {
- "name": "symfony/ux",
- "url": "https://github.com/symfony/ux"
- }
- },
- "minimum-stability": "dev"
-}
diff --git a/src/Swup/doc/index.rst b/src/Swup/doc/index.rst
deleted file mode 100644
index b74cb242fa1..00000000000
--- a/src/Swup/doc/index.rst
+++ /dev/null
@@ -1,217 +0,0 @@
-Symfony UX Swup
-===============
-
-.. warning::
-
- **Deprecated: This package has been deprecated in 2.x and will be removed in the next major version.**
-
- To keep the same functionality in your Symfony application, please follow the migration steps
- from the `Symfony UX Swup README.md`_.
-
-Symfony UX Swup is a Symfony bundle integrating `Swup`_ in
-Symfony applications. It is part of `the Symfony UX initiative`_.
-
-Swup is a complete and easy to use page transition library for Web
-applications. It creates a Single Page Application feel to Web
-applications without having to change anything on the server and without
-bringing the complexity of a React/Vue/Angular application.
-
-Installation
-------------
-
-.. caution::
-
- Before you start, make sure you have `StimulusBundle configured in your app`_.
-
-Install the bundle using Composer and Symfony Flex:
-
-.. code-block:: terminal
-
- $ composer require symfony/ux-swup
-
-If you're using WebpackEncore, install your assets and restart Encore (not
-needed if you're using AssetMapper):
-
-.. code-block:: terminal
-
- $ npm install --force
- $ npm run watch
-
-.. note::
-
- For more complex installation scenarios, you can install the JavaScript assets through the `@symfony/ux-swup npm package`_
-
-Usage
------
-
-In order to implement page transitions, Swup works by transforming the
-links of your application in AJAX calls to the target in their href.
-Once the AJAX call result is received, Swup is able to swap the content
-of the current page with the new content received by AJAX. When doing
-this swap, it is therefore able to animate a transition between pages.
-
-The main usage of Symfony UX Swup is to use its Stimulus controller to
-initialize Swup:
-
-.. code-block:: html+twig
-
-
-
- Swup
-
- {% block javascripts %}
- {{ encore_entry_script_tags('app') }}
- {% endblock %}
-
-
- {# ... #}
-
-
- {# ... #}
-
-
-
-
-.. note::
-
- The ``stimulus_controller()`` function comes from `StimulusBundle`_.
-
-That's it! Swup now reacts to a link click and run the default fade-in
-transition.
-
-By default, Swup will use the ``#swup`` selector as a container, meaning
-it will only swap the content of this container from one page to
-another. If you wish, you can configure additional containers, for
-instance to have a navigation menu that updates when changing pages:
-
-.. code-block:: html+twig
-
-
-
- Swup
-
- {% block javascripts %}
- {{ encore_entry_script_tags('app') }}
- {% endblock %}
-
-
- {# ... #}
-
-
- {# ... #}
-
-
-
- {# ... #}
-
-
-
-
-You can configure several other options using values on the controller.
-Most of these correspond to `Swup Options`_, but there are a few extra
-added:
-
-.. code-block:: html+twig
-
-
-
- Swup
-
-
- {# ... #}
-
-
-
-The extra options are:
-
-- ``theme``: either ``slide`` or ``fade`` (the default);
-- ``debug``: add this attribute to enable debug.
-
-Extend the default behavior
-~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-Symfony UX Swup allows you to extend its default behavior using a custom
-Stimulus controller:
-
-.. code-block:: javascript
-
- // assets/controllers/myswup_controller.js
-
- import { Controller } from '@hotwired/stimulus';
- import SwupProgressPlugin from '@swup/progress-plugin';
-
- export default class extends Controller {
- connect() {
- this.element.addEventListener('swup:pre-connect', this._onPreConnect);
- this.element.addEventListener('swup:connect', this._onConnect);
- }
-
- disconnect() {
- // You should always remove listeners when the controller is disconnected to avoid side-effects
- this.element.removeEventListener('swup:connect', this._onConnect);
- this.element.removeEventListener('swup:pre-connect', this._onPreConnect);
- }
-
- _onPreConnect(event) {
- // Swup has not been initialized - options can be changed
- console.log(event.detail.options); // Options that will be used to initialize Swup
- event.detail.options.plugins.push(new SwupProgressPlugin()); // Adding the progress bar plugin
- }
-
- _onConnect(event) {
- // Swup has just been initialized and you can access details from the event
- console.log(event.detail.swup); // Swup instance
- console.log(event.detail.options); // Options used to initialize Swup
- }
- }
-
-Then in your template, add your controller to the HTML attribute:
-
-.. code-block:: html+twig
-
-
-
- Swup
- {# ... #}
-
-
- {# ... #}
-
-
-
-.. note::
-
- Be careful to add your controller **before** the Swup controller so that it
- is executed before and can listen on the ``swup:connect`` event properly.
-
-Backward Compatibility promise
-------------------------------
-
-This bundle aims at following the same Backward Compatibility promise as
-the Symfony framework:
-https://symfony.com/doc/current/contributing/code/bc.html
-
-.. _`Swup`: https://swup.js.org/
-.. _`the Symfony UX initiative`: https://ux.symfony.com/
-.. _`StimulusBundle`: https://symfony.com/bundles/StimulusBundle/current/index.html
-.. _`Swup Options`: https://swup.js.org/options
-.. _StimulusBundle configured in your app: https://symfony.com/bundles/StimulusBundle/current/index.html
-.. _`@symfony/ux-swup npm package`: https://www.npmjs.com/package/@symfony/ux-swup
-.. _`Symfony UX Swup README.md`: https://github.com/symfony/ux/tree/2.x/src/Swup/README.md
diff --git a/src/Swup/src/DependencyInjection/SwupExtension.php b/src/Swup/src/DependencyInjection/SwupExtension.php
deleted file mode 100644
index 07e9d97b1b0..00000000000
--- a/src/Swup/src/DependencyInjection/SwupExtension.php
+++ /dev/null
@@ -1,59 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\UX\Swup\DependencyInjection;
-
-use Symfony\Component\AssetMapper\AssetMapperInterface;
-use Symfony\Component\DependencyInjection\ContainerBuilder;
-use Symfony\Component\DependencyInjection\Extension\PrependExtensionInterface;
-use Symfony\Component\HttpKernel\DependencyInjection\Extension;
-
-trigger_deprecation('symfony/ux-swup', '2.27.0', 'The package is deprecated and will be removed in 3.0. Follow the migration steps in https://github.com/symfony/ux/tree/2.x/src/Swup to keep using Swup in your Symfony application.');
-
-/**
- * @internal
- */
-class SwupExtension extends Extension implements PrependExtensionInterface
-{
- public function load(array $configs, ContainerBuilder $container): void
- {
- }
-
- public function prepend(ContainerBuilder $container): void
- {
- if (!$this->isAssetMapperAvailable($container)) {
- return;
- }
-
- $container->prependExtensionConfig('framework', [
- 'asset_mapper' => [
- 'paths' => [
- __DIR__.'/../../assets/dist' => '@symfony/ux-swup',
- ],
- ],
- ]);
- }
-
- private function isAssetMapperAvailable(ContainerBuilder $container): bool
- {
- if (!interface_exists(AssetMapperInterface::class)) {
- return false;
- }
-
- // check that FrameworkBundle 6.3 or higher is installed
- $bundlesMetadata = $container->getParameter('kernel.bundles_metadata');
- if (!isset($bundlesMetadata['FrameworkBundle'])) {
- return false;
- }
-
- return is_file($bundlesMetadata['FrameworkBundle']['path'].'/Resources/config/asset_mapper.php');
- }
-}
diff --git a/src/Swup/src/SwupBundle.php b/src/Swup/src/SwupBundle.php
deleted file mode 100644
index 1c4694a1115..00000000000
--- a/src/Swup/src/SwupBundle.php
+++ /dev/null
@@ -1,27 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\UX\Swup;
-
-use Symfony\Component\HttpKernel\Bundle\Bundle;
-
-trigger_deprecation('symfony/ux-swup', '2.27.0', 'The package is deprecated and will be removed in 3.0. Follow the migration steps in https://github.com/symfony/ux/tree/2.x/src/Swup to keep using Swup in your Symfony application.');
-
-/**
- * @final
- */
-class SwupBundle extends Bundle
-{
- public function getPath(): string
- {
- return \dirname(__DIR__);
- }
-}
diff --git a/test_apps/encore-app/assets/controllers.json b/test_apps/encore-app/assets/controllers.json
index 38a018532e0..61a7caedbc2 100644
--- a/test_apps/encore-app/assets/controllers.json
+++ b/test_apps/encore-app/assets/controllers.json
@@ -81,12 +81,6 @@
"fetch": "eager"
}
},
- "@symfony/ux-swup": {
- "swup": {
- "enabled": true,
- "fetch": "eager"
- }
- },
"@symfony/ux-toggle-password": {
"toggle-password": {
"enabled": true,
diff --git a/test_apps/encore-app/composer.json b/test_apps/encore-app/composer.json
index c870cab57d7..0c7c486b8e3 100644
--- a/test_apps/encore-app/composer.json
+++ b/test_apps/encore-app/composer.json
@@ -26,7 +26,6 @@
"symfony/ux-notify": "^2.23",
"symfony/ux-react": "^2.23",
"symfony/ux-svelte": "^2.23",
- "symfony/ux-swup": "^2.23",
"symfony/ux-toggle-password": "^2.23",
"symfony/ux-translator": "^2.23",
"symfony/ux-turbo": "^2.23",
diff --git a/test_apps/encore-app/config/bundles.php b/test_apps/encore-app/config/bundles.php
index e85faf265e6..2f055ee053b 100644
--- a/test_apps/encore-app/config/bundles.php
+++ b/test_apps/encore-app/config/bundles.php
@@ -18,7 +18,6 @@
Symfony\UX\Notify\NotifyBundle::class => ['all' => true],
Symfony\UX\React\ReactBundle::class => ['all' => true],
Symfony\UX\Svelte\SvelteBundle::class => ['all' => true],
- Symfony\UX\Swup\SwupBundle::class => ['all' => true],
Symfony\UX\TogglePassword\TogglePasswordBundle::class => ['all' => true],
Symfony\UX\Translator\UxTranslatorBundle::class => ['all' => true],
Symfony\UX\Turbo\TurboBundle::class => ['all' => true],
diff --git a/test_apps/encore-app/package.json b/test_apps/encore-app/package.json
index 49f19161cc2..64c60b642d0 100644
--- a/test_apps/encore-app/package.json
+++ b/test_apps/encore-app/package.json
@@ -6,10 +6,6 @@
"@googlemaps/js-api-loader": "^1.16.6",
"@hotwired/stimulus": "^3.0.0",
"@hotwired/turbo": "^7.1.1 || ^8.0",
- "@swup/debug-plugin": "^3.0",
- "@swup/fade-theme": "^1.0",
- "@swup/forms-plugin": "^2.0",
- "@swup/slide-theme": "^1.0",
"@symfony/stimulus-bridge": "^3.2.0",
"@symfony/ux-autocomplete": "file:vendor/symfony/ux-autocomplete/assets",
"@symfony/ux-chartjs": "file:vendor/symfony/ux-chartjs/assets",
@@ -22,7 +18,6 @@
"@symfony/ux-notify": "file:vendor/symfony/ux-notify/assets",
"@symfony/ux-react": "file:vendor/symfony/ux-react/assets",
"@symfony/ux-svelte": "file:vendor/symfony/ux-svelte/assets",
- "@symfony/ux-swup": "file:vendor/symfony/ux-swup/assets",
"@symfony/ux-toggle-password": "file:vendor/symfony/ux-toggle-password/assets",
"@symfony/ux-translator": "file:vendor/symfony/ux-translator/assets",
"@symfony/ux-turbo": "file:vendor/symfony/ux-turbo/assets",
@@ -39,7 +34,6 @@
"regenerator-runtime": "^0.13.9",
"svelte": "^3.0 || ^4.0",
"svelte-loader": "^3.2.4",
- "swup": "^3.0",
"tom-select": "^2.2.2",
"typed.js": "^2.0",
"vue": "^3.0",
diff --git a/ux.symfony.com/assets/controllers.json b/ux.symfony.com/assets/controllers.json
index af11d3268d8..5b5375a5a81 100644
--- a/ux.symfony.com/assets/controllers.json
+++ b/ux.symfony.com/assets/controllers.json
@@ -75,12 +75,6 @@
"fetch": "lazy"
}
},
- "@symfony/ux-swup": {
- "swup": {
- "enabled": true,
- "fetch": "lazy"
- }
- },
"@symfony/ux-toggle-password": {
"toggle-password": {
"enabled": true,
diff --git a/ux.symfony.com/composer.json b/ux.symfony.com/composer.json
index d9be8be8509..6a3198f2250 100644
--- a/ux.symfony.com/composer.json
+++ b/ux.symfony.com/composer.json
@@ -44,7 +44,6 @@
"symfony/ux-notify": "2.x-dev",
"symfony/ux-react": "2.x-dev",
"symfony/ux-svelte": "2.x-dev",
- "symfony/ux-swup": "2.x-dev",
"symfony/ux-toggle-password": "2.x-dev",
"symfony/ux-toolkit": "2.x-dev",
"symfony/ux-translator": "2.x-dev",
diff --git a/ux.symfony.com/composer.lock b/ux.symfony.com/composer.lock
index 70da9028284..abef0dce226 100644
--- a/ux.symfony.com/composer.lock
+++ b/ux.symfony.com/composer.lock
@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
- "content-hash": "4c63747018e3269a9e8d6adcd246355b",
+ "content-hash": "cb6b21545f526b7e56b3d51e502ff6cf",
"packages": [
{
"name": "composer/semver",
@@ -8240,74 +8240,6 @@
],
"time": "2024-12-05T14:25:02+00:00"
},
- {
- "name": "symfony/ux-swup",
- "version": "2.x-dev",
- "source": {
- "type": "git",
- "url": "https://github.com/symfony/ux-swup.git",
- "reference": "e344e0308b2c303e138386b2a6f892443947c7f7"
- },
- "dist": {
- "type": "zip",
- "url": "https://api.github.com/repos/symfony/ux-swup/zipball/e344e0308b2c303e138386b2a6f892443947c7f7",
- "reference": "e344e0308b2c303e138386b2a6f892443947c7f7",
- "shasum": ""
- },
- "conflict": {
- "symfony/flex": "<1.13"
- },
- "default-branch": true,
- "type": "symfony-bundle",
- "extra": {
- "thanks": {
- "url": "https://github.com/symfony/ux",
- "name": "symfony/ux"
- }
- },
- "autoload": {
- "psr-4": {
- "Symfony\\UX\\Swup\\": "src/"
- }
- },
- "notification-url": "https://packagist.org/downloads/",
- "license": [
- "MIT"
- ],
- "authors": [
- {
- "name": "Titouan Galopin",
- "email": "galopintitouan@gmail.com"
- },
- {
- "name": "Symfony Community",
- "homepage": "https://symfony.com/contributors"
- }
- ],
- "description": "Swup integration for Symfony",
- "homepage": "https://symfony.com",
- "keywords": [
- "symfony-ux"
- ],
- "support": {
- "source": "https://github.com/symfony/ux-swup/tree/v2.22.1"
- },
- "funding": [
- {
- "url": "https://symfony.com/sponsor",
- "type": "custom"
- },
- {
- "url": "https://github.com/fabpot",
- "type": "github"
- },
- {
- "url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
- "type": "tidelift"
- }
- ],
- "time": "2024-12-05T14:25:02+00:00"
- },
{
"name": "symfony/ux-toggle-password",
"version": "2.x-dev",
@@ -12887,7 +12819,6 @@
"symfony/ux-notify": 20,
"symfony/ux-react": 20,
"symfony/ux-svelte": 20,
- "symfony/ux-swup": 20,
"symfony/ux-toggle-password": 20,
"symfony/ux-toolkit": 20,
"symfony/ux-translator": 20,
diff --git a/ux.symfony.com/config/bundles.php b/ux.symfony.com/config/bundles.php
index ac7e54aa723..ed8e970cf51 100644
--- a/ux.symfony.com/config/bundles.php
+++ b/ux.symfony.com/config/bundles.php
@@ -26,7 +26,6 @@
Symfony\UX\Translator\UxTranslatorBundle::class => ['all' => true],
Symfony\UX\StimulusBundle\StimulusBundle::class => ['all' => true],
Symfony\UX\Typed\TypedBundle::class => ['all' => true],
- Symfony\UX\Swup\SwupBundle::class => ['all' => true],
Zenstruck\Foundry\ZenstruckFoundryBundle::class => ['dev' => true, 'test' => true],
Symfony\UX\TogglePassword\TogglePasswordBundle::class => ['all' => true],
Symfonycasts\SassBundle\SymfonycastsSassBundle::class => ['all' => true],
diff --git a/ux.symfony.com/importmap.php b/ux.symfony.com/importmap.php
index 3b6259f2d12..2c5a6e13be9 100644
--- a/ux.symfony.com/importmap.php
+++ b/ux.symfony.com/importmap.php
@@ -85,27 +85,9 @@
'version' => '3.4.31',
'package_specifier' => 'vue/dist/vue.esm-bundler.js',
],
- 'swup' => [
- 'version' => '3.1.1',
- ],
'delegate-it' => [
'version' => '6.1.0',
],
- '@swup/debug-plugin' => [
- 'version' => '3.0.0',
- ],
- '@swup/fade-theme' => [
- 'version' => '1.0.5',
- ],
- '@swup/forms-plugin' => [
- 'version' => '2.0.1',
- ],
- '@swup/slide-theme' => [
- 'version' => '1.0.5',
- ],
- '@swup/plugin' => [
- 'version' => '2.0.3',
- ],
'@hotwired/turbo' => [
'version' => '8.0.4',
],
diff --git a/ux.symfony.com/src/Model/UxPackage.php b/ux.symfony.com/src/Model/UxPackage.php
index 723d0882127..33f3f2227e7 100644
--- a/ux.symfony.com/src/Model/UxPackage.php
+++ b/ux.symfony.com/src/Model/UxPackage.php
@@ -30,6 +30,7 @@ public function __construct(
private ?string $imageFileName = null,
private ?string $composerName = null,
private bool $isDevDependency = false,
+ private bool $isDeprecated = false,
) {
}
@@ -151,4 +152,9 @@ public function getImage(?string $format = null): string
{
return 'images/ux_packages/'.$this->getImageFilename($format);
}
+
+ public function isDeprecated(): bool
+ {
+ return $this->isDeprecated;
+ }
}
diff --git a/ux.symfony.com/src/Service/UxPackageRepository.php b/ux.symfony.com/src/Service/UxPackageRepository.php
index d488ea98532..1590d329179 100644
--- a/ux.symfony.com/src/Service/UxPackageRepository.php
+++ b/ux.symfony.com/src/Service/UxPackageRepository.php
@@ -208,6 +208,7 @@ public function findAll(?string $query = null): array
'linear-gradient(95deg, #D87036 -5%, #EA9633 105%)',
'Stylized Page Transitions',
'Integration with the page transition library Swup',
+ isDeprecated: true,
))
->setDocsLink('https://swup.js.org/', 'Swup documentation'),
diff --git a/ux.symfony.com/symfony.lock b/ux.symfony.com/symfony.lock
index 2164807c8da..ae918923a7d 100644
--- a/ux.symfony.com/symfony.lock
+++ b/ux.symfony.com/symfony.lock
@@ -605,9 +605,6 @@
"symfony/ux-svelte": {
"version": "2.x-dev"
},
- "symfony/ux-swup": {
- "version": "v2.1.1"
- },
"symfony/ux-toggle-password": {
"version": "2.x-dev"
},
diff --git a/ux.symfony.com/templates/ux_packages/swup.html.twig b/ux.symfony.com/templates/ux_packages/swup.html.twig
index e602bf99b5c..401f130bf56 100644
--- a/ux.symfony.com/templates/ux_packages/swup.html.twig
+++ b/ux.symfony.com/templates/ux_packages/swup.html.twig
@@ -1,61 +1,58 @@
-{% extends 'ux_packages/package.html.twig' %}
-
-{% block package_header %}
- {% component PackageHeader with {
- package: 'swup',
- eyebrowText: 'Slick Page Transitions'
- } %}
- {% block title_header %}
- Ajax Page Transitions with Swup
- {% endblock %}
-
- {% block sub_content %}
- Replace full page refreshes with Ajax-powered, stylized page transitions (an alternative to Turbo).
- {% endblock %}
- {% endcomponent %}
-{% endblock %}
-
-{% block code_block_left %}
-
-{% endblock %}
-
-{% block code_block_right %}
-
-{% endblock %}
-
-{% block demo_title %}UX Swup{% endblock %}
-
-{% block demo_content %}
- {% block swup_specific_demo_content %}
-
-
-
- {% for package in results %}
- {{ include('components/Package/PackageListItem.html.twig', {package}) }}
- {% endfor %}
-
-
-
-
-
+{% extends 'base.html.twig' %}
+
+{% set meta = {
+ title: package.humanName ~ ' - Symfony UX 2',
+ description: package.description,
+ canonical: url(package.route),
+ social: {
+ title: package.tagline ~ ' - Symfony UX 2' ~ package.humanName|u.trimStart('UX '),
+ description: package.description|striptags,
+ image: {
+ url: absolute_url(asset(package.getSocialImage('1200x675'))),
+ type: 'image/png',
+ width: 1200,
+ height: 675,
+ alt: package.humanName ~ ' - Component Icon',
+ },
+ }
+} %}
+
+{% block main %}
+
+
+
Deprecated Package
+
UX Swup 2.x
+
This component is deprecated and will not receive further updates. Please consider
+ using Symfony UX Turbo for modern page
+ transitions.
- {% endblock %}
+
+{% endblock %}
-
-
Ajax-powered page navigation
-
-
URL in address bar changes
-
-
Customizable transitions
-
+{% block stylesheets %}
+ {{ parent() }}
+
{% endblock %}
diff --git a/ux.symfony.com/tests/Functional/UxPackagesTest.php b/ux.symfony.com/tests/Functional/UxPackagesTest.php
index e76019df8de..ba12d1fcff6 100644
--- a/ux.symfony.com/tests/Functional/UxPackagesTest.php
+++ b/ux.symfony.com/tests/Functional/UxPackagesTest.php
@@ -59,6 +59,12 @@ public static function getSmokeTests(): \Generator
continue;
}
+ if ($package->isDeprecated()) {
+ // Deprecated packages have a minimal layout
+ yield $package->getName() => [$package, 'Deprecated Package'];
+ continue;
+ }
+
yield $package->getName() => [$package, \sprintf('%s Doc', $package->getHumanName())];
}
}
diff --git a/ux.symfony.com/tests/baseline-ignore b/ux.symfony.com/tests/baseline-ignore
index 6297f114800..db6f6e22afb 100644
--- a/ux.symfony.com/tests/baseline-ignore
+++ b/ux.symfony.com/tests/baseline-ignore
@@ -1,4 +1,3 @@
%Since symfony/ux-typed 2\.27\.0: The package is deprecated and will be removed in 3\.0\.%
%Since symfony/ux-lazy-image 2\.27\.0: The package is deprecated and will be removed in 3\.0\.%
-%Since symfony/ux-swup 2\.27\.0: The package is deprecated and will be removed in 3\.0\.%
%Since symfony/ux-toggle-password 2\.29\.0: The package is deprecated and will be removed in 3\.0\.%