Skip to content

Commit

Permalink
update symfony flex recipes
Browse files Browse the repository at this point in the history
  • Loading branch information
vitek-rostislav committed Sep 27, 2024
1 parent 4f25631 commit 140e124
Show file tree
Hide file tree
Showing 10 changed files with 117 additions and 50 deletions.
12 changes: 12 additions & 0 deletions assets/app.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/*
* Welcome to your app's main JavaScript file!
*
* We recommend including the built version of this JavaScript file
* (and its CSS file) in your base layout (base.html.twig).
*/

// any CSS you import will output into a single css file (app.css in this case)
import './styles/app.css';

// start the Stimulus application
import './bootstrap';
11 changes: 11 additions & 0 deletions assets/bootstrap.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { startStimulusApp } from '@symfony/stimulus-bridge';

// Registers Stimulus controllers from controllers.json and in the controllers/ directory
export const app = startStimulusApp(require.context(
'@symfony/stimulus-bridge/lazy-controller-loader!./controllers',
true,
/\.[jt]sx?$/
));

// register any custom, 3rd party controllers here
// app.register('some_controller_name', SomeImportedController);
4 changes: 4 additions & 0 deletions assets/controllers.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"controllers": [],
"entrypoints": []
}
16 changes: 16 additions & 0 deletions assets/controllers/hello_controller.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import { Controller } from '@hotwired/stimulus';

/*
* This is an example Stimulus controller!
*
* Any element with a data-controller="hello" attribute will cause
* this controller to be executed. The name "hello" comes from the filename:
* hello_controller.js -> "hello"
*
* Delete this file or adapt it for your use!
*/
export default class extends Controller {
connect() {
this.element.textContent = 'Hello Stimulus! Edit me in assets/controllers/hello_controller.js';
}
}
3 changes: 3 additions & 0 deletions assets/styles/app.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
body {
background-color: lightgray;
}
5 changes: 5 additions & 0 deletions config/preload.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?php

