diff --git a/assets/controllers.json b/assets/controllers.json index a1c6e90c..7ba2551d 100644 --- a/assets/controllers.json +++ b/assets/controllers.json @@ -1,4 +1,11 @@ { - "controllers": [], + "controllers": { + "@symfony/ux-turbo": { + "turbo-core": { + "enabled": true, + "fetch": "eager" + } + } + }, "entrypoints": [] } diff --git a/composer.json b/composer.json index 93ff8f95..82a1a814 100644 --- a/composer.json +++ b/composer.json @@ -56,6 +56,7 @@ "symfony/serializer": "5.4.*", "symfony/translation": "5.4.*", "symfony/twig-bundle": "5.4.*", + "symfony/ux-turbo": "^2.0", "symfony/validator": "5.4.*", "symfony/web-link": "5.4.*", "symfony/webpack-encore-bundle": "^1.1", diff --git a/composer.lock b/composer.lock index bb9d4529..cfa5ae68 100644 --- a/composer.lock +++ b/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": "6a0b77bb02ab9fddfcd455cd0d1ed2e8", + "content-hash": "7c7f12b38342f85999c2c3fb8528534e", "packages": [ { "name": "beberlei/assert", @@ -10334,6 +10334,103 @@ ], "time": "2022-01-02T09:53:40+00:00" }, + { + "name": "symfony/ux-turbo", + "version": "v2.0.1", + "source": { + "type": "git", + "url": "https://github.com/symfony/ux-turbo.git", + "reference": "d8f8aa42f616beff9482fa5c42bfd93333ba7ca8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/ux-turbo/zipball/d8f8aa42f616beff9482fa5c42bfd93333ba7ca8", + "reference": "d8f8aa42f616beff9482fa5c42bfd93333ba7ca8", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "symfony/webpack-encore-bundle": "^1.11" + }, + "conflict": { + "symfony/flex": "<1.13" + }, + "require-dev": { + "doctrine/annotations": "^1.12", + "doctrine/doctrine-bundle": "^2.2", + "doctrine/orm": "^2.8 | 3.0", + "phpstan/phpstan": "^0.12", + "symfony/debug-bundle": "^5.2|^6.0", + "symfony/form": "^5.2|^6.0", + "symfony/framework-bundle": "^5.2|^6.0", + "symfony/mercure-bundle": "^0.3", + "symfony/messenger": "^5.2|^6.0", + "symfony/panther": "^1.0|^2.0", + "symfony/phpunit-bridge": "^5.2.1|^6.0", + "symfony/property-access": "^5.2|^6.0", + "symfony/security-core": "^5.2|^6.0", + "symfony/stopwatch": "^5.2|^6.0", + "symfony/twig-bundle": "^5.2|^6.0", + "symfony/web-profiler-bundle": "^5.2|^6.0" + }, + "type": "symfony-bundle", + "extra": { + "thanks": { + "name": "symfony/ux", + "url": "https://github.com/symfony/ux" + } + }, + "autoload": { + "psr-4": { + "Symfony\\UX\\Turbo\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Kévin Dunglas", + "email": "kevin@dunglas.fr" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Hotwire Turbo integration for Symfony", + "homepage": "https://symfony.com", + "keywords": [ + "hotwire", + "javascript", + "mercure", + "symfony-ux", + "turbo", + "turbo-stream" + ], + "support": { + "source": "https://github.com/symfony/ux-turbo/tree/v2.0.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": "2021-12-12T11:00:03+00:00" + }, { "name": "symfony/validator", "version": "v5.4.5", diff --git a/config/bundles.php b/config/bundles.php index d65f246b..751a2de6 100644 --- a/config/bundles.php +++ b/config/bundles.php @@ -25,4 +25,5 @@ return [ Translation\Bundle\TranslationBundle::class => ['all' => true], Florianv\SwapBundle\FlorianvSwapBundle::class => ['all' => true], Nelmio\SecurityBundle\NelmioSecurityBundle::class => ['all' => true], + Symfony\UX\Turbo\TurboBundle::class => ['all' => true], ]; diff --git a/package.json b/package.json index b333ad1b..44c66a8d 100644 --- a/package.json +++ b/package.json @@ -1,15 +1,17 @@ { "devDependencies": { "@fortawesome/fontawesome-free": "^5.7.2", + "@hotwired/stimulus": "^3.0.0", + "@hotwired/turbo": "^7.0.1", "@popperjs/core": "^2.10.2", "@symfony/stimulus-bridge": "^3.0.0", + "@symfony/ux-turbo": "file:vendor/symfony/ux-turbo/Resources/assets", "@symfony/webpack-encore": "^1.6.1", "bootstrap": "^4.4.1", "core-js": "^3.6.4", "jquery": "^3.5.1", "popper.js": "^1.14.7", "regenerator-runtime": "^0.13.2", - "@hotwired/stimulus": "^3.0.0", "webpack-bundle-analyzer": "^4.3.0", "webpack-notifier": "^1.6.0" }, diff --git a/symfony.lock b/symfony.lock index 36b17172..e8020b55 100644 --- a/symfony.lock +++ b/symfony.lock @@ -749,6 +749,9 @@ "templates/base.html.twig" ] }, + "symfony/ux-turbo": { + "version": "v2.0.1" + }, "symfony/validator": { "version": "5.4", "recipe": { diff --git a/yarn.lock b/yarn.lock index adfa4d49..2bc57483 100644 --- a/yarn.lock +++ b/yarn.lock @@ -955,6 +955,11 @@ resolved "https://registry.yarnpkg.com/@hotwired/stimulus/-/stimulus-3.0.1.tgz#141f15645acaa3b133b7c247cad58ae252ffae85" integrity sha512-oHsJhgY2cip+K2ED7vKUNd2P+BEswVhrCYcJ802DSsblJFv7mPFVk3cQKvm2vHgHeDVdnj7oOKrBbzp1u8D+KA== +"@hotwired/turbo@^7.0.1": + version "7.1.0" + resolved "https://registry.yarnpkg.com/@hotwired/turbo/-/turbo-7.1.0.tgz#27e44e0e3dc5bd1d4bda0766d579cf5a14091cd7" + integrity sha512-Q8kGjqwPqER+CtpQudbH+3Zgs2X4zb6pBAlr6NsKTXadg45pAOvxI9i4QpuHbwSzR2+x87HUm+rot9F/Pe8rxA== + "@jridgewell/resolve-uri@^3.0.3": version "3.0.5" resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.0.5.tgz#68eb521368db76d040a6315cdb24bf2483037b9c" @@ -1024,6 +1029,9 @@ loader-utils "^2.0.0" schema-utils "^3.0.0" +"@symfony/ux-turbo@file:vendor/symfony/ux-turbo/Resources/assets": + version "0.1.0" + "@symfony/webpack-encore@^1.6.1": version "1.8.1" resolved "https://registry.yarnpkg.com/@symfony/webpack-encore/-/webpack-encore-1.8.1.tgz#b28b574e33fefe0b7a46edc4b205ef93299c276d"