update to userland base
This commit is contained in:
parent
85e3a6abdc
commit
a6c6a808f2
10
.env.example
10
.env.example
|
@ -25,7 +25,7 @@ APP_SECRET=ef29ce868e1edbcdca03e977a23dce9c
|
|||
# ###############################
|
||||
# DATABASE_URL="sqlite:///%kernel.project_dir%/var/data.db"
|
||||
# si la db mysql
|
||||
DATABASE_URL="mysql://demoland:plopplop01@127.0.0.1:3306/tykayn?serverVersion=8&charset=utf8mb4"
|
||||
DATABASE_URL="mysql://demoland:plopplop01@127.0.0.1:3306/app?serverVersion=8&charset=utf8mb4"
|
||||
|
||||
# si la db est postgresql
|
||||
#DATABASE_URL="postgresql://app:!ChangeMe!@127.0.0.1:5432/app?serverVersion=16&charset=utf8"
|
||||
|
@ -39,11 +39,5 @@ MESSENGER_TRANSPORT_DSN=doctrine://default?auto_setup=0
|
|||
###< symfony/messenger ###
|
||||
|
||||
###> symfony/mailer ###
|
||||
MAILER_DSN=null://null
|
||||
# MAILER_DSN=null://null
|
||||
###< symfony/mailer ###
|
||||
|
||||
###> symfony/lock ###
|
||||
# Choose one of the stores below
|
||||
# postgresql+advisory://db_user:db_password@localhost/db_name
|
||||
LOCK_DSN=flock
|
||||
###< symfony/lock ###
|
||||
|
|
|
@ -0,0 +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
|
|
@ -1,11 +1,31 @@
|
|||
/node_modules/
|
||||
|
||||
###> symfony/framework-bundle ###
|
||||
/.env
|
||||
/vendor/*
|
||||
/var/cache/dev/
|
||||
/var/log/
|
||||
/.env.local.php
|
||||
/.env.*.local
|
||||
/config/secrets/prod/prod.decrypt.private.php
|
||||
/public/bundles/
|
||||
/var/
|
||||
/vendor/
|
||||
###< symfony/framework-bundle ###
|
||||
|
||||
###> phpunit/phpunit ###
|
||||
/phpunit.xml
|
||||
.phpunit.result.cache
|
||||
###< phpunit/phpunit ###
|
||||
|
||||
###> symfony/phpunit-bridge ###
|
||||
.phpunit.result.cache
|
||||
/phpunit.xml
|
||||
###< symfony/phpunit-bridge ###
|
||||
|
||||
###> phpstan/phpstan ###
|
||||
phpstan.neon
|
||||
###< phpstan/phpstan ###
|
||||
public/bundles/
|
||||
public/build/
|
||||
|
||||
###> symfony/webpack-encore-bundle ###
|
||||
/node_modules/
|
||||
/public/build/
|
||||
npm-debug.log
|
||||
yarn-error.log
|
||||
###< symfony/webpack-encore-bundle ###
|
||||
|
|
1427
.idea/workspace.xml
1427
.idea/workspace.xml
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,23 @@
|
|||
/*
|
||||
* 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.scss';
|
||||
|
||||
// start the Stimulus application
|
||||
import './bootstrap';
|
||||
|
||||
export default {
|
||||
name: 'App',
|
||||
render() {
|
||||
return (
|
||||
<div>
|
||||
Appli VueJS
|
||||
</div>
|
||||
)
|
||||
}
|
||||
}
|
|
@ -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);
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"controllers": [],
|
||||
"entrypoints": []
|
||||
}
|
|
@ -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';
|
||||
}
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
#account_main{
|
||||
display: flex;
|
||||
#account_nav{
|
||||
width: 20rem;
|
||||
padding: 1rem;
|
||||
ul{
|
||||
list-style-type: none;
|
||||
margin-right: 1rem;
|
||||
li{
|
||||
margin-bottom: 0.25rem;
|
||||
a{
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
#account_main_content{
|
||||
width: 30rem;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,29 @@
|
|||
.clickable{
|
||||
cursor:pointer;
|
||||
}
|
||||
a{
|
||||
@extend .clickable;
|
||||
padding: 0.5rem 1rem;
|
||||
display: inline-block;
|
||||
color: $primary_color;
|
||||
text-decoration: none;
|
||||
border: solid 1px $bg_color;
|
||||
&:hover{
|
||||
color: $primary_color_darker;
|
||||
}
|
||||
&.active{
|
||||
background: $bg_active_link;
|
||||
color: $active_link_text;
|
||||
}
|
||||
}
|
||||
button{
|
||||
@extend .clickable;
|
||||
|
||||
padding: 1rem 2rem;
|
||||
border: solid 1px $bg_color;
|
||||
background: $primary_color;
|
||||
border-radius: 0.25rem;
|
||||
&:hover{
|
||||
background: $primary_color_darker;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
form {
|
||||
label {
|
||||
min-width: 15rem;
|
||||
display: inline-block;
|
||||
height: 1.5rem;
|
||||
}
|
||||
|
||||
input {
|
||||
&[type="checkbox"] {
|
||||
width: 1.5rem;
|
||||
height: 1.5rem;
|
||||
margin-left: 0rem;
|
||||
}
|
||||
&[type="text"],
|
||||
&[type="number"],
|
||||
{
|
||||
min-height: 1.5rem;
|
||||
margin-top: 0.5rem;
|
||||
margin-bottom: 0.5rem;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
button {
|
||||
&[type="submit"] {
|
||||
float: right;
|
||||
margin-top: 2rem;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
body {
|
||||
background-color: $bg_color;
|
||||
font-family: "Calibri", "SFMono-Regular", Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
|
||||
}
|
||||
#main_content{
|
||||
margin: 0 auto;
|
||||
padding: 2rem 4rem;
|
||||
min-width: 40rem;
|
||||
max-width: 60rem;
|
||||
min-height: 100vh;
|
||||
background-color: $bg_main_color;
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
#nav_menu{
|
||||
padding: 0.5rem;
|
||||
border-bottom: solid 1px $bg_color;
|
||||
a{
|
||||
margin-right: 1rem;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
$bg_color:lightgray;
|
||||
$bg_main_color: white;
|
||||
$primary_color: #98c87e;
|
||||
$primary_color_darker: #537b3d;
|
||||
$bg_active_link: $primary_color_darker;
|
||||
$active_link_text: white;
|
|
@ -0,0 +1,8 @@
|
|||
@import 'variables';
|
||||
@import 'global';
|
||||
@import 'nav';
|
||||
@import 'account';
|
||||
@import 'forms';
|
||||
@import 'clickables';
|
||||
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
#!/usr/bin/env php
|
||||
<?php
|
||||
|
||||
use App\Kernel;
|
||||
use Symfony\Bundle\FrameworkBundle\Console\Application;
|
||||
|
||||
if (!is_dir(dirname(__DIR__).'/vendor')) {
|
||||
throw new LogicException('Dependencies are missing. Try running "composer install".');
|
||||
}
|
||||
|
||||
if (!is_file(dirname(__DIR__).'/vendor/autoload_runtime.php')) {
|
||||
throw new LogicException('Symfony Runtime is missing. Try running "composer require symfony/runtime".');
|
||||
}
|
||||
|
||||
require_once dirname(__DIR__).'/vendor/autoload_runtime.php';
|
||||
|
||||
return function (array $context) {
|
||||
$kernel = new Kernel($context['APP_ENV'], (bool) $context['APP_DEBUG']);
|
||||
|
||||
return new Application($kernel);
|
||||
};
|
|
@ -0,0 +1,23 @@
|
|||
#!/usr/bin/env php
|
||||
<?php
|
||||
|
||||
if (!ini_get('date.timezone')) {
|
||||
ini_set('date.timezone', 'UTC');
|
||||
}
|
||||
|
||||
if (is_file(dirname(__DIR__).'/vendor/phpunit/phpunit/phpunit')) {
|
||||
if (PHP_VERSION_ID >= 80000) {
|
||||
require dirname(__DIR__).'/vendor/phpunit/phpunit/phpunit';
|
||||
} else {
|
||||
define('PHPUNIT_COMPOSER_INSTALL', dirname(__DIR__).'/vendor/autoload.php');
|
||||
require PHPUNIT_COMPOSER_INSTALL;
|
||||
PHPUnit\TextUI\Command::main();
|
||||
}
|
||||
} else {
|
||||
if (!is_file(dirname(__DIR__).'/vendor/symfony/phpunit-bridge/bin/simple-phpunit.php')) {
|
||||
echo "Unable to find the `simple-phpunit.php` script in `vendor/symfony/phpunit-bridge/bin/`.\n";
|
||||
exit(1);
|
||||
}
|
||||
|
||||
require dirname(__DIR__).'/vendor/symfony/phpunit-bridge/bin/simple-phpunit.php';
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
version: '3'
|
||||
|
||||
services:
|
||||
###> doctrine/doctrine-bundle ###
|
||||
database:
|
||||
ports:
|
||||
- "5432"
|
||||
###< doctrine/doctrine-bundle ###
|
||||
|
||||
###> symfony/mailer ###
|
||||
mailer:
|
||||
image: axllent/mailpit
|
||||
ports:
|
||||
- "1025"
|
||||
- "8025"
|
||||
environment:
|
||||
MP_SMTP_AUTH_ACCEPT_ANY: 1
|
||||
MP_SMTP_AUTH_ALLOW_INSECURE: 1
|
||||
###< symfony/mailer ###
|
|
@ -0,0 +1,21 @@
|
|||
version: '3'
|
||||
|
||||
services:
|
||||
###> doctrine/doctrine-bundle ###
|
||||
database:
|
||||
image: postgres:${POSTGRES_VERSION:-16}-alpine
|
||||
environment:
|
||||
POSTGRES_DB: ${POSTGRES_DB:-app}
|
||||
# You should definitely change the password in production
|
||||
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-!ChangeMe!}
|
||||
POSTGRES_USER: ${POSTGRES_USER:-app}
|
||||
volumes:
|
||||
- database_data:/var/lib/postgresql/data:rw
|
||||
# You may use a bind-mounted host directory instead, so that it is harder to accidentally remove the volume and lose all your data!
|
||||
# - ./docker/db/data:/var/lib/postgresql/data:rw
|
||||
###< doctrine/doctrine-bundle ###
|
||||
|
||||
volumes:
|
||||
###> doctrine/doctrine-bundle ###
|
||||
database_data:
|
||||
###< doctrine/doctrine-bundle ###
|
|
@ -0,0 +1,114 @@
|
|||
{
|
||||
"type": "project",
|
||||
"license": "proprietary",
|
||||
"minimum-stability": "stable",
|
||||
"prefer-stable": true,
|
||||
"require": {
|
||||
"php": ">=8.1",
|
||||
"ext-ctype": "*",
|
||||
"ext-iconv": "*",
|
||||
"amphp/http-client": "^4.2.1",
|
||||
"doctrine/dbal": "^3",
|
||||
"doctrine/doctrine-bundle": "^2.12",
|
||||
"doctrine/doctrine-migrations-bundle": "^3.3",
|
||||
"doctrine/orm": "^3.1",
|
||||
"phpdocumentor/reflection-docblock": "^5.4",
|
||||
"phpstan/phpdoc-parser": "^1.28",
|
||||
"symfony/asset": "6.1.*",
|
||||
"symfony/console": "6.1.*",
|
||||
"symfony/doctrine-messenger": "6.1.*",
|
||||
"symfony/dotenv": "6.1.*",
|
||||
"symfony/expression-language": "6.1.*",
|
||||
"symfony/flex": "^2",
|
||||
"symfony/form": "6.1.*",
|
||||
"symfony/framework-bundle": "6.1.*",
|
||||
"symfony/http-client": "6.1.*",
|
||||
"symfony/intl": "6.1.*",
|
||||
"symfony/mailer": "6.1.*",
|
||||
"symfony/mime": "6.1.*",
|
||||
"symfony/monolog-bundle": "^3.0",
|
||||
"symfony/notifier": "6.1.*",
|
||||
"symfony/process": "6.1.*",
|
||||
"symfony/property-access": "6.1.*",
|
||||
"symfony/property-info": "6.1.*",
|
||||
"symfony/rate-limiter": "6.1.*",
|
||||
"symfony/runtime": "6.1.*",
|
||||
"symfony/security-bundle": "6.1.*",
|
||||
"symfony/serializer": "6.1.*",
|
||||
"symfony/string": "6.1.*",
|
||||
"symfony/translation": "6.1.*",
|
||||
"symfony/twig-bundle": "6.1.*",
|
||||
"symfony/validator": "6.1.*",
|
||||
"symfony/web-link": "6.1.*",
|
||||
"symfony/webpack-encore-bundle": "^1.17",
|
||||
"symfony/yaml": "6.1.*",
|
||||
"symfonycasts/verify-email-bundle": "^1.17",
|
||||
"twig/extra-bundle": "^2.12|^3.0",
|
||||
"twig/twig": "^2.12|^3.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"doctrine/doctrine-fixtures-bundle": "^3.6",
|
||||
"fakerphp/faker": "^1.23",
|
||||
"phpunit/phpunit": "^9.5",
|
||||
"rector/rector": "^1.2",
|
||||
"symfony/browser-kit": "6.1.*",
|
||||
"symfony/css-selector": "6.1.*",
|
||||
"symfony/debug-bundle": "6.1.*",
|
||||
"symfony/maker-bundle": "^1.50",
|
||||
"symfony/phpunit-bridge": "^7.0",
|
||||
"symfony/stopwatch": "6.1.*",
|
||||
"symfony/web-profiler-bundle": "6.1.*"
|
||||
},
|
||||
"config": {
|
||||
"allow-plugins": {
|
||||
"composer/package-versions-deprecated": true,
|
||||
"symfony/flex": true,
|
||||
"symfony/runtime": true
|
||||
},
|
||||
"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": "*",
|
||||
"symfony/polyfill-php73": "*",
|
||||
"symfony/polyfill-php74": "*",
|
||||
"symfony/polyfill-php80": "*",
|
||||
"symfony/polyfill-php81": "*"
|
||||
},
|
||||
"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": "6.1.*"
|
||||
}
|
||||
}
|
||||
}
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,17 @@
|
|||
<?php
|
||||
|
||||
return [
|
||||
Symfony\Bundle\FrameworkBundle\FrameworkBundle::class => ['all' => true],
|
||||
Doctrine\Bundle\DoctrineBundle\DoctrineBundle::class => ['all' => true],
|
||||
Doctrine\Bundle\MigrationsBundle\DoctrineMigrationsBundle::class => ['all' => true],
|
||||
Symfony\Bundle\DebugBundle\DebugBundle::class => ['dev' => true],
|
||||
Symfony\Bundle\TwigBundle\TwigBundle::class => ['all' => true],
|
||||
Symfony\Bundle\WebProfilerBundle\WebProfilerBundle::class => ['dev' => true, 'test' => true],
|
||||
Twig\Extra\TwigExtraBundle\TwigExtraBundle::class => ['all' => true],
|
||||
Symfony\Bundle\SecurityBundle\SecurityBundle::class => ['all' => true],
|
||||
Symfony\Bundle\MonologBundle\MonologBundle::class => ['all' => true],
|
||||
Symfony\Bundle\MakerBundle\MakerBundle::class => ['dev' => true],
|
||||
SymfonyCasts\Bundle\VerifyEmail\SymfonyCastsVerifyEmailBundle::class => ['all' => true],
|
||||
Symfony\WebpackEncoreBundle\WebpackEncoreBundle::class => ['all' => true],
|
||||
Doctrine\Bundle\FixturesBundle\DoctrineFixturesBundle::class => ['dev' => true, 'test' => true],
|
||||
];
|
|
@ -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
|
|
@ -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)%"
|
|
@ -0,0 +1,44 @@
|
|||
doctrine:
|
||||
dbal:
|
||||
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: '16'
|
||||
use_savepoints: true
|
||||
orm:
|
||||
auto_generate_proxy_classes: true
|
||||
naming_strategy: doctrine.orm.naming_strategy.underscore_number_aware
|
||||
auto_mapping: true
|
||||
mappings:
|
||||
App:
|
||||
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
|
|
@ -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
|
|
@ -0,0 +1,26 @@
|
|||
# see https://symfony.com/doc/current/reference/configuration/framework.html
|
||||
framework:
|
||||
secret: '%env(APP_SECRET)%'
|
||||
ide: 'myide://open?url=file://%%f&line=%%l'
|
||||
csrf_protection: true
|
||||
http_method_override: false
|
||||
|
||||
# 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
|
||||
|
|
@ -0,0 +1,2 @@
|
|||
framework:
|
||||
lock: '%env(LOCK_DSN)%'
|
|
@ -0,0 +1,3 @@
|
|||
framework:
|
||||
mailer:
|
||||
dsn: '%env(MAILER_DSN)%'
|
|
@ -0,0 +1,29 @@
|
|||
framework:
|
||||
messenger:
|
||||
failure_transport: failed
|
||||
|
||||
transports:
|
||||
# https://symfony.com/doc/current/messenger.html#transport-configuration
|
||||
async:
|
||||
dsn: '%env(MESSENGER_TRANSPORT_DSN)%'
|
||||
options:
|
||||
use_notify: true
|
||||
check_delayed_interval: 60000
|
||||
retry_strategy:
|
||||
max_retries: 3
|
||||
multiplier: 2
|
||||
failed: 'doctrine://default?queue_name=failed'
|
||||
# sync: 'sync://'
|
||||
|
||||
default_bus: messenger.bus.default
|
||||
|
||||
buses:
|
||||
messenger.bus.default: []
|
||||
|
||||
routing:
|
||||
Symfony\Component\Mailer\Messenger\SendEmailMessage: async
|
||||
Symfony\Component\Notifier\Message\ChatMessage: async
|
||||
Symfony\Component\Notifier\Message\SmsMessage: async
|
||||
|
||||
# Route your messages to the transports
|
||||
# 'App\Message\YourMessage': async
|
|
@ -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
|
|
@ -0,0 +1,12 @@
|
|||
framework:
|
||||
notifier:
|
||||
chatter_transports:
|
||||
texter_transports:
|
||||
channel_policy:
|
||||
# use chat/slack, chat/telegram, sms/twilio or sms/nexmo
|
||||
urgent: ['email']
|
||||
high: ['email']
|
||||
medium: ['email']
|
||||
low: ['email']
|
||||
admin_recipients:
|
||||
- { email: admin@example.com }
|
|
@ -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
|
|
@ -0,0 +1,70 @@
|
|||
security:
|
||||
role_hierarchy:
|
||||
ROLE_ADMIN: ROLE_USER
|
||||
ROLE_SUPER_ADMIN: [ ROLE_ADMIN, ROLE_ALLOWED_TO_SWITCH ]
|
||||
# https://symfony.com/doc/current/security.html#registering-the-user-hashing-passwords
|
||||
password_hashers:
|
||||
Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface: 'auto'
|
||||
# https://symfony.com/doc/current/security.html#loading-the-user-the-user-provider
|
||||
providers:
|
||||
# used to reload user from session & other features (e.g. switch_user)
|
||||
app_user_provider:
|
||||
entity:
|
||||
class: App\Entity\User
|
||||
property: email
|
||||
firewalls:
|
||||
dev:
|
||||
pattern: ^/(_(profiler|wdt)|css|images|js)/
|
||||
security: false
|
||||
main:
|
||||
lazy: true
|
||||
provider: app_user_provider
|
||||
# by default, the feature allows 5 login attempts per minute
|
||||
# login_throttling: null
|
||||
remember_me:
|
||||
secret: '%kernel.secret%' # required
|
||||
lifetime: 604800 # 1 week in seconds
|
||||
# by default, the feature is enabled by checking a
|
||||
# checkbox in the login form (see below), uncomment the
|
||||
# following line to always enable it.
|
||||
#always_remember_me: true
|
||||
# configure the maximum login attempts
|
||||
login_throttling:
|
||||
max_attempts: 3 # per minute ...
|
||||
interval: '5 minutes' # ... or in a custom period
|
||||
|
||||
|
||||
|
||||
# activate different ways to authenticate
|
||||
# https://symfony.com/doc/current/security.html#the-firewall
|
||||
|
||||
# https://symfony.com/doc/current/security/impersonating_user.html
|
||||
switch_user: true
|
||||
form_login:
|
||||
login_path: app_login
|
||||
check_path: app_login
|
||||
enable_csrf: true
|
||||
logout:
|
||||
path: app_logout
|
||||
# where to redirect after logout
|
||||
# target: app_any_route
|
||||
|
||||
# Easy way to control access for large sections of your site
|
||||
# Note: Only the *first* access control that matches will be used
|
||||
access_control:
|
||||
- { path: ^/admin, roles: ROLE_ADMIN }
|
||||
- { path: ^/profile, roles: ROLE_USER }
|
||||
- { path: ^/account, roles: ROLE_USER }
|
||||
|
||||
when@test:
|
||||
security:
|
||||
password_hashers:
|
||||
# By default, password hashers are resource intensive and take time. This is
|
||||
# important to generate secure password hashes. In tests however, secure hashes
|
||||
# are not important, waste resources and increase test times. The following
|
||||
# reduces the work factor to the lowest possible values.
|
||||
Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface:
|
||||
algorithm: auto
|
||||
cost: 4 # Lowest possible value for bcrypt
|
||||
time_cost: 3 # Lowest possible value for argon
|
||||
memory_cost: 10 # Lowest possible value for argon
|
|
@ -0,0 +1,7 @@
|
|||
framework:
|
||||
default_locale: fr
|
||||
translator:
|
||||
default_path: '%kernel.project_dir%/translations'
|
||||
fallbacks:
|
||||
- en
|
||||
providers:
|
|
@ -0,0 +1,6 @@
|
|||
twig:
|
||||
default_path: '%kernel.project_dir%/templates'
|
||||
|
||||
when@test:
|
||||
twig:
|
||||
strict_variables: true
|
|
@ -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
|
|
@ -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 }
|
|
@ -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
|
|
@ -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';
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
controllers:
|
||||
resource: ../src/Controller/
|
||||
type: attribute
|
|
@ -0,0 +1,4 @@
|
|||
when@dev:
|
||||
_errors:
|
||||
resource: '@FrameworkBundle/Resources/config/routing/errors.xml'
|
||||
prefix: /_error
|
|
@ -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
|
|
@ -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
|
|
@ -0,0 +1,31 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace DoctrineMigrations;
|
||||
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Doctrine\Migrations\AbstractMigration;
|
||||
|
||||
/**
|
||||
* Auto-generated Migration: Please modify to your needs!
|
||||
*/
|
||||
final class Version20240715211713 extends AbstractMigration
|
||||
{
|
||||
public function getDescription(): string
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
public function up(Schema $schema): void
|
||||
{
|
||||
// this up() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('ALTER TABLE user ADD is_verified TINYINT(1) NOT NULL');
|
||||
}
|
||||
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
// this down() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('ALTER TABLE `user` DROP is_verified');
|
||||
}
|
||||
}
|
|
@ -0,0 +1,31 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace DoctrineMigrations;
|
||||
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Doctrine\Migrations\AbstractMigration;
|
||||
|
||||
/**
|
||||
* Auto-generated Migration: Please modify to your needs!
|
||||
*/
|
||||
final class Version20240716084111 extends AbstractMigration
|
||||
{
|
||||
public function getDescription(): string
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
public function up(Schema $schema): void
|
||||
{
|
||||
// this up() migration is auto-generated, please modify it to your needs
|
||||
|
||||
}
|
||||
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
// this down() migration is auto-generated, please modify it to your needs
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,31 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace DoctrineMigrations;
|
||||
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Doctrine\Migrations\AbstractMigration;
|
||||
|
||||
/**
|
||||
* Auto-generated Migration: Please modify to your needs!
|
||||
*/
|
||||
final class Version20240716092119 extends AbstractMigration
|
||||
{
|
||||
public function getDescription(): string
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
public function up(Schema $schema): void
|
||||
{
|
||||
// this up() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('ALTER TABLE user ADD last_login DATE DEFAULT NULL');
|
||||
}
|
||||
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
// this down() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('ALTER TABLE `user` DROP last_login');
|
||||
}
|
||||
}
|
|
@ -0,0 +1,67 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace DoctrineMigrations;
|
||||
|
||||
use Doctrine\DBAL\Schema\Schema;
|
||||
use Doctrine\Migrations\AbstractMigration;
|
||||
|
||||
/**
|
||||
* Auto-generated Migration: Please modify to your needs!
|
||||
*/
|
||||
final class Version20240716105848 extends AbstractMigration
|
||||
{
|
||||
public function getDescription(): string
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
public function up(Schema $schema): void
|
||||
{
|
||||
// this up() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('CREATE TABLE exepense_config (id INT AUTO_INCREMENT NOT NULL, owner_id INT DEFAULT NULL, name VARCHAR(255) NOT NULL, delay INT DEFAULT NULL, enabled TINYINT(1) DEFAULT NULL, amount INT NOT NULL, repeatitions INT DEFAULT NULL, INDEX IDX_4797F5B27E3C61F9 (owner_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
|
||||
$this->addSql('CREATE TABLE festival (id INT AUTO_INCREMENT NOT NULL, name VARCHAR(255) NOT NULL, fond_de_caisse_avant INT NOT NULL, fond_de_caisse_apres INT NOT NULL, chiffre_affaire INT NOT NULL, frais_inscription INT DEFAULT NULL, frais_hebergement INT DEFAULT NULL, frais_transport INT DEFAULT NULL, frais_repas INT DEFAULT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
|
||||
$this->addSql('CREATE TABLE product (id INT AUTO_INCREMENT NOT NULL, owner_id INT DEFAULT NULL, product_category_id INT DEFAULT NULL, stock_count INT NOT NULL, name VARCHAR(255) NOT NULL, image VARCHAR(255) DEFAULT NULL, INDEX IDX_D34A04AD7E3C61F9 (owner_id), INDEX IDX_D34A04ADBE6903FD (product_category_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
|
||||
$this->addSql('CREATE TABLE product_category (id INT AUTO_INCREMENT NOT NULL, name VARCHAR(255) NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
|
||||
$this->addSql('CREATE TABLE product_category_user (product_category_id INT NOT NULL, user_id INT NOT NULL, INDEX IDX_DCE5B0FCBE6903FD (product_category_id), INDEX IDX_DCE5B0FCA76ED395 (user_id), PRIMARY KEY(product_category_id, user_id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
|
||||
$this->addSql('CREATE TABLE product_sold (id INT AUTO_INCREMENT NOT NULL, owner_id INT DEFAULT NULL, name VARCHAR(255) DEFAULT NULL, image VARCHAR(255) DEFAULT NULL, INDEX IDX_153AFF387E3C61F9 (owner_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
|
||||
$this->addSql('CREATE TABLE sell_record (id INT AUTO_INCREMENT NOT NULL, owner_id INT DEFAULT NULL, festival_id INT DEFAULT NULL, customer_gender VARCHAR(255) DEFAULT NULL, date DATE NOT NULL, amount INT NOT NULL, paid_by_customer INT DEFAULT NULL, INDEX IDX_F9F12A027E3C61F9 (owner_id), INDEX IDX_F9F12A028AEBAF57 (festival_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
|
||||
$this->addSql('CREATE TABLE serie_festival (id INT AUTO_INCREMENT NOT NULL, owner_id INT DEFAULT NULL, name VARCHAR(255) NOT NULL, date_creation DATE NOT NULL, INDEX IDX_4DFA58B17E3C61F9 (owner_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
|
||||
$this->addSql('ALTER TABLE exepense_config ADD CONSTRAINT FK_4797F5B27E3C61F9 FOREIGN KEY (owner_id) REFERENCES `user` (id)');
|
||||
$this->addSql('ALTER TABLE product ADD CONSTRAINT FK_D34A04AD7E3C61F9 FOREIGN KEY (owner_id) REFERENCES `user` (id)');
|
||||
$this->addSql('ALTER TABLE product ADD CONSTRAINT FK_D34A04ADBE6903FD FOREIGN KEY (product_category_id) REFERENCES product_category (id)');
|
||||
$this->addSql('ALTER TABLE product_category_user ADD CONSTRAINT FK_DCE5B0FCBE6903FD FOREIGN KEY (product_category_id) REFERENCES product_category (id) ON DELETE CASCADE');
|
||||
$this->addSql('ALTER TABLE product_category_user ADD CONSTRAINT FK_DCE5B0FCA76ED395 FOREIGN KEY (user_id) REFERENCES `user` (id) ON DELETE CASCADE');
|
||||
$this->addSql('ALTER TABLE product_sold ADD CONSTRAINT FK_153AFF387E3C61F9 FOREIGN KEY (owner_id) REFERENCES `user` (id)');
|
||||
$this->addSql('ALTER TABLE sell_record ADD CONSTRAINT FK_F9F12A027E3C61F9 FOREIGN KEY (owner_id) REFERENCES `user` (id)');
|
||||
$this->addSql('ALTER TABLE sell_record ADD CONSTRAINT FK_F9F12A028AEBAF57 FOREIGN KEY (festival_id) REFERENCES festival (id)');
|
||||
$this->addSql('ALTER TABLE serie_festival ADD CONSTRAINT FK_4DFA58B17E3C61F9 FOREIGN KEY (owner_id) REFERENCES `user` (id)');
|
||||
$this->addSql('DROP TABLE `admin`');
|
||||
$this->addSql('DROP TABLE user_account');
|
||||
}
|
||||
|
||||
public function down(Schema $schema): void
|
||||
{
|
||||
// this down() migration is auto-generated, please modify it to your needs
|
||||
$this->addSql('CREATE TABLE `admin` (id INT AUTO_INCREMENT NOT NULL, username VARCHAR(255) CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`, email VARCHAR(255) CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB COMMENT = \'\' ');
|
||||
$this->addSql('CREATE TABLE user_account (id INT AUTO_INCREMENT NOT NULL, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB COMMENT = \'\' ');
|
||||
$this->addSql('ALTER TABLE exepense_config DROP FOREIGN KEY FK_4797F5B27E3C61F9');
|
||||
$this->addSql('ALTER TABLE product DROP FOREIGN KEY FK_D34A04AD7E3C61F9');
|
||||
$this->addSql('ALTER TABLE product DROP FOREIGN KEY FK_D34A04ADBE6903FD');
|
||||
$this->addSql('ALTER TABLE product_category_user DROP FOREIGN KEY FK_DCE5B0FCBE6903FD');
|
||||
$this->addSql('ALTER TABLE product_category_user DROP FOREIGN KEY FK_DCE5B0FCA76ED395');
|
||||
$this->addSql('ALTER TABLE product_sold DROP FOREIGN KEY FK_153AFF387E3C61F9');
|
||||
$this->addSql('ALTER TABLE sell_record DROP FOREIGN KEY FK_F9F12A027E3C61F9');
|
||||
$this->addSql('ALTER TABLE sell_record DROP FOREIGN KEY FK_F9F12A028AEBAF57');
|
||||
$this->addSql('ALTER TABLE serie_festival DROP FOREIGN KEY FK_4DFA58B17E3C61F9');
|
||||
$this->addSql('DROP TABLE exepense_config');
|
||||
$this->addSql('DROP TABLE festival');
|
||||
$this->addSql('DROP TABLE product');
|
||||
$this->addSql('DROP TABLE product_category');
|
||||
$this->addSql('DROP TABLE product_category_user');
|
||||
$this->addSql('DROP TABLE product_sold');
|
||||
$this->addSql('DROP TABLE sell_record');
|
||||
$this->addSql('DROP TABLE serie_festival');
|
||||
}
|
||||
}
|
|
@ -0,0 +1,31 @@
|
|||
{
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.17.0",
|
||||
"@babel/preset-env": "^7.16.0",
|
||||
"@hotwired/stimulus": "^3.0.0",
|
||||
"@symfony/stimulus-bridge": "^3.2.0",
|
||||
"@symfony/webpack-encore": "^4.0.0",
|
||||
"@vue/babel-helper-vue-jsx-merge-props": "^1.4.0",
|
||||
"@vue/babel-preset-jsx": "^1.4.0",
|
||||
"core-js": "^3.23.0",
|
||||
"regenerator-runtime": "^0.13.9",
|
||||
"sass": "^1.77.8",
|
||||
"sass-loader": "^14.0.0",
|
||||
"ts-loader": "^9.0.0",
|
||||
"typescript": "^5.5.3",
|
||||
"vue": "^2.5",
|
||||
"vue-loader": "^15.9.5",
|
||||
"vue-template-compiler": "^2.7.16",
|
||||
"webpack": "^5.74.0",
|
||||
"webpack-cli": "^4.10.0",
|
||||
"webpack-notifier": "^1.15.0"
|
||||
},
|
||||
"license": "UNLICENSED",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"dev-server": "encore dev-server",
|
||||
"dev": "encore dev",
|
||||
"watch": "encore dev --watch",
|
||||
"build": "encore production --progress"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,38 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!-- https://phpunit.readthedocs.io/en/latest/configuration.html -->
|
||||
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
|
||||
backupGlobals="false"
|
||||
colors="true"
|
||||
bootstrap="tests/bootstrap.php"
|
||||
convertDeprecationsToExceptions="false"
|
||||
>
|
||||
<php>
|
||||
<ini name="display_errors" value="1" />
|
||||
<ini name="error_reporting" value="-1" />
|
||||
<server name="APP_ENV" value="test" force="true" />
|
||||
<server name="SHELL_VERBOSITY" value="-1" />
|
||||
<server name="SYMFONY_PHPUNIT_REMOVE" value="" />
|
||||
<server name="SYMFONY_PHPUNIT_VERSION" value="9.5" />
|
||||
</php>
|
||||
|
||||
<testsuites>
|
||||
<testsuite name="Project Test Suite">
|
||||
<directory>tests</directory>
|
||||
</testsuite>
|
||||
</testsuites>
|
||||
|
||||
<coverage processUncoveredFiles="true">
|
||||
<include>
|
||||
<directory suffix=".php">src</directory>
|
||||
</include>
|
||||
</coverage>
|
||||
|
||||
<listeners>
|
||||
<listener class="Symfony\Bridge\PhpUnit\SymfonyTestsListener" />
|
||||
</listeners>
|
||||
|
||||
<extensions>
|
||||
</extensions>
|
||||
</phpunit>
|
|
@ -0,0 +1,9 @@
|
|||
<?php
|
||||
|
||||
use App\Kernel;
|
||||
|
||||
require_once dirname(__DIR__).'/vendor/autoload_runtime.php';
|
||||
|
||||
return function (array $context) {
|
||||
return new Kernel($context['APP_ENV'], (bool) $context['APP_DEBUG']);
|
||||
};
|
|
@ -7,7 +7,6 @@ use Rector\Config\RectorConfig;
|
|||
return RectorConfig::configure()
|
||||
->withPaths([
|
||||
__DIR__ . '/config',
|
||||
__DIR__ . '/old',
|
||||
__DIR__ . '/public',
|
||||
__DIR__ . '/src',
|
||||
__DIR__ . '/tests',
|
||||
|
|
|
@ -0,0 +1,27 @@
|
|||
<?php
|
||||
|
||||
namespace App\Controller;
|
||||
|
||||
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
use Symfony\Component\Routing\Annotation\Route;
|
||||
|
||||
class AccountController extends AbstractController
|
||||
{
|
||||
#[Route('/account', name: 'app_account')]
|
||||
public function index(): Response
|
||||
{
|
||||
return $this->render('account/index.html.twig', [
|
||||
'controller_name' => 'AccountController',
|
||||
]);
|
||||
}
|
||||
/***
|
||||
page d'exemple
|
||||
**/
|
||||
#[Route('/account/history', name: 'app_account_history')]
|
||||
public function history(): Response
|
||||
{
|
||||
return $this->render('account/history.html.twig', [
|
||||
]);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
<?php
|
||||
|
||||
namespace App\Controller;
|
||||
|
||||
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
use Symfony\Component\Routing\Annotation\Route;
|
||||
|
||||
class IndexController extends AbstractController
|
||||
{
|
||||
#[Route('/', name: 'app_index')]
|
||||
public function index(): Response
|
||||
{
|
||||
return $this->render('index/index.html.twig', [
|
||||
'controller_name' => 'IndexController',
|
||||
]);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,84 @@
|
|||
<?php
|
||||
|
||||
namespace App\Controller;
|
||||
|
||||
use App\Entity\User;
|
||||
use App\Form\RegistrationFormType;
|
||||
use App\Security\EmailVerifier;
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use Symfony\Bridge\Twig\Mime\TemplatedEmail;
|
||||
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
use Symfony\Component\Mime\Address;
|
||||
use Symfony\Component\PasswordHasher\Hasher\UserPasswordHasherInterface;
|
||||
use Symfony\Component\Routing\Annotation\Route;
|
||||
use Symfony\Contracts\Translation\TranslatorInterface;
|
||||
use SymfonyCasts\Bundle\VerifyEmail\Exception\VerifyEmailExceptionInterface;
|
||||
|
||||
class RegistrationController extends AbstractController
|
||||
{
|
||||
private EmailVerifier $emailVerifier;
|
||||
|
||||
public function __construct(EmailVerifier $emailVerifier)
|
||||
{
|
||||
$this->emailVerifier = $emailVerifier;
|
||||
}
|
||||
|
||||
#[Route('/register', name: 'app_register')]
|
||||
public function register(Request $request, UserPasswordHasherInterface $userPasswordHasher, EntityManagerInterface $entityManager): Response
|
||||
{
|
||||
$user = new User();
|
||||
$form = $this->createForm(RegistrationFormType::class, $user);
|
||||
$form->handleRequest($request);
|
||||
|
||||
if ($form->isSubmitted() && $form->isValid()) {
|
||||
// encode the plain password
|
||||
$user->setPassword(
|
||||
$userPasswordHasher->hashPassword(
|
||||
$user,
|
||||
$form->get('plainPassword')->getData()
|
||||
)
|
||||
);
|
||||
|
||||
$entityManager->persist($user);
|
||||
$entityManager->flush();
|
||||
|
||||
// generate a signed url and email it to the user
|
||||
$this->emailVerifier->sendEmailConfirmation('app_verify_email', $user,
|
||||
(new TemplatedEmail())
|
||||
->from(new Address('mailer-noreply@cipherbliss.com', 'Cipherbliss Registration Service Bot'))
|
||||
->to($user->getEmail())
|
||||
->subject('Please Confirm your Email')
|
||||
->htmlTemplate('registration/confirmation_email.html.twig')
|
||||
);
|
||||
// do anything else you need here, like send an email
|
||||
|
||||
return $this->redirectToRoute('app_account');
|
||||
}
|
||||
|
||||
return $this->render('registration/register.html.twig', [
|
||||
'registrationForm' => $form->createView(),
|
||||
]);
|
||||
}
|
||||
|
||||
#[Route('/verify/email', name: 'app_verify_email')]
|
||||
public function verifyUserEmail(Request $request, TranslatorInterface $translator): Response
|
||||
{
|
||||
$this->denyAccessUnlessGranted('IS_AUTHENTICATED_FULLY');
|
||||
|
||||
// validate email confirmation link, sets User::isVerified=true and persists
|
||||
try {
|
||||
$this->emailVerifier->handleEmailConfirmation($request, $this->getUser());
|
||||
} catch (VerifyEmailExceptionInterface $exception) {
|
||||
$this->addFlash('verify_email_error', $translator->trans($exception->getReason(), [], 'VerifyEmailBundle'));
|
||||
|
||||
return $this->redirectToRoute('app_register');
|
||||
}
|
||||
|
||||
// @TODO Change the redirect on success and handle or remove the flash message in your templates
|
||||
$this->addFlash('success', 'Your email address has been verified.');
|
||||
|
||||
return $this->redirectToRoute('app_register');
|
||||
}
|
||||
}
|
|
@ -0,0 +1,32 @@
|
|||
<?php
|
||||
|
||||
namespace App\Controller;
|
||||
|
||||
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
use Symfony\Component\Routing\Annotation\Route;
|
||||
use Symfony\Component\Security\Http\Authentication\AuthenticationUtils;
|
||||
|
||||
class SecurityController extends AbstractController
|
||||
{
|
||||
#[Route(path: '/login', name: 'app_login')]
|
||||
public function login(AuthenticationUtils $authenticationUtils): Response
|
||||
{
|
||||
// get the login error if there is one
|
||||
$error = $authenticationUtils->getLastAuthenticationError();
|
||||
|
||||
// last username entered by the user
|
||||
$lastUsername = $authenticationUtils->getLastUsername();
|
||||
|
||||
return $this->render('security/login.html.twig', [
|
||||
'last_username' => $lastUsername,
|
||||
'error' => $error,
|
||||
]);
|
||||
}
|
||||
|
||||
#[Route(path: '/logout', name: 'app_logout')]
|
||||
public function logout(): void
|
||||
{
|
||||
throw new \LogicException('This method can be blank - it will be intercepted by the logout key on your firewall.');
|
||||
}
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
<?php
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,110 @@
|
|||
<?php
|
||||
|
||||
namespace App\Entity;
|
||||
|
||||
use App\Repository\ExepenseConfigRepository;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
|
||||
#[ORM\Entity(repositoryClass: ExepenseConfigRepository::class)]
|
||||
class ExepenseConfig
|
||||
{
|
||||
#[ORM\Id]
|
||||
#[ORM\GeneratedValue]
|
||||
#[ORM\Column]
|
||||
private ?int $id = null;
|
||||
|
||||
#[ORM\Column(length: 255)]
|
||||
private ?string $name = null;
|
||||
|
||||
#[ORM\Column(nullable: true)]
|
||||
private ?int $delay = null;
|
||||
|
||||
#[ORM\Column(nullable: true)]
|
||||
private ?bool $enabled = null;
|
||||
|
||||
#[ORM\Column]
|
||||
private ?int $amount = null;
|
||||
|
||||
#[ORM\ManyToOne(inversedBy: 'exepenseConfigs')]
|
||||
private ?User $owner = null;
|
||||
|
||||
#[ORM\Column(nullable: true)]
|
||||
private ?int $repeatitions = null;
|
||||
|
||||
public function getId(): ?int
|
||||
{
|
||||
return $this->id;
|
||||
}
|
||||
|
||||
public function getName(): ?string
|
||||
{
|
||||
return $this->name;
|
||||
}
|
||||
|
||||
public function setName(string $name): static
|
||||
{
|
||||
$this->name = $name;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getDelay(): ?int
|
||||
{
|
||||
return $this->delay;
|
||||
}
|
||||
|
||||
public function setDelay(?int $delay): static
|
||||
{
|
||||
$this->delay = $delay;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function isEnabled(): ?bool
|
||||
{
|
||||
return $this->enabled;
|
||||
}
|
||||
|
||||
public function setEnabled(?bool $enabled): static
|
||||
{
|
||||
$this->enabled = $enabled;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getAmount(): ?int
|
||||
{
|
||||
return $this->amount;
|
||||
}
|
||||
|
||||
public function setAmount(int $amount): static
|
||||
{
|
||||
$this->amount = $amount;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getOwner(): ?User
|
||||
{
|
||||
return $this->owner;
|
||||
}
|
||||
|
||||
public function setOwner(?User $owner): static
|
||||
{
|
||||
$this->owner = $owner;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getRepeatitions(): ?int
|
||||
{
|
||||
return $this->repeatitions;
|
||||
}
|
||||
|
||||
public function setRepeatitions(?int $repeatitions): static
|
||||
{
|
||||
$this->repeatitions = $repeatitions;
|
||||
|
||||
return $this;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,214 @@
|
|||
<?php
|
||||
|
||||
namespace App\Entity;
|
||||
|
||||
use App\Repository\FestivalRepository;
|
||||
use Doctrine\Common\Collections\ArrayCollection;
|
||||
use Doctrine\Common\Collections\Collection;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
|
||||
#[ORM\Entity(repositoryClass: FestivalRepository::class)]
|
||||
class Festival
|
||||
{
|
||||
#[ORM\Id]
|
||||
#[ORM\GeneratedValue]
|
||||
#[ORM\Column]
|
||||
private ?int $id = null;
|
||||
|
||||
#[ORM\Column(length: 255)]
|
||||
private ?string $name = null;
|
||||
|
||||
#[ORM\Column]
|
||||
private ?int $fond_de_caisse_avant = null;
|
||||
|
||||
#[ORM\Column]
|
||||
private ?int $fond_de_caisse_apres = null;
|
||||
|
||||
#[ORM\Column]
|
||||
private ?int $chiffre_affaire = null;
|
||||
|
||||
#[ORM\Column(nullable: true)]
|
||||
private ?int $frais_inscription = null;
|
||||
|
||||
#[ORM\Column(nullable: true)]
|
||||
private ?int $frais_hebergement = null;
|
||||
|
||||
#[ORM\Column(nullable: true)]
|
||||
private ?int $frais_transport = null;
|
||||
|
||||
#[ORM\Column(nullable: true)]
|
||||
private ?int $frais_repas = null;
|
||||
|
||||
#[ORM\OneToMany(targetEntity: SellRecord::class, mappedBy: 'festival')]
|
||||
private Collection $sell_records;
|
||||
|
||||
#[ORM\OneToMany(targetEntity: SerieFestival::class, mappedBy: 'festivals')]
|
||||
private Collection $serieFestivals;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->sell_records = new ArrayCollection();
|
||||
$this->serieFestivals = new ArrayCollection();
|
||||
}
|
||||
|
||||
public function getId(): ?int
|
||||
{
|
||||
return $this->id;
|
||||
}
|
||||
|
||||
public function getName(): ?string
|
||||
{
|
||||
return $this->name;
|
||||
}
|
||||
|
||||
public function setName(string $name): static
|
||||
{
|
||||
$this->name = $name;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getFondDeCaisseAvant(): ?int
|
||||
{
|
||||
return $this->fond_de_caisse_avant;
|
||||
}
|
||||
|
||||
public function setFondDeCaisseAvant(int $fond_de_caisse_avant): static
|
||||
{
|
||||
$this->fond_de_caisse_avant = $fond_de_caisse_avant;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getFondDeCaisseApres(): ?int
|
||||
{
|
||||
return $this->fond_de_caisse_apres;
|
||||
}
|
||||
|
||||
public function setFondDeCaisseApres(int $fond_de_caisse_apres): static
|
||||
{
|
||||
$this->fond_de_caisse_apres = $fond_de_caisse_apres;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getChiffreAffaire(): ?int
|
||||
{
|
||||
return $this->chiffre_affaire;
|
||||
}
|
||||
|
||||
public function setChiffreAffaire(int $chiffre_affaire): static
|
||||
{
|
||||
$this->chiffre_affaire = $chiffre_affaire;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getFraisInscription(): ?int
|
||||
{
|
||||
return $this->frais_inscription;
|
||||
}
|
||||
|
||||
public function setFraisInscription(?int $frais_inscription): static
|
||||
{
|
||||
$this->frais_inscription = $frais_inscription;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getFraisHebergement(): ?int
|
||||
{
|
||||
return $this->frais_hebergement;
|
||||
}
|
||||
|
||||
public function setFraisHebergement(?int $frais_hebergement): static
|
||||
{
|
||||
$this->frais_hebergement = $frais_hebergement;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getFraisTransport(): ?int
|
||||
{
|
||||
return $this->frais_transport;
|
||||
}
|
||||
|
||||
public function setFraisTransport(?int $frais_transport): static
|
||||
{
|
||||
$this->frais_transport = $frais_transport;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getFraisRepas(): ?int
|
||||
{
|
||||
return $this->frais_repas;
|
||||
}
|
||||
|
||||
public function setFraisRepas(?int $frais_repas): static
|
||||
{
|
||||
$this->frais_repas = $frais_repas;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Collection<int, SellRecord>
|
||||
*/
|
||||
public function getSellRecords(): Collection
|
||||
{
|
||||
return $this->sell_records;
|
||||
}
|
||||
|
||||
public function addSellRecord(SellRecord $sellRecord): static
|
||||
{
|
||||
if (!$this->sell_records->contains($sellRecord)) {
|
||||
$this->sell_records->add($sellRecord);
|
||||
$sellRecord->setFestival($this);
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function removeSellRecord(SellRecord $sellRecord): static
|
||||
{
|
||||
if ($this->sell_records->removeElement($sellRecord)) {
|
||||
// set the owning side to null (unless already changed)
|
||||
if ($sellRecord->getFestival() === $this) {
|
||||
$sellRecord->setFestival(null);
|
||||
}
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Collection<int, SerieFestival>
|
||||
*/
|
||||
public function getSerieFestivals(): Collection
|
||||
{
|
||||
return $this->serieFestivals;
|
||||
}
|
||||
|
||||
public function addSerieFestival(SerieFestival $serieFestival): static
|
||||
{
|
||||
if (!$this->serieFestivals->contains($serieFestival)) {
|
||||
$this->serieFestivals->add($serieFestival);
|
||||
$serieFestival->setFestivals($this);
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function removeSerieFestival(SerieFestival $serieFestival): static
|
||||
{
|
||||
if ($this->serieFestivals->removeElement($serieFestival)) {
|
||||
// set the owning side to null (unless already changed)
|
||||
if ($serieFestival->getFestivals() === $this) {
|
||||
$serieFestival->setFestivals(null);
|
||||
}
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,95 @@
|
|||
<?php
|
||||
|
||||
namespace App\Entity;
|
||||
|
||||
use App\Repository\ProductRepository;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
|
||||
#[ORM\Entity(repositoryClass: ProductRepository::class)]
|
||||
class Product
|
||||
{
|
||||
#[ORM\Id]
|
||||
#[ORM\GeneratedValue]
|
||||
#[ORM\Column]
|
||||
private ?int $id = null;
|
||||
|
||||
#[ORM\Column]
|
||||
private ?int $stock_count = null;
|
||||
|
||||
#[ORM\Column(length: 255)]
|
||||
private ?string $name = null;
|
||||
|
||||
#[ORM\Column(length: 255, nullable: true)]
|
||||
private ?string $image = null;
|
||||
|
||||
#[ORM\ManyToOne(inversedBy: 'products')]
|
||||
private ?User $owner = null;
|
||||
|
||||
#[ORM\ManyToOne(inversedBy: 'products')]
|
||||
private ?ProductCategory $productCategory = null;
|
||||
|
||||
public function getId(): ?int
|
||||
{
|
||||
return $this->id;
|
||||
}
|
||||
|
||||
public function getStockCount(): ?int
|
||||
{
|
||||
return $this->stock_count;
|
||||
}
|
||||
|
||||
public function setStockCount(int $stock_count): static
|
||||
{
|
||||
$this->stock_count = $stock_count;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getName(): ?string
|
||||
{
|
||||
return $this->name;
|
||||
}
|
||||
|
||||
public function setName(string $name): static
|
||||
{
|
||||
$this->name = $name;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getImage(): ?string
|
||||
{
|
||||
return $this->image;
|
||||
}
|
||||
|
||||
public function setImage(?string $image): static
|
||||
{
|
||||
$this->image = $image;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getOwner(): ?User
|
||||
{
|
||||
return $this->owner;
|
||||
}
|
||||
|
||||
public function setOwner(?User $owner): static
|
||||
{
|
||||
$this->owner = $owner;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getProductCategory(): ?ProductCategory
|
||||
{
|
||||
return $this->productCategory;
|
||||
}
|
||||
|
||||
public function setProductCategory(?ProductCategory $productCategory): static
|
||||
{
|
||||
$this->productCategory = $productCategory;
|
||||
|
||||
return $this;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,103 @@
|
|||
<?php
|
||||
|
||||
namespace App\Entity;
|
||||
|
||||
use App\Repository\ProductCategoryRepository;
|
||||
use Doctrine\Common\Collections\ArrayCollection;
|
||||
use Doctrine\Common\Collections\Collection;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
|
||||
#[ORM\Entity(repositoryClass: ProductCategoryRepository::class)]
|
||||
class ProductCategory
|
||||
{
|
||||
#[ORM\Id]
|
||||
#[ORM\GeneratedValue]
|
||||
#[ORM\Column]
|
||||
private ?int $id = null;
|
||||
|
||||
#[ORM\Column(length: 255)]
|
||||
private ?string $name = null;
|
||||
|
||||
#[ORM\OneToMany(targetEntity: Product::class, mappedBy: 'productCategory')]
|
||||
private Collection $products;
|
||||
|
||||
#[ORM\ManyToMany(targetEntity: User::class, inversedBy: 'productCategories')]
|
||||
private Collection $owners;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->products = new ArrayCollection();
|
||||
$this->owners = new ArrayCollection();
|
||||
}
|
||||
|
||||
public function getId(): ?int
|
||||
{
|
||||
return $this->id;
|
||||
}
|
||||
|
||||
public function getName(): ?string
|
||||
{
|
||||
return $this->name;
|
||||
}
|
||||
|
||||
public function setName(string $name): static
|
||||
{
|
||||
$this->name = $name;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Collection<int, Product>
|
||||
*/
|
||||
public function getProducts(): Collection
|
||||
{
|
||||
return $this->products;
|
||||
}
|
||||
|
||||
public function addProduct(Product $product): static
|
||||
{
|
||||
if (!$this->products->contains($product)) {
|
||||
$this->products->add($product);
|
||||
$product->setProductCategory($this);
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function removeProduct(Product $product): static
|
||||
{
|
||||
if ($this->products->removeElement($product)) {
|
||||
// set the owning side to null (unless already changed)
|
||||
if ($product->getProductCategory() === $this) {
|
||||
$product->setProductCategory(null);
|
||||
}
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Collection<int, User>
|
||||
*/
|
||||
public function getOwners(): Collection
|
||||
{
|
||||
return $this->owners;
|
||||
}
|
||||
|
||||
public function addOwner(User $owner): static
|
||||
{
|
||||
if (!$this->owners->contains($owner)) {
|
||||
$this->owners->add($owner);
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function removeOwner(User $owner): static
|
||||
{
|
||||
$this->owners->removeElement($owner);
|
||||
|
||||
return $this;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,65 @@
|
|||
<?php
|
||||
|
||||
namespace App\Entity;
|
||||
|
||||
use App\Repository\ProductSoldRepository;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
|
||||
#[ORM\Entity(repositoryClass: ProductSoldRepository::class)]
|
||||
class ProductSold
|
||||
{
|
||||
#[ORM\Id]
|
||||
#[ORM\GeneratedValue]
|
||||
#[ORM\Column]
|
||||
private ?int $id = null;
|
||||
|
||||
#[ORM\Column(length: 255, nullable: true)]
|
||||
private ?string $name = null;
|
||||
|
||||
#[ORM\Column(length: 255, nullable: true)]
|
||||
private ?string $image = null;
|
||||
|
||||
#[ORM\ManyToOne(inversedBy: 'product')]
|
||||
private ?User $owner = null;
|
||||
|
||||
public function getId(): ?int
|
||||
{
|
||||
return $this->id;
|
||||
}
|
||||
|
||||
public function getName(): ?string
|
||||
{
|
||||
return $this->name;
|
||||
}
|
||||
|
||||
public function setName(?string $name): static
|
||||
{
|
||||
$this->name = $name;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getImage(): ?string
|
||||
{
|
||||
return $this->image;
|
||||
}
|
||||
|
||||
public function setImage(?string $image): static
|
||||
{
|
||||
$this->image = $image;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getOwner(): ?User
|
||||
{
|
||||
return $this->owner;
|
||||
}
|
||||
|
||||
public function setOwner(?User $owner): static
|
||||
{
|
||||
$this->owner = $owner;
|
||||
|
||||
return $this;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,111 @@
|
|||
<?php
|
||||
|
||||
namespace App\Entity;
|
||||
|
||||
use App\Repository\SellRecordRepository;
|
||||
use Doctrine\DBAL\Types\Types;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
|
||||
#[ORM\Entity(repositoryClass: SellRecordRepository::class)]
|
||||
class SellRecord
|
||||
{
|
||||
#[ORM\Id]
|
||||
#[ORM\GeneratedValue]
|
||||
#[ORM\Column]
|
||||
private ?int $id = null;
|
||||
|
||||
#[ORM\Column(length: 255, nullable: true)]
|
||||
private ?string $customer_gender = null;
|
||||
|
||||
#[ORM\Column(type: Types::DATE_MUTABLE)]
|
||||
private ?\DateTimeInterface $date = null;
|
||||
|
||||
#[ORM\Column]
|
||||
private ?int $amount = null;
|
||||
|
||||
#[ORM\Column(nullable: true)]
|
||||
private ?int $paid_by_customer = null;
|
||||
|
||||
#[ORM\ManyToOne(inversedBy: 'sellRecords')]
|
||||
private ?User $owner = null;
|
||||
|
||||
#[ORM\ManyToOne(inversedBy: 'sell_records')]
|
||||
private ?Festival $festival = null;
|
||||
|
||||
public function getId(): ?int
|
||||
{
|
||||
return $this->id;
|
||||
}
|
||||
|
||||
public function getCustomerGender(): ?string
|
||||
{
|
||||
return $this->customer_gender;
|
||||
}
|
||||
|
||||
public function setCustomerGender(?string $customer_gender): static
|
||||
{
|
||||
$this->customer_gender = $customer_gender;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getDate(): ?\DateTimeInterface
|
||||
{
|
||||
return $this->date;
|
||||
}
|
||||
|
||||
public function setDate(\DateTimeInterface $date): static
|
||||
{
|
||||
$this->date = $date;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getAmount(): ?int
|
||||
{
|
||||
return $this->amount;
|
||||
}
|
||||
|
||||
public function setAmount(int $amount): static
|
||||
{
|
||||
$this->amount = $amount;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getPaidByCustomer(): ?int
|
||||
{
|
||||
return $this->paid_by_customer;
|
||||
}
|
||||
|
||||
public function setPaidByCustomer(?int $paid_by_customer): static
|
||||
{
|
||||
$this->paid_by_customer = $paid_by_customer;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getOwner(): ?User
|
||||
{
|
||||
return $this->owner;
|
||||
}
|
||||
|
||||
public function setOwner(?User $owner): static
|
||||
{
|
||||
$this->owner = $owner;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getFestival(): ?Festival
|
||||
{
|
||||
return $this->festival;
|
||||
}
|
||||
|
||||
public function setFestival(?Festival $festival): static
|
||||
{
|
||||
$this->festival = $festival;
|
||||
|
||||
return $this;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,81 @@
|
|||
<?php
|
||||
|
||||
namespace App\Entity;
|
||||
|
||||
use App\Repository\SerieFestivalRepository;
|
||||
use Doctrine\DBAL\Types\Types;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
|
||||
#[ORM\Entity(repositoryClass: SerieFestivalRepository::class)]
|
||||
class SerieFestival
|
||||
{
|
||||
#[ORM\Id]
|
||||
#[ORM\GeneratedValue]
|
||||
#[ORM\Column]
|
||||
private ?int $id = null;
|
||||
|
||||
#[ORM\Column(length: 255)]
|
||||
private ?string $name = null;
|
||||
|
||||
#[ORM\Column(type: Types::DATE_MUTABLE)]
|
||||
private ?\DateTimeInterface $date_creation = null;
|
||||
|
||||
#[ORM\ManyToOne(inversedBy: 'festivals')]
|
||||
private ?User $owner = null;
|
||||
|
||||
#[ORM\ManyToOne(inversedBy: 'serieFestivals')]
|
||||
private ?Festival $festivals = null;
|
||||
|
||||
public function getId(): ?int
|
||||
{
|
||||
return $this->id;
|
||||
}
|
||||
|
||||
public function getName(): ?string
|
||||
{
|
||||
return $this->name;
|
||||
}
|
||||
|
||||
public function setName(string $name): static
|
||||
{
|
||||
$this->name = $name;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getDateCreation(): ?\DateTimeInterface
|
||||
{
|
||||
return $this->date_creation;
|
||||
}
|
||||
|
||||
public function setDateCreation(\DateTimeInterface $date_creation): static
|
||||
{
|
||||
$this->date_creation = $date_creation;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getOwner(): ?User
|
||||
{
|
||||
return $this->owner;
|
||||
}
|
||||
|
||||
public function setOwner(?User $owner): static
|
||||
{
|
||||
$this->owner = $owner;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getFestivals(): ?Festival
|
||||
{
|
||||
return $this->festivals;
|
||||
}
|
||||
|
||||
public function setFestivals(?Festival $festivals): static
|
||||
{
|
||||
$this->festivals = $festivals;
|
||||
|
||||
return $this;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,334 @@
|
|||
<?php
|
||||
|
||||
namespace App\Entity;
|
||||
|
||||
use App\Repository\UserRepository;
|
||||
use Doctrine\Common\Collections\ArrayCollection;
|
||||
use Doctrine\Common\Collections\Collection;
|
||||
use Doctrine\DBAL\Types\Types;
|
||||
use Doctrine\ORM\Mapping as ORM;
|
||||
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
|
||||
use Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface;
|
||||
use Symfony\Component\Security\Core\User\UserInterface;
|
||||
|
||||
#[ORM\Entity(repositoryClass: UserRepository::class)]
|
||||
#[ORM\Table(name: '`user`')]
|
||||
#[UniqueEntity(fields: ['email'], message: 'There is already an account with this email')]
|
||||
class User implements UserInterface, PasswordAuthenticatedUserInterface
|
||||
{
|
||||
#[ORM\Id]
|
||||
#[ORM\GeneratedValue]
|
||||
#[ORM\Column]
|
||||
private ?int $id = null;
|
||||
|
||||
#[ORM\Column(length: 180, unique: true)]
|
||||
private ?string $email = null;
|
||||
|
||||
|
||||
#[ORM\Column]
|
||||
private array $roles = [];
|
||||
|
||||
/**
|
||||
* @var string The hashed password
|
||||
*/
|
||||
#[ORM\Column]
|
||||
private ?string $password = null;
|
||||
|
||||
#[ORM\Column(type: 'boolean')]
|
||||
private $isVerified = false;
|
||||
|
||||
#[ORM\Column(length: 500, nullable: true)]
|
||||
private ?string $description = null;
|
||||
|
||||
#[ORM\Column(type: Types::DATE_MUTABLE, nullable: true)]
|
||||
private ?\DateTimeInterface $last_login = null;
|
||||
|
||||
#[ORM\OneToMany(targetEntity: Product::class, mappedBy: 'owner')]
|
||||
private Collection $products;
|
||||
|
||||
#[ORM\OneToMany(targetEntity: SellRecord::class, mappedBy: 'owner')]
|
||||
private Collection $sellRecords;
|
||||
|
||||
#[ORM\ManyToMany(targetEntity: ProductCategory::class, mappedBy: 'owners')]
|
||||
private Collection $productCategories;
|
||||
|
||||
#[ORM\OneToMany(targetEntity: ProductSold::class, mappedBy: 'owner')]
|
||||
private Collection $product;
|
||||
|
||||
#[ORM\OneToMany(targetEntity: ExepenseConfig::class, mappedBy: 'owner')]
|
||||
private Collection $exepenseConfigs;
|
||||
|
||||
#[ORM\OneToMany(targetEntity: SerieFestival::class, mappedBy: 'owner')]
|
||||
private Collection $festivals;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->products = new ArrayCollection();
|
||||
$this->sellRecords = new ArrayCollection();
|
||||
$this->productCategories = new ArrayCollection();
|
||||
$this->product = new ArrayCollection();
|
||||
$this->exepenseConfigs = new ArrayCollection();
|
||||
$this->festivals = new ArrayCollection();
|
||||
}
|
||||
|
||||
public function getId(): ?int
|
||||
{
|
||||
return $this->id;
|
||||
}
|
||||
|
||||
public function getEmail(): ?string
|
||||
{
|
||||
return $this->email;
|
||||
}
|
||||
|
||||
public function setEmail(string $email): static
|
||||
{
|
||||
$this->email = $email;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* A visual identifier that represents this user.
|
||||
*
|
||||
* @see UserInterface
|
||||
*/
|
||||
public function getUserIdentifier(): string
|
||||
{
|
||||
return (string) $this->email;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see UserInterface
|
||||
*/
|
||||
public function getRoles(): array
|
||||
{
|
||||
$roles = $this->roles;
|
||||
// guarantee every user at least has ROLE_USER
|
||||
$roles[] = 'ROLE_USER';
|
||||
|
||||
return array_unique($roles);
|
||||
}
|
||||
|
||||
public function setRoles(array $roles): static
|
||||
{
|
||||
$this->roles = $roles;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see PasswordAuthenticatedUserInterface
|
||||
*/
|
||||
public function getPassword(): string
|
||||
{
|
||||
return $this->password;
|
||||
}
|
||||
|
||||
public function setPassword(string $password): static
|
||||
{
|
||||
$this->password = $password;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see UserInterface
|
||||
*/
|
||||
public function eraseCredentials(): void
|
||||
{
|
||||
// If you store any temporary, sensitive data on the user, clear it here
|
||||
// $this->plainPassword = null;
|
||||
}
|
||||
|
||||
public function isVerified(): bool
|
||||
{
|
||||
return $this->isVerified;
|
||||
}
|
||||
|
||||
public function setIsVerified(bool $isVerified): static
|
||||
{
|
||||
$this->isVerified = $isVerified;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getDescription(): ?string
|
||||
{
|
||||
return $this->description;
|
||||
}
|
||||
|
||||
public function setDescription(?string $description): static
|
||||
{
|
||||
$this->description = $description;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getLastLogin(): ?\DateTimeInterface
|
||||
{
|
||||
return $this->last_login;
|
||||
}
|
||||
|
||||
public function setLastLogin(?\DateTimeInterface $last_login): static
|
||||
{
|
||||
$this->last_login = $last_login;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Collection<int, Product>
|
||||
*/
|
||||
public function getProducts(): Collection
|
||||
{
|
||||
return $this->products;
|
||||
}
|
||||
|
||||
public function addProduct(Product $product): static
|
||||
{
|
||||
if (!$this->products->contains($product)) {
|
||||
$this->products->add($product);
|
||||
$product->setOwner($this);
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function removeProduct(Product $product): static
|
||||
{
|
||||
if ($this->products->removeElement($product)) {
|
||||
// set the owning side to null (unless already changed)
|
||||
if ($product->getOwner() === $this) {
|
||||
$product->setOwner(null);
|
||||
}
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Collection<int, SellRecord>
|
||||
*/
|
||||
public function getSellRecords(): Collection
|
||||
{
|
||||
return $this->sellRecords;
|
||||
}
|
||||
|
||||
public function addSellRecord(SellRecord $sellRecord): static
|
||||
{
|
||||
if (!$this->sellRecords->contains($sellRecord)) {
|
||||
$this->sellRecords->add($sellRecord);
|
||||
$sellRecord->setOwner($this);
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function removeSellRecord(SellRecord $sellRecord): static
|
||||
{
|
||||
if ($this->sellRecords->removeElement($sellRecord)) {
|
||||
// set the owning side to null (unless already changed)
|
||||
if ($sellRecord->getOwner() === $this) {
|
||||
$sellRecord->setOwner(null);
|
||||
}
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Collection<int, ProductCategory>
|
||||
*/
|
||||
public function getProductCategories(): Collection
|
||||
{
|
||||
return $this->productCategories;
|
||||
}
|
||||
|
||||
public function addProductCategory(ProductCategory $productCategory): static
|
||||
{
|
||||
if (!$this->productCategories->contains($productCategory)) {
|
||||
$this->productCategories->add($productCategory);
|
||||
$productCategory->addOwner($this);
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function removeProductCategory(ProductCategory $productCategory): static
|
||||
{
|
||||
if ($this->productCategories->removeElement($productCategory)) {
|
||||
$productCategory->removeOwner($this);
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Collection<int, ProductSold>
|
||||
*/
|
||||
public function getProduct(): Collection
|
||||
{
|
||||
return $this->product;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Collection<int, ExepenseConfig>
|
||||
*/
|
||||
public function getExepenseConfigs(): Collection
|
||||
{
|
||||
return $this->exepenseConfigs;
|
||||
}
|
||||
|
||||
public function addExepenseConfig(ExepenseConfig $exepenseConfig): static
|
||||
{
|
||||
if (!$this->exepenseConfigs->contains($exepenseConfig)) {
|
||||
$this->exepenseConfigs->add($exepenseConfig);
|
||||
$exepenseConfig->setOwner($this);
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function removeExepenseConfig(ExepenseConfig $exepenseConfig): static
|
||||
{
|
||||
if ($this->exepenseConfigs->removeElement($exepenseConfig)) {
|
||||
// set the owning side to null (unless already changed)
|
||||
if ($exepenseConfig->getOwner() === $this) {
|
||||
$exepenseConfig->setOwner(null);
|
||||
}
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return Collection<int, SerieFestival>
|
||||
*/
|
||||
public function getFestivals(): Collection
|
||||
{
|
||||
return $this->festivals;
|
||||
}
|
||||
|
||||
public function addFestival(SerieFestival $festival): static
|
||||
{
|
||||
if (!$this->festivals->contains($festival)) {
|
||||
$this->festivals->add($festival);
|
||||
$festival->setOwner($this);
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function removeFestival(SerieFestival $festival): static
|
||||
{
|
||||
if ($this->festivals->removeElement($festival)) {
|
||||
// set the owning side to null (unless already changed)
|
||||
if ($festival->getOwner() === $this) {
|
||||
$festival->setOwner(null);
|
||||
}
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,55 @@
|
|||
<?php
|
||||
|
||||
namespace App\Form;
|
||||
|
||||
use App\Entity\User;
|
||||
use Symfony\Component\Form\AbstractType;
|
||||
use Symfony\Component\Form\Extension\Core\Type\CheckboxType;
|
||||
use Symfony\Component\Form\Extension\Core\Type\PasswordType;
|
||||
use Symfony\Component\Form\FormBuilderInterface;
|
||||
use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||
use Symfony\Component\Validator\Constraints\IsTrue;
|
||||
use Symfony\Component\Validator\Constraints\Length;
|
||||
use Symfony\Component\Validator\Constraints\NotBlank;
|
||||
|
||||
class RegistrationFormType extends AbstractType
|
||||
{
|
||||
public function buildForm(FormBuilderInterface $builder, array $options): void
|
||||
{
|
||||
$builder
|
||||
->add('email')
|
||||
->add('agreeTerms', CheckboxType::class, [
|
||||
'mapped' => false,
|
||||
'constraints' => [
|
||||
new IsTrue([
|
||||
'message' => 'You should agree to our terms.',
|
||||
]),
|
||||
],
|
||||
])
|
||||
->add('plainPassword', PasswordType::class, [
|
||||
// instead of being set onto the object directly,
|
||||
// this is read and encoded in the controller
|
||||
'mapped' => false,
|
||||
'attr' => ['autocomplete' => 'new-password'],
|
||||
'constraints' => [
|
||||
new NotBlank([
|
||||
'message' => 'Please enter a password',
|
||||
]),
|
||||
new Length([
|
||||
'min' => 6,
|
||||
'minMessage' => 'Your password should be at least {{ limit }} characters',
|
||||
// max length allowed by Symfony for security reasons
|
||||
'max' => 4096,
|
||||
]),
|
||||
],
|
||||
])
|
||||
;
|
||||
}
|
||||
|
||||
public function configureOptions(OptionsResolver $resolver): void
|
||||
{
|
||||
$resolver->setDefaults([
|
||||
'data_class' => User::class,
|
||||
]);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
<?php
|
||||
|
||||
namespace App;
|
||||
|
||||
use Symfony\Bundle\FrameworkBundle\Kernel\MicroKernelTrait;
|
||||
use Symfony\Component\HttpKernel\Kernel as BaseKernel;
|
||||
|
||||
class Kernel extends BaseKernel
|
||||
{
|
||||
use MicroKernelTrait;
|
||||
}
|
|
@ -0,0 +1,48 @@
|
|||
<?php
|
||||
|
||||
namespace App\Repository;
|
||||
|
||||
use App\Entity\ExepenseConfig;
|
||||
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
|
||||
use Doctrine\Persistence\ManagerRegistry;
|
||||
|
||||
/**
|
||||
* @extends ServiceEntityRepository<ExepenseConfig>
|
||||
*
|
||||
* @method ExepenseConfig|null find($id, $lockMode = null, $lockVersion = null)
|
||||
* @method ExepenseConfig|null findOneBy(array $criteria, array $orderBy = null)
|
||||
* @method ExepenseConfig[] findAll()
|
||||
* @method ExepenseConfig[] findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null)
|
||||
*/
|
||||
class ExepenseConfigRepository extends ServiceEntityRepository
|
||||
{
|
||||
public function __construct(ManagerRegistry $registry)
|
||||
{
|
||||
parent::__construct($registry, ExepenseConfig::class);
|
||||
}
|
||||
|
||||
// /**
|
||||
// * @return ExepenseConfig[] Returns an array of ExepenseConfig objects
|
||||
// */
|
||||
// public function findByExampleField($value): array
|
||||
// {
|
||||
// return $this->createQueryBuilder('e')
|
||||
// ->andWhere('e.exampleField = :val')
|
||||
// ->setParameter('val', $value)
|
||||
// ->orderBy('e.id', 'ASC')
|
||||
// ->setMaxResults(10)
|
||||
// ->getQuery()
|
||||
// ->getResult()
|
||||
// ;
|
||||
// }
|
||||
|
||||
// public function findOneBySomeField($value): ?ExepenseConfig
|
||||
// {
|
||||
// return $this->createQueryBuilder('e')
|
||||
// ->andWhere('e.exampleField = :val')
|
||||
// ->setParameter('val', $value)
|
||||
// ->getQuery()
|
||||
// ->getOneOrNullResult()
|
||||
// ;
|
||||
// }
|
||||
}
|
|
@ -0,0 +1,48 @@
|
|||
<?php
|
||||
|
||||
namespace App\Repository;
|
||||
|
||||
use App\Entity\Festival;
|
||||
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
|
||||
use Doctrine\Persistence\ManagerRegistry;
|
||||
|
||||
/**
|
||||
* @extends ServiceEntityRepository<Festival>
|
||||
*
|
||||
* @method Festival|null find($id, $lockMode = null, $lockVersion = null)
|
||||
* @method Festival|null findOneBy(array $criteria, array $orderBy = null)
|
||||
* @method Festival[] findAll()
|
||||
* @method Festival[] findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null)
|
||||
*/
|
||||
class FestivalRepository extends ServiceEntityRepository
|
||||
{
|
||||
public function __construct(ManagerRegistry $registry)
|
||||
{
|
||||
parent::__construct($registry, Festival::class);
|
||||
}
|
||||
|
||||
// /**
|
||||
// * @return Festival[] Returns an array of Festival objects
|
||||
// */
|
||||
// public function findByExampleField($value): array
|
||||
// {
|
||||
// return $this->createQueryBuilder('f')
|
||||
// ->andWhere('f.exampleField = :val')
|
||||
// ->setParameter('val', $value)
|
||||
// ->orderBy('f.id', 'ASC')
|
||||
// ->setMaxResults(10)
|
||||
// ->getQuery()
|
||||
// ->getResult()
|
||||
// ;
|
||||
// }
|
||||
|
||||
// public function findOneBySomeField($value): ?Festival
|
||||
// {
|
||||
// return $this->createQueryBuilder('f')
|
||||
// ->andWhere('f.exampleField = :val')
|
||||
// ->setParameter('val', $value)
|
||||
// ->getQuery()
|
||||
// ->getOneOrNullResult()
|
||||
// ;
|
||||
// }
|
||||
}
|
|
@ -0,0 +1,48 @@
|
|||
<?php
|
||||
|
||||
namespace App\Repository;
|
||||
|
||||
use App\Entity\ProductCategory;
|
||||
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
|
||||
use Doctrine\Persistence\ManagerRegistry;
|
||||
|
||||
/**
|
||||
* @extends ServiceEntityRepository<ProductCategory>
|
||||
*
|
||||
* @method ProductCategory|null find($id, $lockMode = null, $lockVersion = null)
|
||||
* @method ProductCategory|null findOneBy(array $criteria, array $orderBy = null)
|
||||
* @method ProductCategory[] findAll()
|
||||
* @method ProductCategory[] findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null)
|
||||
*/
|
||||
class ProductCategoryRepository extends ServiceEntityRepository
|
||||
{
|
||||
public function __construct(ManagerRegistry $registry)
|
||||
{
|
||||
parent::__construct($registry, ProductCategory::class);
|
||||
}
|
||||
|
||||
// /**
|
||||
// * @return ProductCategory[] Returns an array of ProductCategory objects
|
||||
// */
|
||||
// public function findByExampleField($value): array
|
||||
// {
|
||||
// return $this->createQueryBuilder('p')
|
||||
// ->andWhere('p.exampleField = :val')
|
||||
// ->setParameter('val', $value)
|
||||
// ->orderBy('p.id', 'ASC')
|
||||
// ->setMaxResults(10)
|
||||
// ->getQuery()
|
||||
// ->getResult()
|
||||
// ;
|
||||
// }
|
||||
|
||||
// public function findOneBySomeField($value): ?ProductCategory
|
||||
// {
|
||||
// return $this->createQueryBuilder('p')
|
||||
// ->andWhere('p.exampleField = :val')
|
||||
// ->setParameter('val', $value)
|
||||
// ->getQuery()
|
||||
// ->getOneOrNullResult()
|
||||
// ;
|
||||
// }
|
||||
}
|
|
@ -0,0 +1,48 @@
|
|||
<?php
|
||||
|
||||
namespace App\Repository;
|
||||
|
||||
use App\Entity\Product;
|
||||
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
|
||||
use Doctrine\Persistence\ManagerRegistry;
|
||||
|
||||
/**
|
||||
* @extends ServiceEntityRepository<Product>
|
||||
*
|
||||
* @method Product|null find($id, $lockMode = null, $lockVersion = null)
|
||||
* @method Product|null findOneBy(array $criteria, array $orderBy = null)
|
||||
* @method Product[] findAll()
|
||||
* @method Product[] findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null)
|
||||
*/
|
||||
class ProductRepository extends ServiceEntityRepository
|
||||
{
|
||||
public function __construct(ManagerRegistry $registry)
|
||||
{
|
||||
parent::__construct($registry, Product::class);
|
||||
}
|
||||
|
||||
// /**
|
||||
// * @return Product[] Returns an array of Product objects
|
||||
// */
|
||||
// public function findByExampleField($value): array
|
||||
// {
|
||||
// return $this->createQueryBuilder('p')
|
||||
// ->andWhere('p.exampleField = :val')
|
||||
// ->setParameter('val', $value)
|
||||
// ->orderBy('p.id', 'ASC')
|
||||
// ->setMaxResults(10)
|
||||
// ->getQuery()
|
||||
// ->getResult()
|
||||
// ;
|
||||
// }
|
||||
|
||||
// public function findOneBySomeField($value): ?Product
|
||||
// {
|
||||
// return $this->createQueryBuilder('p')
|
||||
// ->andWhere('p.exampleField = :val')
|
||||
// ->setParameter('val', $value)
|
||||
// ->getQuery()
|
||||
// ->getOneOrNullResult()
|
||||
// ;
|
||||
// }
|
||||
}
|
|
@ -0,0 +1,48 @@
|
|||
<?php
|
||||
|
||||
namespace App\Repository;
|
||||
|
||||
use App\Entity\ProductSold;
|
||||
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
|
||||
use Doctrine\Persistence\ManagerRegistry;
|
||||
|
||||
/**
|
||||
* @extends ServiceEntityRepository<ProductSold>
|
||||
*
|
||||
* @method ProductSold|null find($id, $lockMode = null, $lockVersion = null)
|
||||
* @method ProductSold|null findOneBy(array $criteria, array $orderBy = null)
|
||||
* @method ProductSold[] findAll()
|
||||
* @method ProductSold[] findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null)
|
||||
*/
|
||||
class ProductSoldRepository extends ServiceEntityRepository
|
||||
{
|
||||
public function __construct(ManagerRegistry $registry)
|
||||
{
|
||||
parent::__construct($registry, ProductSold::class);
|
||||
}
|
||||
|
||||
// /**
|
||||
// * @return ProductSold[] Returns an array of ProductSold objects
|
||||
// */
|
||||
// public function findByExampleField($value): array
|
||||
// {
|
||||
// return $this->createQueryBuilder('p')
|
||||
// ->andWhere('p.exampleField = :val')
|
||||
// ->setParameter('val', $value)
|
||||
// ->orderBy('p.id', 'ASC')
|
||||
// ->setMaxResults(10)
|
||||
// ->getQuery()
|
||||
// ->getResult()
|
||||
// ;
|
||||
// }
|
||||
|
||||
// public function findOneBySomeField($value): ?ProductSold
|
||||
// {
|
||||
// return $this->createQueryBuilder('p')
|
||||
// ->andWhere('p.exampleField = :val')
|
||||
// ->setParameter('val', $value)
|
||||
// ->getQuery()
|
||||
// ->getOneOrNullResult()
|
||||
// ;
|
||||
// }
|
||||
}
|
|
@ -0,0 +1,48 @@
|
|||
<?php
|
||||
|
||||
namespace App\Repository;
|
||||
|
||||
use App\Entity\SellRecord;
|
||||
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
|
||||
use Doctrine\Persistence\ManagerRegistry;
|
||||
|
||||
/**
|
||||
* @extends ServiceEntityRepository<SellRecord>
|
||||
*
|
||||
* @method SellRecord|null find($id, $lockMode = null, $lockVersion = null)
|
||||
* @method SellRecord|null findOneBy(array $criteria, array $orderBy = null)
|
||||
* @method SellRecord[] findAll()
|
||||
* @method SellRecord[] findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null)
|
||||
*/
|
||||
class SellRecordRepository extends ServiceEntityRepository
|
||||
{
|
||||
public function __construct(ManagerRegistry $registry)
|
||||
{
|
||||
parent::__construct($registry, SellRecord::class);
|
||||
}
|
||||
|
||||
// /**
|
||||
// * @return SellRecord[] Returns an array of SellRecord objects
|
||||
// */
|
||||
// public function findByExampleField($value): array
|
||||
// {
|
||||
// return $this->createQueryBuilder('s')
|
||||
// ->andWhere('s.exampleField = :val')
|
||||
// ->setParameter('val', $value)
|
||||
// ->orderBy('s.id', 'ASC')
|
||||
// ->setMaxResults(10)
|
||||
// ->getQuery()
|
||||
// ->getResult()
|
||||
// ;
|
||||
// }
|
||||
|
||||
// public function findOneBySomeField($value): ?SellRecord
|
||||
// {
|
||||
// return $this->createQueryBuilder('s')
|
||||
// ->andWhere('s.exampleField = :val')
|
||||
// ->setParameter('val', $value)
|
||||
// ->getQuery()
|
||||
// ->getOneOrNullResult()
|
||||
// ;
|
||||
// }
|
||||
}
|
|
@ -0,0 +1,48 @@
|
|||
<?php
|
||||
|
||||
namespace App\Repository;
|
||||
|
||||
use App\Entity\SerieFestival;
|
||||
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
|
||||
use Doctrine\Persistence\ManagerRegistry;
|
||||
|
||||
/**
|
||||
* @extends ServiceEntityRepository<SerieFestival>
|
||||
*
|
||||
* @method SerieFestival|null find($id, $lockMode = null, $lockVersion = null)
|
||||
* @method SerieFestival|null findOneBy(array $criteria, array $orderBy = null)
|
||||
* @method SerieFestival[] findAll()
|
||||
* @method SerieFestival[] findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null)
|
||||
*/
|
||||
class SerieFestivalRepository extends ServiceEntityRepository
|
||||
{
|
||||
public function __construct(ManagerRegistry $registry)
|
||||
{
|
||||
parent::__construct($registry, SerieFestival::class);
|
||||
}
|
||||
|
||||
// /**
|
||||
// * @return SerieFestival[] Returns an array of SerieFestival objects
|
||||
// */
|
||||
// public function findByExampleField($value): array
|
||||
// {
|
||||
// return $this->createQueryBuilder('s')
|
||||
// ->andWhere('s.exampleField = :val')
|
||||
// ->setParameter('val', $value)
|
||||
// ->orderBy('s.id', 'ASC')
|
||||
// ->setMaxResults(10)
|
||||
// ->getQuery()
|
||||
// ->getResult()
|
||||
// ;
|
||||
// }
|
||||
|
||||
// public function findOneBySomeField($value): ?SerieFestival
|
||||
// {
|
||||
// return $this->createQueryBuilder('s')
|
||||
// ->andWhere('s.exampleField = :val')
|
||||
// ->setParameter('val', $value)
|
||||
// ->getQuery()
|
||||
// ->getOneOrNullResult()
|
||||
// ;
|
||||
// }
|
||||
}
|
|
@ -0,0 +1,43 @@
|
|||
<?php
|
||||
|
||||
namespace App\Repository;
|
||||
|
||||
use App\Entity\User;
|
||||
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
|
||||
use Doctrine\Persistence\ManagerRegistry;
|
||||
use Symfony\Component\Security\Core\Exception\UnsupportedUserException;
|
||||
use Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface;
|
||||
use Symfony\Component\Security\Core\User\PasswordUpgraderInterface;
|
||||
|
||||
/**
|
||||
* @extends ServiceEntityRepository<User>
|
||||
*
|
||||
* @implements PasswordUpgraderInterface<User>
|
||||
*
|
||||
* @method User|null find($id, $lockMode = null, $lockVersion = null)
|
||||
* @method User|null findOneBy(array $criteria, array $orderBy = null)
|
||||
* @method User[] findAll()
|
||||
* @method User[] findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null)
|
||||
*/
|
||||
class UserRepository extends ServiceEntityRepository implements PasswordUpgraderInterface
|
||||
{
|
||||
public function __construct(ManagerRegistry $registry)
|
||||
{
|
||||
parent::__construct($registry, User::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Used to upgrade (rehash) the user's password automatically over time.
|
||||
*/
|
||||
public function upgradePassword(PasswordAuthenticatedUserInterface $user, string $newHashedPassword): void
|
||||
{
|
||||
if (!$user instanceof User) {
|
||||
throw new UnsupportedUserException(sprintf('Instances of "%s" are not supported.', $user::class));
|
||||
}
|
||||
|
||||
$user->setPassword($newHashedPassword);
|
||||
$this->getEntityManager()->persist($user);
|
||||
$this->getEntityManager()->flush();
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,52 @@
|
|||
<?php
|
||||
|
||||
namespace App\Security;
|
||||
|
||||
use Doctrine\ORM\EntityManagerInterface;
|
||||
use Symfony\Bridge\Twig\Mime\TemplatedEmail;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\Mailer\MailerInterface;
|
||||
use Symfony\Component\Security\Core\User\UserInterface;
|
||||
use SymfonyCasts\Bundle\VerifyEmail\Exception\VerifyEmailExceptionInterface;
|
||||
use SymfonyCasts\Bundle\VerifyEmail\VerifyEmailHelperInterface;
|
||||
|
||||
class EmailVerifier
|
||||
{
|
||||
public function __construct(
|
||||
private VerifyEmailHelperInterface $verifyEmailHelper,
|
||||
private MailerInterface $mailer,
|
||||
private EntityManagerInterface $entityManager
|
||||
) {
|
||||
}
|
||||
|
||||
public function sendEmailConfirmation(string $verifyEmailRouteName, UserInterface $user, TemplatedEmail $email): void
|
||||
{
|
||||
$signatureComponents = $this->verifyEmailHelper->generateSignature(
|
||||
$verifyEmailRouteName,
|
||||
$user->getId(),
|
||||
$user->getEmail()
|
||||
);
|
||||
|
||||
$context = $email->getContext();
|
||||
$context['signedUrl'] = $signatureComponents->getSignedUrl();
|
||||
$context['expiresAtMessageKey'] = $signatureComponents->getExpirationMessageKey();
|
||||
$context['expiresAtMessageData'] = $signatureComponents->getExpirationMessageData();
|
||||
|
||||
$email->context($context);
|
||||
|
||||
$this->mailer->send($email);
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws VerifyEmailExceptionInterface
|
||||
*/
|
||||
public function handleEmailConfirmation(Request $request, UserInterface $user): void
|
||||
{
|
||||
$this->verifyEmailHelper->validateEmailConfirmation($request->getUri(), $user->getId(), $user->getEmail());
|
||||
|
||||
$user->setIsVerified(true);
|
||||
|
||||
$this->entityManager->persist($user);
|
||||
$this->entityManager->flush();
|
||||
}
|
||||
}
|
143
symfony.lock
143
symfony.lock
|
@ -1,34 +1,11 @@
|
|||
{
|
||||
"api-platform/core": {
|
||||
"version": "2.7",
|
||||
"recipe": {
|
||||
"repo": "github.com/symfony/recipes",
|
||||
"branch": "main",
|
||||
"version": "2.5",
|
||||
"ref": "05b57782a78c21a664a42055dc11cf1954ca36bb"
|
||||
},
|
||||
"files": [
|
||||
"config/packages/api_platform.yaml",
|
||||
"config/routes/api_platform.yaml",
|
||||
"src/Entity/.gitignore"
|
||||
]
|
||||
},
|
||||
"doctrine/annotations": {
|
||||
"version": "1.14",
|
||||
"recipe": {
|
||||
"repo": "github.com/symfony/recipes",
|
||||
"branch": "main",
|
||||
"version": "1.10",
|
||||
"ref": "64d8583af5ea57b7afa4aba4b159907f3a148b05"
|
||||
}
|
||||
},
|
||||
"doctrine/doctrine-bundle": {
|
||||
"version": "2.10",
|
||||
"version": "2.12",
|
||||
"recipe": {
|
||||
"repo": "github.com/symfony/recipes",
|
||||
"branch": "main",
|
||||
"version": "2.4",
|
||||
"ref": "013b823e7fee65890b23e40f31e6667a1ac519ac"
|
||||
"ref": "91690c0a440faba1a3676256bcca2b4aa9f55b72"
|
||||
},
|
||||
"files": [
|
||||
"config/packages/doctrine.yaml",
|
||||
|
@ -37,7 +14,7 @@
|
|||
]
|
||||
},
|
||||
"doctrine/doctrine-fixtures-bundle": {
|
||||
"version": "3.4",
|
||||
"version": "3.6",
|
||||
"recipe": {
|
||||
"repo": "github.com/symfony/recipes",
|
||||
"branch": "main",
|
||||
|
@ -49,7 +26,7 @@
|
|||
]
|
||||
},
|
||||
"doctrine/doctrine-migrations-bundle": {
|
||||
"version": "3.2",
|
||||
"version": "3.3",
|
||||
"recipe": {
|
||||
"repo": "github.com/symfony/recipes",
|
||||
"branch": "main",
|
||||
|
@ -61,27 +38,6 @@
|
|||
"migrations/.gitignore"
|
||||
]
|
||||
},
|
||||
"easycorp/easyadmin-bundle": {
|
||||
"version": "4.6",
|
||||
"recipe": {
|
||||
"repo": "github.com/symfony/recipes",
|
||||
"branch": "main",
|
||||
"version": "3.0",
|
||||
"ref": "b131e6cbfe1b898a508987851963fff485986285"
|
||||
}
|
||||
},
|
||||
"nelmio/cors-bundle": {
|
||||
"version": "2.3",
|
||||
"recipe": {
|
||||
"repo": "github.com/symfony/recipes",
|
||||
"branch": "main",
|
||||
"version": "1.5",
|
||||
"ref": "6bea22e6c564fba3a1391615cada1437d0bde39c"
|
||||
},
|
||||
"files": [
|
||||
"config/packages/nelmio_cors.yaml"
|
||||
]
|
||||
},
|
||||
"phpstan/phpstan": {
|
||||
"version": "1.11",
|
||||
"recipe": {
|
||||
|
@ -108,32 +64,20 @@
|
|||
"tests/bootstrap.php"
|
||||
]
|
||||
},
|
||||
"sensio/framework-extra-bundle": {
|
||||
"version": "6.2",
|
||||
"recipe": {
|
||||
"repo": "github.com/symfony/recipes",
|
||||
"branch": "main",
|
||||
"version": "5.2",
|
||||
"ref": "fb7e19da7f013d0d422fa9bce16f5c510e27609b"
|
||||
},
|
||||
"files": [
|
||||
"config/packages/sensio_framework_extra.yaml"
|
||||
]
|
||||
},
|
||||
"symfony/console": {
|
||||
"version": "6.0",
|
||||
"version": "6.1",
|
||||
"recipe": {
|
||||
"repo": "github.com/symfony/recipes",
|
||||
"branch": "main",
|
||||
"version": "5.3",
|
||||
"ref": "da0c8be8157600ad34f10ff0c9cc91232522e047"
|
||||
"ref": "1781ff40d8a17d87cf53f8d4cf0c8346ed2bb461"
|
||||
},
|
||||
"files": [
|
||||
"bin/console"
|
||||
]
|
||||
},
|
||||
"symfony/debug-bundle": {
|
||||
"version": "6.0",
|
||||
"version": "6.1",
|
||||
"recipe": {
|
||||
"repo": "github.com/symfony/recipes",
|
||||
"branch": "main",
|
||||
|
@ -145,7 +89,7 @@
|
|||
]
|
||||
},
|
||||
"symfony/flex": {
|
||||
"version": "2.3",
|
||||
"version": "2.4",
|
||||
"recipe": {
|
||||
"repo": "github.com/symfony/recipes",
|
||||
"branch": "main",
|
||||
|
@ -157,7 +101,7 @@
|
|||
]
|
||||
},
|
||||
"symfony/framework-bundle": {
|
||||
"version": "6.0",
|
||||
"version": "6.1",
|
||||
"recipe": {
|
||||
"repo": "github.com/symfony/recipes",
|
||||
"branch": "main",
|
||||
|
@ -175,20 +119,32 @@
|
|||
"src/Kernel.php"
|
||||
]
|
||||
},
|
||||
"symfony/lock": {
|
||||
"version": "6.1",
|
||||
"recipe": {
|
||||
"repo": "github.com/symfony/recipes",
|
||||
"branch": "main",
|
||||
"version": "5.2",
|
||||
"ref": "8e937ff2b4735d110af1770f242c1107fdab4c8e"
|
||||
},
|
||||
"files": [
|
||||
"config/packages/lock.yaml"
|
||||
]
|
||||
},
|
||||
"symfony/mailer": {
|
||||
"version": "6.0",
|
||||
"version": "6.1",
|
||||
"recipe": {
|
||||
"repo": "github.com/symfony/recipes",
|
||||
"branch": "main",
|
||||
"version": "4.3",
|
||||
"ref": "2bf89438209656b85b9a49238c4467bff1b1f939"
|
||||
"ref": "df66ee1f226c46f01e85c29c2f7acce0596ba35a"
|
||||
},
|
||||
"files": [
|
||||
"config/packages/mailer.yaml"
|
||||
]
|
||||
},
|
||||
"symfony/maker-bundle": {
|
||||
"version": "1.49",
|
||||
"version": "1.50",
|
||||
"recipe": {
|
||||
"repo": "github.com/symfony/recipes",
|
||||
"branch": "main",
|
||||
|
@ -197,7 +153,7 @@
|
|||
}
|
||||
},
|
||||
"symfony/messenger": {
|
||||
"version": "6.0",
|
||||
"version": "6.1",
|
||||
"recipe": {
|
||||
"repo": "github.com/symfony/recipes",
|
||||
"branch": "main",
|
||||
|
@ -209,19 +165,19 @@
|
|||
]
|
||||
},
|
||||
"symfony/monolog-bundle": {
|
||||
"version": "3.8",
|
||||
"version": "3.10",
|
||||
"recipe": {
|
||||
"repo": "github.com/symfony/recipes",
|
||||
"branch": "main",
|
||||
"version": "3.7",
|
||||
"ref": "213676c4ec929f046dfde5ea8e97625b81bc0578"
|
||||
"ref": "aff23899c4440dd995907613c1dd709b6f59503f"
|
||||
},
|
||||
"files": [
|
||||
"config/packages/monolog.yaml"
|
||||
]
|
||||
},
|
||||
"symfony/notifier": {
|
||||
"version": "6.0",
|
||||
"version": "6.1",
|
||||
"recipe": {
|
||||
"repo": "github.com/symfony/recipes",
|
||||
"branch": "main",
|
||||
|
@ -233,12 +189,12 @@
|
|||
]
|
||||
},
|
||||
"symfony/phpunit-bridge": {
|
||||
"version": "6.3",
|
||||
"version": "7.0",
|
||||
"recipe": {
|
||||
"repo": "github.com/symfony/recipes",
|
||||
"branch": "main",
|
||||
"version": "6.3",
|
||||
"ref": "01dfaa98c58f7a7b5a9b30e6edb7074af7ed9819"
|
||||
"ref": "a411a0480041243d97382cac7984f7dce7813c08"
|
||||
},
|
||||
"files": [
|
||||
".env.test",
|
||||
|
@ -248,12 +204,12 @@
|
|||
]
|
||||
},
|
||||
"symfony/routing": {
|
||||
"version": "6.0",
|
||||
"version": "6.1",
|
||||
"recipe": {
|
||||
"repo": "github.com/symfony/recipes",
|
||||
"branch": "main",
|
||||
"version": "6.0",
|
||||
"ref": "eb3b377a4dc07006c4bdb2c773652cc9434f5246"
|
||||
"version": "6.1",
|
||||
"ref": "a44010c0d06989bd4f154aa07d2542d47caf5b83"
|
||||
},
|
||||
"files": [
|
||||
"config/packages/routing.yaml",
|
||||
|
@ -261,7 +217,7 @@
|
|||
]
|
||||
},
|
||||
"symfony/security-bundle": {
|
||||
"version": "6.0",
|
||||
"version": "6.1",
|
||||
"recipe": {
|
||||
"repo": "github.com/symfony/recipes",
|
||||
"branch": "main",
|
||||
|
@ -273,12 +229,12 @@
|
|||
]
|
||||
},
|
||||
"symfony/translation": {
|
||||
"version": "6.0",
|
||||
"version": "6.1",
|
||||
"recipe": {
|
||||
"repo": "github.com/symfony/recipes",
|
||||
"branch": "main",
|
||||
"version": "5.3",
|
||||
"ref": "da64f5a2b6d96f5dc24914517c0350a5f91dee43"
|
||||
"ref": "e28e27f53663cc34f0be2837aba18e3a1bef8e7b"
|
||||
},
|
||||
"files": [
|
||||
"config/packages/translation.yaml",
|
||||
|
@ -286,7 +242,7 @@
|
|||
]
|
||||
},
|
||||
"symfony/twig-bundle": {
|
||||
"version": "6.0",
|
||||
"version": "6.1",
|
||||
"recipe": {
|
||||
"repo": "github.com/symfony/recipes",
|
||||
"branch": "main",
|
||||
|
@ -299,7 +255,7 @@
|
|||
]
|
||||
},
|
||||
"symfony/validator": {
|
||||
"version": "6.0",
|
||||
"version": "6.1",
|
||||
"recipe": {
|
||||
"repo": "github.com/symfony/recipes",
|
||||
"branch": "main",
|
||||
|
@ -311,30 +267,18 @@
|
|||
]
|
||||
},
|
||||
"symfony/web-profiler-bundle": {
|
||||
"version": "6.0",
|
||||
"version": "6.1",
|
||||
"recipe": {
|
||||
"repo": "github.com/symfony/recipes",
|
||||
"branch": "main",
|
||||
"version": "5.3",
|
||||
"ref": "24bbc3d84ef2f427f82104f766014e799eefcc3e"
|
||||
"version": "6.1",
|
||||
"ref": "e42b3f0177df239add25373083a564e5ead4e13a"
|
||||
},
|
||||
"files": [
|
||||
"config/packages/web_profiler.yaml",
|
||||
"config/routes/web_profiler.yaml"
|
||||
]
|
||||
},
|
||||
"symfony/webapp-pack": {
|
||||
"version": "1.2",
|
||||
"recipe": {
|
||||
"repo": "github.com/symfony/recipes",
|
||||
"branch": "main",
|
||||
"version": "1.0",
|
||||
"ref": "aece95c8a188f6e6d04f01ccb8678d1764fd2642"
|
||||
},
|
||||
"files": [
|
||||
"config/packages/messenger.yaml"
|
||||
]
|
||||
},
|
||||
"symfony/webpack-encore-bundle": {
|
||||
"version": "1.17",
|
||||
"recipe": {
|
||||
|
@ -354,7 +298,10 @@
|
|||
"webpack.config.js"
|
||||
]
|
||||
},
|
||||
"symfonycasts/verify-email-bundle": {
|
||||
"version": "v1.17.0"
|
||||
},
|
||||
"twig/extra-bundle": {
|
||||
"version": "v3.6.1"
|
||||
"version": "v3.8.0"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
{% extends 'base.html.twig' %}
|
||||
|
||||
|
||||
{% block title %}Votre compte{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<div id="account_main">
|
||||
<div id="account_nav">
|
||||
{% include 'account/nav.html.twig' %}
|
||||
</div>
|
||||
<div id="account_main_content">
|
||||
{% block account_body %}{% endblock %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endblock body %}
|
|
@ -0,0 +1,22 @@
|
|||
{% extends 'account/base.html.twig' %}
|
||||
|
||||
{% block title %}Votre historique{% endblock %}
|
||||
|
||||
{% block account_body %}
|
||||
<div id="account_history">
|
||||
|
||||
<h1>
|
||||
Mon compte
|
||||
</h1>
|
||||
<p>
|
||||
Page historique
|
||||
</p>
|
||||
<article>
|
||||
<h1>Votre historique d'actions</h1>
|
||||
<p>
|
||||
Blah blah blah.
|
||||
</p>
|
||||
</article>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock account_body %}
|
|
@ -0,0 +1,28 @@
|
|||
{% extends 'account/base.html.twig' %}
|
||||
|
||||
{% block title %}Votre compte{% endblock %}
|
||||
|
||||
{% block account_body %}
|
||||
|
||||
<div id="account_home">
|
||||
|
||||
<h1>
|
||||
Tableau de bord
|
||||
</h1>
|
||||
<a href="{{ path('app_account') }}">modifier mes informations (todo)</a>
|
||||
<p>
|
||||
Coucou {{ app.user.email }}!
|
||||
</p>
|
||||
<p>
|
||||
Votre description:
|
||||
{{ app.user.description }}
|
||||
</p>
|
||||
|
||||
<footer>
|
||||
<p>
|
||||
<a href="{{ path('app_logout') }}">Logout</a>
|
||||
</p>
|
||||
</footer>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock account_body %}
|
|
@ -0,0 +1,17 @@
|
|||
<menu>
|
||||
{# Navigation de l'espace utilisateur #}
|
||||
<ul>
|
||||
<li>
|
||||
<a href="{{ path('app_account') }}">
|
||||
Tableau de bord
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{{ path('app_account_history') }}">
|
||||
Historique
|
||||
</a>
|
||||
</li>
|
||||
<li>un autre</li>
|
||||
<li>un bidule</li>
|
||||
</ul>
|
||||
</menu>
|
|
@ -0,0 +1,32 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="fr">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>{% block title %}Bienvenu!{% endblock %}</title>
|
||||
<link rel="icon"
|
||||
href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 128 128%22><text y=%221.2em%22 font-size=%2296%22>⚫️</text></svg>">
|
||||
{# Run `composer require symfony/webpack-encore-bundle` to start using Symfony UX #}
|
||||
{% block stylesheets %}
|
||||
{{ encore_entry_link_tags('app') }}
|
||||
{% endblock %}
|
||||
|
||||
{% block javascripts %}
|
||||
{{ encore_entry_script_tags('app') }}
|
||||
{% endblock %}
|
||||
</head>
|
||||
<body>
|
||||
<div id="main_content">
|
||||
<div id="main_header">
|
||||
{% block header %}
|
||||
{% include 'common/nav.html.twig' %}
|
||||
{% endblock %}
|
||||
</div>
|
||||
<div id="main_body">
|
||||
{% block body %}{% endblock %}
|
||||
</div>
|
||||
<div id="main_footer">
|
||||
{% block footer %}{% endblock %}
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,23 @@
|
|||
{% set currentRoute = app.request.attributes.get('_route') %}
|
||||
<div id="nav_menu">
|
||||
<nav>
|
||||
<div class="mb-3">
|
||||
<a href="{{ path('app_index') }}"
|
||||
class="{% if currentRoute == 'app_index' %}active{% endif %}"
|
||||
>{{ 'common.homepage'|trans }}</a>
|
||||
{% if app.user %}
|
||||
<a
|
||||
class="account-link {% if currentRoute == 'app_account' %}active{% endif %}"
|
||||
href="{{ path('app_account') }}">{{ app.user.userIdentifier }}</a>
|
||||
<a href="{{ path('app_logout') }}">{{ 'user.logout'|trans }}</a>
|
||||
|
||||
{% else %}
|
||||
<a class="account-link {% if currentRoute == 'app_login' %}active{% endif %}"
|
||||
href="{{ path('app_login') }}">{{ 'user.login'|trans }}</a>
|
||||
<a class="account-link {% if currentRoute == 'app_register' %}active{% endif %}"
|
||||
href="{{ path('app_register') }}">{{ 'user.register'|trans }}</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
{# <a href="{{path('admin')}}">Admin</a> #}
|
||||
</nav>
|
||||
</div>
|
|
@ -2,99 +2,7 @@
|
|||
|
||||
{% include 'default/header.html.twig' %}
|
||||
|
||||
{% block body %}
|
||||
<div class="main-screen" id="homepage">
|
||||
<div id="welcome">
|
||||
<section class="bg-accessories">
|
||||
<div class="bg-shader">
|
||||
<div class="container main-section">
|
||||
<div class="row">
|
||||
<div class="col-xs-12 padded-v">
|
||||
<h1 class="text-center">
|
||||
{#<i class="fa fa-circle-o-notch logo-main"></i>#}
|
||||
{% trans %}menu.title{% endtrans %}
|
||||
</h1>
|
||||
</div>
|
||||
<div class="col-xs-12 col-md-6 padded-v">
|
||||
<div class="description">
|
||||
{% trans %}home.main_description{% endtrans %}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="try col-xs-12 col-md-6">
|
||||
<br>
|
||||
<div class="row">
|
||||
<div class=" padded text-right">
|
||||
<a class="btn btn-primary"
|
||||
href="#"
|
||||
class="btn btn-primary">
|
||||
{% trans %}home.try{% endtrans %}
|
||||
</a>
|
||||
</div>
|
||||
<div class="hint padded">
|
||||
<sub>{% trans %}home.demo_hint{% endtrans %}</sub>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
</div>
|
||||
<section class="bg-girl">
|
||||
<div class="bg-shader">
|
||||
<div class="container">
|
||||
|
||||
{% include 'default/description-app.html.twig' %}
|
||||
<div class="try">
|
||||
<fieldset class="bg-dark padded">
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-sm-6">
|
||||
<a class="btn btn-primary" href="{{ path('dashboard') }}"
|
||||
class="btn btn-success">
|
||||
{% trans %}home.try{% endtrans %}
|
||||
</a>
|
||||
<p>
|
||||
{% trans %}home.demo_hint{% endtrans %}
|
||||
</p>
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-6">
|
||||
<a class="btn btn-primary" href="#">
|
||||
<i class="fa fa-user"></i>
|
||||
{% trans %}layout.register{% endtrans %}
|
||||
</a>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<section class="bg-color">
|
||||
<div id="contact" class="text-center">
|
||||
<i class="fa fa-envelope-open-o"></i>
|
||||
contactez-moi pour tout renseignement:
|
||||
<a href="mailto:contact@cipherbliss.com"> par email</a>
|
||||
, Telegram
|
||||
<a href="https://t.me/tykayn">
|
||||
@tykayn
|
||||
</a>
|
||||
, ou sur Mastodon
|
||||
<a href="https://mastodon.cipherbliss.com/@tykayn">
|
||||
<img src="https://en.gravatar.com/userimage/53061325/811d383aa2ebb8d2d83baab7da5f4a7b.jpeg"
|
||||
alt="avatar Mastodon" width="50" height="50"> @tykayn
|
||||
</a>
|
||||
</div>
|
||||
|
||||
</section>
|
||||
</div>
|
||||
{% endblock %}
|
||||
{% include 'default/footer.html.twig' %}
|
||||
|
||||
{% endblock %}
|
||||
|
|
|
@ -0,0 +1,97 @@
|
|||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block title %}Hello IndexController!{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<div class="main-screen" id="homepage">
|
||||
<div id="welcome">
|
||||
<section class="bg-accessories">
|
||||
<div class="bg-shader">
|
||||
<div class="container main-section">
|
||||
<div class="row">
|
||||
<div class="col-xs-12 padded-v">
|
||||
<h1 class="text-center">
|
||||
{# <i class="fa fa-circle-o-notch logo-main"></i> #}
|
||||
{% trans %}menu.title{% endtrans %}
|
||||
</h1>
|
||||
</div>
|
||||
<div class="col-xs-12 col-md-6 padded-v">
|
||||
<div class="description">
|
||||
{% trans %}home.main_description{% endtrans %}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="try col-xs-12 col-md-6">
|
||||
<br>
|
||||
<div class="row">
|
||||
<div class=" padded text-right">
|
||||
<a class="btn btn-primary"
|
||||
href="#"
|
||||
class="btn btn-primary">
|
||||
{% trans %}home.try{% endtrans %}
|
||||
</a>
|
||||
</div>
|
||||
<div class="hint padded">
|
||||
<sub>{% trans %}home.demo_hint{% endtrans %}</sub>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
</div>
|
||||
<section class="bg-girl">
|
||||
<div class="bg-shader">
|
||||
<div class="container">
|
||||
|
||||
{% include 'default/description-app.html.twig' %}
|
||||
<div class="try">
|
||||
<fieldset class="bg-dark padded">
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-sm-6">
|
||||
{# <a class="btn btn-primary" href="{{ path('dashboard') }}"#}
|
||||
{# class="btn btn-success">#}
|
||||
{# {% trans %}home.try{% endtrans %}#}
|
||||
{# </a>#}
|
||||
<p>
|
||||
{% trans %}home.demo_hint{% endtrans %}
|
||||
</p>
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-6">
|
||||
<a class="btn btn-primary" href="#">
|
||||
<i class="fa fa-user"></i>
|
||||
{% trans %}layout.register{% endtrans %}
|
||||
</a>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<section class="bg-color">
|
||||
<div id="contact" class="text-center">
|
||||
<i class="fa fa-envelope-open-o"></i>
|
||||
contactez-moi pour tout renseignement:
|
||||
<a href="mailto:contact@cipherbliss.com"> par email</a>
|
||||
, Telegram
|
||||
<a href="https://t.me/tykayn">
|
||||
@tykayn
|
||||
</a>
|
||||
, ou sur Mastodon
|
||||
<a href="https://mastodon.cipherbliss.com/@tykayn">
|
||||
<img src="https://en.gravatar.com/userimage/53061325/811d383aa2ebb8d2d83baab7da5f4a7b.jpeg"
|
||||
alt="avatar Mastodon" width="50" height="50"> @tykayn
|
||||
</a>
|
||||
</div>
|
||||
|
||||
</section>
|
||||
</div>
|
||||
{% endblock %}
|
|
@ -0,0 +1,11 @@
|
|||
<h1>Hi! Please confirm your email!</h1>
|
||||
|
||||
<p>
|
||||
Please confirm your email address by clicking the following link: <br><br>
|
||||
<a href="{{ signedUrl|raw }}">Confirm my Email</a>.
|
||||
This link will expire in {{ expiresAtMessageKey|trans(expiresAtMessageData, 'VerifyEmailBundle') }}.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
Cheers!
|
||||
</p>
|
|
@ -0,0 +1,23 @@
|
|||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block title %}Register{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
{% for flash_error in app.flashes('verify_email_error') %}
|
||||
<div class="alert alert-danger" role="alert">{{ flash_error }}</div>
|
||||
{% endfor %}
|
||||
|
||||
<h1>Register</h1>
|
||||
|
||||
{{ form_errors(registrationForm) }}
|
||||
|
||||
{{ form_start(registrationForm) }}
|
||||
{{ form_row(registrationForm.email) }}
|
||||
{{ form_row(registrationForm.plainPassword, {
|
||||
label: 'Password'
|
||||
}) }}
|
||||
{{ form_row(registrationForm.agreeTerms) }}
|
||||
|
||||
<button type="submit" class="btn">Register</button>
|
||||
{{ form_end(registrationForm) }}
|
||||
{% endblock %}
|
|
@ -3,40 +3,47 @@
|
|||
{% block title %}Log in!{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<form method="post">
|
||||
{% if error %}
|
||||
<div class="alert alert-danger">{{ error.messageKey|trans(error.messageData, 'security') }}</div>
|
||||
{% endif %}
|
||||
<form method="post">
|
||||
{% if error %}
|
||||
<div class="alert alert-danger">{{ error.messageKey|trans(error.messageData, 'security') }}</div>
|
||||
{% endif %}
|
||||
|
||||
{% if app.user %}
|
||||
<div class="mb-3">
|
||||
You are logged in as {{ app.user.userIdentifier }}, <a href="{{ path('app_logout') }}">Logout</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if app.user %}
|
||||
<div class="mb-3">
|
||||
You are logged in as {{ app.user.userIdentifier }}, <a href="{{ path('app_logout') }}">Logout</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<h1 class="h3 mb-3 font-weight-normal">Please sign in</h1>
|
||||
<label for="inputUsername">Username</label>
|
||||
<input type="text" value="{{ last_username }}" name="username" id="inputUsername" class="form-control" autocomplete="username" required autofocus>
|
||||
<label for="inputPassword">Password</label>
|
||||
<input type="password" name="password" id="inputPassword" class="form-control" autocomplete="current-password" required>
|
||||
<h1 class="h3 mb-3 font-weight-normal">Please sign in</h1>
|
||||
<label for="username">Email</label>
|
||||
<input type="email" value="{{ last_username }}" name="_username" id="username" class="form-control" autocomplete="email" required autofocus>
|
||||
<label for="password">Password</label>
|
||||
<input type="password" name="_password" id="password" class="form-control" autocomplete="current-password" required>
|
||||
|
||||
<input type="hidden" name="_csrf_token"
|
||||
value="{{ csrf_token('authenticate') }}"
|
||||
>
|
||||
<input type="hidden" name="_csrf_token"
|
||||
value="{{ csrf_token('authenticate') }}"
|
||||
>
|
||||
|
||||
{#
|
||||
Uncomment this section and add a remember_me option below your firewall to activate remember me functionality.
|
||||
See https://symfony.com/doc/current/security/remember_me.html
|
||||
{#
|
||||
Uncomment this section and add a remember_me option below your firewall to activate remember me functionality.
|
||||
See https://symfony.com/doc/current/security/remember_me.html
|
||||
|
||||
<div class="checkbox mb-3">
|
||||
<label>
|
||||
<input type="checkbox" name="_remember_me"> Remember me
|
||||
</label>
|
||||
</div>
|
||||
#}
|
||||
|
||||
<button class="btn btn-lg btn-primary" type="submit">
|
||||
Sign in
|
||||
</button>
|
||||
</form>
|
||||
<div class="checkbox mb-3">
|
||||
<label>
|
||||
<input type="checkbox" name="_remember_me"> Remember me
|
||||
</label>
|
||||
</div>
|
||||
#}
|
||||
{#
|
||||
If you want to control the URL the user is redirected to on success
|
||||
#}
|
||||
<input type="hidden" name="_target_path" value="/account">
|
||||
<label>
|
||||
<input type="checkbox" name="_remember_me" checked>
|
||||
Keep me logged in
|
||||
</label>
|
||||
<button class="btn btn-lg btn-primary" type="submit">
|
||||
Sign in
|
||||
</button>
|
||||
</form>
|
||||
{% endblock %}
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
<?php
|
||||
|
||||
use Symfony\Component\Dotenv\Dotenv;
|
||||
|
||||
require dirname(__DIR__).'/vendor/autoload.php';
|
||||
|
||||
if (file_exists(dirname(__DIR__).'/config/bootstrap.php')) {
|
||||
require dirname(__DIR__).'/config/bootstrap.php';
|
||||
} elseif (method_exists(Dotenv::class, 'bootEnv')) {
|
||||
(new Dotenv())->bootEnv(dirname(__DIR__).'/.env');
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
common:
|
||||
homepage: Homepage
|
||||
pages:
|
||||
app_index:
|
||||
title: 'Greetings noble barbarian!'
|
||||
subtitle: 'Welcome to this Symfony application able to manage a user space.'
|
||||
user:
|
||||
login: 'Log in'
|
||||
logout: 'Sign out'
|
||||
register: 'Create an account'
|
|
@ -0,0 +1,10 @@
|
|||
common:
|
||||
homepage: Accueil
|
||||
pages:
|
||||
app_index:
|
||||
title: 'Salutations noble barbare!'
|
||||
subtitle: 'Bienvenue dans cette application Symfony capable de gérer un espace utilisateur.'
|
||||
user:
|
||||
login: Login
|
||||
logout: 'Se déconnecter'
|
||||
register: 'Créer un compte'
|
|
@ -0,0 +1,38 @@
|
|||
'An authentication exception occurred':
|
||||
'': 'An authentication exception occurred.'
|
||||
'Authentication credentials could not be found':
|
||||
'': 'Authentication credentials could not be found.'
|
||||
'Authentication request could not be processed due to a system problem':
|
||||
'': 'Authentication request could not be processed due to a system problem.'
|
||||
'Invalid credentials':
|
||||
'': 'Invalid credentials.'
|
||||
'Cookie has already been used by someone else':
|
||||
'': 'Cookie has already been used by someone else.'
|
||||
'Not privileged to request the resource':
|
||||
'': 'Not privileged to request the resource.'
|
||||
'Invalid CSRF token':
|
||||
'': 'Invalid CSRF token.'
|
||||
'No authentication provider found to support the authentication token':
|
||||
'': 'No authentication provider found to support the authentication token.'
|
||||
'No session available, it either timed out or cookies are not enabled':
|
||||
'': 'No session available, it either timed out or cookies are not enabled.'
|
||||
'No token could be found':
|
||||
'': 'No token could be found.'
|
||||
'Username could not be found':
|
||||
'': 'Username could not be found.'
|
||||
'Account has expired':
|
||||
'': 'Account has expired.'
|
||||
'Credentials have expired':
|
||||
'': 'Credentials have expired.'
|
||||
'Account is disabled':
|
||||
'': 'Account is disabled.'
|
||||
'Account is locked':
|
||||
'': 'Account is locked.'
|
||||
'Too many failed login attempts, please try again later':
|
||||
'': 'Too many failed login attempts, please try again later.'
|
||||
'Invalid or expired login link':
|
||||
'': 'Invalid or expired login link.'
|
||||
'Too many failed login attempts, please try again in %minutes% minute':
|
||||
'': 'Too many failed login attempts, please try again in %minutes% minute.'
|
||||
'Too many failed login attempts, please try again in %minutes% minutes':
|
||||
'': 'Too many failed login attempts, please try again in %minutes% minutes.'
|
|
@ -0,0 +1,38 @@
|
|||
'An authentication exception occurred':
|
||||
'': "Une exception d'authentification s'est produite."
|
||||
'Authentication credentials could not be found':
|
||||
'': "Les identifiants d'authentification n'ont pas pu être trouvés."
|
||||
'Authentication request could not be processed due to a system problem':
|
||||
'': "La requête d'authentification n'a pas pu être executée à cause d'un problème système."
|
||||
'Invalid credentials':
|
||||
'': 'Identifiants invalides.'
|
||||
'Cookie has already been used by someone else':
|
||||
'': "Le cookie a déjà été utilisé par quelqu'un d'autre."
|
||||
'Not privileged to request the resource':
|
||||
'': 'Privilèges insuffisants pour accéder à la ressource.'
|
||||
'Invalid CSRF token':
|
||||
'': 'Jeton CSRF invalide.'
|
||||
'No authentication provider found to support the authentication token':
|
||||
'': "Aucun fournisseur d'authentification n'a été trouvé pour supporter le jeton d'authentification."
|
||||
'No session available, it either timed out or cookies are not enabled':
|
||||
'': 'Aucune session disponible, celle-ci a expiré ou les cookies ne sont pas activés.'
|
||||
'No token could be found':
|
||||
'': "Aucun jeton n'a pu être trouvé."
|
||||
'Username could not be found':
|
||||
'': "Le nom d'utilisateur n'a pas pu être trouvé."
|
||||
'Account has expired':
|
||||
'': 'Le compte a expiré.'
|
||||
'Credentials have expired':
|
||||
'': 'Les identifiants ont expiré.'
|
||||
'Account is disabled':
|
||||
'': 'Le compte est désactivé.'
|
||||
'Account is locked':
|
||||
'': 'Le compte est bloqué.'
|
||||
'Too many failed login attempts, please try again later':
|
||||
'': 'Plusieurs tentatives de connexion ont échoué, veuillez réessayer plus tard.'
|
||||
'Invalid or expired login link':
|
||||
'': 'Lien de connexion invalide ou expiré.'
|
||||
'Too many failed login attempts, please try again in %minutes% minute':
|
||||
'': 'Plusieurs tentatives de connexion ont échoué, veuillez réessayer dans %minutes% minute.'
|
||||
'Too many failed login attempts, please try again in %minutes% minutes':
|
||||
'': 'Plusieurs tentatives de connexion ont échoué, veuillez réessayer dans %minutes% minutes.'
|
|
@ -0,0 +1,287 @@
|
|||
'This value should be false':
|
||||
'': 'This value should be false.'
|
||||
'This value should be true':
|
||||
'': 'This value should be true.'
|
||||
'This value should be of type {{ type }}':
|
||||
'': 'This value should be of type {{ type }}.'
|
||||
'This value should be blank':
|
||||
'': 'This value should be blank.'
|
||||
'The value you selected is not a valid choice':
|
||||
'': 'The value you selected is not a valid choice.'
|
||||
'You must select at least {{ limit }} choice':
|
||||
'|You must select at least {{ limit }} choices':
|
||||
'': 'You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices.'
|
||||
'You must select at most {{ limit }} choice':
|
||||
'|You must select at most {{ limit }} choices':
|
||||
'': 'You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices.'
|
||||
'One or more of the given values is invalid':
|
||||
'': 'One or more of the given values is invalid.'
|
||||
'This field was not expected':
|
||||
'': 'This field was not expected.'
|
||||
'This field is missing':
|
||||
'': 'This field is missing.'
|
||||
'This value is not a valid date':
|
||||
'': 'This value is not a valid date.'
|
||||
'This value is not a valid datetime':
|
||||
'': 'This value is not a valid datetime.'
|
||||
'This value is not a valid email address':
|
||||
'': 'This value is not a valid email address.'
|
||||
'The file could not be found':
|
||||
'': 'The file could not be found.'
|
||||
'The file is not readable':
|
||||
'': 'The file is not readable.'
|
||||
'The file is too large ({{ size }} {{ suffix }})':
|
||||
' Allowed maximum size is {{ limit }} {{ suffix }}':
|
||||
'': 'The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}.'
|
||||
'The mime type of the file is invalid ({{ type }})':
|
||||
' Allowed mime types are {{ types }}':
|
||||
'': 'The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}.'
|
||||
'This value should be {{ limit }} or less':
|
||||
'': 'This value should be {{ limit }} or less.'
|
||||
'This value is too long':
|
||||
' It should have {{ limit }} character or less':
|
||||
'|This value is too long': { ' It should have {{ limit }} characters or less': { '': 'This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less.' } }
|
||||
'This value should be {{ limit }} or more':
|
||||
'': 'This value should be {{ limit }} or more.'
|
||||
'This value is too short':
|
||||
' It should have {{ limit }} character or more':
|
||||
'|This value is too short': { ' It should have {{ limit }} characters or more': { '': 'This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more.' } }
|
||||
'This value should not be blank':
|
||||
'': 'This value should not be blank.'
|
||||
'This value should not be null':
|
||||
'': 'This value should not be null.'
|
||||
'This value should be null':
|
||||
'': 'This value should be null.'
|
||||
'This value is not valid':
|
||||
'': 'This value is not valid.'
|
||||
'This value is not a valid time':
|
||||
'': 'This value is not a valid time.'
|
||||
'This value is not a valid URL':
|
||||
'': 'This value is not a valid URL.'
|
||||
'The two values should be equal':
|
||||
'': 'The two values should be equal.'
|
||||
'The file is too large':
|
||||
' Allowed maximum size is {{ limit }} {{ suffix }}':
|
||||
'': 'The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}.'
|
||||
'': 'The file is too large.'
|
||||
'The file could not be uploaded':
|
||||
'': 'The file could not be uploaded.'
|
||||
'This value should be a valid number':
|
||||
'': 'This value should be a valid number.'
|
||||
'This file is not a valid image':
|
||||
'': 'This file is not a valid image.'
|
||||
'This is not a valid IP address':
|
||||
'': 'This is not a valid IP address.'
|
||||
'This value is not a valid language':
|
||||
'': 'This value is not a valid language.'
|
||||
'This value is not a valid locale':
|
||||
'': 'This value is not a valid locale.'
|
||||
'This value is not a valid country':
|
||||
'': 'This value is not a valid country.'
|
||||
'This value is already used':
|
||||
'': 'This value is already used.'
|
||||
'The size of the image could not be detected':
|
||||
'': 'The size of the image could not be detected.'
|
||||
'The image width is too big ({{ width }}px)':
|
||||
' Allowed maximum width is {{ max_width }}px':
|
||||
'': 'The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px.'
|
||||
'The image width is too small ({{ width }}px)':
|
||||
' Minimum width expected is {{ min_width }}px':
|
||||
'': 'The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px.'
|
||||
'The image height is too big ({{ height }}px)':
|
||||
' Allowed maximum height is {{ max_height }}px':
|
||||
'': 'The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px.'
|
||||
'The image height is too small ({{ height }}px)':
|
||||
' Minimum height expected is {{ min_height }}px':
|
||||
'': 'The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px.'
|
||||
"This value should be the user's current password":
|
||||
'': "This value should be the user's current password."
|
||||
'This value should have exactly {{ limit }} character':
|
||||
'|This value should have exactly {{ limit }} characters':
|
||||
'': 'This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters.'
|
||||
'The file was only partially uploaded':
|
||||
'': 'The file was only partially uploaded.'
|
||||
'No file was uploaded':
|
||||
'': 'No file was uploaded.'
|
||||
'No temporary folder was configured in php':
|
||||
ini:
|
||||
'': 'No temporary folder was configured in php.ini, or the configured folder does not exist.'
|
||||
'Cannot write temporary file to disk':
|
||||
'': 'Cannot write temporary file to disk.'
|
||||
'A PHP extension caused the upload to fail':
|
||||
'': 'A PHP extension caused the upload to fail.'
|
||||
'This collection should contain {{ limit }} element or more':
|
||||
'|This collection should contain {{ limit }} elements or more':
|
||||
'': 'This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more.'
|
||||
'This collection should contain {{ limit }} element or less':
|
||||
'|This collection should contain {{ limit }} elements or less':
|
||||
'': 'This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less.'
|
||||
'This collection should contain exactly {{ limit }} element':
|
||||
'|This collection should contain exactly {{ limit }} elements':
|
||||
'': 'This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements.'
|
||||
'Invalid card number':
|
||||
'': 'Invalid card number.'
|
||||
'Unsupported card type or invalid card number':
|
||||
'': 'Unsupported card type or invalid card number.'
|
||||
'This is not a valid International Bank Account Number (IBAN)':
|
||||
'': 'This is not a valid International Bank Account Number (IBAN).'
|
||||
'This value is not a valid ISBN-10':
|
||||
'': 'This value is not a valid ISBN-10.'
|
||||
'This value is not a valid ISBN-13':
|
||||
'': 'This value is not a valid ISBN-13.'
|
||||
'This value is neither a valid ISBN-10 nor a valid ISBN-13':
|
||||
'': 'This value is neither a valid ISBN-10 nor a valid ISBN-13.'
|
||||
'This value is not a valid ISSN':
|
||||
'': 'This value is not a valid ISSN.'
|
||||
'This value is not a valid currency':
|
||||
'': 'This value is not a valid currency.'
|
||||
'This value should be equal to {{ compared_value }}':
|
||||
'': 'This value should be equal to {{ compared_value }}.'
|
||||
'This value should be greater than {{ compared_value }}':
|
||||
'': 'This value should be greater than {{ compared_value }}.'
|
||||
'This value should be greater than or equal to {{ compared_value }}':
|
||||
'': 'This value should be greater than or equal to {{ compared_value }}.'
|
||||
'This value should be identical to {{ compared_value_type }} {{ compared_value }}':
|
||||
'': 'This value should be identical to {{ compared_value_type }} {{ compared_value }}.'
|
||||
'This value should be less than {{ compared_value }}':
|
||||
'': 'This value should be less than {{ compared_value }}.'
|
||||
'This value should be less than or equal to {{ compared_value }}':
|
||||
'': 'This value should be less than or equal to {{ compared_value }}.'
|
||||
'This value should not be equal to {{ compared_value }}':
|
||||
'': 'This value should not be equal to {{ compared_value }}.'
|
||||
'This value should not be identical to {{ compared_value_type }} {{ compared_value }}':
|
||||
'': 'This value should not be identical to {{ compared_value_type }} {{ compared_value }}.'
|
||||
'The image ratio is too big ({{ ratio }})':
|
||||
' Allowed maximum ratio is {{ max_ratio }}':
|
||||
'': 'The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}.'
|
||||
'The image ratio is too small ({{ ratio }})':
|
||||
' Minimum ratio expected is {{ min_ratio }}':
|
||||
'': 'The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}.'
|
||||
'The image is square ({{ width }}x{{ height }}px)':
|
||||
' Square images are not allowed':
|
||||
'': 'The image is square ({{ width }}x{{ height }}px). Square images are not allowed.'
|
||||
'The image is landscape oriented ({{ width }}x{{ height }}px)':
|
||||
' Landscape oriented images are not allowed':
|
||||
'': 'The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed.'
|
||||
'The image is portrait oriented ({{ width }}x{{ height }}px)':
|
||||
' Portrait oriented images are not allowed':
|
||||
'': 'The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed.'
|
||||
'An empty file is not allowed':
|
||||
'': 'An empty file is not allowed.'
|
||||
'The host could not be resolved':
|
||||
'': 'The host could not be resolved.'
|
||||
'This value does not match the expected {{ charset }} charset':
|
||||
'': 'This value does not match the expected {{ charset }} charset.'
|
||||
'This is not a valid Business Identifier Code (BIC)':
|
||||
'': 'This is not a valid Business Identifier Code (BIC).'
|
||||
Error: Error
|
||||
'This is not a valid UUID':
|
||||
'': 'This is not a valid UUID.'
|
||||
'This value should be a multiple of {{ compared_value }}':
|
||||
'': 'This value should be a multiple of {{ compared_value }}.'
|
||||
'This Business Identifier Code (BIC) is not associated with IBAN {{ iban }}':
|
||||
'': 'This Business Identifier Code (BIC) is not associated with IBAN {{ iban }}.'
|
||||
'This value should be valid JSON':
|
||||
'': 'This value should be valid JSON.'
|
||||
'This collection should contain only unique elements':
|
||||
'': 'This collection should contain only unique elements.'
|
||||
'This value should be positive':
|
||||
'': 'This value should be positive.'
|
||||
'This value should be either positive or zero':
|
||||
'': 'This value should be either positive or zero.'
|
||||
'This value should be negative':
|
||||
'': 'This value should be negative.'
|
||||
'This value should be either negative or zero':
|
||||
'': 'This value should be either negative or zero.'
|
||||
'This value is not a valid timezone':
|
||||
'': 'This value is not a valid timezone.'
|
||||
'This password has been leaked in a data breach, it must not be used':
|
||||
' Please use another password':
|
||||
'': 'This password has been leaked in a data breach, it must not be used. Please use another password.'
|
||||
'This value should be between {{ min }} and {{ max }}':
|
||||
'': 'This value should be between {{ min }} and {{ max }}.'
|
||||
'This value is not a valid hostname':
|
||||
'': 'This value is not a valid hostname.'
|
||||
'The number of elements in this collection should be a multiple of {{ compared_value }}':
|
||||
'': 'The number of elements in this collection should be a multiple of {{ compared_value }}.'
|
||||
'This value should satisfy at least one of the following constraints:': 'This value should satisfy at least one of the following constraints:'
|
||||
'Each element of this collection should satisfy its own set of constraints':
|
||||
'': 'Each element of this collection should satisfy its own set of constraints.'
|
||||
'This value is not a valid International Securities Identification Number (ISIN)':
|
||||
'': 'This value is not a valid International Securities Identification Number (ISIN).'
|
||||
'This value should be a valid expression':
|
||||
'': 'This value should be a valid expression.'
|
||||
'This value is not a valid CSS color':
|
||||
'': 'This value is not a valid CSS color.'
|
||||
'This value is not a valid CIDR notation':
|
||||
'': 'This value is not a valid CIDR notation.'
|
||||
'The value of the netmask should be between {{ min }} and {{ max }}':
|
||||
'': 'The value of the netmask should be between {{ min }} and {{ max }}.'
|
||||
'This form should not contain extra fields':
|
||||
'': 'This form should not contain extra fields.'
|
||||
'The uploaded file was too large':
|
||||
' Please try to upload a smaller file':
|
||||
'': 'The uploaded file was too large. Please try to upload a smaller file.'
|
||||
'The CSRF token is invalid':
|
||||
' Please try to resubmit the form':
|
||||
'': 'The CSRF token is invalid. Please try to resubmit the form.'
|
||||
'This value is not a valid HTML5 color':
|
||||
'': 'This value is not a valid HTML5 color.'
|
||||
'Please enter a valid birthdate':
|
||||
'': 'Please enter a valid birthdate.'
|
||||
'The selected choice is invalid':
|
||||
'': 'The selected choice is invalid.'
|
||||
'The collection is invalid':
|
||||
'': 'The collection is invalid.'
|
||||
'Please select a valid color':
|
||||
'': 'Please select a valid color.'
|
||||
'Please select a valid country':
|
||||
'': 'Please select a valid country.'
|
||||
'Please select a valid currency':
|
||||
'': 'Please select a valid currency.'
|
||||
'Please choose a valid date interval':
|
||||
'': 'Please choose a valid date interval.'
|
||||
'Please enter a valid date and time':
|
||||
'': 'Please enter a valid date and time.'
|
||||
'Please enter a valid date':
|
||||
'': 'Please enter a valid date.'
|
||||
'Please select a valid file':
|
||||
'': 'Please select a valid file.'
|
||||
'The hidden field is invalid':
|
||||
'': 'The hidden field is invalid.'
|
||||
'Please enter an integer':
|
||||
'': 'Please enter an integer.'
|
||||
'Please select a valid language':
|
||||
'': 'Please select a valid language.'
|
||||
'Please select a valid locale':
|
||||
'': 'Please select a valid locale.'
|
||||
'Please enter a valid money amount':
|
||||
'': 'Please enter a valid money amount.'
|
||||
'Please enter a number':
|
||||
'': 'Please enter a number.'
|
||||
'The password is invalid':
|
||||
'': 'The password is invalid.'
|
||||
'Please enter a percentage value':
|
||||
'': 'Please enter a percentage value.'
|
||||
'The values do not match':
|
||||
'': 'The values do not match.'
|
||||
'Please enter a valid time':
|
||||
'': 'Please enter a valid time.'
|
||||
'Please select a valid timezone':
|
||||
'': 'Please select a valid timezone.'
|
||||
'Please enter a valid URL':
|
||||
'': 'Please enter a valid URL.'
|
||||
'Please enter a valid search term':
|
||||
'': 'Please enter a valid search term.'
|
||||
'Please provide a valid phone number':
|
||||
'': 'Please provide a valid phone number.'
|
||||
'The checkbox has an invalid value':
|
||||
'': 'The checkbox has an invalid value.'
|
||||
'Please enter a valid email address':
|
||||
'': 'Please enter a valid email address.'
|
||||
'Please select a valid option':
|
||||
'': 'Please select a valid option.'
|
||||
'Please select a valid range':
|
||||
'': 'Please select a valid range.'
|
||||
'Please enter a valid week':
|
||||
'': 'Please enter a valid week.'
|
|
@ -0,0 +1,287 @@
|
|||
'This value should be false':
|
||||
'': 'Cette valeur doit être fausse.'
|
||||
'This value should be true':
|
||||
'': 'Cette valeur doit être vraie.'
|
||||
'This value should be of type {{ type }}':
|
||||
'': 'Cette valeur doit être de type {{ type }}.'
|
||||
'This value should be blank':
|
||||
'': 'Cette valeur doit être vide.'
|
||||
'The value you selected is not a valid choice':
|
||||
'': "Cette valeur doit être l'un des choix proposés."
|
||||
'You must select at least {{ limit }} choice':
|
||||
'|You must select at least {{ limit }} choices':
|
||||
'': 'Vous devez sélectionner au moins {{ limit }} choix.|Vous devez sélectionner au moins {{ limit }} choix.'
|
||||
'You must select at most {{ limit }} choice':
|
||||
'|You must select at most {{ limit }} choices':
|
||||
'': 'Vous devez sélectionner au maximum {{ limit }} choix.|Vous devez sélectionner au maximum {{ limit }} choix.'
|
||||
'One or more of the given values is invalid':
|
||||
'': 'Une ou plusieurs des valeurs soumises sont invalides.'
|
||||
'This field was not expected':
|
||||
'': "Ce champ n'a pas été prévu."
|
||||
'This field is missing':
|
||||
'': 'Ce champ est manquant.'
|
||||
'This value is not a valid date':
|
||||
'': "Cette valeur n'est pas une date valide."
|
||||
'This value is not a valid datetime':
|
||||
'': "Cette valeur n'est pas une date valide."
|
||||
'This value is not a valid email address':
|
||||
'': "Cette valeur n'est pas une adresse email valide."
|
||||
'The file could not be found':
|
||||
'': "Le fichier n'a pas été trouvé."
|
||||
'The file is not readable':
|
||||
'': "Le fichier n'est pas lisible."
|
||||
'The file is too large ({{ size }} {{ suffix }})':
|
||||
' Allowed maximum size is {{ limit }} {{ suffix }}':
|
||||
'': 'Le fichier est trop volumineux ({{ size }} {{ suffix }}). Sa taille ne doit pas dépasser {{ limit }} {{ suffix }}.'
|
||||
'The mime type of the file is invalid ({{ type }})':
|
||||
' Allowed mime types are {{ types }}':
|
||||
'': 'Le type du fichier est invalide ({{ type }}). Les types autorisés sont {{ types }}.'
|
||||
'This value should be {{ limit }} or less':
|
||||
'': 'Cette valeur doit être inférieure ou égale à {{ limit }}.'
|
||||
'This value is too long':
|
||||
' It should have {{ limit }} character or less':
|
||||
'|This value is too long': { ' It should have {{ limit }} characters or less': { '': 'Cette chaîne est trop longue. Elle doit avoir au maximum {{ limit }} caractère.|Cette chaîne est trop longue. Elle doit avoir au maximum {{ limit }} caractères.' } }
|
||||
'This value should be {{ limit }} or more':
|
||||
'': 'Cette valeur doit être supérieure ou égale à {{ limit }}.'
|
||||
'This value is too short':
|
||||
' It should have {{ limit }} character or more':
|
||||
'|This value is too short': { ' It should have {{ limit }} characters or more': { '': 'Cette chaîne est trop courte. Elle doit avoir au minimum {{ limit }} caractère.|Cette chaîne est trop courte. Elle doit avoir au minimum {{ limit }} caractères.' } }
|
||||
'This value should not be blank':
|
||||
'': 'Cette valeur ne doit pas être vide.'
|
||||
'This value should not be null':
|
||||
'': 'Cette valeur ne doit pas être nulle.'
|
||||
'This value should be null':
|
||||
'': 'Cette valeur doit être nulle.'
|
||||
'This value is not valid':
|
||||
'': "Cette valeur n'est pas valide."
|
||||
'This value is not a valid time':
|
||||
'': "Cette valeur n'est pas une heure valide."
|
||||
'This value is not a valid URL':
|
||||
'': "Cette valeur n'est pas une URL valide."
|
||||
'The two values should be equal':
|
||||
'': 'Les deux valeurs doivent être identiques.'
|
||||
'The file is too large':
|
||||
' Allowed maximum size is {{ limit }} {{ suffix }}':
|
||||
'': 'Le fichier est trop volumineux. Sa taille ne doit pas dépasser {{ limit }} {{ suffix }}.'
|
||||
'': 'Le fichier est trop volumineux.'
|
||||
'The file could not be uploaded':
|
||||
'': 'Le téléchargement de ce fichier est impossible.'
|
||||
'This value should be a valid number':
|
||||
'': 'Cette valeur doit être un nombre.'
|
||||
'This file is not a valid image':
|
||||
'': "Ce fichier n'est pas une image valide."
|
||||
'This is not a valid IP address':
|
||||
'': "Cette adresse IP n'est pas valide."
|
||||
'This value is not a valid language':
|
||||
'': "Cette langue n'est pas valide."
|
||||
'This value is not a valid locale':
|
||||
'': "Ce paramètre régional n'est pas valide."
|
||||
'This value is not a valid country':
|
||||
'': "Ce pays n'est pas valide."
|
||||
'This value is already used':
|
||||
'': 'Cette valeur est déjà utilisée.'
|
||||
'The size of the image could not be detected':
|
||||
'': "La taille de l'image n'a pas pu être détectée."
|
||||
'The image width is too big ({{ width }}px)':
|
||||
' Allowed maximum width is {{ max_width }}px':
|
||||
'': "La largeur de l'image est trop grande ({{ width }}px). La largeur maximale autorisée est de {{ max_width }}px."
|
||||
'The image width is too small ({{ width }}px)':
|
||||
' Minimum width expected is {{ min_width }}px':
|
||||
'': "La largeur de l'image est trop petite ({{ width }}px). La largeur minimale attendue est de {{ min_width }}px."
|
||||
'The image height is too big ({{ height }}px)':
|
||||
' Allowed maximum height is {{ max_height }}px':
|
||||
'': "La hauteur de l'image est trop grande ({{ height }}px). La hauteur maximale autorisée est de {{ max_height }}px."
|
||||
'The image height is too small ({{ height }}px)':
|
||||
' Minimum height expected is {{ min_height }}px':
|
||||
'': "La hauteur de l'image est trop petite ({{ height }}px). La hauteur minimale attendue est de {{ min_height }}px."
|
||||
"This value should be the user's current password":
|
||||
'': "Cette valeur doit être le mot de passe actuel de l'utilisateur."
|
||||
'This value should have exactly {{ limit }} character':
|
||||
'|This value should have exactly {{ limit }} characters':
|
||||
'': 'Cette chaîne doit avoir exactement {{ limit }} caractère.|Cette chaîne doit avoir exactement {{ limit }} caractères.'
|
||||
'The file was only partially uploaded':
|
||||
'': 'Le fichier a été partiellement transféré.'
|
||||
'No file was uploaded':
|
||||
'': "Aucun fichier n'a été transféré."
|
||||
'No temporary folder was configured in php':
|
||||
ini:
|
||||
'': "Aucun répertoire temporaire n'a été configuré dans le php.ini, ou le répertoire configuré n'existe pas."
|
||||
'Cannot write temporary file to disk':
|
||||
'': "Impossible d'écrire le fichier temporaire sur le disque."
|
||||
'A PHP extension caused the upload to fail':
|
||||
'': 'Une extension PHP a empêché le transfert du fichier.'
|
||||
'This collection should contain {{ limit }} element or more':
|
||||
'|This collection should contain {{ limit }} elements or more':
|
||||
'': 'Cette collection doit contenir {{ limit }} élément ou plus.|Cette collection doit contenir {{ limit }} éléments ou plus.'
|
||||
'This collection should contain {{ limit }} element or less':
|
||||
'|This collection should contain {{ limit }} elements or less':
|
||||
'': 'Cette collection doit contenir {{ limit }} élément ou moins.|Cette collection doit contenir {{ limit }} éléments ou moins.'
|
||||
'This collection should contain exactly {{ limit }} element':
|
||||
'|This collection should contain exactly {{ limit }} elements':
|
||||
'': 'Cette collection doit contenir exactement {{ limit }} élément.|Cette collection doit contenir exactement {{ limit }} éléments.'
|
||||
'Invalid card number':
|
||||
'': 'Numéro de carte invalide.'
|
||||
'Unsupported card type or invalid card number':
|
||||
'': 'Type de carte non supporté ou numéro invalide.'
|
||||
'This is not a valid International Bank Account Number (IBAN)':
|
||||
'': "Le numéro IBAN (International Bank Account Number) saisi n'est pas valide."
|
||||
'This value is not a valid ISBN-10':
|
||||
'': "Cette valeur n'est pas un code ISBN-10 valide."
|
||||
'This value is not a valid ISBN-13':
|
||||
'': "Cette valeur n'est pas un code ISBN-13 valide."
|
||||
'This value is neither a valid ISBN-10 nor a valid ISBN-13':
|
||||
'': "Cette valeur n'est ni un code ISBN-10, ni un code ISBN-13 valide."
|
||||
'This value is not a valid ISSN':
|
||||
'': "Cette valeur n'est pas un code ISSN valide."
|
||||
'This value is not a valid currency':
|
||||
'': "Cette valeur n'est pas une devise valide."
|
||||
'This value should be equal to {{ compared_value }}':
|
||||
'': 'Cette valeur doit être égale à {{ compared_value }}.'
|
||||
'This value should be greater than {{ compared_value }}':
|
||||
'': 'Cette valeur doit être supérieure à {{ compared_value }}.'
|
||||
'This value should be greater than or equal to {{ compared_value }}':
|
||||
'': 'Cette valeur doit être supérieure ou égale à {{ compared_value }}.'
|
||||
'This value should be identical to {{ compared_value_type }} {{ compared_value }}':
|
||||
'': 'Cette valeur doit être identique à {{ compared_value_type }} {{ compared_value }}.'
|
||||
'This value should be less than {{ compared_value }}':
|
||||
'': 'Cette valeur doit être inférieure à {{ compared_value }}.'
|
||||
'This value should be less than or equal to {{ compared_value }}':
|
||||
'': 'Cette valeur doit être inférieure ou égale à {{ compared_value }}.'
|
||||
'This value should not be equal to {{ compared_value }}':
|
||||
'': 'Cette valeur ne doit pas être égale à {{ compared_value }}.'
|
||||
'This value should not be identical to {{ compared_value_type }} {{ compared_value }}':
|
||||
'': 'Cette valeur ne doit pas être identique à {{ compared_value_type }} {{ compared_value }}.'
|
||||
'The image ratio is too big ({{ ratio }})':
|
||||
' Allowed maximum ratio is {{ max_ratio }}':
|
||||
'': "Le rapport largeur/hauteur de l'image est trop grand ({{ ratio }}). Le rapport maximal autorisé est {{ max_ratio }}."
|
||||
'The image ratio is too small ({{ ratio }})':
|
||||
' Minimum ratio expected is {{ min_ratio }}':
|
||||
'': "Le rapport largeur/hauteur de l'image est trop petit ({{ ratio }}). Le rapport minimal attendu est {{ min_ratio }}."
|
||||
'The image is square ({{ width }}x{{ height }}px)':
|
||||
' Square images are not allowed':
|
||||
'': "L'image est carrée ({{ width }}x{{ height }}px). Les images carrées ne sont pas autorisées."
|
||||
'The image is landscape oriented ({{ width }}x{{ height }}px)':
|
||||
' Landscape oriented images are not allowed':
|
||||
'': "L'image est au format paysage ({{ width }}x{{ height }}px). Les images au format paysage ne sont pas autorisées."
|
||||
'The image is portrait oriented ({{ width }}x{{ height }}px)':
|
||||
' Portrait oriented images are not allowed':
|
||||
'': "L'image est au format portrait ({{ width }}x{{ height }}px). Les images au format portrait ne sont pas autorisées."
|
||||
'An empty file is not allowed':
|
||||
'': "Un fichier vide n'est pas autorisé."
|
||||
'The host could not be resolved':
|
||||
'': "Le nom de domaine n'a pas pu être résolu."
|
||||
'This value does not match the expected {{ charset }} charset':
|
||||
'': 'Cette valeur ne correspond pas au jeu de caractères {{ charset }} attendu.'
|
||||
'This is not a valid Business Identifier Code (BIC)':
|
||||
'': "Ce n'est pas un code universel d'identification des banques (BIC) valide."
|
||||
Error: Erreur
|
||||
'This is not a valid UUID':
|
||||
'': "Ceci n'est pas un UUID valide."
|
||||
'This value should be a multiple of {{ compared_value }}':
|
||||
'': 'Cette valeur doit être un multiple de {{ compared_value }}.'
|
||||
'This Business Identifier Code (BIC) is not associated with IBAN {{ iban }}':
|
||||
'': "Ce code d'identification d'entreprise (BIC) n'est pas associé à l'IBAN {{ iban }}."
|
||||
'This value should be valid JSON':
|
||||
'': 'Cette valeur doit être un JSON valide.'
|
||||
'This collection should contain only unique elements':
|
||||
'': 'Cette collection ne doit pas comporter de doublons.'
|
||||
'This value should be positive':
|
||||
'': 'Cette valeur doit être strictement positive.'
|
||||
'This value should be either positive or zero':
|
||||
'': 'Cette valeur doit être supérieure ou égale à zéro.'
|
||||
'This value should be negative':
|
||||
'': 'Cette valeur doit être strictement négative.'
|
||||
'This value should be either negative or zero':
|
||||
'': 'Cette valeur doit être inférieure ou égale à zéro.'
|
||||
'This value is not a valid timezone':
|
||||
'': "Cette valeur n'est pas un fuseau horaire valide."
|
||||
'This password has been leaked in a data breach, it must not be used':
|
||||
' Please use another password':
|
||||
'': "Ce mot de passe a été divulgué lors d'une fuite de données, il ne doit plus être utilisé. Veuillez utiliser un autre mot de passe."
|
||||
'This value should be between {{ min }} and {{ max }}':
|
||||
'': 'Cette valeur doit être comprise entre {{ min }} et {{ max }}.'
|
||||
'This value is not a valid hostname':
|
||||
'': "Cette valeur n'est pas un nom d'hôte valide."
|
||||
'The number of elements in this collection should be a multiple of {{ compared_value }}':
|
||||
'': "Le nombre d'éléments de cette collection doit être un multiple de {{ compared_value }}."
|
||||
'This value should satisfy at least one of the following constraints:': 'Cette valeur doit satisfaire à au moins une des contraintes suivantes :'
|
||||
'Each element of this collection should satisfy its own set of constraints':
|
||||
'': 'Chaque élément de cette collection doit satisfaire à son propre jeu de contraintes.'
|
||||
'This value is not a valid International Securities Identification Number (ISIN)':
|
||||
'': "Cette valeur n'est pas un code international de sécurité valide (ISIN)."
|
||||
'This value should be a valid expression':
|
||||
'': 'Cette valeur doit être une expression valide.'
|
||||
'This value is not a valid CSS color':
|
||||
'': "Cette valeur n'est pas une couleur CSS valide."
|
||||
'This value is not a valid CIDR notation':
|
||||
'': "Cette valeur n'est pas une notation CIDR valide."
|
||||
'The value of the netmask should be between {{ min }} and {{ max }}':
|
||||
'': 'La valeur du masque de réseau doit être comprise entre {{ min }} et {{ max }}.'
|
||||
'This form should not contain extra fields':
|
||||
'': 'Ce formulaire ne doit pas contenir de champs supplémentaires.'
|
||||
'The uploaded file was too large':
|
||||
' Please try to upload a smaller file':
|
||||
'': "Le fichier téléchargé est trop volumineux. Merci d'essayer d'envoyer un fichier plus petit."
|
||||
'The CSRF token is invalid':
|
||||
' Please try to resubmit the form':
|
||||
'': 'Le jeton CSRF est invalide. Veuillez renvoyer le formulaire.'
|
||||
'This value is not a valid HTML5 color':
|
||||
'': "Cette valeur n'est pas une couleur HTML5 valide."
|
||||
'Please enter a valid birthdate':
|
||||
'': 'Veuillez entrer une date de naissance valide.'
|
||||
'The selected choice is invalid':
|
||||
'': 'Le choix sélectionné est invalide.'
|
||||
'The collection is invalid':
|
||||
'': 'La collection est invalide.'
|
||||
'Please select a valid color':
|
||||
'': 'Veuillez sélectionner une couleur valide.'
|
||||
'Please select a valid country':
|
||||
'': 'Veuillez sélectionner un pays valide.'
|
||||
'Please select a valid currency':
|
||||
'': 'Veuillez sélectionner une devise valide.'
|
||||
'Please choose a valid date interval':
|
||||
'': 'Veuillez choisir un intervalle de dates valide.'
|
||||
'Please enter a valid date and time':
|
||||
'': 'Veuillez saisir une date et une heure valides.'
|
||||
'Please enter a valid date':
|
||||
'': 'Veuillez entrer une date valide.'
|
||||
'Please select a valid file':
|
||||
'': 'Veuillez sélectionner un fichier valide.'
|
||||
'The hidden field is invalid':
|
||||
'': "Le champ masqué n'est pas valide."
|
||||
'Please enter an integer':
|
||||
'': 'Veuillez saisir un entier.'
|
||||
'Please select a valid language':
|
||||
'': 'Veuillez sélectionner une langue valide.'
|
||||
'Please select a valid locale':
|
||||
'': 'Veuillez sélectionner une langue valide.'
|
||||
'Please enter a valid money amount':
|
||||
'': 'Veuillez saisir un montant valide.'
|
||||
'Please enter a number':
|
||||
'': 'Veuillez saisir un nombre.'
|
||||
'The password is invalid':
|
||||
'': 'Le mot de passe est invalide.'
|
||||
'Please enter a percentage value':
|
||||
'': 'Veuillez saisir un pourcentage valide.'
|
||||
'The values do not match':
|
||||
'': 'Les valeurs ne correspondent pas.'
|
||||
'Please enter a valid time':
|
||||
'': 'Veuillez saisir une heure valide.'
|
||||
'Please select a valid timezone':
|
||||
'': 'Veuillez sélectionner un fuseau horaire valide.'
|
||||
'Please enter a valid URL':
|
||||
'': 'Veuillez saisir une URL valide.'
|
||||
'Please enter a valid search term':
|
||||
'': 'Veuillez saisir un terme de recherche valide.'
|
||||
'Please provide a valid phone number':
|
||||
'': 'Veuillez fournir un numéro de téléphone valide.'
|
||||
'The checkbox has an invalid value':
|
||||
'': 'La case à cocher a une valeur non valide.'
|
||||
'Please enter a valid email address':
|
||||
'': 'Veuillez saisir une adresse email valide.'
|
||||
'Please select a valid option':
|
||||
'': 'Veuillez sélectionner une option valide.'
|
||||
'Please select a valid range':
|
||||
'': 'Veuillez sélectionner une plage valide.'
|
||||
'Please enter a valid week':
|
||||
'': 'Veuillez entrer une semaine valide.'
|
|
@ -0,0 +1,81 @@
|
|||
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 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.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())
|
||||
|
||||
// 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()
|
||||
|
||||
// uncomment if you use React
|
||||
//.enableReactPreset()
|
||||
|
||||
// make a Vuejs app
|
||||
.enableVueLoader(() => {}, {
|
||||
useJsx: true
|
||||
})
|
||||
|
||||
// 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 New Issue