Compare commits
8 Commits
2_symfony_
...
3_start_ne
Author | SHA1 | Date | |
---|---|---|---|
37d2c86aef | |||
79e99c20c2 | |||
8413dba234 | |||
f7da84b719 | |||
5622128c68 | |||
70fc3ca9ab | |||
5d61e30e3d | |||
348c725cf9 |
5
.gitignore
vendored
5
.gitignore
vendored
@@ -1,7 +1,10 @@
|
||||
# Uncomment to ignore Symfony project
|
||||
/app/*
|
||||
#/app/*
|
||||
/app/.yarncache
|
||||
!/app/.keep
|
||||
|
||||
# Uncomment to ignore Database datas
|
||||
/data/*
|
||||
!/data/.keep
|
||||
|
||||
.idea
|
||||
|
29
README.md
29
README.md
@@ -18,5 +18,30 @@ La branche `1_docker_ready` fournit juste le docker-compose.yml et les Dockerfil
|
||||
* `$ docker-compose up -d`
|
||||
* `$ docker-compose exec -u 1000 php bash`
|
||||
|
||||
A ce stade les commandes composer et symfony sont disponible pour lancer la création du projet.
|
||||
Après ça on choisira dans le fichier `app/.env` le type de base de donnée. Un conteneur est prévu pour utiliser postgresql. Par défaut, Symfony proposera l'utilisation d'un fichier sqlite (`app/data/database.sqlite`).
|
||||
A ce stade les commandes `composer` et `symfony` sont disponibles pour lancer la création du projet.
|
||||
Après ça on choisira dans le fichier `app/.env` le type de base de donnée. Un conteneur est prévu pour utiliser postgresql.
|
||||
|
||||
## 2_symfony_demo
|
||||
|
||||
* commandes exécutées:
|
||||
* `$ symfony new --demo demo`
|
||||
* `$ mv demo/* . && mv demo/.* . && rmdir demo`
|
||||
|
||||
Cette branche démarre d'une installation toute prête de la demo Symfony. La db est enregistrée dans le repo dans un simple fichier sqlite (`app/data/database.sqlite`). Le conteneur docker postgresql est donc désactivé.
|
||||
|
||||
## 3_start_new_project
|
||||
|
||||
* commandes exécutées:
|
||||
* `$ symfony new myproject`
|
||||
* `$ mv myproject/* . && mv myproject/.* . && rmdir myproject`
|
||||
* `composer require annotations twig orm form form validator maker-bundle security-csrf \
|
||||
&& composer require --dev profiler`
|
||||
* Adapt querystring in `./app/.env`:
|
||||
```
|
||||
--- DATABASE_URL="postgresql://db_user:db_password@127.0.0.1:5432/db_name?serverVersion=13&charset=utf8"
|
||||
+++ DATABASE_URL="postgresql://postgres:secret@db:5432/postgres?serverVersion=12&charset=utf8"
|
||||
```
|
||||
* Create database schema: `bin/console doctrine:schema:create`
|
||||
* `$ composer require symfony/webpack-encore-bundle` and `$ yarn install --force`
|
||||
* `$ yarn add sass sass-loader`
|
||||
* `$ composer require --dev symfony/debug-bundle symfony/var-dumper`
|
||||
|
28
app/.env
Normal file
28
app/.env
Normal file
@@ -0,0 +1,28 @@
|
||||
# In all environments, the following files are loaded if they exist,
|
||||
# the latter taking precedence over the former:
|
||||
#
|
||||
# * .env contains default values for the environment variables needed by the app
|
||||
# * .env.local uncommitted file with local overrides
|
||||
# * .env.$APP_ENV committed environment-specific defaults
|
||||
# * .env.$APP_ENV.local uncommitted environment-specific overrides
|
||||
#
|
||||
# Real environment variables win over .env files.
|
||||
#
|
||||
# DO NOT DEFINE PRODUCTION SECRETS IN THIS FILE NOR IN ANY OTHER COMMITTED FILES.
|
||||
#
|
||||
# Run "composer dump-env prod" to compile .env files for production use (requires symfony/flex >=1.2).
|
||||
# https://symfony.com/doc/current/best_practices.html#use-environment-variables-for-infrastructure-configuration
|
||||
|
||||
###> symfony/framework-bundle ###
|
||||
APP_ENV=dev
|
||||
APP_SECRET=d6c584c628f4a555632b6e2c1382502a
|
||||
###< symfony/framework-bundle ###
|
||||
|
||||
###> doctrine/doctrine-bundle ###
|
||||
# Format described at https://www.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/configuration.html#connecting-using-a-url
|
||||
# IMPORTANT: You MUST configure your server version, either here or in config/packages/doctrine.yaml
|
||||
#
|
||||
# DATABASE_URL="sqlite:///%kernel.project_dir%/var/data.db"
|
||||
# DATABASE_URL="mysql://db_user:db_password@127.0.0.1:3306/db_name?serverVersion=5.7"
|
||||
DATABASE_URL="postgresql://postgres:secret@db:5432/postgres?serverVersion=12&charset=utf8"
|
||||
###< doctrine/doctrine-bundle ###
|
17
app/.gitignore
vendored
Normal file
17
app/.gitignore
vendored
Normal file
@@ -0,0 +1,17 @@
|
||||
|
||||
###> symfony/framework-bundle ###
|
||||
/.env.local
|
||||
/.env.local.php
|
||||
/.env.*.local
|
||||
/config/secrets/prod/prod.decrypt.private.php
|
||||
/public/bundles/
|
||||
/var/
|
||||
/vendor/
|
||||
###< symfony/framework-bundle ###
|
||||
|
||||
###> symfony/webpack-encore-bundle ###
|
||||
/node_modules/
|
||||
/public/build/
|
||||
npm-debug.log
|
||||
yarn-error.log
|
||||
###< symfony/webpack-encore-bundle ###
|
15
app/assets/app.js
Normal file
15
app/assets/app.js
Normal file
@@ -0,0 +1,15 @@
|
||||
/*
|
||||
* 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';
|
||||
|
||||
// SCSS
|
||||
import './styles/app.scss';
|
||||
|
||||
// start the Stimulus application
|
||||
import './bootstrap';
|
11
app/assets/bootstrap.js
vendored
Normal file
11
app/assets/bootstrap.js
vendored
Normal file
@@ -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,
|
||||
/\.(j|t)sx?$/
|
||||
));
|
||||
|
||||
// register any custom, 3rd party controllers here
|
||||
// app.register('some_controller_name', SomeImportedController);
|
4
app/assets/controllers.json
Normal file
4
app/assets/controllers.json
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"controllers": [],
|
||||
"entrypoints": []
|
||||
}
|
16
app/assets/controllers/hello_controller.js
Normal file
16
app/assets/controllers/hello_controller.js
Normal file
@@ -0,0 +1,16 @@
|
||||
import { Controller } from '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
app/assets/styles/app.css
Normal file
3
app/assets/styles/app.css
Normal file
@@ -0,0 +1,3 @@
|
||||
body {
|
||||
background-color: lightgray;
|
||||
}
|
0
app/assets/styles/app.scss
Normal file
0
app/assets/styles/app.scss
Normal file
43
app/bin/console
Executable file
43
app/bin/console
Executable file
@@ -0,0 +1,43 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
|
||||
use App\Kernel;
|
||||
use Symfony\Bundle\FrameworkBundle\Console\Application;
|
||||
use Symfony\Component\Console\Input\ArgvInput;
|
||||
use Symfony\Component\Dotenv\Dotenv;
|
||||
use Symfony\Component\ErrorHandler\Debug;
|
||||
|
||||
if (!in_array(PHP_SAPI, ['cli', 'phpdbg', 'embed'], true)) {
|
||||
echo 'Warning: The console should be invoked via the CLI version of PHP, not the '.PHP_SAPI.' SAPI'.PHP_EOL;
|
||||
}
|
||||
|
||||
set_time_limit(0);
|
||||
|
||||
require dirname(__DIR__).'/vendor/autoload.php';
|
||||
|
||||
if (!class_exists(Application::class) || !class_exists(Dotenv::class)) {
|
||||
throw new LogicException('You need to add "symfony/framework-bundle" and "symfony/dotenv" as Composer dependencies.');
|
||||
}
|
||||
|
||||
$input = new ArgvInput();
|
||||
if (null !== $env = $input->getParameterOption(['--env', '-e'], null, true)) {
|
||||
putenv('APP_ENV='.$_SERVER['APP_ENV'] = $_ENV['APP_ENV'] = $env);
|
||||
}
|
||||
|
||||
if ($input->hasParameterOption('--no-debug', true)) {
|
||||
putenv('APP_DEBUG='.$_SERVER['APP_DEBUG'] = $_ENV['APP_DEBUG'] = '0');
|
||||
}
|
||||
|
||||
(new Dotenv())->bootEnv(dirname(__DIR__).'/.env');
|
||||
|
||||
if ($_SERVER['APP_DEBUG']) {
|
||||
umask(0000);
|
||||
|
||||
if (class_exists(Debug::class)) {
|
||||
Debug::enable();
|
||||
}
|
||||
}
|
||||
|
||||
$kernel = new Kernel($_SERVER['APP_ENV'], (bool) $_SERVER['APP_DEBUG']);
|
||||
$application = new Application($kernel);
|
||||
$application->run($input);
|
79
app/composer.json
Normal file
79
app/composer.json
Normal file
@@ -0,0 +1,79 @@
|
||||
{
|
||||
"type": "project",
|
||||
"license": "proprietary",
|
||||
"minimum-stability": "dev",
|
||||
"prefer-stable": true,
|
||||
"require": {
|
||||
"php": ">=7.2.5",
|
||||
"ext-ctype": "*",
|
||||
"ext-iconv": "*",
|
||||
"composer/package-versions-deprecated": "1.11.99.1",
|
||||
"doctrine/doctrine-bundle": "^2.3",
|
||||
"doctrine/doctrine-migrations-bundle": "^3.1",
|
||||
"doctrine/orm": "^2.8",
|
||||
"sensio/framework-extra-bundle": "^6.1",
|
||||
"symfony/console": "5.2.*",
|
||||
"symfony/dotenv": "5.2.*",
|
||||
"symfony/flex": "^1.3.1",
|
||||
"symfony/form": "5.2.*",
|
||||
"symfony/framework-bundle": "5.2.*",
|
||||
"symfony/maker-bundle": "^1.30",
|
||||
"symfony/proxy-manager-bridge": "5.2.*",
|
||||
"symfony/security-csrf": "5.2.*",
|
||||
"symfony/twig-bundle": "5.2.*",
|
||||
"symfony/validator": "5.2.*",
|
||||
"symfony/webpack-encore-bundle": "^1.11",
|
||||
"symfony/yaml": "5.2.*",
|
||||
"twig/extra-bundle": "^2.12|^3.0",
|
||||
"twig/twig": "^2.12|^3.0"
|
||||
},
|
||||
"config": {
|
||||
"optimize-autoloader": true,
|
||||
"preferred-install": {
|
||||
"*": "dist"
|
||||
},
|
||||
"sort-packages": true
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"App\\": "src/"
|
||||
}
|
||||
},
|
||||
"autoload-dev": {
|
||||
"psr-4": {
|
||||
"App\\Tests\\": "tests/"
|
||||
}
|
||||
},
|
||||
"replace": {
|
||||
"symfony/polyfill-ctype": "*",
|
||||
"symfony/polyfill-iconv": "*",
|
||||
"symfony/polyfill-php72": "*"
|
||||
},
|
||||
"scripts": {
|
||||
"auto-scripts": {
|
||||
"cache:clear": "symfony-cmd",
|
||||
"assets:install %PUBLIC_DIR%": "symfony-cmd"
|
||||
},
|
||||
"post-install-cmd": [
|
||||
"@auto-scripts"
|
||||
],
|
||||
"post-update-cmd": [
|
||||
"@auto-scripts"
|
||||
]
|
||||
},
|
||||
"conflict": {
|
||||
"symfony/symfony": "*"
|
||||
},
|
||||
"extra": {
|
||||
"symfony": {
|
||||
"allow-contrib": false,
|
||||
"require": "5.2.*"
|
||||
}
|
||||
},
|
||||
"require-dev": {
|
||||
"symfony/debug-bundle": "5.2.*",
|
||||
"symfony/stopwatch": "^5.2",
|
||||
"symfony/var-dumper": "5.2.*",
|
||||
"symfony/web-profiler-bundle": "^5.2"
|
||||
}
|
||||
}
|
6210
app/composer.lock
generated
Normal file
6210
app/composer.lock
generated
Normal file
File diff suppressed because it is too large
Load Diff
14
app/config/bundles.php
Normal file
14
app/config/bundles.php
Normal file
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
Symfony\Bundle\FrameworkBundle\FrameworkBundle::class => ['all' => true],
|
||||
Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle::class => ['all' => true],
|
||||
Symfony\Bundle\MakerBundle\MakerBundle::class => ['dev' => true],
|
||||
Doctrine\Bundle\DoctrineBundle\DoctrineBundle::class => ['all' => true],
|
||||
Doctrine\Bundle\MigrationsBundle\DoctrineMigrationsBundle::class => ['all' => true],
|
||||
Symfony\Bundle\TwigBundle\TwigBundle::class => ['all' => true],
|
||||
Twig\Extra\TwigExtraBundle\TwigExtraBundle::class => ['all' => true],
|
||||
Symfony\Bundle\WebProfilerBundle\WebProfilerBundle::class => ['dev' => true, 'test' => true],
|
||||
Symfony\WebpackEncoreBundle\WebpackEncoreBundle::class => ['all' => true],
|
||||
Symfony\Bundle\DebugBundle\DebugBundle::class => ['dev' => true, 'test' => true],
|
||||
];
|
3
app/config/packages/assets.yaml
Normal file
3
app/config/packages/assets.yaml
Normal file
@@ -0,0 +1,3 @@
|
||||
framework:
|
||||
assets:
|
||||
json_manifest_path: '%kernel.project_dir%/public/build/manifest.json'
|
19
app/config/packages/cache.yaml
Normal file
19
app/config/packages/cache.yaml
Normal file
@@ -0,0 +1,19 @@
|
||||
framework:
|
||||
cache:
|
||||
# Unique name of your app: used to compute stable namespaces for cache keys.
|
||||
#prefix_seed: your_vendor_name/app_name
|
||||
|
||||
# The "app" cache stores to the filesystem by default.
|
||||
# The data in this cache should persist between deploys.
|
||||
# Other options include:
|
||||
|
||||
# Redis
|
||||
#app: cache.adapter.redis
|
||||
#default_redis_provider: redis://localhost
|
||||
|
||||
# APCu (not recommended with heavy random-write workloads as memory fragmentation can cause perf issues)
|
||||
#app: cache.adapter.apcu
|
||||
|
||||
# Namespaced pools use the above "app" backend by default
|
||||
#pools:
|
||||
#my.dedicated.cache: null
|
4
app/config/packages/dev/debug.yaml
Normal file
4
app/config/packages/dev/debug.yaml
Normal file
@@ -0,0 +1,4 @@
|
||||
debug:
|
||||
# Forwards VarDumper Data clones to a centralized server allowing to inspect dumps on CLI or in your browser.
|
||||
# See the "server:dump" command to start a new server.
|
||||
dump_destination: "tcp://%env(VAR_DUMPER_SERVER)%"
|
6
app/config/packages/dev/web_profiler.yaml
Normal file
6
app/config/packages/dev/web_profiler.yaml
Normal file
@@ -0,0 +1,6 @@
|
||||
web_profiler:
|
||||
toolbar: true
|
||||
intercept_redirects: false
|
||||
|
||||
framework:
|
||||
profiler: { only_exceptions: false }
|
19
app/config/packages/doctrine.yaml
Normal file
19
app/config/packages/doctrine.yaml
Normal file
@@ -0,0 +1,19 @@
|
||||
doctrine:
|
||||
dbal:
|
||||
override_url: true
|
||||
url: '%env(resolve:DATABASE_URL)%'
|
||||
|
||||
# IMPORTANT: You MUST configure your server version,
|
||||
# either here or in the DATABASE_URL env var (see .env file)
|
||||
#server_version: '13'
|
||||
orm:
|
||||
auto_generate_proxy_classes: true
|
||||
naming_strategy: doctrine.orm.naming_strategy.underscore_number_aware
|
||||
auto_mapping: true
|
||||
mappings:
|
||||
App:
|
||||
is_bundle: false
|
||||
type: annotation
|
||||
dir: '%kernel.project_dir%/src/Entity'
|
||||
prefix: 'App\Entity'
|
||||
alias: App
|
6
app/config/packages/doctrine_migrations.yaml
Normal file
6
app/config/packages/doctrine_migrations.yaml
Normal file
@@ -0,0 +1,6 @@
|
||||
doctrine_migrations:
|
||||
migrations_paths:
|
||||
# namespace is arbitrary but should be different from App\Migrations
|
||||
# as migrations classes should NOT be autoloaded
|
||||
'DoctrineMigrations': '%kernel.project_dir%/migrations'
|
||||
enable_profiler: '%kernel.debug%'
|
17
app/config/packages/framework.yaml
Normal file
17
app/config/packages/framework.yaml
Normal file
@@ -0,0 +1,17 @@
|
||||
# see https://symfony.com/doc/current/reference/configuration/framework.html
|
||||
framework:
|
||||
secret: '%env(APP_SECRET)%'
|
||||
#csrf_protection: true
|
||||
#http_method_override: true
|
||||
|
||||
# Enables session support. Note that the session will ONLY be started if you read or write from it.
|
||||
# Remove or comment this section to explicitly disable session support.
|
||||
session:
|
||||
handler_id: null
|
||||
cookie_secure: auto
|
||||
cookie_samesite: lax
|
||||
|
||||
#esi: true
|
||||
#fragments: true
|
||||
php_errors:
|
||||
log: true
|
20
app/config/packages/prod/doctrine.yaml
Normal file
20
app/config/packages/prod/doctrine.yaml
Normal file
@@ -0,0 +1,20 @@
|
||||
doctrine:
|
||||
orm:
|
||||
auto_generate_proxy_classes: false
|
||||
metadata_cache_driver:
|
||||
type: pool
|
||||
pool: doctrine.system_cache_pool
|
||||
query_cache_driver:
|
||||
type: pool
|
||||
pool: doctrine.system_cache_pool
|
||||
result_cache_driver:
|
||||
type: pool
|
||||
pool: doctrine.result_cache_pool
|
||||
|
||||
framework:
|
||||
cache:
|
||||
pools:
|
||||
doctrine.result_cache_pool:
|
||||
adapter: cache.app
|
||||
doctrine.system_cache_pool:
|
||||
adapter: cache.system
|
3
app/config/packages/prod/routing.yaml
Normal file
3
app/config/packages/prod/routing.yaml
Normal file
@@ -0,0 +1,3 @@
|
||||
framework:
|
||||
router:
|
||||
strict_requirements: null
|
4
app/config/packages/prod/webpack_encore.yaml
Normal file
4
app/config/packages/prod/webpack_encore.yaml
Normal file
@@ -0,0 +1,4 @@
|
||||
#webpack_encore:
|
||||
# Cache the entrypoints.json (rebuild Symfony's cache when entrypoints.json changes)
|
||||
# Available in version 1.2
|
||||
#cache: true
|
7
app/config/packages/routing.yaml
Normal file
7
app/config/packages/routing.yaml
Normal file
@@ -0,0 +1,7 @@
|
||||
framework:
|
||||
router:
|
||||
utf8: true
|
||||
|
||||
# Configure how to generate URLs in non-HTTP contexts, such as CLI commands.
|
||||
# See https://symfony.com/doc/current/routing.html#generating-urls-in-commands
|
||||
#default_uri: http://localhost
|
3
app/config/packages/sensio_framework_extra.yaml
Normal file
3
app/config/packages/sensio_framework_extra.yaml
Normal file
@@ -0,0 +1,3 @@
|
||||
sensio_framework_extra:
|
||||
router:
|
||||
annotations: false
|
7
app/config/packages/test/doctrine.yaml
Normal file
7
app/config/packages/test/doctrine.yaml
Normal file
@@ -0,0 +1,7 @@
|
||||
#doctrine:
|
||||
# dbal:
|
||||
# # Overrides the database name in the test environment only
|
||||
# # "host", "port", "user", & "password" can also be set to override their respective url parts
|
||||
# #
|
||||
# # If you're using ParaTest, "TEST_TOKEN" is set by ParaTest otherwise nothing is appended to the database name.
|
||||
# dbname: main_test%env(default::TEST_TOKEN)%
|
4
app/config/packages/test/framework.yaml
Normal file
4
app/config/packages/test/framework.yaml
Normal file
@@ -0,0 +1,4 @@
|
||||
framework:
|
||||
test: true
|
||||
session:
|
||||
storage_id: session.storage.mock_file
|
2
app/config/packages/test/twig.yaml
Normal file
2
app/config/packages/test/twig.yaml
Normal file
@@ -0,0 +1,2 @@
|
||||
twig:
|
||||
strict_variables: true
|
3
app/config/packages/test/validator.yaml
Normal file
3
app/config/packages/test/validator.yaml
Normal file
@@ -0,0 +1,3 @@
|
||||
framework:
|
||||
validation:
|
||||
not_compromised_password: false
|
6
app/config/packages/test/web_profiler.yaml
Normal file
6
app/config/packages/test/web_profiler.yaml
Normal file
@@ -0,0 +1,6 @@
|
||||
web_profiler:
|
||||
toolbar: false
|
||||
intercept_redirects: false
|
||||
|
||||
framework:
|
||||
profiler: { collect: false }
|
2
app/config/packages/test/webpack_encore.yaml
Normal file
2
app/config/packages/test/webpack_encore.yaml
Normal file
@@ -0,0 +1,2 @@
|
||||
#webpack_encore:
|
||||
# strict_mode: false
|
2
app/config/packages/twig.yaml
Normal file
2
app/config/packages/twig.yaml
Normal file
@@ -0,0 +1,2 @@
|
||||
twig:
|
||||
default_path: '%kernel.project_dir%/templates'
|
8
app/config/packages/validator.yaml
Normal file
8
app/config/packages/validator.yaml
Normal file
@@ -0,0 +1,8 @@
|
||||
framework:
|
||||
validation:
|
||||
email_validation_mode: html5
|
||||
|
||||
# Enables validator auto-mapping support.
|
||||
# For instance, basic validation constraints will be inferred from Doctrine's metadata.
|
||||
#auto_mapping:
|
||||
# App\Entity\: []
|
30
app/config/packages/webpack_encore.yaml
Normal file
30
app/config/packages/webpack_encore.yaml
Normal file
@@ -0,0 +1,30 @@
|
||||
webpack_encore:
|
||||
# The path where Encore is building the assets - i.e. Encore.setOutputPath()
|
||||
output_path: '%kernel.project_dir%/public/build'
|
||||
# If multiple builds are defined (as shown below), you can disable the default build:
|
||||
# output_path: false
|
||||
|
||||
# Set attributes that will be rendered on all script and link tags
|
||||
script_attributes:
|
||||
defer: true
|
||||
# link_attributes:
|
||||
|
||||
# If using Encore.enableIntegrityHashes() and need the crossorigin attribute (default: false, or use 'anonymous' or 'use-credentials')
|
||||
# crossorigin: 'anonymous'
|
||||
|
||||
# Preload all rendered script and link tags automatically via the HTTP/2 Link header
|
||||
# preload: true
|
||||
|
||||
# Throw an exception if the entrypoints.json file is missing or an entry is missing from the data
|
||||
# strict_mode: false
|
||||
|
||||
# If you have multiple builds:
|
||||
# builds:
|
||||
# pass "frontend" as the 3rg arg to the Twig functions
|
||||
# {{ encore_entry_script_tags('entry1', null, 'frontend') }}
|
||||
|
||||
# frontend: '%kernel.project_dir%/public/frontend/build'
|
||||
|
||||
# Cache the entrypoints.json (rebuild Symfony's cache when entrypoints.json changes)
|
||||
# Put in config/packages/prod/webpack_encore.yaml
|
||||
# cache: true
|
5
app/config/preload.php
Normal file
5
app/config/preload.php
Normal file
@@ -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';
|
||||
}
|
3
app/config/routes.yaml
Normal file
3
app/config/routes.yaml
Normal file
@@ -0,0 +1,3 @@
|
||||
#index:
|
||||
# path: /
|
||||
# controller: App\Controller\DefaultController::index
|
7
app/config/routes/annotations.yaml
Normal file
7
app/config/routes/annotations.yaml
Normal file
@@ -0,0 +1,7 @@
|
||||
controllers:
|
||||
resource: ../../src/Controller/
|
||||
type: annotation
|
||||
|
||||
kernel:
|
||||
resource: ../../src/Kernel.php
|
||||
type: annotation
|
3
app/config/routes/dev/framework.yaml
Normal file
3
app/config/routes/dev/framework.yaml
Normal file
@@ -0,0 +1,3 @@
|
||||
_errors:
|
||||
resource: '@FrameworkBundle/Resources/config/routing/errors.xml'
|
||||
prefix: /_error
|
7
app/config/routes/dev/web_profiler.yaml
Normal file
7
app/config/routes/dev/web_profiler.yaml
Normal file
@@ -0,0 +1,7 @@
|
||||
web_profiler_wdt:
|
||||
resource: '@WebProfilerBundle/Resources/config/routing/wdt.xml'
|
||||
prefix: /_wdt
|
||||
|
||||
web_profiler_profiler:
|
||||
resource: '@WebProfilerBundle/Resources/config/routing/profiler.xml'
|
||||
prefix: /_profiler
|
31
app/config/services.yaml
Normal file
31
app/config/services.yaml
Normal file
@@ -0,0 +1,31 @@
|
||||
# This file is the entry point to configure your own services.
|
||||
# Files in the packages/ subdirectory configure your dependencies.
|
||||
|
||||
# Put parameters here that don't need to change on each machine where the app is deployed
|
||||
# https://symfony.com/doc/current/best_practices/configuration.html#application-related-configuration
|
||||
parameters:
|
||||
|
||||
services:
|
||||
# default configuration for services in *this* file
|
||||
_defaults:
|
||||
autowire: true # Automatically injects dependencies in your services.
|
||||
autoconfigure: true # Automatically registers your services as commands, event subscribers, etc.
|
||||
|
||||
# makes classes in src/ available to be used as services
|
||||
# this creates a service per class whose id is the fully-qualified class name
|
||||
App\:
|
||||
resource: '../src/'
|
||||
exclude:
|
||||
- '../src/DependencyInjection/'
|
||||
- '../src/Entity/'
|
||||
- '../src/Kernel.php'
|
||||
- '../src/Tests/'
|
||||
|
||||
# controllers are imported separately to make sure services can be injected
|
||||
# as action arguments even if you don't extend any base controller class
|
||||
App\Controller\:
|
||||
resource: '../src/Controller/'
|
||||
tags: ['controller.service_arguments']
|
||||
|
||||
# add more service definitions when explicit configuration is needed
|
||||
# please note that last definitions always *replace* previous ones
|
0
app/migrations/.gitignore
vendored
Normal file
0
app/migrations/.gitignore
vendored
Normal file
22
app/package.json
Normal file
22
app/package.json
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"devDependencies": {
|
||||
"@symfony/stimulus-bridge": "^2.0.0",
|
||||
"@symfony/webpack-encore": "^1.0.0",
|
||||
"core-js": "^3.0.0",
|
||||
"regenerator-runtime": "^0.13.2",
|
||||
"stimulus": "^2.0.0",
|
||||
"webpack-notifier": "^1.6.0"
|
||||
},
|
||||
"license": "UNLICENSED",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev-server": "encore dev-server",
|
||||
"dev": "encore dev",
|
||||
"watch": "encore dev --watch",
|
||||
"build": "encore production --progress"
|
||||
},
|
||||
"dependencies": {
|
||||
"sass": "^1.32.10",
|
||||
"sass-loader": "^11.0.1"
|
||||
}
|
||||
}
|
22
app/public/index.php
Normal file
22
app/public/index.php
Normal file
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
use App\Kernel;
|
||||
use Symfony\Component\Dotenv\Dotenv;
|
||||
use Symfony\Component\ErrorHandler\Debug;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
|
||||
require dirname(__DIR__).'/vendor/autoload.php';
|
||||
|
||||
(new Dotenv())->bootEnv(dirname(__DIR__).'/.env');
|
||||
|
||||
if ($_SERVER['APP_DEBUG']) {
|
||||
umask(0000);
|
||||
|
||||
Debug::enable();
|
||||
}
|
||||
|
||||
$kernel = new Kernel($_SERVER['APP_ENV'], (bool) $_SERVER['APP_DEBUG']);
|
||||
$request = Request::createFromGlobals();
|
||||
$response = $kernel->handle($request);
|
||||
$response->send();
|
||||
$kernel->terminate($request, $response);
|
0
app/src/Controller/.gitignore
vendored
Normal file
0
app/src/Controller/.gitignore
vendored
Normal file
0
app/src/Entity/.gitignore
vendored
Normal file
0
app/src/Entity/.gitignore
vendored
Normal file
38
app/src/Kernel.php
Normal file
38
app/src/Kernel.php
Normal file
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
namespace App;
|
||||
|
||||
use Symfony\Bundle\FrameworkBundle\Kernel\MicroKernelTrait;
|
||||
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||
use Symfony\Component\HttpKernel\Kernel as BaseKernel;
|
||||
use Symfony\Component\Routing\Loader\Configurator\RoutingConfigurator;
|
||||
|
||||
class Kernel extends BaseKernel
|
||||
{
|
||||
use MicroKernelTrait;
|
||||
|
||||
protected function configureContainer(ContainerConfigurator $container): void
|
||||
{
|
||||
$container->import('../config/{packages}/*.yaml');
|
||||
$container->import('../config/{packages}/'.$this->environment.'/*.yaml');
|
||||
|
||||
if (is_file(\dirname(__DIR__).'/config/services.yaml')) {
|
||||
$container->import('../config/services.yaml');
|
||||
$container->import('../config/{services}_'.$this->environment.'.yaml');
|
||||
} elseif (is_file($path = \dirname(__DIR__).'/config/services.php')) {
|
||||
(require $path)($container->withPath($path), $this);
|
||||
}
|
||||
}
|
||||
|
||||
protected function configureRoutes(RoutingConfigurator $routes): void
|
||||
{
|
||||
$routes->import('../config/{routes}/'.$this->environment.'/*.yaml');
|
||||
$routes->import('../config/{routes}/*.yaml');
|
||||
|
||||
if (is_file(\dirname(__DIR__).'/config/routes.yaml')) {
|
||||
$routes->import('../config/routes.yaml');
|
||||
} elseif (is_file($path = \dirname(__DIR__).'/config/routes.php')) {
|
||||
(require $path)($routes->withPath($path), $this);
|
||||
}
|
||||
}
|
||||
}
|
0
app/src/Repository/.gitignore
vendored
Normal file
0
app/src/Repository/.gitignore
vendored
Normal file
395
app/symfony.lock
Normal file
395
app/symfony.lock
Normal file
@@ -0,0 +1,395 @@
|
||||
{
|
||||
"composer/package-versions-deprecated": {
|
||||
"version": "1.11.99.1"
|
||||
},
|
||||
"doctrine/annotations": {
|
||||
"version": "1.0",
|
||||
"recipe": {
|
||||
"repo": "github.com/symfony/recipes",
|
||||
"branch": "master",
|
||||
"version": "1.0",
|
||||
"ref": "a2759dd6123694c8d901d0ec80006e044c2e6457"
|
||||
},
|
||||
"files": [
|
||||
"config/routes/annotations.yaml"
|
||||
]
|
||||
},
|
||||
"doctrine/cache": {
|
||||
"version": "1.10.2"
|
||||
},
|
||||
"doctrine/collections": {
|
||||
"version": "1.6.7"
|
||||
},
|
||||
"doctrine/common": {
|
||||
"version": "3.1.2"
|
||||
},
|
||||
"doctrine/dbal": {
|
||||
"version": "2.13.0"
|
||||
},
|
||||
"doctrine/deprecations": {
|
||||
"version": "v0.5.3"
|
||||
},
|
||||
"doctrine/doctrine-bundle": {
|
||||
"version": "2.3",
|
||||
"recipe": {
|
||||
"repo": "github.com/symfony/recipes",
|
||||
"branch": "master",
|
||||
"version": "2.3",
|
||||
"ref": "6e0f582596a8f1c865aaa0d3cceb9bf0daf609b4"
|
||||
},
|
||||
"files": [
|
||||
"config/packages/doctrine.yaml",
|
||||
"config/packages/prod/doctrine.yaml",
|
||||
"config/packages/test/doctrine.yaml",
|
||||
"src/Entity/.gitignore",
|
||||
"src/Repository/.gitignore"
|
||||
]
|
||||
},
|
||||
"doctrine/doctrine-migrations-bundle": {
|
||||
"version": "3.1",
|
||||
"recipe": {
|
||||
"repo": "github.com/symfony/recipes",
|
||||
"branch": "master",
|
||||
"version": "3.1",
|
||||
"ref": "ee609429c9ee23e22d6fa5728211768f51ed2818"
|
||||
},
|
||||
"files": [
|
||||
"config/packages/doctrine_migrations.yaml",
|
||||
"migrations/.gitignore"
|
||||
]
|
||||
},
|
||||
"doctrine/event-manager": {
|
||||
"version": "1.1.1"
|
||||
},
|
||||
"doctrine/inflector": {
|
||||
"version": "2.0.3"
|
||||
},
|
||||
"doctrine/instantiator": {
|
||||
"version": "1.4.0"
|
||||
},
|
||||
"doctrine/lexer": {
|
||||
"version": "1.2.1"
|
||||
},
|
||||
"doctrine/migrations": {
|
||||
"version": "3.1.1"
|
||||
},
|
||||
"doctrine/orm": {
|
||||
"version": "2.8.4"
|
||||
},
|
||||
"doctrine/persistence": {
|
||||
"version": "2.1.0"
|
||||
},
|
||||
"doctrine/sql-formatter": {
|
||||
"version": "1.1.1"
|
||||
},
|
||||
"friendsofphp/proxy-manager-lts": {
|
||||
"version": "v1.0.3"
|
||||
},
|
||||
"laminas/laminas-code": {
|
||||
"version": "3.4.1"
|
||||
},
|
||||
"laminas/laminas-eventmanager": {
|
||||
"version": "3.3.1"
|
||||
},
|
||||
"laminas/laminas-zendframework-bridge": {
|
||||
"version": "1.2.0"
|
||||
},
|
||||
"nikic/php-parser": {
|
||||
"version": "v4.10.4"
|
||||
},
|
||||
"psr/cache": {
|
||||
"version": "1.0.1"
|
||||
},
|
||||
"psr/container": {
|
||||
"version": "1.1.1"
|
||||
},
|
||||
"psr/event-dispatcher": {
|
||||
"version": "1.0.0"
|
||||
},
|
||||
"psr/log": {
|
||||
"version": "1.1.3"
|
||||
},
|
||||
"sensio/framework-extra-bundle": {
|
||||
"version": "5.2",
|
||||
"recipe": {
|
||||
"repo": "github.com/symfony/recipes",
|
||||
"branch": "master",
|
||||
"version": "5.2",
|
||||
"ref": "fb7e19da7f013d0d422fa9bce16f5c510e27609b"
|
||||
},
|
||||
"files": [
|
||||
"config/packages/sensio_framework_extra.yaml"
|
||||
]
|
||||
},
|
||||
"symfony/asset": {
|
||||
"version": "v5.2.4"
|
||||
},
|
||||
"symfony/cache": {
|
||||
"version": "v5.2.6"
|
||||
},
|
||||
"symfony/cache-contracts": {
|
||||
"version": "v2.2.0"
|
||||
},
|
||||
"symfony/config": {
|
||||
"version": "v5.2.4"
|
||||
},
|
||||
"symfony/console": {
|
||||
"version": "5.1",
|
||||
"recipe": {
|
||||
"repo": "github.com/symfony/recipes",
|
||||
"branch": "master",
|
||||
"version": "5.1",
|
||||
"ref": "c6d02bdfba9da13c22157520e32a602dbee8a75c"
|
||||
},
|
||||
"files": [
|
||||
"bin/console"
|
||||
]
|
||||
},
|
||||
"symfony/debug-bundle": {
|
||||
"version": "4.1",
|
||||
"recipe": {
|
||||
"repo": "github.com/symfony/recipes",
|
||||
"branch": "master",
|
||||
"version": "4.1",
|
||||
"ref": "f8863cbad2f2e58c4b65fa1eac892ab189971bea"
|
||||
},
|
||||
"files": [
|
||||
"config/packages/dev/debug.yaml"
|
||||
]
|
||||
},
|
||||
"symfony/dependency-injection": {
|
||||
"version": "v5.2.6"
|
||||
},
|
||||
"symfony/deprecation-contracts": {
|
||||
"version": "v2.2.0"
|
||||
},
|
||||
"symfony/doctrine-bridge": {
|
||||
"version": "v5.2.6"
|
||||
},
|
||||
"symfony/dotenv": {
|
||||
"version": "v5.2.4"
|
||||
},
|
||||
"symfony/error-handler": {
|
||||
"version": "v5.2.6"
|
||||
},
|
||||
"symfony/event-dispatcher": {
|
||||
"version": "v5.2.4"
|
||||
},
|
||||
"symfony/event-dispatcher-contracts": {
|
||||
"version": "v2.2.0"
|
||||
},
|
||||
"symfony/filesystem": {
|
||||
"version": "v5.2.6"
|
||||
},
|
||||
"symfony/finder": {
|
||||
"version": "v5.2.4"
|
||||
},
|
||||
"symfony/flex": {
|
||||
"version": "1.0",
|
||||
"recipe": {
|
||||
"repo": "github.com/symfony/recipes",
|
||||
"branch": "master",
|
||||
"version": "1.0",
|
||||
"ref": "c0eeb50665f0f77226616b6038a9b06c03752d8e"
|
||||
},
|
||||
"files": [
|
||||
".env"
|
||||
]
|
||||
},
|
||||
"symfony/form": {
|
||||
"version": "v5.2.6"
|
||||
},
|
||||
"symfony/framework-bundle": {
|
||||
"version": "5.2",
|
||||
"recipe": {
|
||||
"repo": "github.com/symfony/recipes",
|
||||
"branch": "master",
|
||||
"version": "5.2",
|
||||
"ref": "6ec87563dcc85cd0c48856dcfbfc29610506d250"
|
||||
},
|
||||
"files": [
|
||||
"config/packages/cache.yaml",
|
||||
"config/packages/framework.yaml",
|
||||
"config/packages/test/framework.yaml",
|
||||
"config/preload.php",
|
||||
"config/routes/dev/framework.yaml",
|
||||
"config/services.yaml",
|
||||
"public/index.php",
|
||||
"src/Controller/.gitignore",
|
||||
"src/Kernel.php"
|
||||
]
|
||||
},
|
||||
"symfony/http-client-contracts": {
|
||||
"version": "v2.3.1"
|
||||
},
|
||||
"symfony/http-foundation": {
|
||||
"version": "v5.2.4"
|
||||
},
|
||||
"symfony/http-kernel": {
|
||||
"version": "v5.2.6"
|
||||
},
|
||||
"symfony/intl": {
|
||||
"version": "v5.2.4"
|
||||
},
|
||||
"symfony/maker-bundle": {
|
||||
"version": "1.0",
|
||||
"recipe": {
|
||||
"repo": "github.com/symfony/recipes",
|
||||
"branch": "master",
|
||||
"version": "1.0",
|
||||
"ref": "fadbfe33303a76e25cb63401050439aa9b1a9c7f"
|
||||
}
|
||||
},
|
||||
"symfony/options-resolver": {
|
||||
"version": "v5.2.4"
|
||||
},
|
||||
"symfony/orm-pack": {
|
||||
"version": "v2.1.0"
|
||||
},
|
||||
"symfony/polyfill-intl-grapheme": {
|
||||
"version": "v1.22.1"
|
||||
},
|
||||
"symfony/polyfill-intl-icu": {
|
||||
"version": "v1.22.1"
|
||||
},
|
||||
"symfony/polyfill-intl-normalizer": {
|
||||
"version": "v1.22.1"
|
||||
},
|
||||
"symfony/polyfill-mbstring": {
|
||||
"version": "v1.22.1"
|
||||
},
|
||||
"symfony/polyfill-php73": {
|
||||
"version": "v1.22.1"
|
||||
},
|
||||
"symfony/polyfill-php80": {
|
||||
"version": "v1.22.1"
|
||||
},
|
||||
"symfony/profiler-pack": {
|
||||
"version": "v1.0.5"
|
||||
},
|
||||
"symfony/property-access": {
|
||||
"version": "v5.2.4"
|
||||
},
|
||||
"symfony/property-info": {
|
||||
"version": "v5.2.4"
|
||||
},
|
||||
"symfony/proxy-manager-bridge": {
|
||||
"version": "v5.2.4"
|
||||
},
|
||||
"symfony/routing": {
|
||||
"version": "5.1",
|
||||
"recipe": {
|
||||
"repo": "github.com/symfony/recipes",
|
||||
"branch": "master",
|
||||
"version": "5.1",
|
||||
"ref": "b4f3e7c95e38b606eef467e8a42a8408fc460c43"
|
||||
},
|
||||
"files": [
|
||||
"config/packages/prod/routing.yaml",
|
||||
"config/packages/routing.yaml",
|
||||
"config/routes.yaml"
|
||||
]
|
||||
},
|
||||
"symfony/security-core": {
|
||||
"version": "v5.2.6"
|
||||
},
|
||||
"symfony/security-csrf": {
|
||||
"version": "v5.2.4"
|
||||
},
|
||||
"symfony/service-contracts": {
|
||||
"version": "v2.2.0"
|
||||
},
|
||||
"symfony/stopwatch": {
|
||||
"version": "v5.2.4"
|
||||
},
|
||||
"symfony/string": {
|
||||
"version": "v5.2.6"
|
||||
},
|
||||
"symfony/translation-contracts": {
|
||||
"version": "v2.3.0"
|
||||
},
|
||||
"symfony/twig-bridge": {
|
||||
"version": "v5.2.6"
|
||||
},
|
||||
"symfony/twig-bundle": {
|
||||
"version": "5.0",
|
||||
"recipe": {
|
||||
"repo": "github.com/symfony/recipes",
|
||||
"branch": "master",
|
||||
"version": "5.0",
|
||||
"ref": "fab9149bbaa4d5eca054ed93f9e1b66cc500895d"
|
||||
},
|
||||
"files": [
|
||||
"config/packages/test/twig.yaml",
|
||||
"config/packages/twig.yaml",
|
||||
"templates/base.html.twig"
|
||||
]
|
||||
},
|
||||
"symfony/twig-pack": {
|
||||
"version": "v1.0.1"
|
||||
},
|
||||
"symfony/validator": {
|
||||
"version": "4.3",
|
||||
"recipe": {
|
||||
"repo": "github.com/symfony/recipes",
|
||||
"branch": "master",
|
||||
"version": "4.3",
|
||||
"ref": "d902da3e4952f18d3bf05aab29512eb61cabd869"
|
||||
},
|
||||
"files": [
|
||||
"config/packages/test/validator.yaml",
|
||||
"config/packages/validator.yaml"
|
||||
]
|
||||
},
|
||||
"symfony/var-dumper": {
|
||||
"version": "v5.2.6"
|
||||
},
|
||||
"symfony/var-exporter": {
|
||||
"version": "v5.2.4"
|
||||
},
|
||||
"symfony/web-profiler-bundle": {
|
||||
"version": "3.3",
|
||||
"recipe": {
|
||||
"repo": "github.com/symfony/recipes",
|
||||
"branch": "master",
|
||||
"version": "3.3",
|
||||
"ref": "6bdfa1a95f6b2e677ab985cd1af2eae35d62e0f6"
|
||||
},
|
||||
"files": [
|
||||
"config/packages/dev/web_profiler.yaml",
|
||||
"config/packages/test/web_profiler.yaml",
|
||||
"config/routes/dev/web_profiler.yaml"
|
||||
]
|
||||
},
|
||||
"symfony/webpack-encore-bundle": {
|
||||
"version": "1.9",
|
||||
"recipe": {
|
||||
"repo": "github.com/symfony/recipes",
|
||||
"branch": "master",
|
||||
"version": "1.9",
|
||||
"ref": "9399a0bfc6ee7a0c019f952bca46d6a6045dd451"
|
||||
},
|
||||
"files": [
|
||||
"assets/app.js",
|
||||
"assets/bootstrap.js",
|
||||
"assets/controllers.json",
|
||||
"assets/controllers/hello_controller.js",
|
||||
"assets/styles/app.css",
|
||||
"config/packages/assets.yaml",
|
||||
"config/packages/prod/webpack_encore.yaml",
|
||||
"config/packages/test/webpack_encore.yaml",
|
||||
"config/packages/webpack_encore.yaml",
|
||||
"package.json",
|
||||
"webpack.config.js"
|
||||
]
|
||||
},
|
||||
"symfony/yaml": {
|
||||
"version": "v5.2.5"
|
||||
},
|
||||
"twig/extra-bundle": {
|
||||
"version": "v3.3.0"
|
||||
},
|
||||
"twig/twig": {
|
||||
"version": "v3.3.0"
|
||||
}
|
||||
}
|
19
app/templates/base.html.twig
Normal file
19
app/templates/base.html.twig
Normal file
@@ -0,0 +1,19 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>{% block title %}Welcome!{% endblock %}</title>
|
||||
{# Run `composer require symfony/webpack-encore-bundle`
|
||||
and uncomment the following Encore helpers to start using Symfony UX #}
|
||||
{% block stylesheets %}
|
||||
{#{{ encore_entry_link_tags('app') }}#}
|
||||
{% endblock %}
|
||||
|
||||
{% block javascripts %}
|
||||
{#{{ encore_entry_script_tags('app') }}#}
|
||||
{% endblock %}
|
||||
</head>
|
||||
<body>
|
||||
{% block body %}{% endblock %}
|
||||
</body>
|
||||
</html>
|
75
app/webpack.config.js
Normal file
75
app/webpack.config.js
Normal file
@@ -0,0 +1,75 @@
|
||||
const Encore = require('@symfony/webpack-encore');
|
||||
|
||||
// Manually configure the runtime environment if not already configured yet by the "encore" command.
|
||||
// It's useful when you use tools that rely on webpack.config.js file.
|
||||
if (!Encore.isRuntimeEnvironmentConfigured()) {
|
||||
Encore.configureRuntimeEnvironment(process.env.NODE_ENV || 'dev');
|
||||
}
|
||||
|
||||
Encore
|
||||
// directory where compiled assets will be stored
|
||||
.setOutputPath('public/build/')
|
||||
// public path used by the web server to access the output path
|
||||
.setPublicPath('/build')
|
||||
// only needed for CDN's or sub-directory deploy
|
||||
//.setManifestKeyPrefix('build/')
|
||||
|
||||
/*
|
||||
* ENTRY CONFIG
|
||||
*
|
||||
* Each entry will result in one JavaScript file (e.g. app.js)
|
||||
* and one CSS file (e.g. app.css) if your JavaScript imports CSS.
|
||||
*/
|
||||
.addEntry('app', './assets/app.js')
|
||||
|
||||
// enables the Symfony UX Stimulus bridge (used in assets/bootstrap.js)
|
||||
.enableStimulusBridge('./assets/controllers.json')
|
||||
|
||||
// When enabled, Webpack "splits" your files into smaller pieces for greater optimization.
|
||||
.splitEntryChunks()
|
||||
|
||||
// will require an extra script tag for runtime.js
|
||||
// but, you probably want this, unless you're building a single-page app
|
||||
.enableSingleRuntimeChunk()
|
||||
|
||||
/*
|
||||
* FEATURE CONFIG
|
||||
*
|
||||
* Enable & configure other features below. For a full
|
||||
* list of features, see:
|
||||
* https://symfony.com/doc/current/frontend.html#adding-more-features
|
||||
*/
|
||||
.cleanupOutputBeforeBuild()
|
||||
.enableBuildNotifications()
|
||||
.enableSourceMaps(!Encore.isProduction())
|
||||
// enables hashed filenames (e.g. app.abc123.css)
|
||||
.enableVersioning(Encore.isProduction())
|
||||
|
||||
.configureBabel((config) => {
|
||||
config.plugins.push('@babel/plugin-proposal-class-properties');
|
||||
})
|
||||
|
||||
// enables @babel/preset-env polyfills
|
||||
.configureBabelPresetEnv((config) => {
|
||||
config.useBuiltIns = 'usage';
|
||||
config.corejs = 3;
|
||||
})
|
||||
|
||||
// enables Sass/SCSS support
|
||||
.enableSassLoader()
|
||||
|
||||
// uncomment if you use TypeScript
|
||||
//.enableTypeScriptLoader()
|
||||
|
||||
// uncomment if you use React
|
||||
//.enableReactPreset()
|
||||
|
||||
// uncomment to get integrity="..." attributes on your script & link tags
|
||||
// requires WebpackEncoreBundle 1.4 or higher
|
||||
//.enableIntegrityHashes(Encore.isProduction())
|
||||
|
||||
// uncomment if you're having problems with a jQuery plugin
|
||||
//.autoProvidejQuery()
|
||||
;
|
||||
|
||||
module.exports = Encore.getWebpackConfig();
|
5258
app/yarn.lock
Normal file
5258
app/yarn.lock
Normal file
File diff suppressed because it is too large
Load Diff
23
docker-node.sh
Executable file
23
docker-node.sh
Executable file
@@ -0,0 +1,23 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Ce script permet de lancer node dans un conteneur docker séparé,
|
||||
# afin de disposer des outils comme yarn (paquet npm)
|
||||
|
||||
# exécute toujours dans le répertoire `php`
|
||||
cd $(dirname $0)
|
||||
|
||||
# la commande exécutée dans le conteneur
|
||||
if [ $# -eq 0 ]; then
|
||||
cmd=bash
|
||||
else
|
||||
cmd="${@}"
|
||||
fi
|
||||
|
||||
# le conteneur node monte le dossier de l'application
|
||||
docker run --rm -it \
|
||||
--user "$(id -u):$(id -g)" \
|
||||
--volume "${PWD}/app:/app" \
|
||||
--workdir "/app" \
|
||||
--env "YARN_CACHE_FOLDER=/app/.yarncache" \
|
||||
node:14 ${cmd}
|
||||
|
Reference in New Issue
Block a user