Compare commits
No commits in common. "1518a8f19427f397fe8e354e8716a7eae69c5633" and "f96c46ff9987aa6eda2460b6facbf3175fec590c" have entirely different histories.
1518a8f194
...
f96c46ff99
64 changed files with 1297 additions and 2398 deletions
5
app/.env
5
app/.env
|
@ -4,7 +4,8 @@ APP_SECRET=3a451032bf2c8c9a639dfb642ce825d0
|
|||
###< symfony/framework-bundle ###
|
||||
|
||||
###> doctrine/doctrine-bundle ###
|
||||
# DATABASE_URL="sqlite:///%kernel.project_dir%/var/data.db"
|
||||
DATABASE_URL="mysql://root:empty@127.0.0.1:3306/app?serverVersion=8.0.32&charset=utf8mb4"
|
||||
# DATABASE_URL="mysql://app:!ChangeMe!@127.0.0.1:3306/app?serverVersion=10.11.2-MariaDB&charset=utf8mb4"
|
||||
# DATABASE_URL="postgresql://app:!ChangeMe!@127.0.0.1:5432/app?serverVersion=16&charset=utf8"
|
||||
###< doctrine/doctrine-bundle ###
|
||||
|
||||
TEST_TOKEN=
|
|
@ -1,6 +1,6 @@
|
|||
# define your env variables for the test env here
|
||||
KERNEL_CLASS='App\Kernel'
|
||||
APP_SECRET='$ecretf0rt3st'
|
||||
SYMFONY_DEPRECATIONS_HELPER=999999
|
||||
PANTHER_APP_ENV=panther
|
||||
PANTHER_ERROR_SCREENSHOT_DIR=./var/error-screenshots
|
||||
TEST_TOKEN="_test"
|
|
@ -35,13 +35,6 @@
|
|||
"strict": "error",
|
||||
"array-bracket-newline": "error",
|
||||
"yoda": "error",
|
||||
"@typescript-eslint/array-type": [
|
||||
"error",
|
||||
{
|
||||
"default": "generic"
|
||||
}
|
||||
],
|
||||
"@typescript-eslint/ban-tslint-comment": "off",
|
||||
"@typescript-eslint/no-non-null-assertion": "off"
|
||||
"@typescript-eslint/ban-tslint-comment": "off"
|
||||
}
|
||||
}
|
|
@ -1,3 +0,0 @@
|
|||
*.*
|
||||
!*.css
|
||||
!*.scss
|
|
@ -1,13 +0,0 @@
|
|||
{
|
||||
"extends": "stylelint-config-standard",
|
||||
"plugins": [
|
||||
"stylelint-scss"
|
||||
],
|
||||
"rules": {
|
||||
"custom-property-empty-line-before": null,
|
||||
"declaration-empty-line-before": null,
|
||||
"media-feature-range-notation": null,
|
||||
"import-notation": "string",
|
||||
"scss/no-global-function-names": null
|
||||
}
|
||||
}
|
29
app/Makefile
29
app/Makefile
|
@ -17,7 +17,7 @@ up: ## Starts the Local Instance
|
|||
down: ## Stops the Local Instance
|
||||
ifneq (,$(wildcard ./npm-watch.pid))
|
||||
@printf "${RED}Killing ${YELLOW}Encore${CLEAR}!\n"
|
||||
@- kill $$(cat ./npm-watch.pid)
|
||||
kill $$(cat ./npm-watch.pid)
|
||||
@rm -rf ./npm-watch.pid
|
||||
endif
|
||||
@symfony local:server:stop
|
||||
|
@ -33,12 +33,6 @@ fresh: ## Starts a Fresh Local Instance
|
|||
|
||||
##|——[ Code Quality ]————————————————————————————————————————————————————————————————————|
|
||||
test: ## Runs all Unittests
|
||||
@docker compose up -d
|
||||
@symfony console doctrine:database:drop --if-exists --force --env=test
|
||||
@symfony console doctrine:database:create --env=test
|
||||
@symfony console doctrine:migrations:migrate -n --env=test
|
||||
@symfony console doctrine:fixtures:load -n --env=test
|
||||
@symfony console cache:clear --env=test
|
||||
vendor/bin/phpunit
|
||||
|
||||
analyze: ## Runs Static Code Analysis
|
||||
|
@ -48,39 +42,22 @@ lint: ## Runs the Linters
|
|||
@make lint-php -s
|
||||
@make lint-ts -s
|
||||
@make lint-twig -s
|
||||
@make lint-scss -s
|
||||
|
||||
##|——[ Testing ]—————————————————————————————————————————————————————————————————————————|
|
||||
test-unit: ## Runs the Unit tests
|
||||
vendor/bin/phpunit --testsuite Unit
|
||||
|
||||
test-integration: ## Runs the Integration tests
|
||||
@symfony console doctrine:fixtures:load -n --env=test
|
||||
vendor/bin/phpunit --testsuite Integration
|
||||
|
||||
test-web: ## Runs the Web tests
|
||||
@symfony console doctrine:fixtures:load -n --env=test
|
||||
vendor/bin/phpunit --testsuite Web
|
||||
|
||||
##|——[ Linting ]—————————————————————————————————————————————————————————————————————————|
|
||||
lint-php: ## Runs the PHP Linting
|
||||
vendor/bin/php-cs-fixer fix --allow-risky=yes
|
||||
|
||||
lint-ts: ## Runs the Typescript Linting
|
||||
npm run lint:ts:fix
|
||||
npm run lint:fix
|
||||
|
||||
lint-twig: ## Runs Twig Linting
|
||||
vendor/bin/twig-cs-fixer lint --fix
|
||||
php bin/console lint:twig
|
||||
|
||||
lint-scss: ## Runs Twig Linting
|
||||
npm run lint:scss:fix
|
||||
|
||||
##|——[ Data ]————————————————————————————————————————————————————————————————————————————|
|
||||
db-demo: ## Writes the Demo Data to the Local Instance
|
||||
symfony console doctrine:database:drop --if-exists --force
|
||||
symfony console doctrine:database:create
|
||||
symfony console doctrine:migrations:migrate -n
|
||||
symfony console doctrine:schema:update --force
|
||||
symfony console doctrine:fixtures:load -n
|
||||
symfony console cache:clear
|
||||
|
||||
|
|
|
@ -1,2 +1 @@
|
|||
import '@styles/app.scss';
|
||||
import '@packages/stimulus';
|
||||
import './styles/app.scss';
|
10
app/assets/bootstrap.ts
Normal file
10
app/assets/bootstrap.ts
Normal file
|
@ -0,0 +1,10 @@
|
|||
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);
|
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 '@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';
|
||||
}
|
||||
}
|
|
@ -1,7 +0,0 @@
|
|||
import {Controller} from '@hotwired/stimulus';
|
||||
|
||||
export default class extends Controller {
|
||||
connect(): void {
|
||||
this.element.textContent = 'Hello Stimulus! Edit me in assets/controllers/hello_controller.js';
|
||||
}
|
||||
}
|
|
@ -1,8 +0,0 @@
|
|||
import {startStimulusApp} from '@symfony/stimulus-bridge';
|
||||
import {Application} from '@hotwired/stimulus';
|
||||
|
||||
export const app: Application = startStimulusApp(require.context(
|
||||
'@symfony/stimulus-bridge/lazy-controller-loader!@controllers',
|
||||
true,
|
||||
/\.[jt]sx?$/
|
||||
));
|
|
@ -1,3 +1,3 @@
|
|||
:root {
|
||||
$gitKeep: true;
|
||||
body {
|
||||
background-color: lightgray;
|
||||
}
|
1
app/assets/tsconfig.json
Normal file
1
app/assets/tsconfig.json
Normal file
|
@ -0,0 +1 @@
|
|||
{}
|
|
@ -7,27 +7,26 @@
|
|||
"php": ">=8.1",
|
||||
"ext-ctype": "*",
|
||||
"ext-iconv": "*",
|
||||
"doctrine/doctrine-bundle": "^2.12",
|
||||
"doctrine/doctrine-bundle": "^2.11",
|
||||
"doctrine/doctrine-migrations-bundle": "^3.3",
|
||||
"doctrine/orm": "^3.0",
|
||||
"symfony/asset": "6.4.*",
|
||||
"symfony/console": "6.4.*",
|
||||
"symfony/dotenv": "6.4.*",
|
||||
"symfony/asset": "6.3.*",
|
||||
"symfony/console": "6.3.*",
|
||||
"symfony/dotenv": "6.3.*",
|
||||
"symfony/flex": "^2",
|
||||
"symfony/form": "6.4.*",
|
||||
"symfony/framework-bundle": "6.4.*",
|
||||
"symfony/form": "6.3.*",
|
||||
"symfony/framework-bundle": "6.3.*",
|
||||
"symfony/monolog-bundle": "^3.10",
|
||||
"symfony/runtime": "6.4.*",
|
||||
"symfony/runtime": "6.3.*",
|
||||
"symfony/stimulus-bundle": "^2.12",
|
||||
"symfony/stopwatch": "6.4.*",
|
||||
"symfony/twig-bundle": "6.4.*",
|
||||
"symfony/uid": "6.4.*",
|
||||
"symfony/validator": "6.4.*",
|
||||
"symfony/stopwatch": "6.3.*",
|
||||
"symfony/twig-bundle": "6.3.*",
|
||||
"symfony/uid": "6.3.*",
|
||||
"symfony/validator": "6.3.*",
|
||||
"symfony/webpack-encore-bundle": "^2.1",
|
||||
"symfony/yaml": "6.4.*",
|
||||
"symfony/yaml": "6.3.*",
|
||||
"twig/extra-bundle": "^2.12|^3.0",
|
||||
"twig/twig": "^2.12|^3.0",
|
||||
"webmozart/assert": "*"
|
||||
"twig/twig": "^2.12|^3.0"
|
||||
},
|
||||
"config": {
|
||||
"allow-plugins": {
|
||||
|
@ -45,8 +44,7 @@
|
|||
},
|
||||
"autoload-dev": {
|
||||
"psr-4": {
|
||||
"App\\Tests\\": "tests/",
|
||||
"DoctrineFixtures\\": "fixtures/"
|
||||
"App\\Tests\\": "tests/"
|
||||
}
|
||||
},
|
||||
"replace": {
|
||||
|
@ -76,23 +74,21 @@
|
|||
"extra": {
|
||||
"symfony": {
|
||||
"allow-contrib": false,
|
||||
"require": "6.4.*"
|
||||
"require": "6.3.*"
|
||||
}
|
||||
},
|
||||
"require-dev": {
|
||||
"dama/doctrine-test-bundle": "^8.0",
|
||||
"doctrine/doctrine-fixtures-bundle": "^3.5",
|
||||
"friendsofphp/php-cs-fixer": "^3.49",
|
||||
"phpstan/extension-installer": "^1.3",
|
||||
"phpstan/phpstan": "^1.10",
|
||||
"phpstan/phpstan-phpunit": "^1.3",
|
||||
"phpunit/phpunit": "^9.6",
|
||||
"symfony/browser-kit": "6.4.*",
|
||||
"symfony/css-selector": "6.4.*",
|
||||
"symfony/debug-bundle": "6.4.*",
|
||||
"symfony/browser-kit": "6.3.*",
|
||||
"symfony/css-selector": "6.3.*",
|
||||
"symfony/debug-bundle": "6.3.*",
|
||||
"symfony/phpunit-bridge": "^7.0",
|
||||
"symfony/web-profiler-bundle": "6.4.*",
|
||||
"symplify/config-transformer": "^12.3",
|
||||
"symfony/web-profiler-bundle": "6.3.*",
|
||||
"vincentlanglet/twig-cs-fixer": "^2.4"
|
||||
}
|
||||
}
|
||||
|
|
1788
app/composer.lock
generated
1788
app/composer.lock
generated
File diff suppressed because it is too large
Load diff
|
@ -1,7 +1,5 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
return [
|
||||
Symfony\Bundle\FrameworkBundle\FrameworkBundle::class => ['all' => true],
|
||||
Symfony\WebpackEncoreBundle\WebpackEncoreBundle::class => ['all' => true],
|
||||
|
@ -14,5 +12,4 @@ return [
|
|||
Symfony\Bundle\MonologBundle\MonologBundle::class => ['all' => true],
|
||||
Symfony\Bundle\DebugBundle\DebugBundle::class => ['dev' => true],
|
||||
Doctrine\Bundle\FixturesBundle\DoctrineFixturesBundle::class => ['dev' => true, 'test' => true],
|
||||
DAMA\DoctrineTestBundle\DAMADoctrineTestBundle::class => ['test' => true],
|
||||
];
|
||||
|
|
|
@ -1,11 +0,0 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||
|
||||
return static function (ContainerConfigurator $containerConfigurator): void {
|
||||
$containerConfigurator->extension('framework', [
|
||||
'cache' => null,
|
||||
]);
|
||||
};
|
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
|
|
@ -1,15 +0,0 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||
|
||||
return static function (ContainerConfigurator $containerConfigurator): void {
|
||||
if ($containerConfigurator->env() === 'test') {
|
||||
$containerConfigurator->extension('dama_doctrine_test', [
|
||||
'enable_static_connection' => true,
|
||||
'enable_static_meta_data_cache' => true,
|
||||
'enable_static_query_cache' => true,
|
||||
]);
|
||||
}
|
||||
};
|
|
@ -1,13 +0,0 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||
|
||||
return static function (ContainerConfigurator $containerConfigurator): void {
|
||||
if ($containerConfigurator->env() === 'dev') {
|
||||
$containerConfigurator->extension('debug', [
|
||||
'dump_destination' => 'tcp://%env(VAR_DUMPER_SERVER)%',
|
||||
]);
|
||||
}
|
||||
};
|
5
app/config/packages/debug.yaml
Normal file
5
app/config/packages/debug.yaml
Normal file
|
@ -0,0 +1,5 @@
|
|||
when@dev:
|
||||
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)%"
|
|
@ -1,71 +0,0 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||
|
||||
return static function (ContainerConfigurator $containerConfigurator): void {
|
||||
$containerConfigurator->extension('doctrine', [
|
||||
'dbal' => [
|
||||
'url' => '%env(resolve:DATABASE_URL)%',
|
||||
'profiling_collect_backtrace' => '%kernel.debug%',
|
||||
],
|
||||
'orm' => [
|
||||
'auto_generate_proxy_classes' => true,
|
||||
'enable_lazy_ghost_objects' => true,
|
||||
'report_fields_where_declared' => true,
|
||||
'validate_xml_mapping' => true,
|
||||
'naming_strategy' => 'doctrine.orm.naming_strategy.underscore_number_aware',
|
||||
'auto_mapping' => true,
|
||||
'mappings' => [
|
||||
'App' => [
|
||||
'type' => 'attribute',
|
||||
'is_bundle' => false,
|
||||
'dir' => '%kernel.project_dir%/src',
|
||||
'prefix' => 'App',
|
||||
'alias' => 'App',
|
||||
],
|
||||
],
|
||||
],
|
||||
]);
|
||||
if ($containerConfigurator->env() === 'test') {
|
||||
$containerConfigurator->extension('doctrine', [
|
||||
'dbal' => [
|
||||
'connections' => [
|
||||
'default' => [
|
||||
'dbname_suffix' => '%env(TEST_TOKEN)%',
|
||||
'use_savepoints' => true,
|
||||
],
|
||||
],
|
||||
],
|
||||
]);
|
||||
}
|
||||
if ($containerConfigurator->env() === 'prod') {
|
||||
$containerConfigurator->extension('doctrine', [
|
||||
'orm' => [
|
||||
'auto_generate_proxy_classes' => false,
|
||||
'proxy_dir' => '%kernel.build_dir%/doctrine/orm/Proxies',
|
||||
'query_cache_driver' => [
|
||||
'type' => 'pool',
|
||||
'pool' => 'doctrine.system_cache_pool',
|
||||
],
|
||||
'result_cache_driver' => [
|
||||
'type' => 'pool',
|
||||
'pool' => 'doctrine.result_cache_pool',
|
||||
],
|
||||
],
|
||||
]);
|
||||
$containerConfigurator->extension('framework', [
|
||||
'cache' => [
|
||||
'pools' => [
|
||||
'doctrine.result_cache_pool' => [
|
||||
'adapter' => 'cache.app',
|
||||
],
|
||||
'doctrine.system_cache_pool' => [
|
||||
'adapter' => 'cache.system',
|
||||
],
|
||||
],
|
||||
],
|
||||
]);
|
||||
}
|
||||
};
|
44
app/config/packages/doctrine.yaml
Normal file
44
app/config/packages/doctrine.yaml
Normal file
|
@ -0,0 +1,44 @@
|
|||
doctrine:
|
||||
dbal:
|
||||
url: '%env(resolve:DATABASE_URL)%'
|
||||
profiling_collect_backtrace: '%kernel.debug%'
|
||||
orm:
|
||||
auto_generate_proxy_classes: true
|
||||
enable_lazy_ghost_objects: true
|
||||
report_fields_where_declared: true
|
||||
validate_xml_mapping: true
|
||||
naming_strategy: doctrine.orm.naming_strategy.underscore_number_aware
|
||||
auto_mapping: true
|
||||
mappings:
|
||||
App:
|
||||
type: attribute
|
||||
is_bundle: false
|
||||
dir: '%kernel.project_dir%/src/Entity'
|
||||
prefix: 'App\Entity'
|
||||
alias: App
|
||||
|
||||
when@test:
|
||||
doctrine:
|
||||
dbal:
|
||||
# "TEST_TOKEN" is typically set by ParaTest
|
||||
dbname_suffix: '_test%env(default::TEST_TOKEN)%'
|
||||
|
||||
when@prod:
|
||||
doctrine:
|
||||
orm:
|
||||
auto_generate_proxy_classes: false
|
||||
proxy_dir: '%kernel.build_dir%/doctrine/orm/Proxies'
|
||||
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
|
|
@ -1,14 +0,0 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||
|
||||
return static function (ContainerConfigurator $containerConfigurator): void {
|
||||
$containerConfigurator->extension('doctrine_migrations', [
|
||||
'migrations_paths' => [
|
||||
'DoctrineMigrations' => '%kernel.project_dir%/migrations',
|
||||
],
|
||||
'enable_profiler' => false,
|
||||
]);
|
||||
};
|
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: false
|
|
@ -1,37 +0,0 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||
|
||||
return static function (ContainerConfigurator $containerConfigurator): void {
|
||||
$containerConfigurator->extension('framework', [
|
||||
'secret' => '%env(APP_SECRET)%',
|
||||
'http_method_override' => false,
|
||||
'handle_all_throwables' => true,
|
||||
'session' => [
|
||||
'handler_id' => null,
|
||||
'cookie_secure' => 'auto',
|
||||
'cookie_samesite' => 'lax',
|
||||
'storage_factory_id' => 'session.storage.factory.native',
|
||||
],
|
||||
'php_errors' => [
|
||||
'log' => true,
|
||||
],
|
||||
]);
|
||||
if ($containerConfigurator->env() === 'test') {
|
||||
$containerConfigurator->extension('framework', [
|
||||
'test' => true,
|
||||
'session' => [
|
||||
'storage_factory_id' => 'session.storage.factory.mock_file',
|
||||
],
|
||||
]);
|
||||
}
|
||||
if ($containerConfigurator->env() === 'prod') {
|
||||
$containerConfigurator->extension('framework', [
|
||||
'session' => [
|
||||
'handler_id' => 'file://%kernel_project_dir%/var/sessions',
|
||||
],
|
||||
]);
|
||||
}
|
||||
};
|
25
app/config/packages/framework.yaml
Normal file
25
app/config/packages/framework.yaml
Normal file
|
@ -0,0 +1,25 @@
|
|||
# see https://symfony.com/doc/current/reference/configuration/framework.html
|
||||
framework:
|
||||
secret: '%env(APP_SECRET)%'
|
||||
#csrf_protection: true
|
||||
http_method_override: false
|
||||
handle_all_throwables: 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
|
||||
storage_factory_id: session.storage.factory.native
|
||||
|
||||
#esi: true
|
||||
#fragments: true
|
||||
php_errors:
|
||||
log: true
|
||||
|
||||
when@test:
|
||||
framework:
|
||||
test: true
|
||||
session:
|
||||
storage_factory_id: session.storage.factory.mock_file
|
|
@ -1,96 +0,0 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||
|
||||
return static function (ContainerConfigurator $containerConfigurator): void {
|
||||
$containerConfigurator->extension('monolog', [
|
||||
'channels' => [
|
||||
'deprecation',
|
||||
],
|
||||
]);
|
||||
if ($containerConfigurator->env() === 'dev') {
|
||||
$containerConfigurator->extension('monolog', [
|
||||
'handlers' => [
|
||||
'main' => [
|
||||
'type' => 'stream',
|
||||
'path' => '%kernel.logs_dir%/%kernel.environment%.log',
|
||||
'level' => 'debug',
|
||||
'channels' => [
|
||||
'!event',
|
||||
],
|
||||
],
|
||||
'console' => [
|
||||
'type' => 'console',
|
||||
'process_psr_3_messages' => false,
|
||||
'channels' => [
|
||||
'!event',
|
||||
'!doctrine',
|
||||
'!console',
|
||||
],
|
||||
],
|
||||
],
|
||||
]);
|
||||
}
|
||||
if ($containerConfigurator->env() === 'test') {
|
||||
$containerConfigurator->extension('monolog', [
|
||||
'handlers' => [
|
||||
'main' => [
|
||||
'type' => 'fingers_crossed',
|
||||
'action_level' => 'error',
|
||||
'handler' => 'nested',
|
||||
'excluded_http_codes' => [
|
||||
404,
|
||||
405,
|
||||
],
|
||||
'channels' => [
|
||||
'!event',
|
||||
],
|
||||
],
|
||||
'nested' => [
|
||||
'type' => 'stream',
|
||||
'path' => '%kernel.logs_dir%/%kernel.environment%.log',
|
||||
'level' => 'debug',
|
||||
],
|
||||
],
|
||||
]);
|
||||
}
|
||||
if ($containerConfigurator->env() === 'prod') {
|
||||
$containerConfigurator->extension('monolog', [
|
||||
'handlers' => [
|
||||
'main' => [
|
||||
'type' => 'fingers_crossed',
|
||||
'action_level' => 'error',
|
||||
'handler' => 'nested',
|
||||
'excluded_http_codes' => [
|
||||
404,
|
||||
405,
|
||||
],
|
||||
'buffer_size' => 50,
|
||||
],
|
||||
'nested' => [
|
||||
'type' => 'stream',
|
||||
'path' => '%kernel.logs_dir%/%kernel.environment%.log',
|
||||
'level' => 'debug',
|
||||
'formatter' => 'monolog.formatter.json',
|
||||
],
|
||||
'console' => [
|
||||
'type' => 'console',
|
||||
'process_psr_3_messages' => false,
|
||||
'channels' => [
|
||||
'!event',
|
||||
'!doctrine',
|
||||
],
|
||||
],
|
||||
'deprecation' => [
|
||||
'type' => 'stream',
|
||||
'channels' => [
|
||||
'deprecation',
|
||||
],
|
||||
'path' => '%kernel.logs_dir%/%kernel.environment%.log',
|
||||
],
|
||||
],
|
||||
]);
|
||||
}
|
||||
};
|
62
app/config/packages/monolog.yaml
Normal file
62
app/config/packages/monolog.yaml
Normal file
|
@ -0,0 +1,62 @@
|
|||
monolog:
|
||||
channels:
|
||||
- deprecation # Deprecations are logged in the dedicated "deprecation" channel when it exists
|
||||
|
||||
when@dev:
|
||||
monolog:
|
||||
handlers:
|
||||
main:
|
||||
type: stream
|
||||
path: "%kernel.logs_dir%/%kernel.environment%.log"
|
||||
level: debug
|
||||
channels: ["!event"]
|
||||
# uncomment to get logging in your browser
|
||||
# you may have to allow bigger header sizes in your Web server configuration
|
||||
#firephp:
|
||||
# type: firephp
|
||||
# level: info
|
||||
#chromephp:
|
||||
# type: chromephp
|
||||
# level: info
|
||||
console:
|
||||
type: console
|
||||
process_psr_3_messages: false
|
||||
channels: ["!event", "!doctrine", "!console"]
|
||||
|
||||
when@test:
|
||||
monolog:
|
||||
handlers:
|
||||
main:
|
||||
type: fingers_crossed
|
||||
action_level: error
|
||||
handler: nested
|
||||
excluded_http_codes: [404, 405]
|
||||
channels: ["!event"]
|
||||
nested:
|
||||
type: stream
|
||||
path: "%kernel.logs_dir%/%kernel.environment%.log"
|
||||
level: debug
|
||||
|
||||
when@prod:
|
||||
monolog:
|
||||
handlers:
|
||||
main:
|
||||
type: fingers_crossed
|
||||
action_level: error
|
||||
handler: nested
|
||||
excluded_http_codes: [404, 405]
|
||||
buffer_size: 50 # How many messages should be saved? Prevent memory leaks
|
||||
nested:
|
||||
type: stream
|
||||
path: php://stderr
|
||||
level: debug
|
||||
formatter: monolog.formatter.json
|
||||
console:
|
||||
type: console
|
||||
process_psr_3_messages: false
|
||||
channels: ["!event", "!doctrine"]
|
||||
deprecation:
|
||||
type: stream
|
||||
channels: [deprecation]
|
||||
path: php://stderr
|
||||
formatter: monolog.formatter.json
|
|
@ -1,20 +0,0 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||
|
||||
return static function (ContainerConfigurator $containerConfigurator): void {
|
||||
$containerConfigurator->extension('framework', [
|
||||
'router' => [
|
||||
'utf8' => true,
|
||||
],
|
||||
]);
|
||||
if ($containerConfigurator->env() === 'prod') {
|
||||
$containerConfigurator->extension('framework', [
|
||||
'router' => [
|
||||
'strict_requirements' => null,
|
||||
],
|
||||
]);
|
||||
}
|
||||
};
|
12
app/config/packages/routing.yaml
Normal file
12
app/config/packages/routing.yaml
Normal file
|
@ -0,0 +1,12 @@
|
|||
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
|
||||
|
||||
when@prod:
|
||||
framework:
|
||||
router:
|
||||
strict_requirements: null
|
|
@ -1,16 +0,0 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||
|
||||
return static function (ContainerConfigurator $containerConfigurator): void {
|
||||
$containerConfigurator->extension('twig', [
|
||||
'default_path' => '%kernel.project_dir%/templates',
|
||||
]);
|
||||
if ($containerConfigurator->env() === 'test') {
|
||||
$containerConfigurator->extension('twig', [
|
||||
'strict_variables' => true,
|
||||
]);
|
||||
}
|
||||
};
|
6
app/config/packages/twig.yaml
Normal file
6
app/config/packages/twig.yaml
Normal file
|
@ -0,0 +1,6 @@
|
|||
twig:
|
||||
default_path: '%kernel.project_dir%/templates'
|
||||
|
||||
when@test:
|
||||
twig:
|
||||
strict_variables: true
|
|
@ -1,14 +0,0 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||
|
||||
return static function (ContainerConfigurator $containerConfigurator): void {
|
||||
$containerConfigurator->extension('framework', [
|
||||
'uid' => [
|
||||
'default_uuid_version' => 7,
|
||||
'time_based_uuid_version' => 7,
|
||||
],
|
||||
]);
|
||||
};
|
4
app/config/packages/uid.yaml
Normal file
4
app/config/packages/uid.yaml
Normal file
|
@ -0,0 +1,4 @@
|
|||
framework:
|
||||
uid:
|
||||
default_uuid_version: 7
|
||||
time_based_uuid_version: 7
|
|
@ -1,20 +0,0 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||
|
||||
return static function (ContainerConfigurator $containerConfigurator): void {
|
||||
$containerConfigurator->extension('framework', [
|
||||
'validation' => [
|
||||
'email_validation_mode' => 'html5',
|
||||
],
|
||||
]);
|
||||
if ($containerConfigurator->env() === 'test') {
|
||||
$containerConfigurator->extension('framework', [
|
||||
'validation' => [
|
||||
'not_compromised_password' => false,
|
||||
],
|
||||
]);
|
||||
}
|
||||
};
|
13
app/config/packages/validator.yaml
Normal file
13
app/config/packages/validator.yaml
Normal file
|
@ -0,0 +1,13 @@
|
|||
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\: []
|
||||
|
||||
when@test:
|
||||
framework:
|
||||
validation:
|
||||
not_compromised_password: false
|
|
@ -1,31 +0,0 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||
|
||||
return static function (ContainerConfigurator $containerConfigurator): void {
|
||||
if ($containerConfigurator->env() === 'dev') {
|
||||
$containerConfigurator->extension('web_profiler', [
|
||||
'toolbar' => true,
|
||||
'intercept_redirects' => false,
|
||||
]);
|
||||
$containerConfigurator->extension('framework', [
|
||||
'profiler' => [
|
||||
'only_exceptions' => false,
|
||||
'collect_serializer_data' => true,
|
||||
],
|
||||
]);
|
||||
}
|
||||
if ($containerConfigurator->env() === 'test') {
|
||||
$containerConfigurator->extension('web_profiler', [
|
||||
'toolbar' => false,
|
||||
'intercept_redirects' => false,
|
||||
]);
|
||||
$containerConfigurator->extension('framework', [
|
||||
'profiler' => [
|
||||
'collect' => false,
|
||||
],
|
||||
]);
|
||||
}
|
||||
};
|
17
app/config/packages/web_profiler.yaml
Normal file
17
app/config/packages/web_profiler.yaml
Normal file
|
@ -0,0 +1,17 @@
|
|||
when@dev:
|
||||
web_profiler:
|
||||
toolbar: true
|
||||
intercept_redirects: false
|
||||
|
||||
framework:
|
||||
profiler:
|
||||
only_exceptions: false
|
||||
collect_serializer_data: true
|
||||
|
||||
when@test:
|
||||
web_profiler:
|
||||
toolbar: false
|
||||
intercept_redirects: false
|
||||
|
||||
framework:
|
||||
profiler: { collect: false }
|
|
@ -1,20 +0,0 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||
|
||||
return static function (ContainerConfigurator $containerConfigurator): void {
|
||||
$containerConfigurator->extension('webpack_encore', [
|
||||
'output_path' => '%kernel.project_dir%/public/build',
|
||||
'script_attributes' => [
|
||||
'defer' => true,
|
||||
],
|
||||
]);
|
||||
|
||||
$containerConfigurator->extension('framework', [
|
||||
'assets' => [
|
||||
'json_manifest_path' => '%kernel.project_dir%/public/build/manifest.json',
|
||||
],
|
||||
]);
|
||||
};
|
45
app/config/packages/webpack_encore.yaml
Normal file
45
app/config/packages/webpack_encore.yaml
Normal file
|
@ -0,0 +1,45 @@
|
|||
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
|
||||
# Uncomment (also under link_attributes) if using Turbo Drive
|
||||
# https://turbo.hotwired.dev/handbook/drive#reloading-when-assets-change
|
||||
# 'data-turbo-track': reload
|
||||
# link_attributes:
|
||||
# Uncomment if using Turbo Drive
|
||||
# 'data-turbo-track': reload
|
||||
|
||||
# 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:
|
||||
# frontend: '%kernel.project_dir%/public/frontend/build'
|
||||
|
||||
# pass the build name as the 3rd argument to the Twig functions
|
||||
# {{ encore_entry_script_tags('entry1', null, 'frontend') }}
|
||||
|
||||
framework:
|
||||
assets:
|
||||
json_manifest_path: '%kernel.project_dir%/public/build/manifest.json'
|
||||
|
||||
#when@prod:
|
||||
# webpack_encore:
|
||||
# # Cache the entrypoints.json (rebuild Symfony's cache when entrypoints.json changes)
|
||||
# # Available in version 1.2
|
||||
# cache: true
|
||||
|
||||
#when@test:
|
||||
# webpack_encore:
|
||||
# strict_mode: false
|
|
@ -1,7 +1,5 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
if (file_exists(dirname(__DIR__).'/var/cache/prod/App_KernelProdContainer.preload.php')) {
|
||||
require dirname(__DIR__).'/var/cache/prod/App_KernelProdContainer.preload.php';
|
||||
}
|
||||
|
|
|
@ -1,9 +0,0 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
use Symfony\Component\Routing\Loader\Configurator\RoutingConfigurator;
|
||||
|
||||
return function (RoutingConfigurator $routes): void {
|
||||
$routes->import('../src/*', 'attribute');
|
||||
};
|
5
app/config/routes.yaml
Normal file
5
app/config/routes.yaml
Normal file
|
@ -0,0 +1,5 @@
|
|||
controllers:
|
||||
resource:
|
||||
path: ../src/Controller/
|
||||
namespace: App\Controller
|
||||
type: attribute
|
|
@ -1,13 +0,0 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
use Symfony\Component\Routing\Loader\Configurator\RoutingConfigurator;
|
||||
|
||||
return static function (RoutingConfigurator $routingConfigurator): void {
|
||||
if ($routingConfigurator->env() === 'dev') {
|
||||
$routingConfigurator->import('@FrameworkBundle/Resources/config/routing/errors.xml')
|
||||
->prefix('/_error')
|
||||
;
|
||||
}
|
||||
};
|
4
app/config/routes/framework.yaml
Normal file
4
app/config/routes/framework.yaml
Normal file
|
@ -0,0 +1,4 @@
|
|||
when@dev:
|
||||
_errors:
|
||||
resource: '@FrameworkBundle/Resources/config/routing/errors.xml'
|
||||
prefix: /_error
|
|
@ -1,16 +0,0 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
use Symfony\Component\Routing\Loader\Configurator\RoutingConfigurator;
|
||||
|
||||
return static function (RoutingConfigurator $routingConfigurator): void {
|
||||
if ($routingConfigurator->env() === 'dev') {
|
||||
$routingConfigurator->import('@WebProfilerBundle/Resources/config/routing/wdt.xml')
|
||||
->prefix('/_wdt')
|
||||
;
|
||||
$routingConfigurator->import('@WebProfilerBundle/Resources/config/routing/profiler.xml')
|
||||
->prefix('/_profiler')
|
||||
;
|
||||
}
|
||||
};
|
8
app/config/routes/web_profiler.yaml
Normal file
8
app/config/routes/web_profiler.yaml
Normal file
|
@ -0,0 +1,8 @@
|
|||
when@dev:
|
||||
web_profiler_wdt:
|
||||
resource: '@WebProfilerBundle/Resources/config/routing/wdt.xml'
|
||||
prefix: /_wdt
|
||||
|
||||
web_profiler_profiler:
|
||||
resource: '@WebProfilerBundle/Resources/config/routing/profiler.xml'
|
||||
prefix: /_profiler
|
|
@ -1,18 +0,0 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||
|
||||
return function (ContainerConfigurator $container): void {
|
||||
$services = $container->services()
|
||||
->defaults()
|
||||
->autowire()
|
||||
->autoconfigure()
|
||||
;
|
||||
|
||||
$services
|
||||
->load('App\\', '../src/')
|
||||
->exclude('../src/{DependencyInjection,Entity,Kernel.php}')
|
||||
;
|
||||
};
|
24
app/config/services.yaml
Normal file
24
app/config/services.yaml
Normal file
|
@ -0,0 +1,24 @@
|
|||
# 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.html#use-parameters-for-application-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'
|
||||
|
||||
# add more service definitions when explicit configuration is needed
|
||||
# please note that last definitions always *replace* previous ones
|
|
@ -1,15 +0,0 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||
|
||||
return function (ContainerConfigurator $container): void {
|
||||
$services = $container->services()
|
||||
->defaults()
|
||||
->autowire()
|
||||
->autoconfigure()
|
||||
;
|
||||
|
||||
$services->load('DoctrineFixtures\\', '../fixtures');
|
||||
};
|
|
@ -1,15 +0,0 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
|
||||
|
||||
return function (ContainerConfigurator $container): void {
|
||||
$services = $container->services()
|
||||
->defaults()
|
||||
->autowire()
|
||||
->autoconfigure()
|
||||
;
|
||||
|
||||
$services->load('DoctrineFixtures\\', '../fixtures');
|
||||
};
|
835
app/package-lock.json
generated
835
app/package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
@ -15,8 +15,6 @@
|
|||
"regenerator-runtime": "^0.13.9",
|
||||
"sass": "^1.69.5",
|
||||
"sass-loader": "^13.3.2",
|
||||
"stylelint": "^16.3.1",
|
||||
"stylelint-config-standard-scss": "^13.1.0",
|
||||
"ts-loader": "^9.5.0",
|
||||
"typescript": "^5.2.2",
|
||||
"webpack": "^5.74.0",
|
||||
|
@ -26,20 +24,14 @@
|
|||
"license": "UNLICENSED",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev-server": "encore dev-server",
|
||||
"dev": "encore dev",
|
||||
"h": "encore --help",
|
||||
"dev:server": "encore dev-server",
|
||||
"watch": "encore dev --watch",
|
||||
"build": "encore production --progress",
|
||||
"lint:ts": "eslint assets",
|
||||
"lint:ts:fix": "eslint assets --fix",
|
||||
"lint:scss": "stylelint assets",
|
||||
"lint:scss:fix": "stylelint assets --fix"
|
||||
"lint": "eslint assets",
|
||||
"lint:fix": "eslint assets --fix"
|
||||
},
|
||||
"volta": {
|
||||
"node": "20.9.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"tsconfig-paths-webpack-plugin": "^4.1.0"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,2 +0,0 @@
|
|||
xdebug.mode = debug
|
||||
xdebug.start_with_request = trigger
|
|
@ -18,25 +18,15 @@
|
|||
</php>
|
||||
|
||||
<testsuites>
|
||||
<testsuite name="Unit">
|
||||
<directory>tests/Unit</directory>
|
||||
</testsuite>
|
||||
<testsuite name="Integration">
|
||||
<directory>tests/Integration</directory>
|
||||
</testsuite>
|
||||
<testsuite name="Web">
|
||||
<directory>tests/Web</directory>
|
||||
<testsuite name="Project Test Suite">
|
||||
<directory>tests</directory>
|
||||
</testsuite>
|
||||
</testsuites>
|
||||
|
||||
tests
|
||||
<coverage processUncoveredFiles="true">
|
||||
<include>
|
||||
<directory suffix=".php">src</directory>
|
||||
</include>
|
||||
<exclude>
|
||||
<directory suffix="Entity.php">src</directory>
|
||||
<directory suffix="Fixtures.php">fixtures</directory>
|
||||
</exclude>
|
||||
</coverage>
|
||||
|
||||
<listeners>
|
||||
|
@ -44,6 +34,5 @@
|
|||
</listeners>
|
||||
|
||||
<extensions>
|
||||
<extension class="DAMA\DoctrineTestBundle\PHPUnit\PHPUnitExtension"/>
|
||||
</extensions>
|
||||
</phpunit>
|
19
app/src/DataFixtures/AppFixtures.php
Normal file
19
app/src/DataFixtures/AppFixtures.php
Normal file
|
@ -0,0 +1,19 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\DataFixtures;
|
||||
|
||||
use Doctrine\Bundle\FixturesBundle\Fixture;
|
||||
use Doctrine\Persistence\ObjectManager;
|
||||
|
||||
class AppFixtures extends Fixture
|
||||
{
|
||||
public function load(ObjectManager $manager): void
|
||||
{
|
||||
// $product = new Product();
|
||||
// $manager->persist($product);
|
||||
|
||||
$manager->flush();
|
||||
}
|
||||
}
|
|
@ -1,16 +1,4 @@
|
|||
{
|
||||
"dama/doctrine-test-bundle": {
|
||||
"version": "8.0",
|
||||
"recipe": {
|
||||
"repo": "github.com/symfony/recipes-contrib",
|
||||
"branch": "main",
|
||||
"version": "7.2",
|
||||
"ref": "896306d79d4ee143af9eadf9b09fd34a8c391b70"
|
||||
},
|
||||
"files": [
|
||||
"config/packages/dama_doctrine_test_bundle.yaml"
|
||||
]
|
||||
},
|
||||
"doctrine/doctrine-bundle": {
|
||||
"version": "2.11",
|
||||
"recipe": {
|
||||
|
@ -194,7 +182,7 @@
|
|||
"files": [
|
||||
"assets/bootstrap.js",
|
||||
"assets/controllers.json",
|
||||
"assets/controllers/hello_controller.ts"
|
||||
"assets/controllers/hello_controller.js"
|
||||
]
|
||||
},
|
||||
"symfony/twig-bundle": {
|
||||
|
|
|
@ -7,16 +7,9 @@
|
|||
"noImplicitAny": true,
|
||||
"strict": true,
|
||||
"allowSyntheticDefaultImports": true,
|
||||
"esModuleInterop": true,
|
||||
"baseUrl": "./",
|
||||
"paths": {
|
||||
"@src/*": ["./*"],
|
||||
"@packages/*": ["./packages/*"],
|
||||
"@controllers/*": ["./controllers/*"],
|
||||
"@styles/*": ["./styles/*"],
|
||||
}
|
||||
"esModuleInterop": true
|
||||
},
|
||||
"files": [
|
||||
".assets/**/*.ts"
|
||||
"assets"
|
||||
]
|
||||
}
|
|
@ -1,41 +1,76 @@
|
|||
|
||||
const Encore = require('@symfony/webpack-encore');
|
||||
const path = require('path');
|
||||
const TsconfigPathsPlugin = require('tsconfig-paths-webpack-plugin');
|
||||
|
||||
// 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');
|
||||
}
|
||||
|
||||
const ROOT_PATH = path.resolve(__dirname, './');
|
||||
const ASSETS_PATH = ROOT_PATH + '/assets';
|
||||
|
||||
const ALIASES = {
|
||||
'@src' : ASSETS_PATH,
|
||||
'@packages' : ASSETS_PATH + '/packages',
|
||||
'@controllers' : ASSETS_PATH + '/controllers',
|
||||
'@styles' : ASSETS_PATH + '/styles'
|
||||
};
|
||||
|
||||
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')
|
||||
.addAliases(ALIASES)
|
||||
// only needed for CDN's or subdirectory 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.ts')
|
||||
.enableStimulusBridge('./assets/controllers.json')
|
||||
|
||||
// When enabled, Webpack "splits" your files into smaller pieces for greater optimization.
|
||||
.splitEntryChunks()
|
||||
|
||||
// enables the Symfony UX Stimulus bridge (used in assets/bootstrap.js)
|
||||
.enableStimulusBridge('./assets/controllers.json')
|
||||
|
||||
// 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())
|
||||
|
||||
// configure Babel
|
||||
// .configureBabel((config) => {
|
||||
// config.plugins.push('@babel/a-babel-plugin');
|
||||
// })
|
||||
|
||||
// enables and configure @babel/preset-env polyfills
|
||||
.configureBabelPresetEnv((config) => {
|
||||
config.useBuiltIns = 'usage';
|
||||
config.corejs = '3.23';
|
||||
})
|
||||
|
||||
// enables Sass/SCSS support
|
||||
.enableSassLoader()
|
||||
|
||||
// uncomment if you use TypeScript
|
||||
.enableTypeScriptLoader()
|
||||
.enableForkedTypeScriptTypesChecking()
|
||||
|
||||
// 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();
|
||||
|
|
Loading…
Reference in a new issue