if (file_exists(dirname(__DIR__).'/var/cache/prod/App_KernelProdContainer.preload.php')) {
require dirname(__DIR__).'/var/cache/prod/App_KernelProdContainer.preload.php';
}
4 changes: 4 additions & 0 deletions config/routes/framework.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
when@dev:
_errors:
resource: '@FrameworkBundle/Resources/config/routing/errors.xml'
prefix: /_error
3 changes: 3 additions & 0 deletions config/routes/security.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
_security_logout:
resource: security.route_loader.logout
type: service
20 changes: 16 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,26 @@
"test": "npm run test:unit && npm run test:e2e",
"test:unit": "jest",
"test:cypress-install": "./node_modules/.bin/cypress install",
"test:e2e": "./node_modules/.bin/cypress run"
"test:e2e": "./node_modules/.bin/cypress run",
"dev-server": "encore dev-server",
"dev": "encore dev",
"watch": "encore dev --watch",
"build": "encore production --progress"
},
"license": "ISC",
"devDependencies": {
"@babel/core": "^7.8.3",
"@babel/preset-env": "^7.8.3",
"@babel/core": "^7.17.0",
"@babel/preset-env": "^7.16.0",
"babel-jest": "^25.1.0",
"cypress": "^10.3.0",
"jest": "^25.1.0"
"jest": "^25.1.0",
"@hotwired/stimulus": "^3.0.0",
"@symfony/stimulus-bridge": "^3.2.0",
"@symfony/webpack-encore": "^4.0.0",
"core-js": "^3.23.0",
"regenerator-runtime": "^0.13.9",
"webpack": "^5.74.0",
"webpack-cli": "^4.10.0",
"webpack-notifier": "^1.15.0"
}
}
89 changes: 43 additions & 46 deletions symfony.lock
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,12 @@
"version": "v5.0.3"
},
"symfony/flex": {
"version": "1.0",
"version": "1.21",
"recipe": {
"repo": "github.com/symfony/recipes",
"branch": "master",
"branch": "main",
"version": "1.0",
"ref": "c0eeb50665f0f77226616b6038a9b06c03752d8e"
"ref": "146251ae39e06a95be0fe3d13c807bcf3938b172"
},
"files": [
".env"
Expand All @@ -75,19 +75,18 @@
"version": "v4.4.3"
},
"symfony/framework-bundle": {
"version": "4.4",
"version": "6.4",
"recipe": {
"repo": "github.com/symfony/recipes",
"branch": "master",
"version": "4.4",
"ref": "23ecaccc551fe2f74baf613811ae529eb07762fa"
"branch": "main",
"version": "6.4",
"ref": "32126346f25e1cee607cc4aa6783d46034920554"
},
"files": [
"config/bootstrap.php",
"config/packages/cache.yaml",
"config/packages/framework.yaml",
"config/packages/test/framework.yaml",
"config/routes/dev/framework.yaml",
"config/preload.php",
"config/routes/framework.yaml",
"config/services.yaml",
"public/index.php",
"src/Controller/.gitignore",
Expand Down Expand Up @@ -122,41 +121,41 @@
"version": "v5.0.3"
},
"symfony/routing": {
"version": "4.2",
"version": "6.4",
"recipe": {
"repo": "github.com/symfony/recipes",
"branch": "master",
"version": "4.2",
"ref": "683dcb08707ba8d41b7e34adb0344bfd68d248a7"
"branch": "main",
"version": "6.2",
"ref": "e0a11b4ccb8c9e70b574ff5ad3dfdcd41dec5aa6"
},
"files": [
"config/packages/prod/routing.yaml",
"config/packages/routing.yaml",
"config/routes.yaml"
]
},
"symfony/security-bundle": {
"version": "4.4",
"version": "6.4",
"recipe": {
"repo": "github.com/symfony/recipes",
"branch": "master",
"version": "4.4",
"ref": "30efd98dd3b4ead6e9ad4713b1efc43bbe94bf77"
"branch": "main",
"version": "6.4",
"ref": "2ae08430db28c8eb4476605894296c82a642028f"
},
"files": [
"config/packages/security.yaml"
"config/packages/security.yaml",
"config/routes/security.yaml"
]
},
"symfony/service-contracts": {
"version": "v2.0.1"
},
"symfony/translation": {
"version": "3.3",
"version": "6.4",
"recipe": {
"repo": "github.com/symfony/recipes",
"branch": "master",
"version": "3.3",
"ref": "2ad9d2545bce8ca1a863e50e92141f0b9d87ffcd"
"branch": "main",
"version": "6.3",
"ref": "e28e27f53663cc34f0be2837aba18e3a1bef8e7b"
},
"files": [
"config/packages/translation.yaml",
Expand All @@ -167,46 +166,44 @@
"version": "v4.4.3"
},
"symfony/twig-bundle": {
"version": "4.4",
"version": "6.4",
"recipe": {
"repo": "github.com/symfony/recipes",
"branch": "master",
"version": "4.4",
"ref": "15a41bbd66a1323d09824a189b485c126bbefa51"
"branch": "main",
"version": "6.4",
"ref": "cab5fd2a13a45c266d45a7d9337e28dee6272877"
},
"files": [
"config/packages/test/twig.yaml",
"config/packages/twig.yaml",
"templates/base.html.twig"
]
},
"symfony/validator": {
"version": "4.3",
"version": "6.4",
"recipe": {
"repo": "github.com/symfony/recipes",
"branch": "master",
"version": "4.3",
"ref": "d902da3e4952f18d3bf05aab29512eb61cabd869"
"branch": "main",
"version": "5.3",
"ref": "c32cfd98f714894c4f128bb99aa2530c1227603c"
},
"files": [
"config/packages/test/validator.yaml",
"config/packages/validator.yaml"
]
},
"symfony/webpack-encore-bundle": {
"version": "1.6",
"version": "1.17",
"recipe": {
"repo": "github.com/symfony/recipes",
"branch": "master",
"version": "1.6",
"ref": "69e1d805ad95964088bd510c05995e87dc391564"
"branch": "main",
"version": "1.10",
"ref": "eff2e505d4557c967b6710fe06bd947ba555cae5"
},
"files": [
"assets/css/app.css",
"assets/js/app.js",
"config/packages/assets.yaml",
"config/packages/prod/webpack_encore.yaml",
"config/packages/test/webpack_encore.yaml",
"assets/app.js",
"assets/bootstrap.js",
"assets/controllers.json",
"assets/controllers/hello_controller.js",
"assets/styles/app.css",
"config/packages/webpack_encore.yaml",
"package.json",
"webpack.config.js"
Expand All @@ -219,12 +216,12 @@
"version": "1.2.0"
},
"tgalopin/html-sanitizer-bundle": {
"version": "1.0",
"version": "1.4",
"recipe": {
"repo": "github.com/symfony/recipes-contrib",
"branch": "master",
"branch": "main",
"version": "1.0",
"ref": "26a72f38eede2c53b5d3ccbed5c150e10a93268d"
"ref": "95b935177db9abb65356fe19e57fe5abd908b5b8"
},
"files": [
"config/packages/html_sanitizer.yaml"
Expand Down

0 comments on commit 140e124

Please sign in to comment.