Compare commits
23 Commits
maurine-pa
...
feat/cnx_a
| Author | SHA1 | Date | |
|---|---|---|---|
| 7e6e10381f | |||
|
|
3821006ef3 | ||
|
|
e7e6d7c1af | ||
| 23789ab33e | |||
| 1cb1fc925b | |||
| 0e5351b7f4 | |||
| ba84b49134 | |||
| 1b5fd98527 | |||
| 36cd7923c1 | |||
| c0829d30d0 | |||
| 458f4b5d91 | |||
| 627f5b6954 | |||
| ff6399436c | |||
| d81e450a0e | |||
| 3dcba06f20 | |||
| f72c99f56a | |||
| 0fa1c418f8 | |||
| 74f795ba25 | |||
| ab90664b0a | |||
| 8450372a97 | |||
| 0b3e9bebb9 | |||
| ef7f038ab8 | |||
| 38b1293a27 |
17
.editorconfig
Normal file
17
.editorconfig
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
# editorconfig.org
|
||||||
|
|
||||||
|
root = true
|
||||||
|
|
||||||
|
[*]
|
||||||
|
charset = utf-8
|
||||||
|
end_of_line = lf
|
||||||
|
indent_size = 4
|
||||||
|
indent_style = space
|
||||||
|
insert_final_newline = true
|
||||||
|
trim_trailing_whitespace = true
|
||||||
|
|
||||||
|
[{compose.yaml,compose.*.yaml}]
|
||||||
|
indent_size = 2
|
||||||
|
|
||||||
|
[*.md]
|
||||||
|
trim_trailing_whitespace = false
|
||||||
2
.env
2
.env
@@ -1,5 +1,5 @@
|
|||||||
APP_ENV=dev
|
APP_ENV=dev
|
||||||
APP_SECRET=
|
APP_SECRET=je_te_remplis_parce_que_tu_me_mets_des_messages_d_erreur
|
||||||
APP_SHARE_DIR=var/share
|
APP_SHARE_DIR=var/share
|
||||||
APP_VERSION=0.0.1
|
APP_VERSION=0.0.1
|
||||||
DATABASE_URL="postgresql://app:!ChangeMe!@127.0.0.1:5432/app?serverVersion=16&charset=utf8"
|
DATABASE_URL="postgresql://app:!ChangeMe!@127.0.0.1:5432/app?serverVersion=16&charset=utf8"
|
||||||
|
|||||||
3
.env.test
Normal file
3
.env.test
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
# define your env variables for the test env here
|
||||||
|
KERNEL_CLASS='App\Kernel'
|
||||||
|
APP_SECRET='$ecretf0rt3st'
|
||||||
27
.gitignore
vendored
27
.gitignore
vendored
@@ -26,3 +26,30 @@ phpunit.xml
|
|||||||
### OS / Misc ###
|
### OS / Misc ###
|
||||||
.DS_Store
|
.DS_Store
|
||||||
Thumbs.db
|
Thumbs.db
|
||||||
|
|
||||||
|
###> symfony/webpack-encore-bundle ###
|
||||||
|
/node_modules/
|
||||||
|
/public/build/
|
||||||
|
npm-debug.log
|
||||||
|
yarn-error.log
|
||||||
|
###< symfony/webpack-encore-bundle ###
|
||||||
|
|
||||||
|
###> symfony/asset-mapper ###
|
||||||
|
/public/assets/
|
||||||
|
/assets/vendor/
|
||||||
|
###< symfony/asset-mapper ###
|
||||||
|
|
||||||
|
###> symfony/framework-bundle ###
|
||||||
|
/.env.local
|
||||||
|
/.env.local.php
|
||||||
|
/.env.*.local
|
||||||
|
/config/secrets/prod/prod.decrypt.private.php
|
||||||
|
/public/bundles/
|
||||||
|
/var/
|
||||||
|
/vendor/
|
||||||
|
###< symfony/framework-bundle ###
|
||||||
|
|
||||||
|
###> phpunit/phpunit ###
|
||||||
|
/phpunit.xml
|
||||||
|
/.phpunit.cache/
|
||||||
|
###< phpunit/phpunit ###
|
||||||
|
|||||||
@@ -2,9 +2,9 @@ import './stimulus_bootstrap.js';
|
|||||||
/*
|
/*
|
||||||
* Welcome to your app's main JavaScript file!
|
* Welcome to your app's main JavaScript file!
|
||||||
*
|
*
|
||||||
* This file will be included onto the page via the importmap() Twig function,
|
* We recommend including the built version of this JavaScript file
|
||||||
* which should already be in your base.html.twig.
|
* (and its CSS file) in your base layout (base.html.twig).
|
||||||
*/
|
*/
|
||||||
import './styles/app.css';
|
|
||||||
|
|
||||||
console.log('This log comes from assets/app.js - welcome to AssetMapper! 🎉');
|
// any CSS you import will output into a single css file (app.css in this case)
|
||||||
|
import './styles/app.css';
|
||||||
|
|||||||
81
assets/controllers/csrf_protection_controller.js
Normal file
81
assets/controllers/csrf_protection_controller.js
Normal file
@@ -0,0 +1,81 @@
|
|||||||
|
const nameCheck = /^[-_a-zA-Z0-9]{4,22}$/;
|
||||||
|
const tokenCheck = /^[-_/+a-zA-Z0-9]{24,}$/;
|
||||||
|
|
||||||
|
// Generate and double-submit a CSRF token in a form field and a cookie, as defined by Symfony's SameOriginCsrfTokenManager
|
||||||
|
// Use `form.requestSubmit()` to ensure that the submit event is triggered. Using `form.submit()` will not trigger the event
|
||||||
|
// and thus this event-listener will not be executed.
|
||||||
|
document.addEventListener('submit', function (event) {
|
||||||
|
generateCsrfToken(event.target);
|
||||||
|
}, true);
|
||||||
|
|
||||||
|
// When @hotwired/turbo handles form submissions, send the CSRF token in a header in addition to a cookie
|
||||||
|
// The `framework.csrf_protection.check_header` config option needs to be enabled for the header to be checked
|
||||||
|
document.addEventListener('turbo:submit-start', function (event) {
|
||||||
|
const h = generateCsrfHeaders(event.detail.formSubmission.formElement);
|
||||||
|
Object.keys(h).map(function (k) {
|
||||||
|
event.detail.formSubmission.fetchRequest.headers[k] = h[k];
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
// When @hotwired/turbo handles form submissions, remove the CSRF cookie once a form has been submitted
|
||||||
|
document.addEventListener('turbo:submit-end', function (event) {
|
||||||
|
removeCsrfToken(event.detail.formSubmission.formElement);
|
||||||
|
});
|
||||||
|
|
||||||
|
export function generateCsrfToken (formElement) {
|
||||||
|
const csrfField = formElement.querySelector('input[data-controller="csrf-protection"], input[name="_csrf_token"]');
|
||||||
|
|
||||||
|
if (!csrfField) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
let csrfCookie = csrfField.getAttribute('data-csrf-protection-cookie-value');
|
||||||
|
let csrfToken = csrfField.value;
|
||||||
|
|
||||||
|
if (!csrfCookie && nameCheck.test(csrfToken)) {
|
||||||
|
csrfField.setAttribute('data-csrf-protection-cookie-value', csrfCookie = csrfToken);
|
||||||
|
csrfField.defaultValue = csrfToken = btoa(String.fromCharCode.apply(null, (window.crypto || window.msCrypto).getRandomValues(new Uint8Array(18))));
|
||||||
|
}
|
||||||
|
csrfField.dispatchEvent(new Event('change', { bubbles: true }));
|
||||||
|
|
||||||
|
if (csrfCookie && tokenCheck.test(csrfToken)) {
|
||||||
|
const cookie = csrfCookie + '_' + csrfToken + '=' + csrfCookie + '; path=/; samesite=strict';
|
||||||
|
document.cookie = window.location.protocol === 'https:' ? '__Host-' + cookie + '; secure' : cookie;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export function generateCsrfHeaders (formElement) {
|
||||||
|
const headers = {};
|
||||||
|
const csrfField = formElement.querySelector('input[data-controller="csrf-protection"], input[name="_csrf_token"]');
|
||||||
|
|
||||||
|
if (!csrfField) {
|
||||||
|
return headers;
|
||||||
|
}
|
||||||
|
|
||||||
|
const csrfCookie = csrfField.getAttribute('data-csrf-protection-cookie-value');
|
||||||
|
|
||||||
|
if (tokenCheck.test(csrfField.value) && nameCheck.test(csrfCookie)) {
|
||||||
|
headers[csrfCookie] = csrfField.value;
|
||||||
|
}
|
||||||
|
|
||||||
|
return headers;
|
||||||
|
}
|
||||||
|
|
||||||
|
export function removeCsrfToken (formElement) {
|
||||||
|
const csrfField = formElement.querySelector('input[data-controller="csrf-protection"], input[name="_csrf_token"]');
|
||||||
|
|
||||||
|
if (!csrfField) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
const csrfCookie = csrfField.getAttribute('data-csrf-protection-cookie-value');
|
||||||
|
|
||||||
|
if (tokenCheck.test(csrfField.value) && nameCheck.test(csrfCookie)) {
|
||||||
|
const cookie = csrfCookie + '_' + csrfField.value + '=0; path=/; samesite=strict; max-age=0';
|
||||||
|
|
||||||
|
document.cookie = window.location.protocol === 'https:' ? '__Host-' + cookie + '; secure' : cookie;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* stimulusFetch: 'lazy' */
|
||||||
|
export default 'csrf-protection-controller';
|
||||||
16
assets/controllers/hello_controller.js
Normal file
16
assets/controllers/hello_controller.js
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
import { Controller } from '@hotwired/stimulus';
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This is an example Stimulus controller!
|
||||||
|
*
|
||||||
|
* Any element with a data-controller="hello" attribute will cause
|
||||||
|
* this controller to be executed. The name "hello" comes from the filename:
|
||||||
|
* hello_controller.js -> "hello"
|
||||||
|
*
|
||||||
|
* Delete this file or adapt it for your use!
|
||||||
|
*/
|
||||||
|
export default class extends Controller {
|
||||||
|
connect() {
|
||||||
|
this.element.textContent = 'Hello Stimulus! Edit me in assets/controllers/hello_controller.js';
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,5 +1,13 @@
|
|||||||
import { startStimulusApp } from '@symfony/stimulus-bundle';
|
import { startStimulusApp } from '@symfony/stimulus-bundle';
|
||||||
|
|
||||||
startStimulusApp();
|
const app = startStimulusApp();
|
||||||
|
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
|
// register any custom, 3rd party controllers here
|
||||||
// app.register('some_controller_name', SomeImportedController);
|
// app.register('some_controller_name', SomeImportedController);
|
||||||
|
|||||||
@@ -1,3 +1,35 @@
|
|||||||
body {
|
@import "tailwindcss";
|
||||||
background-color: skyblue;
|
|
||||||
|
/* Chargement des polices d'écriture */
|
||||||
|
@import url('https://fonts.googleapis.com/css2?family=Sora:wght@100..800&display=swap');
|
||||||
|
@import url('https://fonts.googleapis.com/css2?family=Caveat:wght@400..700&family=Sora:wght@100..800&display=swap');
|
||||||
|
|
||||||
|
/* Configuration charte graphique */
|
||||||
|
@theme {
|
||||||
|
/* --- Couleurs de l'association --- */
|
||||||
|
--color-bouton: #4DD5C8;
|
||||||
|
--color-bouton-hover: #6CE0D6;
|
||||||
|
--color-title: #E6A638;
|
||||||
|
--color-text: #000000;
|
||||||
|
--color-bg-primaire: #F9FCF7;
|
||||||
|
--color-bg-secondaire: #23978B;
|
||||||
|
|
||||||
|
/* --- Couleurs liées à des actions --- */
|
||||||
|
--color-danger: #EF4444;
|
||||||
|
--color-danger-hover: #DC2626;
|
||||||
|
|
||||||
|
--color-success: #A7F3D0;
|
||||||
|
--color-success-text: #065F46;
|
||||||
|
|
||||||
|
--color-info: #BFDBFE;
|
||||||
|
--color-info-hover: #93C5FD;
|
||||||
|
|
||||||
|
/* --- Couleurs en plus --- */
|
||||||
|
--color-gris-clair: #E5E7EB;
|
||||||
|
--color-gris-moyen: #9CA3AF;
|
||||||
|
--color-gris-fonce: #4B5563;
|
||||||
|
|
||||||
|
/* Polices */
|
||||||
|
--font-sora: "Sora", system-ui, sans-serif;
|
||||||
|
--font-caveat: "Caveat", cursive;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,6 +25,5 @@ services:
|
|||||||
environment:
|
environment:
|
||||||
MP_SMTP_AUTH_ACCEPT_ANY: 1
|
MP_SMTP_AUTH_ACCEPT_ANY: 1
|
||||||
MP_SMTP_AUTH_ALLOW_INSECURE: 1
|
MP_SMTP_AUTH_ALLOW_INSECURE: 1
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
database_data:
|
database_data:
|
||||||
|
|||||||
@@ -10,10 +10,10 @@
|
|||||||
"doctrine/doctrine-bundle": "^3.2",
|
"doctrine/doctrine-bundle": "^3.2",
|
||||||
"doctrine/doctrine-migrations-bundle": "^4.0",
|
"doctrine/doctrine-migrations-bundle": "^4.0",
|
||||||
"doctrine/orm": "^3.6",
|
"doctrine/orm": "^3.6",
|
||||||
|
"fakerphp/faker": "^1.24",
|
||||||
"phpdocumentor/reflection-docblock": "^5.6",
|
"phpdocumentor/reflection-docblock": "^5.6",
|
||||||
"phpstan/phpdoc-parser": "^2.3",
|
"phpstan/phpdoc-parser": "^2.3",
|
||||||
"symfony/asset": "8.0.*",
|
"symfony/asset": "8.0.*",
|
||||||
"symfony/asset-mapper": "8.0.*",
|
|
||||||
"symfony/console": "8.0.*",
|
"symfony/console": "8.0.*",
|
||||||
"symfony/doctrine-messenger": "8.0.*",
|
"symfony/doctrine-messenger": "8.0.*",
|
||||||
"symfony/dotenv": "8.0.*",
|
"symfony/dotenv": "8.0.*",
|
||||||
@@ -37,10 +37,12 @@
|
|||||||
"symfony/string": "8.0.*",
|
"symfony/string": "8.0.*",
|
||||||
"symfony/translation": "8.0.*",
|
"symfony/translation": "8.0.*",
|
||||||
"symfony/twig-bundle": "8.0.*",
|
"symfony/twig-bundle": "8.0.*",
|
||||||
|
"symfony/uid": "8.0.*",
|
||||||
"symfony/ux-turbo": "^2.32",
|
"symfony/ux-turbo": "^2.32",
|
||||||
"symfony/validator": "8.0.*",
|
"symfony/validator": "8.0.*",
|
||||||
"symfony/web-link": "8.0.*",
|
"symfony/web-link": "8.0.*",
|
||||||
"symfony/yaml": "8.0.*",
|
"symfony/yaml": "8.0.*",
|
||||||
|
"symfonycasts/tailwind-bundle": "^0.12.0",
|
||||||
"twig/extra-bundle": "^2.12|^3.0",
|
"twig/extra-bundle": "^2.12|^3.0",
|
||||||
"twig/twig": "^2.12|^3.0"
|
"twig/twig": "^2.12|^3.0"
|
||||||
},
|
},
|
||||||
@@ -98,6 +100,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
|
"doctrine/doctrine-fixtures-bundle": "^4.3",
|
||||||
"phpunit/phpunit": "^13.0",
|
"phpunit/phpunit": "^13.0",
|
||||||
"symfony/browser-kit": "8.0.*",
|
"symfony/browser-kit": "8.0.*",
|
||||||
"symfony/css-selector": "8.0.*",
|
"symfony/css-selector": "8.0.*",
|
||||||
|
|||||||
489
composer.lock
generated
489
composer.lock
generated
@@ -4,7 +4,7 @@
|
|||||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||||
"This file is @generated automatically"
|
"This file is @generated automatically"
|
||||||
],
|
],
|
||||||
"content-hash": "b80e1957a1c5f59c7aa332a9535d541a",
|
"content-hash": "bc53a345dda69084bc7dbf18b03f3d9d",
|
||||||
"packages": [
|
"packages": [
|
||||||
{
|
{
|
||||||
"name": "composer/semver",
|
"name": "composer/semver",
|
||||||
@@ -1263,6 +1263,69 @@
|
|||||||
],
|
],
|
||||||
"time": "2025-03-06T22:45:56+00:00"
|
"time": "2025-03-06T22:45:56+00:00"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "fakerphp/faker",
|
||||||
|
"version": "v1.24.1",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/FakerPHP/Faker.git",
|
||||||
|
"reference": "e0ee18eb1e6dc3cda3ce9fd97e5a0689a88a64b5"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/FakerPHP/Faker/zipball/e0ee18eb1e6dc3cda3ce9fd97e5a0689a88a64b5",
|
||||||
|
"reference": "e0ee18eb1e6dc3cda3ce9fd97e5a0689a88a64b5",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"php": "^7.4 || ^8.0",
|
||||||
|
"psr/container": "^1.0 || ^2.0",
|
||||||
|
"symfony/deprecation-contracts": "^2.2 || ^3.0"
|
||||||
|
},
|
||||||
|
"conflict": {
|
||||||
|
"fzaninotto/faker": "*"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"bamarni/composer-bin-plugin": "^1.4.1",
|
||||||
|
"doctrine/persistence": "^1.3 || ^2.0",
|
||||||
|
"ext-intl": "*",
|
||||||
|
"phpunit/phpunit": "^9.5.26",
|
||||||
|
"symfony/phpunit-bridge": "^5.4.16"
|
||||||
|
},
|
||||||
|
"suggest": {
|
||||||
|
"doctrine/orm": "Required to use Faker\\ORM\\Doctrine",
|
||||||
|
"ext-curl": "Required by Faker\\Provider\\Image to download images.",
|
||||||
|
"ext-dom": "Required by Faker\\Provider\\HtmlLorem for generating random HTML.",
|
||||||
|
"ext-iconv": "Required by Faker\\Provider\\ru_RU\\Text::realText() for generating real Russian text.",
|
||||||
|
"ext-mbstring": "Required for multibyte Unicode string functionality."
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"Faker\\": "src/Faker/"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"MIT"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "François Zaninotto"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "Faker is a PHP library that generates fake data for you.",
|
||||||
|
"keywords": [
|
||||||
|
"data",
|
||||||
|
"faker",
|
||||||
|
"fixtures"
|
||||||
|
],
|
||||||
|
"support": {
|
||||||
|
"issues": "https://github.com/FakerPHP/Faker/issues",
|
||||||
|
"source": "https://github.com/FakerPHP/Faker/tree/v1.24.1"
|
||||||
|
},
|
||||||
|
"time": "2024-11-21T13:46:39+00:00"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "monolog/monolog",
|
"name": "monolog/monolog",
|
||||||
"version": "3.10.0",
|
"version": "3.10.0",
|
||||||
@@ -1966,16 +2029,16 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/asset-mapper",
|
"name": "symfony/asset-mapper",
|
||||||
"version": "v8.0.4",
|
"version": "v8.0.6",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/asset-mapper.git",
|
"url": "https://github.com/symfony/asset-mapper.git",
|
||||||
"reference": "14184221c21c2622e62f2c009a6cc25c5570e4ba"
|
"reference": "80635c3722b9bb5481e0282497ae23796dcd3712"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/symfony/asset-mapper/zipball/14184221c21c2622e62f2c009a6cc25c5570e4ba",
|
"url": "https://api.github.com/repos/symfony/asset-mapper/zipball/80635c3722b9bb5481e0282497ae23796dcd3712",
|
||||||
"reference": "14184221c21c2622e62f2c009a6cc25c5570e4ba",
|
"reference": "80635c3722b9bb5481e0282497ae23796dcd3712",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@@ -2023,7 +2086,7 @@
|
|||||||
"description": "Maps directories of assets & makes them available in a public directory with versioned filenames.",
|
"description": "Maps directories of assets & makes them available in a public directory with versioned filenames.",
|
||||||
"homepage": "https://symfony.com",
|
"homepage": "https://symfony.com",
|
||||||
"support": {
|
"support": {
|
||||||
"source": "https://github.com/symfony/asset-mapper/tree/v8.0.4"
|
"source": "https://github.com/symfony/asset-mapper/tree/v8.0.6"
|
||||||
},
|
},
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
@@ -2043,7 +2106,7 @@
|
|||||||
"type": "tidelift"
|
"type": "tidelift"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2026-01-13T13:06:50+00:00"
|
"time": "2026-02-17T13:07:04+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/cache",
|
"name": "symfony/cache",
|
||||||
@@ -3388,16 +3451,16 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/form",
|
"name": "symfony/form",
|
||||||
"version": "v8.0.4",
|
"version": "v8.0.7",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/form.git",
|
"url": "https://github.com/symfony/form.git",
|
||||||
"reference": "c34ec2c2648e2dfedab3ce7e3c6c86f8d89c3092"
|
"reference": "954e17b053dad9fb227ebd90260752e3a46bb06a"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/symfony/form/zipball/c34ec2c2648e2dfedab3ce7e3c6c86f8d89c3092",
|
"url": "https://api.github.com/repos/symfony/form/zipball/954e17b053dad9fb227ebd90260752e3a46bb06a",
|
||||||
"reference": "c34ec2c2648e2dfedab3ce7e3c6c86f8d89c3092",
|
"reference": "954e17b053dad9fb227ebd90260752e3a46bb06a",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@@ -3459,7 +3522,7 @@
|
|||||||
"description": "Allows to easily create, process and reuse HTML forms",
|
"description": "Allows to easily create, process and reuse HTML forms",
|
||||||
"homepage": "https://symfony.com",
|
"homepage": "https://symfony.com",
|
||||||
"support": {
|
"support": {
|
||||||
"source": "https://github.com/symfony/form/tree/v8.0.4"
|
"source": "https://github.com/symfony/form/tree/v8.0.7"
|
||||||
},
|
},
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
@@ -3479,7 +3542,7 @@
|
|||||||
"type": "tidelift"
|
"type": "tidelift"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2026-01-23T11:07:10+00:00"
|
"time": "2026-03-06T13:17:40+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/framework-bundle",
|
"name": "symfony/framework-bundle",
|
||||||
@@ -5213,6 +5276,89 @@
|
|||||||
],
|
],
|
||||||
"time": "2025-06-23T16:12:55+00:00"
|
"time": "2025-06-23T16:12:55+00:00"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "symfony/polyfill-uuid",
|
||||||
|
"version": "v1.33.0",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/symfony/polyfill-uuid.git",
|
||||||
|
"reference": "21533be36c24be3f4b1669c4725c7d1d2bab4ae2"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/symfony/polyfill-uuid/zipball/21533be36c24be3f4b1669c4725c7d1d2bab4ae2",
|
||||||
|
"reference": "21533be36c24be3f4b1669c4725c7d1d2bab4ae2",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"php": ">=7.2"
|
||||||
|
},
|
||||||
|
"provide": {
|
||||||
|
"ext-uuid": "*"
|
||||||
|
},
|
||||||
|
"suggest": {
|
||||||
|
"ext-uuid": "For best performance"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"extra": {
|
||||||
|
"thanks": {
|
||||||
|
"url": "https://github.com/symfony/polyfill",
|
||||||
|
"name": "symfony/polyfill"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"autoload": {
|
||||||
|
"files": [
|
||||||
|
"bootstrap.php"
|
||||||
|
],
|
||||||
|
"psr-4": {
|
||||||
|
"Symfony\\Polyfill\\Uuid\\": ""
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"MIT"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Grégoire Pineau",
|
||||||
|
"email": "lyrixx@lyrixx.info"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Symfony Community",
|
||||||
|
"homepage": "https://symfony.com/contributors"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "Symfony polyfill for uuid functions",
|
||||||
|
"homepage": "https://symfony.com",
|
||||||
|
"keywords": [
|
||||||
|
"compatibility",
|
||||||
|
"polyfill",
|
||||||
|
"portable",
|
||||||
|
"uuid"
|
||||||
|
],
|
||||||
|
"support": {
|
||||||
|
"source": "https://github.com/symfony/polyfill-uuid/tree/v1.33.0"
|
||||||
|
},
|
||||||
|
"funding": [
|
||||||
|
{
|
||||||
|
"url": "https://symfony.com/sponsor",
|
||||||
|
"type": "custom"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"url": "https://github.com/fabpot",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"url": "https://github.com/nicolas-grekas",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
|
||||||
|
"type": "tidelift"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"time": "2024-09-09T11:45:10+00:00"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/process",
|
"name": "symfony/process",
|
||||||
"version": "v8.0.5",
|
"version": "v8.0.5",
|
||||||
@@ -5610,16 +5756,16 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/security-bundle",
|
"name": "symfony/security-bundle",
|
||||||
"version": "v8.0.4",
|
"version": "v8.0.6",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/symfony/security-bundle.git",
|
"url": "https://github.com/symfony/security-bundle.git",
|
||||||
"reference": "c170650a00ba724be3455852747af600a2f042b4"
|
"reference": "73ba33c215a5e4516c7045c26f6fec71e4ab5727"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/symfony/security-bundle/zipball/c170650a00ba724be3455852747af600a2f042b4",
|
"url": "https://api.github.com/repos/symfony/security-bundle/zipball/73ba33c215a5e4516c7045c26f6fec71e4ab5727",
|
||||||
"reference": "c170650a00ba724be3455852747af600a2f042b4",
|
"reference": "73ba33c215a5e4516c7045c26f6fec71e4ab5727",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@@ -5686,7 +5832,7 @@
|
|||||||
"description": "Provides a tight integration of the Security component into the Symfony full-stack framework",
|
"description": "Provides a tight integration of the Security component into the Symfony full-stack framework",
|
||||||
"homepage": "https://symfony.com",
|
"homepage": "https://symfony.com",
|
||||||
"support": {
|
"support": {
|
||||||
"source": "https://github.com/symfony/security-bundle/tree/v8.0.4"
|
"source": "https://github.com/symfony/security-bundle/tree/v8.0.6"
|
||||||
},
|
},
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
@@ -5706,7 +5852,7 @@
|
|||||||
"type": "tidelift"
|
"type": "tidelift"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"time": "2026-01-10T13:58:55+00:00"
|
"time": "2026-02-22T22:01:53+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/security-core",
|
"name": "symfony/security-core",
|
||||||
@@ -6808,6 +6954,84 @@
|
|||||||
],
|
],
|
||||||
"time": "2026-01-09T12:15:10+00:00"
|
"time": "2026-01-09T12:15:10+00:00"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "symfony/uid",
|
||||||
|
"version": "v8.0.4",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/symfony/uid.git",
|
||||||
|
"reference": "8b81bd3700f5c1913c22a3266a647aa1bb974435"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/symfony/uid/zipball/8b81bd3700f5c1913c22a3266a647aa1bb974435",
|
||||||
|
"reference": "8b81bd3700f5c1913c22a3266a647aa1bb974435",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"php": ">=8.4",
|
||||||
|
"symfony/polyfill-uuid": "^1.15"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"symfony/console": "^7.4|^8.0"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"Symfony\\Component\\Uid\\": ""
|
||||||
|
},
|
||||||
|
"exclude-from-classmap": [
|
||||||
|
"/Tests/"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"MIT"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Grégoire Pineau",
|
||||||
|
"email": "lyrixx@lyrixx.info"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Nicolas Grekas",
|
||||||
|
"email": "p@tchwork.com"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Symfony Community",
|
||||||
|
"homepage": "https://symfony.com/contributors"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "Provides an object-oriented API to generate and represent UIDs",
|
||||||
|
"homepage": "https://symfony.com",
|
||||||
|
"keywords": [
|
||||||
|
"UID",
|
||||||
|
"ulid",
|
||||||
|
"uuid"
|
||||||
|
],
|
||||||
|
"support": {
|
||||||
|
"source": "https://github.com/symfony/uid/tree/v8.0.4"
|
||||||
|
},
|
||||||
|
"funding": [
|
||||||
|
{
|
||||||
|
"url": "https://symfony.com/sponsor",
|
||||||
|
"type": "custom"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"url": "https://github.com/fabpot",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"url": "https://github.com/nicolas-grekas",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
|
||||||
|
"type": "tidelift"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"time": "2026-01-03T23:40:55+00:00"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/ux-turbo",
|
"name": "symfony/ux-turbo",
|
||||||
"version": "v2.32.0",
|
"version": "v2.32.0",
|
||||||
@@ -7331,6 +7555,62 @@
|
|||||||
],
|
],
|
||||||
"time": "2025-12-04T18:17:06+00:00"
|
"time": "2025-12-04T18:17:06+00:00"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "symfonycasts/tailwind-bundle",
|
||||||
|
"version": "v0.12.0",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/SymfonyCasts/tailwind-bundle.git",
|
||||||
|
"reference": "17c85e25d3ceb54b8599e8ca4c5b67c485f2a48a"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/SymfonyCasts/tailwind-bundle/zipball/17c85e25d3ceb54b8599e8ca4c5b67c485f2a48a",
|
||||||
|
"reference": "17c85e25d3ceb54b8599e8ca4c5b67c485f2a48a",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"php": ">=8.1",
|
||||||
|
"symfony/asset-mapper": "^6.3|^7.0|^8.0",
|
||||||
|
"symfony/cache": "^6.3|^7.0|^8.0",
|
||||||
|
"symfony/console": "^5.4|^6.3|^7.0|^8.0",
|
||||||
|
"symfony/deprecation-contracts": "^2.2|^3.0",
|
||||||
|
"symfony/http-client": "^5.4|^6.3|^7.0|^8.0",
|
||||||
|
"symfony/process": "^5.4|^6.3|^7.0|^8.0"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"phpunit/phpunit": "^9.6",
|
||||||
|
"symfony/filesystem": "^6.3|^7.0|^8.0",
|
||||||
|
"symfony/framework-bundle": "^6.3|^7.0|^8.0",
|
||||||
|
"symfony/phpunit-bridge": "^6.3.9|^7.0|^8.0"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"Symfonycasts\\TailwindBundle\\": "src"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"MIT"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Ryan Weaver",
|
||||||
|
"homepage": "https://symfonycasts.com"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "Delightful Tailwind Support for Symfony + AssetMapper",
|
||||||
|
"keywords": [
|
||||||
|
"asset-mapper",
|
||||||
|
"tailwind"
|
||||||
|
],
|
||||||
|
"support": {
|
||||||
|
"issues": "https://github.com/SymfonyCasts/tailwind-bundle/issues",
|
||||||
|
"source": "https://github.com/SymfonyCasts/tailwind-bundle/tree/v0.12.0"
|
||||||
|
},
|
||||||
|
"time": "2025-11-24T10:14:04+00:00"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "twig/extra-bundle",
|
"name": "twig/extra-bundle",
|
||||||
"version": "v3.23.0",
|
"version": "v3.23.0",
|
||||||
@@ -7548,6 +7828,175 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"packages-dev": [
|
"packages-dev": [
|
||||||
|
{
|
||||||
|
"name": "doctrine/data-fixtures",
|
||||||
|
"version": "2.2.0",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/doctrine/data-fixtures.git",
|
||||||
|
"reference": "7a615ba135e45d67674bb623d90f34f6c7b6bd97"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/doctrine/data-fixtures/zipball/7a615ba135e45d67674bb623d90f34f6c7b6bd97",
|
||||||
|
"reference": "7a615ba135e45d67674bb623d90f34f6c7b6bd97",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"doctrine/persistence": "^3.1 || ^4.0",
|
||||||
|
"php": "^8.1",
|
||||||
|
"psr/log": "^1.1 || ^2 || ^3"
|
||||||
|
},
|
||||||
|
"conflict": {
|
||||||
|
"doctrine/dbal": "<3.5 || >=5",
|
||||||
|
"doctrine/orm": "<2.14 || >=4",
|
||||||
|
"doctrine/phpcr-odm": "<1.3.0"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"doctrine/coding-standard": "^14",
|
||||||
|
"doctrine/dbal": "^3.5 || ^4",
|
||||||
|
"doctrine/mongodb-odm": "^1.3.0 || ^2.0.0",
|
||||||
|
"doctrine/orm": "^2.14 || ^3",
|
||||||
|
"ext-sqlite3": "*",
|
||||||
|
"fig/log-test": "^1",
|
||||||
|
"phpstan/phpstan": "2.1.31",
|
||||||
|
"phpunit/phpunit": "10.5.45 || 12.4.0",
|
||||||
|
"symfony/cache": "^6.4 || ^7",
|
||||||
|
"symfony/var-exporter": "^6.4 || ^7"
|
||||||
|
},
|
||||||
|
"suggest": {
|
||||||
|
"alcaeus/mongo-php-adapter": "For using MongoDB ODM 1.3 with PHP 7 (deprecated)",
|
||||||
|
"doctrine/mongodb-odm": "For loading MongoDB ODM fixtures",
|
||||||
|
"doctrine/orm": "For loading ORM fixtures",
|
||||||
|
"doctrine/phpcr-odm": "For loading PHPCR ODM fixtures"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"Doctrine\\Common\\DataFixtures\\": "src"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"MIT"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Jonathan Wage",
|
||||||
|
"email": "jonwage@gmail.com"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "Data Fixtures for all Doctrine Object Managers",
|
||||||
|
"homepage": "https://www.doctrine-project.org",
|
||||||
|
"keywords": [
|
||||||
|
"database"
|
||||||
|
],
|
||||||
|
"support": {
|
||||||
|
"issues": "https://github.com/doctrine/data-fixtures/issues",
|
||||||
|
"source": "https://github.com/doctrine/data-fixtures/tree/2.2.0"
|
||||||
|
},
|
||||||
|
"funding": [
|
||||||
|
{
|
||||||
|
"url": "https://www.doctrine-project.org/sponsorship.html",
|
||||||
|
"type": "custom"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"url": "https://www.patreon.com/phpdoctrine",
|
||||||
|
"type": "patreon"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"url": "https://tidelift.com/funding/github/packagist/doctrine%2Fdata-fixtures",
|
||||||
|
"type": "tidelift"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"time": "2025-10-17T20:06:20+00:00"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "doctrine/doctrine-fixtures-bundle",
|
||||||
|
"version": "4.3.1",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/doctrine/DoctrineFixturesBundle.git",
|
||||||
|
"reference": "9e013ed10d49bf7746b07204d336384a7d9b5a4d"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/doctrine/DoctrineFixturesBundle/zipball/9e013ed10d49bf7746b07204d336384a7d9b5a4d",
|
||||||
|
"reference": "9e013ed10d49bf7746b07204d336384a7d9b5a4d",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"doctrine/data-fixtures": "^2.2",
|
||||||
|
"doctrine/doctrine-bundle": "^2.2 || ^3.0",
|
||||||
|
"doctrine/orm": "^2.14.0 || ^3.0",
|
||||||
|
"doctrine/persistence": "^2.4 || ^3.0 || ^4.0",
|
||||||
|
"php": "^8.1",
|
||||||
|
"psr/log": "^2 || ^3",
|
||||||
|
"symfony/config": "^6.4 || ^7.0 || ^8.0",
|
||||||
|
"symfony/console": "^6.4 || ^7.0 || ^8.0",
|
||||||
|
"symfony/dependency-injection": "^6.4 || ^7.0 || ^8.0",
|
||||||
|
"symfony/deprecation-contracts": "^2.1 || ^3",
|
||||||
|
"symfony/doctrine-bridge": "^6.4.16 || ^7.1.9 || ^8.0",
|
||||||
|
"symfony/http-kernel": "^6.4 || ^7.0 || ^8.0"
|
||||||
|
},
|
||||||
|
"conflict": {
|
||||||
|
"doctrine/dbal": "< 3"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"doctrine/coding-standard": "14.0.0",
|
||||||
|
"phpstan/phpstan": "2.1.11",
|
||||||
|
"phpunit/phpunit": "^10.5.38 || 11.4.14"
|
||||||
|
},
|
||||||
|
"type": "symfony-bundle",
|
||||||
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"Doctrine\\Bundle\\FixturesBundle\\": "src"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"MIT"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Fabien Potencier",
|
||||||
|
"email": "fabien@symfony.com"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Doctrine Project",
|
||||||
|
"homepage": "https://www.doctrine-project.org"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Symfony Community",
|
||||||
|
"homepage": "https://symfony.com/contributors"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "Symfony DoctrineFixturesBundle",
|
||||||
|
"homepage": "https://www.doctrine-project.org",
|
||||||
|
"keywords": [
|
||||||
|
"Fixture",
|
||||||
|
"persistence"
|
||||||
|
],
|
||||||
|
"support": {
|
||||||
|
"issues": "https://github.com/doctrine/DoctrineFixturesBundle/issues",
|
||||||
|
"source": "https://github.com/doctrine/DoctrineFixturesBundle/tree/4.3.1"
|
||||||
|
},
|
||||||
|
"funding": [
|
||||||
|
{
|
||||||
|
"url": "https://www.doctrine-project.org/sponsorship.html",
|
||||||
|
"type": "custom"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"url": "https://www.patreon.com/phpdoctrine",
|
||||||
|
"type": "patreon"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"url": "https://tidelift.com/funding/github/packagist/doctrine%2Fdoctrine-fixtures-bundle",
|
||||||
|
"type": "tidelift"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"time": "2025-12-03T16:05:42+00:00"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "myclabs/deep-copy",
|
"name": "myclabs/deep-copy",
|
||||||
"version": "1.13.4",
|
"version": "1.13.4",
|
||||||
@@ -9824,5 +10273,5 @@
|
|||||||
"ext-iconv": "*"
|
"ext-iconv": "*"
|
||||||
},
|
},
|
||||||
"platform-dev": [],
|
"platform-dev": [],
|
||||||
"plugin-api-version": "2.9.0"
|
"plugin-api-version": "2.6.0"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,10 +7,12 @@ return [
|
|||||||
Symfony\Bundle\DebugBundle\DebugBundle::class => ['dev' => true],
|
Symfony\Bundle\DebugBundle\DebugBundle::class => ['dev' => true],
|
||||||
Symfony\Bundle\TwigBundle\TwigBundle::class => ['all' => true],
|
Symfony\Bundle\TwigBundle\TwigBundle::class => ['all' => true],
|
||||||
Symfony\Bundle\WebProfilerBundle\WebProfilerBundle::class => ['dev' => true, 'test' => true],
|
Symfony\Bundle\WebProfilerBundle\WebProfilerBundle::class => ['dev' => true, 'test' => true],
|
||||||
Symfony\UX\StimulusBundle\StimulusBundle::class => ['all' => true],
|
|
||||||
Symfony\UX\Turbo\TurboBundle::class => ['all' => true],
|
|
||||||
Twig\Extra\TwigExtraBundle\TwigExtraBundle::class => ['all' => true],
|
Twig\Extra\TwigExtraBundle\TwigExtraBundle::class => ['all' => true],
|
||||||
Symfony\Bundle\SecurityBundle\SecurityBundle::class => ['all' => true],
|
Symfony\Bundle\SecurityBundle\SecurityBundle::class => ['all' => true],
|
||||||
Symfony\Bundle\MonologBundle\MonologBundle::class => ['all' => true],
|
Symfony\Bundle\MonologBundle\MonologBundle::class => ['all' => true],
|
||||||
Symfony\Bundle\MakerBundle\MakerBundle::class => ['dev' => true],
|
Symfony\Bundle\MakerBundle\MakerBundle::class => ['dev' => true],
|
||||||
|
Symfony\UX\StimulusBundle\StimulusBundle::class => ['all' => true],
|
||||||
|
Symfony\UX\Turbo\TurboBundle::class => ['all' => true],
|
||||||
|
Doctrine\Bundle\FixturesBundle\DoctrineFixturesBundle::class => ['dev' => true, 'test' => true],
|
||||||
|
Symfonycasts\TailwindBundle\SymfonycastsTailwindBundle::class => ['all' => true],
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -1,20 +1,57 @@
|
|||||||
security:
|
security:
|
||||||
|
# Hierarchie des rôles #
|
||||||
|
role_hierarchy:
|
||||||
|
ROLE_ORGANISATION: ROLE_USER
|
||||||
|
ROLE_ADMIN_ORGANISATION: ROLE_ORGANISATION
|
||||||
|
ROLE_ADMIN: ROLE_ADMIN
|
||||||
|
|
||||||
# https://symfony.com/doc/current/security.html#registering-the-user-hashing-passwords
|
# https://symfony.com/doc/current/security.html#registering-the-user-hashing-passwords
|
||||||
|
# Comment sont hachés nos mots de passe
|
||||||
password_hashers:
|
password_hashers:
|
||||||
Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface: 'auto'
|
Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface: 'auto'
|
||||||
|
|
||||||
# https://symfony.com/doc/current/security.html#loading-the-user-the-user-provider
|
# https://symfony.com/doc/current/security.html#loading-the-user-the-user-provider
|
||||||
|
# d'où viennent nos utilisateurs ?
|
||||||
providers:
|
providers:
|
||||||
users_in_memory: { memory: null }
|
# used to reload user from session & other features (e.g. switch_user)
|
||||||
|
app_user_provider: # un nom unique
|
||||||
|
entity: # nos utilisateurs sont en base de données
|
||||||
|
class: App\Entity\User # c'est cette entité-là
|
||||||
|
property: email # représentée par cette propriété-ci
|
||||||
|
|
||||||
|
# activation du système de sécurité
|
||||||
firewalls:
|
firewalls:
|
||||||
|
# permet de désactiver sur la debug bar, le profiler, etc...
|
||||||
dev:
|
dev:
|
||||||
# Ensure dev tools and static assets are always allowed
|
# Ensure dev tools and static assets are always allowed
|
||||||
pattern: ^/(_profiler|_wdt|assets|build)/
|
pattern: ^/(_profiler|_wdt|assets|build)/
|
||||||
security: false
|
security: false
|
||||||
|
# notre pare-feu principal, activé partout par défaut
|
||||||
main:
|
main:
|
||||||
lazy: true
|
lazy: true
|
||||||
provider: users_in_memory
|
provider: app_user_provider
|
||||||
|
# Le formulaire de connexion sera automatiquement protégé des attaques CSRF.
|
||||||
|
# La classe FormLoginAuthenticator est automatiquement utilisée en interne par Symfony,
|
||||||
|
# il n'y a plus de classe de type Authenticator à gérer soi-même.
|
||||||
|
form_login:
|
||||||
|
login_path: app_login
|
||||||
|
check_path: app_login
|
||||||
|
enable_csrf: true
|
||||||
|
username_parameter: _username
|
||||||
|
password_parameter: _password
|
||||||
|
default_target_path: app_home
|
||||||
|
logout:
|
||||||
|
path: app_logout
|
||||||
|
# où rediriger après la déconnexion
|
||||||
|
target: app_login
|
||||||
|
|
||||||
|
remember_me:
|
||||||
|
secret: '%kernel.secret%'
|
||||||
|
lifetime: 604800
|
||||||
|
path: /
|
||||||
|
# par défaut, le "souvenir de moi" n'est pas coché, l'utilisateur doit cliquer sur la check-box
|
||||||
|
# si on veut "souvenir de moi" activité en permanence, il faut décommenter cette ligne :
|
||||||
|
#always_remember_me: true
|
||||||
|
|
||||||
# Activate different ways to authenticate:
|
# Activate different ways to authenticate:
|
||||||
# https://symfony.com/doc/current/security.html#the-firewall
|
# https://symfony.com/doc/current/security.html#the-firewall
|
||||||
@@ -23,9 +60,11 @@ security:
|
|||||||
# switch_user: true
|
# switch_user: true
|
||||||
|
|
||||||
# Note: Only the *first* matching rule is applied
|
# Note: Only the *first* matching rule is applied
|
||||||
|
# autorisations
|
||||||
access_control:
|
access_control:
|
||||||
# - { path: ^/admin, roles: ROLE_ADMIN }
|
- { path: ^/admin, roles: ROLE_ADMIN }
|
||||||
# - { path: ^/profile, roles: ROLE_USER }
|
- { path: ^/organisation, roles: ROLE_ADMIN_ORGANISATION }
|
||||||
|
- { path: ^/user, roles: ROLE_USER }
|
||||||
|
|
||||||
when@test:
|
when@test:
|
||||||
security:
|
security:
|
||||||
|
|||||||
6
config/packages/symfonycasts_tailwind.yaml
Normal file
6
config/packages/symfonycasts_tailwind.yaml
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
symfonycasts_tailwind:
|
||||||
|
# Specify the EXACT version of Tailwind CSS you want to use
|
||||||
|
binary_version: 'v4.1.11'
|
||||||
|
|
||||||
|
# Alternatively, you can specify the path to the binary that you manage yourself
|
||||||
|
#binary: 'node_modules/.bin/tailwindcss'
|
||||||
2
config/packages/tailwind.yaml
Normal file
2
config/packages/tailwind.yaml
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
symfonycasts_tailwind:
|
||||||
|
input_css: '%kernel.project_dir%/assets/styles/app.css'
|
||||||
@@ -638,7 +638,7 @@ use Symfony\Component\Config\Loader\ParamConfigurator as Param;
|
|||||||
* }>,
|
* }>,
|
||||||
* },
|
* },
|
||||||
* uid?: bool|array{ // Uid configuration
|
* uid?: bool|array{ // Uid configuration
|
||||||
* enabled?: bool|Param, // Default: false
|
* enabled?: bool|Param, // Default: true
|
||||||
* default_uuid_version?: 7|6|4|1|Param, // Default: 7
|
* default_uuid_version?: 7|6|4|1|Param, // Default: 7
|
||||||
* name_based_uuid_version?: 5|3|Param, // Default: 5
|
* name_based_uuid_version?: 5|3|Param, // Default: 5
|
||||||
* name_based_uuid_namespace?: scalar|Param|null,
|
* name_based_uuid_namespace?: scalar|Param|null,
|
||||||
@@ -938,20 +938,6 @@ use Symfony\Component\Config\Loader\ParamConfigurator as Param;
|
|||||||
* intercept_redirects?: bool|Param, // Default: false
|
* intercept_redirects?: bool|Param, // Default: false
|
||||||
* excluded_ajax_paths?: scalar|Param|null, // Default: "^/((index|app(_[\\w]+)?)\\.php/)?_wdt"
|
* excluded_ajax_paths?: scalar|Param|null, // Default: "^/((index|app(_[\\w]+)?)\\.php/)?_wdt"
|
||||||
* }
|
* }
|
||||||
* @psalm-type StimulusConfig = array{
|
|
||||||
* controller_paths?: list<scalar|Param|null>,
|
|
||||||
* controllers_json?: scalar|Param|null, // Default: "%kernel.project_dir%/assets/controllers.json"
|
|
||||||
* }
|
|
||||||
* @psalm-type TurboConfig = array{
|
|
||||||
* broadcast?: bool|array{
|
|
||||||
* enabled?: bool|Param, // Default: true
|
|
||||||
* entity_template_prefixes?: list<scalar|Param|null>,
|
|
||||||
* doctrine_orm?: bool|array{ // Enable the Doctrine ORM integration
|
|
||||||
* enabled?: bool|Param, // Default: true
|
|
||||||
* },
|
|
||||||
* },
|
|
||||||
* default_transport?: scalar|Param|null, // Default: "default"
|
|
||||||
* }
|
|
||||||
* @psalm-type TwigExtraConfig = array{
|
* @psalm-type TwigExtraConfig = array{
|
||||||
* cache?: bool|array{
|
* cache?: bool|array{
|
||||||
* enabled?: bool|Param, // Default: false
|
* enabled?: bool|Param, // Default: false
|
||||||
@@ -1455,6 +1441,29 @@ use Symfony\Component\Config\Loader\ParamConfigurator as Param;
|
|||||||
* generate_final_classes?: bool|Param, // Default: true
|
* generate_final_classes?: bool|Param, // Default: true
|
||||||
* generate_final_entities?: bool|Param, // Default: false
|
* generate_final_entities?: bool|Param, // Default: false
|
||||||
* }
|
* }
|
||||||
|
* @psalm-type StimulusConfig = array{
|
||||||
|
* controller_paths?: list<scalar|Param|null>,
|
||||||
|
* controllers_json?: scalar|Param|null, // Default: "%kernel.project_dir%/assets/controllers.json"
|
||||||
|
* }
|
||||||
|
* @psalm-type TurboConfig = array{
|
||||||
|
* broadcast?: bool|array{
|
||||||
|
* enabled?: bool|Param, // Default: true
|
||||||
|
* entity_template_prefixes?: list<scalar|Param|null>,
|
||||||
|
* doctrine_orm?: bool|array{ // Enable the Doctrine ORM integration
|
||||||
|
* enabled?: bool|Param, // Default: true
|
||||||
|
* },
|
||||||
|
* },
|
||||||
|
* default_transport?: scalar|Param|null, // Default: "default"
|
||||||
|
* }
|
||||||
|
* @psalm-type SymfonycastsTailwindConfig = array{
|
||||||
|
* input_css?: list<scalar|Param|null>,
|
||||||
|
* config_file?: scalar|Param|null, // Path to the tailwind.config.js file // Default: "%kernel.project_dir%/tailwind.config.js"
|
||||||
|
* binary?: scalar|Param|null, // The tailwind binary to use instead of downloading a new one // Default: null
|
||||||
|
* binary_version?: scalar|Param|null, // Tailwind CLI version to download - null means the latest version // Default: null
|
||||||
|
* binary_platform?: "auto"|"linux-arm64"|"linux-arm64-musl"|"linux-x64"|"linux-x64-musl"|"macos-arm64"|"macos-x64"|"windows-x64"|Param, // Tailwind CLI platform to download - "auto" will try to detect the platform automatically // Default: "auto"
|
||||||
|
* postcss_config_file?: scalar|Param|null, // Path to PostCSS config file which is passed to the Tailwind CLI // Default: null
|
||||||
|
* strict_mode?: bool|Param|null, // When enabled, an exception will be thrown if there are no built assets (default: false in `test` env, true otherwise) // Default: null
|
||||||
|
* }
|
||||||
* @psalm-type ConfigType = array{
|
* @psalm-type ConfigType = array{
|
||||||
* imports?: ImportsConfig,
|
* imports?: ImportsConfig,
|
||||||
* parameters?: ParametersConfig,
|
* parameters?: ParametersConfig,
|
||||||
@@ -1463,11 +1472,12 @@ use Symfony\Component\Config\Loader\ParamConfigurator as Param;
|
|||||||
* doctrine?: DoctrineConfig,
|
* doctrine?: DoctrineConfig,
|
||||||
* doctrine_migrations?: DoctrineMigrationsConfig,
|
* doctrine_migrations?: DoctrineMigrationsConfig,
|
||||||
* twig?: TwigConfig,
|
* twig?: TwigConfig,
|
||||||
* stimulus?: StimulusConfig,
|
|
||||||
* turbo?: TurboConfig,
|
|
||||||
* twig_extra?: TwigExtraConfig,
|
* twig_extra?: TwigExtraConfig,
|
||||||
* security?: SecurityConfig,
|
* security?: SecurityConfig,
|
||||||
* monolog?: MonologConfig,
|
* monolog?: MonologConfig,
|
||||||
|
* stimulus?: StimulusConfig,
|
||||||
|
* turbo?: TurboConfig,
|
||||||
|
* symfonycasts_tailwind?: SymfonycastsTailwindConfig,
|
||||||
* "when@dev"?: array{
|
* "when@dev"?: array{
|
||||||
* imports?: ImportsConfig,
|
* imports?: ImportsConfig,
|
||||||
* parameters?: ParametersConfig,
|
* parameters?: ParametersConfig,
|
||||||
@@ -1478,12 +1488,13 @@ use Symfony\Component\Config\Loader\ParamConfigurator as Param;
|
|||||||
* debug?: DebugConfig,
|
* debug?: DebugConfig,
|
||||||
* twig?: TwigConfig,
|
* twig?: TwigConfig,
|
||||||
* web_profiler?: WebProfilerConfig,
|
* web_profiler?: WebProfilerConfig,
|
||||||
* stimulus?: StimulusConfig,
|
|
||||||
* turbo?: TurboConfig,
|
|
||||||
* twig_extra?: TwigExtraConfig,
|
* twig_extra?: TwigExtraConfig,
|
||||||
* security?: SecurityConfig,
|
* security?: SecurityConfig,
|
||||||
* monolog?: MonologConfig,
|
* monolog?: MonologConfig,
|
||||||
* maker?: MakerConfig,
|
* maker?: MakerConfig,
|
||||||
|
* stimulus?: StimulusConfig,
|
||||||
|
* turbo?: TurboConfig,
|
||||||
|
* symfonycasts_tailwind?: SymfonycastsTailwindConfig,
|
||||||
* },
|
* },
|
||||||
* "when@prod"?: array{
|
* "when@prod"?: array{
|
||||||
* imports?: ImportsConfig,
|
* imports?: ImportsConfig,
|
||||||
@@ -1493,11 +1504,12 @@ use Symfony\Component\Config\Loader\ParamConfigurator as Param;
|
|||||||
* doctrine?: DoctrineConfig,
|
* doctrine?: DoctrineConfig,
|
||||||
* doctrine_migrations?: DoctrineMigrationsConfig,
|
* doctrine_migrations?: DoctrineMigrationsConfig,
|
||||||
* twig?: TwigConfig,
|
* twig?: TwigConfig,
|
||||||
* stimulus?: StimulusConfig,
|
|
||||||
* turbo?: TurboConfig,
|
|
||||||
* twig_extra?: TwigExtraConfig,
|
* twig_extra?: TwigExtraConfig,
|
||||||
* security?: SecurityConfig,
|
* security?: SecurityConfig,
|
||||||
* monolog?: MonologConfig,
|
* monolog?: MonologConfig,
|
||||||
|
* stimulus?: StimulusConfig,
|
||||||
|
* turbo?: TurboConfig,
|
||||||
|
* symfonycasts_tailwind?: SymfonycastsTailwindConfig,
|
||||||
* },
|
* },
|
||||||
* "when@test"?: array{
|
* "when@test"?: array{
|
||||||
* imports?: ImportsConfig,
|
* imports?: ImportsConfig,
|
||||||
@@ -1508,11 +1520,12 @@ use Symfony\Component\Config\Loader\ParamConfigurator as Param;
|
|||||||
* doctrine_migrations?: DoctrineMigrationsConfig,
|
* doctrine_migrations?: DoctrineMigrationsConfig,
|
||||||
* twig?: TwigConfig,
|
* twig?: TwigConfig,
|
||||||
* web_profiler?: WebProfilerConfig,
|
* web_profiler?: WebProfilerConfig,
|
||||||
* stimulus?: StimulusConfig,
|
|
||||||
* turbo?: TurboConfig,
|
|
||||||
* twig_extra?: TwigExtraConfig,
|
* twig_extra?: TwigExtraConfig,
|
||||||
* security?: SecurityConfig,
|
* security?: SecurityConfig,
|
||||||
* monolog?: MonologConfig,
|
* monolog?: MonologConfig,
|
||||||
|
* stimulus?: StimulusConfig,
|
||||||
|
* turbo?: TurboConfig,
|
||||||
|
* symfonycasts_tailwind?: SymfonycastsTailwindConfig,
|
||||||
* },
|
* },
|
||||||
* ...<string, ExtensionType|array{ // extra keys must follow the when@%env% pattern or match an extension alias
|
* ...<string, ExtensionType|array{ // extra keys must follow the when@%env% pattern or match an extension alias
|
||||||
* imports?: ImportsConfig,
|
* imports?: ImportsConfig,
|
||||||
|
|||||||
@@ -1,5 +1,8 @@
|
|||||||
|
parameters:
|
||||||
|
images_directory: '%kernel.project_dir%/public/uploads/images'
|
||||||
|
|
||||||
services:
|
services:
|
||||||
# configuration par défaut pour les services
|
# configuration par défaut pour les services
|
||||||
_defaults:
|
_defaults:
|
||||||
autowire: true # Injecte automatiquement les dépendances dans vos services.
|
autowire: true # Injecte automatiquement les dépendances dans vos services.
|
||||||
autoconfigure: true # Enregistre automatiquement vos services en tant que commandes, abonnés d'événements, etc.
|
autoconfigure: true # Enregistre automatiquement vos services en tant que commandes, abonnés d'événements, etc.
|
||||||
@@ -12,3 +15,8 @@ services:
|
|||||||
$kazApiClient: '@kaz_api.client'
|
$kazApiClient: '@kaz_api.client'
|
||||||
$apiUser: '%env(KAZ_API_USER)%'
|
$apiUser: '%env(KAZ_API_USER)%'
|
||||||
$apiPassword: '%env(KAZ_API_PASSWORD)%'
|
$apiPassword: '%env(KAZ_API_PASSWORD)%'
|
||||||
|
|
||||||
|
# Gestion de l'enregistrement de la photo de profil
|
||||||
|
App\Service\FileUploader:
|
||||||
|
arguments:
|
||||||
|
$targetDirectory: '%images_directory%'
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ use Doctrine\Migrations\AbstractMigration;
|
|||||||
/**
|
/**
|
||||||
* Auto-generated Migration: Please modify to your needs!
|
* Auto-generated Migration: Please modify to your needs!
|
||||||
*/
|
*/
|
||||||
final class Version20260313104837 extends AbstractMigration
|
final class Version20260313151403 extends AbstractMigration
|
||||||
{
|
{
|
||||||
public function getDescription(): string
|
public function getDescription(): string
|
||||||
{
|
{
|
||||||
@@ -20,7 +20,8 @@ final class Version20260313104837 extends AbstractMigration
|
|||||||
public function up(Schema $schema): void
|
public function up(Schema $schema): void
|
||||||
{
|
{
|
||||||
// this up() migration is auto-generated, please modify it to your needs
|
// this up() migration is auto-generated, please modify it to your needs
|
||||||
$this->addSql('CREATE TABLE "user" (id INT GENERATED BY DEFAULT AS IDENTITY NOT NULL, role VARCHAR(255) NOT NULL, mail VARCHAR(255) NOT NULL, mail_quota VARCHAR(255) NOT NULL, mail_de_secours VARCHAR(255) NOT NULL, identifiant_kaz VARCHAR(255) NOT NULL, quota VARCHAR(255) NOT NULL, has_nextcloud_access BOOLEAN NOT NULL, nextcloud_quota VARCHAR(255) NOT NULL, has_mobilizon BOOLEAN NOT NULL, has_agora_access BOOLEAN NOT NULL, PRIMARY KEY (id))');
|
$this->addSql('CREATE TABLE "user" (id UUID NOT NULL, email VARCHAR(180) NOT NULL, roles JSON NOT NULL, password VARCHAR(255) NOT NULL, email_quota VARCHAR(255) NOT NULL, alternate_email VARCHAR(255) NOT NULL, identifiant_kaz VARCHAR(255) NOT NULL, quota VARCHAR(255) NOT NULL, has_nextcloud_access BOOLEAN NOT NULL, nextcloud_quota VARCHAR(255) NOT NULL, has_mobilizon BOOLEAN NOT NULL, has_agora_access BOOLEAN NOT NULL, lastname VARCHAR(255) NOT NULL, firstname VARCHAR(255) NOT NULL, PRIMARY KEY (id))');
|
||||||
|
$this->addSql('CREATE UNIQUE INDEX UNIQ_IDENTIFIER_EMAIL ON "user" (email)');
|
||||||
$this->addSql('CREATE TABLE messenger_messages (id BIGINT GENERATED BY DEFAULT AS IDENTITY NOT NULL, body TEXT NOT NULL, headers TEXT NOT NULL, queue_name VARCHAR(190) NOT NULL, created_at TIMESTAMP(0) WITHOUT TIME ZONE NOT NULL, available_at TIMESTAMP(0) WITHOUT TIME ZONE NOT NULL, delivered_at TIMESTAMP(0) WITHOUT TIME ZONE DEFAULT NULL, PRIMARY KEY (id))');
|
$this->addSql('CREATE TABLE messenger_messages (id BIGINT GENERATED BY DEFAULT AS IDENTITY NOT NULL, body TEXT NOT NULL, headers TEXT NOT NULL, queue_name VARCHAR(190) NOT NULL, created_at TIMESTAMP(0) WITHOUT TIME ZONE NOT NULL, available_at TIMESTAMP(0) WITHOUT TIME ZONE NOT NULL, delivered_at TIMESTAMP(0) WITHOUT TIME ZONE DEFAULT NULL, PRIMARY KEY (id))');
|
||||||
$this->addSql('CREATE INDEX IDX_75EA56E0FB7336F0E3BD61CE16BA31DBBF396750 ON messenger_messages (queue_name, available_at, delivered_at, id)');
|
$this->addSql('CREATE INDEX IDX_75EA56E0FB7336F0E3BD61CE16BA31DBBF396750 ON messenger_messages (queue_name, available_at, delivered_at, id)');
|
||||||
}
|
}
|
||||||
31
migrations/Version20260316103235.php
Normal file
31
migrations/Version20260316103235.php
Normal file
@@ -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 Version20260316103235 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" ALTER alternate_email DROP 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" ALTER alternate_email SET NOT NULL');
|
||||||
|
}
|
||||||
|
}
|
||||||
31
migrations/Version20260316104254.php
Normal file
31
migrations/Version20260316104254.php
Normal file
@@ -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 Version20260316104254 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" ALTER identifiant_kaz DROP 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" ALTER identifiant_kaz SET NOT NULL');
|
||||||
|
}
|
||||||
|
}
|
||||||
31
migrations/Version20260316104335.php
Normal file
31
migrations/Version20260316104335.php
Normal file
@@ -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 Version20260316104335 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" ALTER quota DROP 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" ALTER quota SET NOT NULL');
|
||||||
|
}
|
||||||
|
}
|
||||||
31
migrations/Version20260316104505.php
Normal file
31
migrations/Version20260316104505.php
Normal file
@@ -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 Version20260316104505 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" ALTER has_agora_access DROP 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" ALTER has_agora_access SET NOT NULL');
|
||||||
|
}
|
||||||
|
}
|
||||||
33
migrations/Version20260316104557.php
Normal file
33
migrations/Version20260316104557.php
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
<?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 Version20260316104557 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" ALTER has_nextcloud_access DROP NOT NULL');
|
||||||
|
$this->addSql('ALTER TABLE "user" ALTER has_mobilizon DROP 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" ALTER has_nextcloud_access SET NOT NULL');
|
||||||
|
$this->addSql('ALTER TABLE "user" ALTER has_mobilizon SET NOT NULL');
|
||||||
|
}
|
||||||
|
}
|
||||||
49
migrations/Version20260316114715.php
Normal file
49
migrations/Version20260316114715.php
Normal file
@@ -0,0 +1,49 @@
|
|||||||
|
<?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 Version20260316114715 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_name VARCHAR(255) NOT NULL');
|
||||||
|
$this->addSql('ALTER TABLE "user" ADD first_name VARCHAR(255) NOT NULL');
|
||||||
|
$this->addSql('ALTER TABLE "user" DROP lastname');
|
||||||
|
$this->addSql('ALTER TABLE "user" DROP firstname');
|
||||||
|
$this->addSql('ALTER TABLE "user" ALTER alternate_email SET NOT NULL');
|
||||||
|
$this->addSql('ALTER TABLE "user" ALTER identifiant_kaz SET NOT NULL');
|
||||||
|
$this->addSql('ALTER TABLE "user" ALTER quota SET NOT NULL');
|
||||||
|
$this->addSql('ALTER TABLE "user" ALTER has_nextcloud_access SET NOT NULL');
|
||||||
|
$this->addSql('ALTER TABLE "user" ALTER has_mobilizon SET NOT NULL');
|
||||||
|
$this->addSql('ALTER TABLE "user" ALTER has_agora_access SET 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" ADD lastname VARCHAR(255) NOT NULL');
|
||||||
|
$this->addSql('ALTER TABLE "user" ADD firstname VARCHAR(255) NOT NULL');
|
||||||
|
$this->addSql('ALTER TABLE "user" DROP last_name');
|
||||||
|
$this->addSql('ALTER TABLE "user" DROP first_name');
|
||||||
|
$this->addSql('ALTER TABLE "user" ALTER alternate_email DROP NOT NULL');
|
||||||
|
$this->addSql('ALTER TABLE "user" ALTER identifiant_kaz DROP NOT NULL');
|
||||||
|
$this->addSql('ALTER TABLE "user" ALTER quota DROP NOT NULL');
|
||||||
|
$this->addSql('ALTER TABLE "user" ALTER has_nextcloud_access DROP NOT NULL');
|
||||||
|
$this->addSql('ALTER TABLE "user" ALTER has_mobilizon DROP NOT NULL');
|
||||||
|
$this->addSql('ALTER TABLE "user" ALTER has_agora_access DROP NOT NULL');
|
||||||
|
}
|
||||||
|
}
|
||||||
31
migrations/Version20260326214353.php
Normal file
31
migrations/Version20260326214353.php
Normal file
@@ -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 Version20260326214353 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 photo VARCHAR(255) 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 photo');
|
||||||
|
}
|
||||||
|
}
|
||||||
31
migrations/Version20260326231417.php
Normal file
31
migrations/Version20260326231417.php
Normal file
@@ -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 Version20260326231417 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 telephone VARCHAR(20) 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 telephone');
|
||||||
|
}
|
||||||
|
}
|
||||||
35
migrations/Version20260328101039.php
Normal file
35
migrations/Version20260328101039.php
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
<?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 Version20260328101039 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 "user" (id UUID NOT NULL, email VARCHAR(180) NOT NULL, roles JSON NOT NULL, password VARCHAR(255) NOT NULL, email_quota VARCHAR(255) NOT NULL, alternate_email VARCHAR(255) NOT NULL, identifiant_kaz VARCHAR(255) NOT NULL, quota VARCHAR(255) NOT NULL, has_nextcloud_access BOOLEAN NOT NULL, nextcloud_quota VARCHAR(255) NOT NULL, has_mobilizon BOOLEAN NOT NULL, has_agora_access BOOLEAN NOT NULL, last_name VARCHAR(255) NOT NULL, first_name VARCHAR(255) NOT NULL, photo VARCHAR(255) DEFAULT NULL, telephone VARCHAR(20) DEFAULT NULL, PRIMARY KEY (id))');
|
||||||
|
$this->addSql('CREATE UNIQUE INDEX UNIQ_IDENTIFIER_EMAIL ON "user" (email)');
|
||||||
|
$this->addSql('CREATE TABLE messenger_messages (id BIGINT GENERATED BY DEFAULT AS IDENTITY NOT NULL, body TEXT NOT NULL, headers TEXT NOT NULL, queue_name VARCHAR(190) NOT NULL, created_at TIMESTAMP(0) WITHOUT TIME ZONE NOT NULL, available_at TIMESTAMP(0) WITHOUT TIME ZONE NOT NULL, delivered_at TIMESTAMP(0) WITHOUT TIME ZONE DEFAULT NULL, PRIMARY KEY (id))');
|
||||||
|
$this->addSql('CREATE INDEX IDX_75EA56E0FB7336F0E3BD61CE16BA31DBBF396750 ON messenger_messages (queue_name, available_at, delivered_at, id)');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function down(Schema $schema): void
|
||||||
|
{
|
||||||
|
// this down() migration is auto-generated, please modify it to your needs
|
||||||
|
$this->addSql('DROP TABLE "user"');
|
||||||
|
$this->addSql('DROP TABLE messenger_messages');
|
||||||
|
}
|
||||||
|
}
|
||||||
35
migrations/Version20260328101220.php
Normal file
35
migrations/Version20260328101220.php
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
<?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 Version20260328101220 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 "user" (id UUID NOT NULL, email VARCHAR(180) NOT NULL, roles JSON NOT NULL, password VARCHAR(255) NOT NULL, email_quota VARCHAR(255) NOT NULL, alternate_email VARCHAR(255) NOT NULL, identifiant_kaz VARCHAR(255) NOT NULL, quota VARCHAR(255) NOT NULL, has_nextcloud_access BOOLEAN NOT NULL, nextcloud_quota VARCHAR(255) NOT NULL, has_mobilizon BOOLEAN NOT NULL, has_agora_access BOOLEAN NOT NULL, last_name VARCHAR(255) NOT NULL, first_name VARCHAR(255) NOT NULL, photo VARCHAR(255) DEFAULT NULL, telephone VARCHAR(20) DEFAULT NULL, PRIMARY KEY (id))');
|
||||||
|
$this->addSql('CREATE UNIQUE INDEX UNIQ_IDENTIFIER_EMAIL ON "user" (email)');
|
||||||
|
$this->addSql('CREATE TABLE messenger_messages (id BIGINT GENERATED BY DEFAULT AS IDENTITY NOT NULL, body TEXT NOT NULL, headers TEXT NOT NULL, queue_name VARCHAR(190) NOT NULL, created_at TIMESTAMP(0) WITHOUT TIME ZONE NOT NULL, available_at TIMESTAMP(0) WITHOUT TIME ZONE NOT NULL, delivered_at TIMESTAMP(0) WITHOUT TIME ZONE DEFAULT NULL, PRIMARY KEY (id))');
|
||||||
|
$this->addSql('CREATE INDEX IDX_75EA56E0FB7336F0E3BD61CE16BA31DBBF396750 ON messenger_messages (queue_name, available_at, delivered_at, id)');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function down(Schema $schema): void
|
||||||
|
{
|
||||||
|
// this down() migration is auto-generated, please modify it to your needs
|
||||||
|
$this->addSql('DROP TABLE "user"');
|
||||||
|
$this->addSql('DROP TABLE messenger_messages');
|
||||||
|
}
|
||||||
|
}
|
||||||
35
migrations/Version20260329084928.php
Normal file
35
migrations/Version20260329084928.php
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
<?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 Version20260329084928 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 "user" (id UUID NOT NULL, email VARCHAR(180) NOT NULL, roles JSON NOT NULL, password VARCHAR(255) NOT NULL, email_quota VARCHAR(255) NOT NULL, alternate_email VARCHAR(255) NOT NULL, identifiant_kaz VARCHAR(255) NOT NULL, quota VARCHAR(255) NOT NULL, has_nextcloud_access BOOLEAN NOT NULL, nextcloud_quota VARCHAR(255) NOT NULL, has_mobilizon BOOLEAN NOT NULL, has_agora_access BOOLEAN NOT NULL, last_name VARCHAR(255) NOT NULL, first_name VARCHAR(255) NOT NULL, photo VARCHAR(255) DEFAULT NULL, telephone VARCHAR(20) DEFAULT NULL, PRIMARY KEY (id))');
|
||||||
|
$this->addSql('CREATE UNIQUE INDEX UNIQ_IDENTIFIER_EMAIL ON "user" (email)');
|
||||||
|
$this->addSql('CREATE TABLE messenger_messages (id BIGINT GENERATED BY DEFAULT AS IDENTITY NOT NULL, body TEXT NOT NULL, headers TEXT NOT NULL, queue_name VARCHAR(190) NOT NULL, created_at TIMESTAMP(0) WITHOUT TIME ZONE NOT NULL, available_at TIMESTAMP(0) WITHOUT TIME ZONE NOT NULL, delivered_at TIMESTAMP(0) WITHOUT TIME ZONE DEFAULT NULL, PRIMARY KEY (id))');
|
||||||
|
$this->addSql('CREATE INDEX IDX_75EA56E0FB7336F0E3BD61CE16BA31DBBF396750 ON messenger_messages (queue_name, available_at, delivered_at, id)');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function down(Schema $schema): void
|
||||||
|
{
|
||||||
|
// this down() migration is auto-generated, please modify it to your needs
|
||||||
|
$this->addSql('DROP TABLE "user"');
|
||||||
|
$this->addSql('DROP TABLE messenger_messages');
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -15,6 +15,28 @@
|
|||||||
<ini name="error_reporting" value="-1" />
|
<ini name="error_reporting" value="-1" />
|
||||||
<server name="APP_ENV" value="test" force="true" />
|
<server name="APP_ENV" value="test" force="true" />
|
||||||
<server name="SHELL_VERBOSITY" value="-1" />
|
<server name="SHELL_VERBOSITY" value="-1" />
|
||||||
|
|
||||||
|
<!-- ###+ symfony/framework-bundle ### -->
|
||||||
|
<env name="APP_ENV" value="dev"/>
|
||||||
|
<env name="APP_SECRET" value=""/>
|
||||||
|
<env name="APP_SHARE_DIR" value="var/share"/>
|
||||||
|
<!-- ###- symfony/framework-bundle ### -->
|
||||||
|
|
||||||
|
<!-- ###+ symfony/routing ### -->
|
||||||
|
<!-- 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 -->
|
||||||
|
<env name="DEFAULT_URI" value="http://localhost"/>
|
||||||
|
<!-- ###- symfony/routing ### -->
|
||||||
|
|
||||||
|
<!-- ###+ doctrine/doctrine-bundle ### -->
|
||||||
|
<!-- Format described at https://www.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/configuration.html#connecting-using-a-url -->
|
||||||
|
<!-- IMPORTANT: You MUST configure your server version, either here or in config/packages/doctrine.yaml -->
|
||||||
|
<!-- -->
|
||||||
|
<!-- DATABASE_URL="sqlite:///%kernel.project_dir%/var/data_%kernel.environment%.db" -->
|
||||||
|
<!-- DATABASE_URL="mysql://app:!ChangeMe!@127.0.0.1:3306/app?serverVersion=8.0.32&charset=utf8mb4" -->
|
||||||
|
<!-- DATABASE_URL="mysql://app:!ChangeMe!@127.0.0.1:3306/app?serverVersion=10.11.2-MariaDB&charset=utf8mb4" -->
|
||||||
|
<env name="DATABASE_URL" value="postgresql://app:!ChangeMe!@127.0.0.1:5432/app?serverVersion=16&charset=utf8"/>
|
||||||
|
<!-- ###- doctrine/doctrine-bundle ### -->
|
||||||
</php>
|
</php>
|
||||||
|
|
||||||
<testsuites>
|
<testsuites>
|
||||||
|
|||||||
66
public/img/logo.svg
Normal file
66
public/img/logo.svg
Normal file
File diff suppressed because one or more lines are too long
|
After Width: | Height: | Size: 71 KiB |
@@ -8,11 +8,9 @@ use Symfony\Component\Routing\Attribute\Route;
|
|||||||
|
|
||||||
class HomeController extends AbstractController
|
class HomeController extends AbstractController
|
||||||
{
|
{
|
||||||
#[Route('/hello')]
|
#[Route(path: '/', name: 'app_home', methods: ['GET'])]
|
||||||
public function hello(): Response
|
public function home(): Response
|
||||||
{
|
{
|
||||||
return $this->render('home/hello.html.twig', [
|
return $this->render('home/home.html.twig');
|
||||||
'name' => 'Melvin'
|
|
||||||
]);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
36
src/Controller/SecurityController.php
Normal file
36
src/Controller/SecurityController.php
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Controller;
|
||||||
|
|
||||||
|
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
||||||
|
use Symfony\Component\HttpFoundation\Request;
|
||||||
|
use Symfony\Component\HttpFoundation\Response;
|
||||||
|
use Symfony\Component\Routing\Attribute\Route;
|
||||||
|
use Symfony\Component\Security\Http\Authentication\AuthenticationUtils;
|
||||||
|
|
||||||
|
class SecurityController extends AbstractController
|
||||||
|
{
|
||||||
|
#[Route(path: '/login', name: 'app_login')]
|
||||||
|
public function login(AuthenticationUtils $authenticationUtils, Request $request): Response
|
||||||
|
{
|
||||||
|
if ($this->getUser()) {
|
||||||
|
return $this->redirectToRoute('app_home');
|
||||||
|
}
|
||||||
|
|
||||||
|
// Récupération de l'erreur de connexion (s'il y en a une)
|
||||||
|
$error = $authenticationUtils->getLastAuthenticationError();
|
||||||
|
// Récupération du dernier nom d'utilisateur saisi par l'adhérent
|
||||||
|
$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.');
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -2,10 +2,19 @@
|
|||||||
|
|
||||||
namespace App\Controller;
|
namespace App\Controller;
|
||||||
|
|
||||||
|
use App\Form\ChangePasswordType;
|
||||||
|
use App\Form\UserProfileType;
|
||||||
|
use App\Service\FileUploader;
|
||||||
use App\Service\KazApiService;
|
use App\Service\KazApiService;
|
||||||
|
use Doctrine\ORM\EntityManagerInterface;
|
||||||
|
use Symfony\Component\HttpFoundation\File\UploadedFile;
|
||||||
|
use Symfony\Component\HttpFoundation\Request;
|
||||||
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
||||||
|
use Symfony\Component\Form\FormError;
|
||||||
use Symfony\Component\HttpFoundation\Response;
|
use Symfony\Component\HttpFoundation\Response;
|
||||||
|
use Symfony\Component\PasswordHasher\Hasher\UserPasswordHasherInterface;
|
||||||
use Symfony\Component\Routing\Attribute\Route;
|
use Symfony\Component\Routing\Attribute\Route;
|
||||||
|
use Symfony\Component\Security\Http\Attribute\IsGranted;
|
||||||
use Symfony\Contracts\HttpClient\Exception\ClientExceptionInterface;
|
use Symfony\Contracts\HttpClient\Exception\ClientExceptionInterface;
|
||||||
use Symfony\Contracts\HttpClient\Exception\DecodingExceptionInterface;
|
use Symfony\Contracts\HttpClient\Exception\DecodingExceptionInterface;
|
||||||
use Symfony\Contracts\HttpClient\Exception\RedirectionExceptionInterface;
|
use Symfony\Contracts\HttpClient\Exception\RedirectionExceptionInterface;
|
||||||
@@ -18,7 +27,7 @@ class UserController extends AbstractController
|
|||||||
* Permet de vérifier si un utilisateur existe dans le ldap.
|
* Permet de vérifier si un utilisateur existe dans le ldap.
|
||||||
*
|
*
|
||||||
* @param string $email L'adresse e-mail de l'utilisateur.
|
* @param string $email L'adresse e-mail de l'utilisateur.
|
||||||
* @param KazApiService $apiClient Le service utilisé pour récupérer les données utilisateur.
|
* @param KazApiService $apiKazService Le service utilisé pour récupérer les données utilisateur.
|
||||||
*
|
*
|
||||||
* @return Response La page index utilisateur rendue.
|
* @return Response La page index utilisateur rendue.
|
||||||
* @throws ClientExceptionInterface
|
* @throws ClientExceptionInterface
|
||||||
@@ -27,13 +36,126 @@ class UserController extends AbstractController
|
|||||||
* @throws ServerExceptionInterface
|
* @throws ServerExceptionInterface
|
||||||
* @throws TransportExceptionInterface
|
* @throws TransportExceptionInterface
|
||||||
*/
|
*/
|
||||||
#[Route('/user/{email}')]
|
|
||||||
public function index(string $email, KazApiService $apiClient): Response
|
|
||||||
{
|
|
||||||
$exist = $apiClient->getUserData($email);
|
|
||||||
|
|
||||||
|
#[Route('/user/{email}', name: 'app_user_by_mail', methods: ['GET'])]
|
||||||
|
public function index(string $email, KazApiService $apiKazService): Response
|
||||||
|
{
|
||||||
|
$user = $apiKazService->getUserData($email);
|
||||||
|
return $this->render('user/profil_infos.html.twig', [
|
||||||
|
'user' => $user,
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* TODO : Param l'API avec un Serializer pour la lecture du fichier JSON ? */
|
||||||
|
#[Route('/mon-profil', name: 'app_user', methods: ['GET', 'POST'])]
|
||||||
|
#[IsGranted('ROLE_USER')]
|
||||||
|
public function showProfile(
|
||||||
|
Request $request,
|
||||||
|
EntityManagerInterface $entityManager,
|
||||||
|
FileUploader $fileUploader,
|
||||||
|
KazApiService $apiKazService
|
||||||
|
): Response {
|
||||||
|
# Récupération de l'utilisateur actuellement connecté
|
||||||
|
$user = $this->getUser();
|
||||||
|
|
||||||
|
$kazUser = $apiKazService->getUserData($user->getEmail());
|
||||||
|
|
||||||
|
$user = $user->updateFromKazUser($kazUser);
|
||||||
|
|
||||||
|
//TODO: modifier pour que ça communique avec l'API */
|
||||||
|
|
||||||
|
# Création du formulaire lié à l'utilisateur connecté
|
||||||
|
$form = $this->createForm(UserProfileType::class, $user);
|
||||||
|
$form->handleRequest($request);
|
||||||
|
|
||||||
|
# Traitement si l'utilisateur clique sur "Valider"
|
||||||
|
if ($form->isSubmitted() && $form->isValid()) {
|
||||||
|
|
||||||
|
/** @var UploadedFile $imageFile */
|
||||||
|
$imageFile = $form->get('image')->getData();
|
||||||
|
|
||||||
|
if ($imageFile) {
|
||||||
|
# Suppression de l'ancienne photo du serveur
|
||||||
|
$fileUploader->delete($user->getPhoto());
|
||||||
|
|
||||||
|
# Dépot de la nouvelle photo
|
||||||
|
$newFilename = $fileUploader->upload($imageFile);
|
||||||
|
|
||||||
|
# Mise à jour de l'utilisateur avec le nouveau nom
|
||||||
|
$user->setPhoto($newFilename);
|
||||||
|
}
|
||||||
|
|
||||||
|
$alternateEmail = $form->get('alternateEmail')->getData();
|
||||||
|
$regexEmail = '/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/';
|
||||||
|
if(isset($alternateEmail) && preg_match($regexEmail, $alternateEmail)) {
|
||||||
|
$user->setAlternateEmail($form->get('alternateEmail')->getData());
|
||||||
|
} else {
|
||||||
|
$alternateEmail->addError(new FormError('L\'adresse e-mail n\'est pas valide.'));
|
||||||
|
}
|
||||||
|
|
||||||
|
$telephone = $form->get('telephone')->getData();
|
||||||
|
$regexTelephone = '/^[0-9\+\s\.\-\(\)]+$/';
|
||||||
|
if(isset($telephone) && preg_match($regexTelephone, $telephone)) {
|
||||||
|
$user->setTelephone($telephone);
|
||||||
|
} else {
|
||||||
|
$telephone->addError(new FormError('Le numéro de téléphone n\'est pas valide.'));
|
||||||
|
}
|
||||||
|
|
||||||
|
# Sauvegarde en base de données
|
||||||
|
$entityManager->flush();
|
||||||
|
|
||||||
|
# Message de confirmation et rechargement de la page
|
||||||
|
$this->addFlash('success', 'Votre profil a été mis à jour avec succès !');
|
||||||
|
|
||||||
|
return $this->redirectToRoute('app_user');
|
||||||
|
}
|
||||||
|
|
||||||
|
# Affichage de la page
|
||||||
return $this->render('user/index.html.twig', [
|
return $this->render('user/index.html.twig', [
|
||||||
'exist' => $exist,
|
'form' => $form->createView(),
|
||||||
|
'userData' => $user, # TODO : Mettre $userData quand connexion avec API OK
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
#[Route('/mot-de-passe', name: 'app_user_edit_password', methods: ['GET', 'POST'])]
|
||||||
|
public function editPassword(
|
||||||
|
Request $request,
|
||||||
|
UserPasswordHasherInterface $hasher,
|
||||||
|
EntityManagerInterface $entityManager
|
||||||
|
): Response
|
||||||
|
{
|
||||||
|
# Création du formulaire
|
||||||
|
$form = $this->createForm(ChangePasswordType::class);
|
||||||
|
|
||||||
|
# Liaison du formulaire à la requête HTTP
|
||||||
|
$form->handleRequest($request);
|
||||||
|
|
||||||
|
# Vérification du formulaire, s'il est bien soumis et valide
|
||||||
|
if ($form->isSubmitted() && $form->isValid()) {
|
||||||
|
# Récupération des données du formulaire
|
||||||
|
$user = $this->getUser();
|
||||||
|
$plainOldPassword = $form->get('oldPassword')->getData();
|
||||||
|
$newPassword = $form->get('newPassword')->getData();
|
||||||
|
|
||||||
|
# Vérification de l'ancien mot de passe
|
||||||
|
if (!$hasher->isPasswordValid($user, $plainOldPassword)) {
|
||||||
|
$form->get('oldPassword')->addError(new FormError('L\'ancien mot de passe est incorrect.'));
|
||||||
|
} else {
|
||||||
|
# Si tout est OK : Hachage du mot de passe
|
||||||
|
$hashedPassword = $hasher->hashPassword($user, $newPassword);
|
||||||
|
$user->setPassword($hashedPassword);
|
||||||
|
|
||||||
|
# Sauvegarde en BDD
|
||||||
|
$entityManager->flush();
|
||||||
|
|
||||||
|
# Message de succès pour l'utilisateur
|
||||||
|
$this->addFlash('success', 'Votre mot de passe a bien été mis à jour !');
|
||||||
|
|
||||||
|
return $this->redirectToRoute('app_user_edit_password');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return $this->render('user/edit_password.html.twig', [
|
||||||
|
'form' => $form->createView(),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
96
src/DataFixtures/AppFixtures.php
Normal file
96
src/DataFixtures/AppFixtures.php
Normal file
@@ -0,0 +1,96 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\DataFixtures;
|
||||||
|
|
||||||
|
use App\Entity\User;
|
||||||
|
use Doctrine\Bundle\FixturesBundle\Fixture;
|
||||||
|
use Doctrine\Persistence\ObjectManager;
|
||||||
|
use Faker\Factory;
|
||||||
|
use Symfony\Component\PasswordHasher\Hasher\UserPasswordHasherInterface;
|
||||||
|
|
||||||
|
class AppFixtures extends Fixture
|
||||||
|
{
|
||||||
|
# Initialisation de l'outil de hachage de Symfony
|
||||||
|
private UserPasswordHasherInterface $hasher;
|
||||||
|
|
||||||
|
# Injection de dépendance pour récupérer le service de sécurité
|
||||||
|
public function __construct(UserPasswordHasherInterface $hasher)
|
||||||
|
{
|
||||||
|
$this->hasher = $hasher;
|
||||||
|
}
|
||||||
|
|
||||||
|
# Méthode principale qui génère les données en base
|
||||||
|
public function load(ObjectManager $manager): void
|
||||||
|
{
|
||||||
|
# Initialisation de Faker en français
|
||||||
|
$faker = Factory::create('fr_FR');
|
||||||
|
|
||||||
|
# Boucle pour créer 10 utilisateurs
|
||||||
|
for ($i = 0; $i < 10; $i++) {
|
||||||
|
# Instanciation d'un nouvel utilisateur (Adhérent)
|
||||||
|
$user = new User();
|
||||||
|
# Attribution d'un email aléatoire et unique
|
||||||
|
$user->setEmail($faker->unique()->safeEmail());
|
||||||
|
# Définition des droits d'accès de l'utilisateur
|
||||||
|
$user->setRoles(['ROLE_USER', 'ROLE_ORGANISATION']);
|
||||||
|
# Hachage sécurisé du mot de passe "password"
|
||||||
|
$user->setPassword($this->hasher->hashPassword($user, 'password'));
|
||||||
|
# Définition d'un NOM et Prénom
|
||||||
|
$user->setFirstname($faker->firstName());
|
||||||
|
$user->setLastname($faker->lastName());
|
||||||
|
# autres fixtures à modifier plus tard
|
||||||
|
$user->setNextcloudQuota($faker->numberBetween(1, 20) . 'G');
|
||||||
|
$user->setQuota($faker->numberBetween(1, 10) . 'G');
|
||||||
|
$user->setEmailQuota('1G');
|
||||||
|
$user->setAlternateEmail($faker->unique()->safeEmail());
|
||||||
|
$user->setHasAgoraAccess($faker->boolean(70)); // 70% de chance d'avoir accès
|
||||||
|
$user->setHasMobilizon($faker->boolean(50));
|
||||||
|
$user->setHasNextcloudAccess($faker->boolean(90));
|
||||||
|
$user->setIdentifiantKaz($faker->uuid());
|
||||||
|
# Préparation de l'enregistrement de l'objet en base de données
|
||||||
|
$manager->persist($user);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Création d'un compte de test fixe
|
||||||
|
$admin = new User();
|
||||||
|
$admin->setEmail('admin@kaz.bzh');
|
||||||
|
$admin->setRoles(['ROLE_USER', 'ROLE_ADMIN', 'ROLE_ORGANISATION']);
|
||||||
|
$admin->setPassword($this->hasher->hashPassword($admin, 'password'));
|
||||||
|
$admin->setFirstName('Admin');
|
||||||
|
$admin->setLastName('KAZ');
|
||||||
|
|
||||||
|
// Remplissage des champs obligatoires restants pour éviter les erreurs SQL
|
||||||
|
$admin->setAlternateEmail('secours@kaz.bzh');
|
||||||
|
$admin->setIdentifiantKaz('ADMIN-KAZ-001');
|
||||||
|
$admin->setQuota('5G');
|
||||||
|
$admin->setEmailQuota('1G');
|
||||||
|
$admin->setNextcloudQuota('10G');
|
||||||
|
$admin->setHasNextcloudAccess(true);
|
||||||
|
$admin->setHasMobilizon(true);
|
||||||
|
$admin->setHasAgoraAccess(true);
|
||||||
|
|
||||||
|
$manager->persist($admin);
|
||||||
|
|
||||||
|
// Création d'un compte de test fixe
|
||||||
|
$melvin = new User();
|
||||||
|
$melvin->setEmail('melvin.leveque@kazkouil.fr');
|
||||||
|
$melvin->setRoles(['ROLE_USER', 'ROLE_ADMIN', 'ROLE_ORGANISATION']);
|
||||||
|
$melvin->setPassword($this->hasher->hashPassword($melvin, 'password'));
|
||||||
|
$melvin->setFirstName('');
|
||||||
|
$melvin->setLastName('');
|
||||||
|
|
||||||
|
$melvin->setAlternateEmail('');
|
||||||
|
$melvin->setIdentifiantKaz('MELVIN-KAZ-001');
|
||||||
|
$melvin->setQuota('5G');
|
||||||
|
$melvin->setEmailQuota('1G');
|
||||||
|
$melvin->setNextcloudQuota('10G');
|
||||||
|
$melvin->setHasNextcloudAccess(true);
|
||||||
|
$melvin->setHasMobilizon(true);
|
||||||
|
$melvin->setHasAgoraAccess(true);
|
||||||
|
|
||||||
|
$manager->persist($melvin);
|
||||||
|
|
||||||
|
# Exécution réelle des requêtes SQL (envoi vers la base), une fois la bouche finie
|
||||||
|
$manager->flush();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -3,48 +3,83 @@
|
|||||||
namespace App\Entity;
|
namespace App\Entity;
|
||||||
|
|
||||||
use App\Repository\UserRepository;
|
use App\Repository\UserRepository;
|
||||||
|
use Doctrine\DBAL\Types\Types;
|
||||||
use Doctrine\ORM\Mapping as ORM;
|
use Doctrine\ORM\Mapping as ORM;
|
||||||
use Symfony\Component\Validator\Constraints\Uuid;
|
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
|
||||||
|
use Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface;
|
||||||
|
use Symfony\Component\Security\Core\User\UserInterface;
|
||||||
|
use Symfony\Component\Uid\Uuid;
|
||||||
|
|
||||||
#[ORM\Entity(repositoryClass: UserRepository::class)]
|
#[ORM\Entity(repositoryClass: UserRepository::class)]
|
||||||
#[ORM\Table(name: '`user`')]
|
#[ORM\Table(name: '`user`')]
|
||||||
class User
|
#[UniqueEntity(fields: ['email'], message: 'There is already an account with this email')]
|
||||||
|
class User implements UserInterface, PasswordAuthenticatedUserInterface
|
||||||
{
|
{
|
||||||
|
|
||||||
|
public const string EMAIL_QUOTA_DEFAULT = '1G';
|
||||||
|
|
||||||
#[ORM\Id]
|
#[ORM\Id]
|
||||||
#[ORM\GeneratedValue]
|
#[ORM\GeneratedValue(strategy: 'CUSTOM')]
|
||||||
#[ORM\Column]
|
#[ORM\CustomIdGenerator(class: 'doctrine.uuid_generator')]
|
||||||
private ?Uuid $id ;
|
#[ORM\Column(type: 'uuid', unique: true, name: 'id')]
|
||||||
|
private ?Uuid $id;
|
||||||
|
|
||||||
#[ORM\Column(length: 255)]
|
#[ORM\Column(length: 180, unique: true)]
|
||||||
private ?string $role = null;
|
private ?string $email = null;
|
||||||
|
|
||||||
#[ORM\Column(length: 255)]
|
/**
|
||||||
private ?string $mail = null;
|
* @var list<string> The user roles
|
||||||
|
*/
|
||||||
|
#[ORM\Column(name: 'roles')]
|
||||||
|
private array $roles = [];
|
||||||
|
|
||||||
#[ORM\Column(length: 255)]
|
/**
|
||||||
private ?string $mailQuota = null;
|
* @var ?string The hashed password
|
||||||
|
*/
|
||||||
|
#[ORM\Column(name: 'password')]
|
||||||
|
private ?string $password = null;
|
||||||
|
|
||||||
#[ORM\Column(length: 255)]
|
#[ORM\Column(length: 255, name: 'email_quota')]
|
||||||
private ?string $mailDeSecours = null;
|
private ?string $emailQuota = null;
|
||||||
|
|
||||||
#[ORM\Column(length: 255)]
|
#[ORM\Column(length: 255, name: 'alternate_email')]
|
||||||
|
private ?string $alternateEmail = null;
|
||||||
|
|
||||||
|
#[ORM\Column(length: 255, name: 'identifiant_kaz')]
|
||||||
private ?string $identifiantKaz = null;
|
private ?string $identifiantKaz = null;
|
||||||
|
|
||||||
#[ORM\Column(length: 255)]
|
#[ORM\Column(length: 255, name: 'quota')]
|
||||||
private ?string $quota = null;
|
private ?string $quota = null;
|
||||||
|
|
||||||
#[ORM\Column]
|
#[ORM\Column(name: 'has_nextcloud_access')]
|
||||||
private ?bool $hasNextcloudAccess = null;
|
private ?bool $hasNextcloudAccess = null;
|
||||||
|
|
||||||
#[ORM\Column(length: 255)]
|
#[ORM\Column(length: 255, name: 'nextcloud_quota')]
|
||||||
private ?string $nextcloudQuota = null;
|
private ?string $nextcloudQuota = null;
|
||||||
|
|
||||||
#[ORM\Column]
|
#[ORM\Column(name: 'has_mobilizon')]
|
||||||
private ?bool $hasMobilizon = null;
|
private ?bool $hasMobilizon = null;
|
||||||
|
|
||||||
#[ORM\Column]
|
#[ORM\Column(name: 'has_agora_access')]
|
||||||
private ?bool $hasAgoraAccess = null;
|
private ?bool $hasAgoraAccess = null;
|
||||||
|
|
||||||
|
#[ORM\Column(length: 255, name: 'last_name')]
|
||||||
|
private ?string $lastName = null;
|
||||||
|
|
||||||
|
#[ORM\Column(length: 255, name: 'first_name')]
|
||||||
|
private ?string $firstName = null;
|
||||||
|
|
||||||
|
// TODO: Modifier "photo" par "image"
|
||||||
|
#[ORM\Column(length: 255, nullable: true, name: 'photo')]
|
||||||
|
private ?string $photo = null;
|
||||||
|
|
||||||
|
#[ORM\Column(length: 20, nullable: true, name: 'telephone')]
|
||||||
|
private ?string $telephone = null;
|
||||||
|
|
||||||
|
public function __construct() {
|
||||||
|
$this->emailQuota = self::EMAIL_QUOTA_DEFAULT;
|
||||||
|
}
|
||||||
|
|
||||||
public function getId(): ?Uuid
|
public function getId(): ?Uuid
|
||||||
{
|
{
|
||||||
return $this->id;
|
return $this->id;
|
||||||
@@ -57,50 +92,104 @@ class User
|
|||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getRole(): ?string
|
public function getEmail(): ?string
|
||||||
{
|
{
|
||||||
return $this->role;
|
return $this->email;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setRole(string $role): static
|
public function setEmail(string $email): static
|
||||||
{
|
{
|
||||||
$this->role = $role;
|
$this->email = $email;
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getMail(): ?string
|
/**
|
||||||
|
* A visual identifier that represents this user.
|
||||||
|
*
|
||||||
|
* @see UserInterface
|
||||||
|
*/
|
||||||
|
public function getUserIdentifier(): string
|
||||||
{
|
{
|
||||||
return $this->mail;
|
return (string) $this->email;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setMail(string $mail): static
|
/**
|
||||||
|
* @see UserInterface
|
||||||
|
*/
|
||||||
|
public function getRoles(): array
|
||||||
{
|
{
|
||||||
$this->mail = $mail;
|
$roles = $this->roles;
|
||||||
|
$roles[] = 'ROLE_USER'; // garantit qu'il a au moins ce rôle
|
||||||
|
return array_unique($roles);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param list<string> $roles
|
||||||
|
*/
|
||||||
|
public function setRoles(array $roles): static
|
||||||
|
{
|
||||||
|
$this->roles = $roles;
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getMailQuota(): ?string
|
/**
|
||||||
|
* @see UserInterface
|
||||||
|
* Ajout de cette fonction, car obligatoire pour faire fonctionner UserInterface correctement
|
||||||
|
*/
|
||||||
|
public function eraseCredentials(): void
|
||||||
{
|
{
|
||||||
return $this->mailQuota;
|
// Si vous stockez des données temporaires sensibles sur l'utilisateur, nettoyez-les ici
|
||||||
|
// $this->plainPassword = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setMailQuota(string $mailQuota): static
|
/**
|
||||||
|
* @see PasswordAuthenticatedUserInterface
|
||||||
|
*/
|
||||||
|
public function getPassword(): ?string
|
||||||
{
|
{
|
||||||
$this->mailQuota = $mailQuota;
|
return $this->password;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setPassword(string $password): static
|
||||||
|
{
|
||||||
|
$this->password = $password;
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getMailDeSecours(): ?string
|
/**
|
||||||
|
* Ensure the session doesn't contain actual password hashes by CRC32C-hashing them, as supported since Symfony 7.3.
|
||||||
|
*/
|
||||||
|
public function __serialize(): array
|
||||||
{
|
{
|
||||||
return $this->mailDeSecours;
|
$data = (array) $this;
|
||||||
|
$data["\0".self::class."\0password"] = hash('crc32c', $this->password);
|
||||||
|
|
||||||
|
return $data;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setMailDeSecours(string $mailDeSecours): static
|
public function getEmailQuota(): ?string
|
||||||
{
|
{
|
||||||
$this->mailDeSecours = $mailDeSecours;
|
return $this->emailQuota;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setEmailQuota(string $emailQuota): static
|
||||||
|
{
|
||||||
|
$this->emailQuota = $emailQuota;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getAlternateEmail(): ?string
|
||||||
|
{
|
||||||
|
return $this->alternateEmail;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setAlternateEmail(string $alternateEmail): static
|
||||||
|
{
|
||||||
|
$this->alternateEmail = $alternateEmail;
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
@@ -176,4 +265,67 @@ class User
|
|||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getLastName(): ?string
|
||||||
|
{
|
||||||
|
return $this->lastName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setLastName(string $lastName): static
|
||||||
|
{
|
||||||
|
$this->lastName = $lastName;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getFirstName(): ?string
|
||||||
|
{
|
||||||
|
return $this->firstName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setFirstName(string $firstName): static
|
||||||
|
{
|
||||||
|
$this->firstName = $firstName;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getPhoto(): ?string
|
||||||
|
{
|
||||||
|
return $this->photo;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setPhoto(?string $photo): static
|
||||||
|
{
|
||||||
|
$this->photo = $photo;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getTelephone(): ?string
|
||||||
|
{
|
||||||
|
return $this->telephone;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setTelephone(?string $telephone): static
|
||||||
|
{
|
||||||
|
$this->telephone = $telephone;
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function updateFromKazUser($kazUser) : User
|
||||||
|
{
|
||||||
|
$this->setEmail($kazUser['mail']);
|
||||||
|
// Création du firstname et lastname
|
||||||
|
$name = explode(' ', $kazUser['sn']);
|
||||||
|
$this->setFirstName($name[0]);
|
||||||
|
// Récupération des valeurs du tableau moins la première
|
||||||
|
$aLastname = array_slice($name, 1);
|
||||||
|
$this->setLastName(implode(' ', $aLastname));
|
||||||
|
|
||||||
|
//TODO: Ajouter les champs manquants de l'objet User dans l'api kaz.
|
||||||
|
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
54
src/Form/ChangePasswordType.php
Normal file
54
src/Form/ChangePasswordType.php
Normal file
@@ -0,0 +1,54 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Form;
|
||||||
|
|
||||||
|
use Symfony\Component\Form\AbstractType;
|
||||||
|
use Symfony\Component\Form\Extension\Core\Type\PasswordType;
|
||||||
|
use Symfony\Component\Form\Extension\Core\Type\RepeatedType;
|
||||||
|
use Symfony\Component\Form\FormBuilderInterface;
|
||||||
|
use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||||
|
use Symfony\Component\Validator\Constraints\Length;
|
||||||
|
use Symfony\Component\Validator\Constraints\NotBlank;
|
||||||
|
|
||||||
|
class ChangePasswordType extends AbstractType
|
||||||
|
{
|
||||||
|
# Mise en place du formulaire de changement de mot de passe
|
||||||
|
public function buildForm(FormBuilderInterface $builder, array $options): void
|
||||||
|
{
|
||||||
|
$builder
|
||||||
|
->add('oldPassword', PasswordType::class, [
|
||||||
|
'label' => 'Mot de passe actuel',
|
||||||
|
'mapped' => false,
|
||||||
|
# Mise en place de contraintes dans la saisie du mot de passe
|
||||||
|
'constraints' => [
|
||||||
|
new NotBlank(message: 'Veuillez saisir votre mot de passe actuel'),
|
||||||
|
],
|
||||||
|
])
|
||||||
|
->add('newPassword', RepeatedType::class, [
|
||||||
|
'type' => PasswordType::class,
|
||||||
|
'invalid_message' => 'Les deux mots de passe doivent être identiques.',
|
||||||
|
'mapped' => false,
|
||||||
|
# Mise en place de contraintes dans la saisie du mot de passe
|
||||||
|
'constraints' => [
|
||||||
|
new NotBlank(
|
||||||
|
message: 'Veuillez saisir un mot de passe'
|
||||||
|
),
|
||||||
|
new Length(
|
||||||
|
min: 8,
|
||||||
|
minMessage: 'Votre mot de passe doit faire au moins {{ limit }} caractères',
|
||||||
|
max: 4096,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
'first_options' => ['label' => 'Nouveau mot de passe'],
|
||||||
|
'second_options' => ['label' => 'Confirmer le nouveau mot de passe'],
|
||||||
|
])
|
||||||
|
;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function configureOptions(OptionsResolver $resolver): void
|
||||||
|
{
|
||||||
|
$resolver->setDefaults([
|
||||||
|
// Configure your form options here
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
}
|
||||||
73
src/Form/UserProfileType.php
Normal file
73
src/Form/UserProfileType.php
Normal file
@@ -0,0 +1,73 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Form;
|
||||||
|
|
||||||
|
use App\Entity\User;
|
||||||
|
use Symfony\Component\Form\Extension\Core\Type\TelType;
|
||||||
|
use Symfony\Component\Form\Extension\Core\Type\TextType;
|
||||||
|
use Symfony\Component\Form\AbstractType;
|
||||||
|
use Symfony\Component\Form\Extension\Core\Type\EmailType;
|
||||||
|
use Symfony\Component\Form\Extension\Core\Type\FileType;
|
||||||
|
use Symfony\Component\Form\FormBuilderInterface;
|
||||||
|
use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||||
|
use Symfony\Component\Validator\Constraints\Image;
|
||||||
|
use Symfony\Component\Validator\Constraints\Length;
|
||||||
|
use Symfony\Component\Validator\Constraints\Regex;
|
||||||
|
|
||||||
|
class UserProfileType extends AbstractType
|
||||||
|
{
|
||||||
|
public function buildForm(FormBuilderInterface $builder, array $options): void
|
||||||
|
{
|
||||||
|
$builder
|
||||||
|
->add('firstName', TextType::class, [
|
||||||
|
'label' => 'Prénom',
|
||||||
|
'disabled' => true,
|
||||||
|
])
|
||||||
|
->add('lastName', TextType::class, [
|
||||||
|
'label' => 'Nom',
|
||||||
|
'disabled' => true,
|
||||||
|
])
|
||||||
|
->add('email', EmailType::class, [
|
||||||
|
'label' => 'E-mail',
|
||||||
|
'disabled' => true,
|
||||||
|
])
|
||||||
|
->add('alternateEmail', EmailType::class, ['label' => 'E-mail de secours'])
|
||||||
|
->add('telephone', TelType::class, [
|
||||||
|
'label'=>'Téléphone',
|
||||||
|
'required' => false,
|
||||||
|
'attr' => [
|
||||||
|
'placeholder'=>'06 00 00 00 00',
|
||||||
|
'class'=> 'w-full px-4 py-3 border border-gris-clair rounded-lg focus:outline-none focus:border-bouton focus:ring-1 focus:ring-bouton transition-shadow'
|
||||||
|
],
|
||||||
|
'constraints' => [
|
||||||
|
new Regex(
|
||||||
|
pattern: '/^[0-9\+\s\.\-\(\)]+$/',
|
||||||
|
message: 'Le numéro de téléphone contient des caractères non valides'
|
||||||
|
),
|
||||||
|
new Length(
|
||||||
|
max: 20,
|
||||||
|
maxMessage: 'Le numéro est trop long (maximum {{ limit }} caractères)'
|
||||||
|
),
|
||||||
|
],
|
||||||
|
])
|
||||||
|
->add('image', FileType::class, [
|
||||||
|
'label' => 'Ma photo de profil',
|
||||||
|
'mapped' => false,
|
||||||
|
'required' => false,
|
||||||
|
'constraints' => [
|
||||||
|
new Image(
|
||||||
|
maxSize: '2M',
|
||||||
|
extensions: ['jpg', 'jpeg', 'png'],
|
||||||
|
extensionsMessage: 'Veuillez déposer une image JPG, JPEG ou PNG valide',)
|
||||||
|
],
|
||||||
|
])
|
||||||
|
;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function configureOptions(OptionsResolver $resolver): void
|
||||||
|
{
|
||||||
|
$resolver->setDefaults([
|
||||||
|
'data_class' => User::class,
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -5,17 +5,34 @@ namespace App\Repository;
|
|||||||
use App\Entity\User;
|
use App\Entity\User;
|
||||||
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
|
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
|
||||||
use Doctrine\Persistence\ManagerRegistry;
|
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>
|
* @extends ServiceEntityRepository<User>
|
||||||
*/
|
*/
|
||||||
class UserRepository extends ServiceEntityRepository
|
class UserRepository extends ServiceEntityRepository implements PasswordUpgraderInterface
|
||||||
{
|
{
|
||||||
public function __construct(ManagerRegistry $registry)
|
public function __construct(ManagerRegistry $registry)
|
||||||
{
|
{
|
||||||
parent::__construct($registry, User::class);
|
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();
|
||||||
|
}
|
||||||
|
|
||||||
// /**
|
// /**
|
||||||
// * @return User[] Returns an array of User objects
|
// * @return User[] Returns an array of User objects
|
||||||
// */
|
// */
|
||||||
|
|||||||
48
src/Service/FileUploader.php
Normal file
48
src/Service/FileUploader.php
Normal file
@@ -0,0 +1,48 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Service;
|
||||||
|
|
||||||
|
use Symfony\Component\HttpFoundation\File\Exception\FileException;
|
||||||
|
use Symfony\Component\HttpFoundation\File\UploadedFile;
|
||||||
|
use Symfony\Component\String\Slugger\SluggerInterface;
|
||||||
|
|
||||||
|
class FileUploader
|
||||||
|
{
|
||||||
|
// On utilise la promotion de constructeur (PHP 8) : ultra moderne et concis
|
||||||
|
public function __construct(
|
||||||
|
private string $targetDirectory,
|
||||||
|
private SluggerInterface $slugger,
|
||||||
|
) {
|
||||||
|
}
|
||||||
|
|
||||||
|
public function upload(UploadedFile $file): string
|
||||||
|
{
|
||||||
|
$originalFilename = pathinfo($file->getClientOriginalName(), PATHINFO_FILENAME);
|
||||||
|
$safeFilename = $this->slugger->slug($originalFilename);
|
||||||
|
$fileName = $safeFilename . '-' . uniqid() . '.' . $file->guessExtension();
|
||||||
|
|
||||||
|
try {
|
||||||
|
$file->move($this->getTargetDirectory(), $fileName);
|
||||||
|
} catch (FileException $e) {
|
||||||
|
// Ici tu peux logguer l'erreur si besoin
|
||||||
|
throw new \Exception('Erreur lors du transfert de l\'image : ' . $e->getMessage());
|
||||||
|
}
|
||||||
|
|
||||||
|
return $fileName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function delete(?string $fileName): void
|
||||||
|
{
|
||||||
|
if ($fileName) {
|
||||||
|
$filePath = $this->getTargetDirectory() . 'FileUploader.php/' . $fileName;
|
||||||
|
if (file_exists($filePath)) {
|
||||||
|
unlink($filePath);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getTargetDirectory(): string
|
||||||
|
{
|
||||||
|
return $this->targetDirectory;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -14,12 +14,18 @@ use Symfony\Contracts\HttpClient\HttpClientInterface;
|
|||||||
class KazApiService
|
class KazApiService
|
||||||
{
|
{
|
||||||
private ?string $token = null;
|
private ?string $token = null;
|
||||||
|
private HttpClientInterface $httpClient;
|
||||||
|
|
||||||
public function __construct(
|
public function __construct(
|
||||||
private readonly HttpClientInterface $kazApiClient,
|
private readonly HttpClientInterface $kazApiClient,
|
||||||
private readonly string $apiUser,
|
private readonly string $apiUser,
|
||||||
private readonly string $apiPassword
|
private readonly string $apiPassword
|
||||||
) {}
|
) {
|
||||||
|
$this->httpClient = $kazApiClient->withOptions([
|
||||||
|
'auth_basic' => [$apiUser, $apiPassword]
|
||||||
|
]);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Récupère le token JWT via l'authentification Basic
|
* Récupère le token JWT via l'authentification Basic
|
||||||
@@ -37,16 +43,14 @@ class KazApiService
|
|||||||
return $this->token;
|
return $this->token;
|
||||||
}
|
}
|
||||||
|
|
||||||
$response = $this->kazApiClient->request('POST', '/get_token', [
|
$response = $this->httpClient->request('GET', '/get_token');
|
||||||
'auth_basic' => [$this->apiUser, $this->apiPassword]
|
|
||||||
]);
|
|
||||||
|
|
||||||
if ($response->getStatusCode() !== 200) {
|
if ($response->getStatusCode() !== 200) {
|
||||||
throw new Exception('Impossible de récupérer le token JWT');
|
throw new Exception('Impossible de récupérer le token JWT'.$response->getStatusCode());
|
||||||
}
|
}
|
||||||
|
|
||||||
$data = $response->toArray();
|
$data = $response->toArray();
|
||||||
$this->token = $data['token']; // Ajustez la clé selon le format de votre API
|
$this->token = $data['access_token']; // Ajustez la clé selon le format de votre API
|
||||||
|
|
||||||
return $this->token;
|
return $this->token;
|
||||||
}
|
}
|
||||||
@@ -68,7 +72,6 @@ class KazApiService
|
|||||||
public function getUserData(string $email): array
|
public function getUserData(string $email): array
|
||||||
{
|
{
|
||||||
$options['headers']['Authorization'] = 'Bearer ' . $this->getToken();
|
$options['headers']['Authorization'] = 'Bearer ' . $this->getToken();
|
||||||
|
|
||||||
$response = $this->kazApiClient->request('GET', "/ldap/user/$email", $options);
|
$response = $this->kazApiClient->request('GET', "/ldap/user/$email", $options);
|
||||||
|
|
||||||
if ($response->getStatusCode() !== 200) {
|
if ($response->getStatusCode() !== 200) {
|
||||||
|
|||||||
31
symfony.lock
31
symfony.lock
@@ -22,6 +22,18 @@
|
|||||||
"src/Repository/.gitignore"
|
"src/Repository/.gitignore"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
"doctrine/doctrine-fixtures-bundle": {
|
||||||
|
"version": "4.3",
|
||||||
|
"recipe": {
|
||||||
|
"repo": "github.com/symfony/recipes",
|
||||||
|
"branch": "main",
|
||||||
|
"version": "3.0",
|
||||||
|
"ref": "1f5514cfa15b947298df4d771e694e578d4c204d"
|
||||||
|
},
|
||||||
|
"files": [
|
||||||
|
"src/DataFixtures/AppFixtures.php"
|
||||||
|
]
|
||||||
|
},
|
||||||
"doctrine/doctrine-migrations-bundle": {
|
"doctrine/doctrine-migrations-bundle": {
|
||||||
"version": "4.0",
|
"version": "4.0",
|
||||||
"recipe": {
|
"recipe": {
|
||||||
@@ -270,6 +282,15 @@
|
|||||||
"templates/base.html.twig"
|
"templates/base.html.twig"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
"symfony/uid": {
|
||||||
|
"version": "8.0",
|
||||||
|
"recipe": {
|
||||||
|
"repo": "github.com/symfony/recipes",
|
||||||
|
"branch": "main",
|
||||||
|
"version": "7.0",
|
||||||
|
"ref": "0df5844274d871b37fc3816c57a768ffc60a43a5"
|
||||||
|
}
|
||||||
|
},
|
||||||
"symfony/ux-turbo": {
|
"symfony/ux-turbo": {
|
||||||
"version": "2.32",
|
"version": "2.32",
|
||||||
"recipe": {
|
"recipe": {
|
||||||
@@ -307,16 +328,16 @@
|
|||||||
"config/routes/web_profiler.yaml"
|
"config/routes/web_profiler.yaml"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"symfony/webapp-pack": {
|
"symfonycasts/tailwind-bundle": {
|
||||||
"version": "1.4",
|
"version": "0.12",
|
||||||
"recipe": {
|
"recipe": {
|
||||||
"repo": "github.com/symfony/recipes",
|
"repo": "github.com/symfony/recipes",
|
||||||
"branch": "main",
|
"branch": "main",
|
||||||
"version": "1.0",
|
"version": "0.8",
|
||||||
"ref": "b9e6cc8e7b6069d0e8a816665809a423864eb4dd"
|
"ref": "d0bd0276f74de90adfaa4c6cd74cc0caacd77e0a"
|
||||||
},
|
},
|
||||||
"files": [
|
"files": [
|
||||||
"config/packages/messenger.yaml"
|
"config/packages/symfonycasts_tailwind.yaml"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"twig/extra-bundle": {
|
"twig/extra-bundle": {
|
||||||
|
|||||||
65
templates/_navbar.html.twig
Normal file
65
templates/_navbar.html.twig
Normal file
@@ -0,0 +1,65 @@
|
|||||||
|
<nav class="bg-white border-b border-gris-clair shadow-sm py-4 px-6 sticky top-0 z-50 font-sora">
|
||||||
|
|
||||||
|
<div class="max-w-7xl mx-auto flex flex-col md:flex-row items-center justify-between gap-4">
|
||||||
|
|
||||||
|
<div class="flex flex-col md:flex-row items-center gap-4 md:gap-8 w-full md:w-auto">
|
||||||
|
|
||||||
|
<a href="{{ path('app_home') }}" class="flex items-center gap-2 transition-transform hover:scale-105">
|
||||||
|
<img src="{{ asset('img/logo.svg') }}" alt="Logo de l'association" class="h-10 w-auto object-contain">
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<ul class="flex flex-wrap justify-center md:justify-start gap-2 md:gap-4">
|
||||||
|
|
||||||
|
{# Onglet : Mon profil #}
|
||||||
|
<li>
|
||||||
|
<a href="{{ path('app_user') }}"
|
||||||
|
class="px-4 py-2 text-sm font-semibold transition-colors block
|
||||||
|
{{ app.request.attributes.get('_route') == 'app_user'
|
||||||
|
? 'bg-bouton/20 border border-bouton text-text rounded-lg'
|
||||||
|
: 'text-gris-fonce hover:bg-gris-clair hover:text-text rounded-lg border border-transparent' }}">
|
||||||
|
Mon profil
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
{# Onglet : Mon offre #}
|
||||||
|
<li>
|
||||||
|
{# TODO : créer la route {{ path('app_offres') }} #}
|
||||||
|
<a href="#"
|
||||||
|
class="px-4 py-2 text-sm font-semibold transition-colors block text-gris-fonce hover:bg-gris-clair hover:text-text rounded-lg border border-transparent flex items-center gap-1">
|
||||||
|
Mon offre
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
{# Onglet : Gérer mes mots de passe #}
|
||||||
|
<li>
|
||||||
|
<a href="{{ path('app_user_edit_password') }}"
|
||||||
|
class="px-4 py-2 text-sm font-semibold transition-colors block
|
||||||
|
{{ app.request.attributes.get('_route') == 'app_user_edit_password'
|
||||||
|
? 'bg-bouton/20 border border-bouton text-text rounded-lg'
|
||||||
|
: 'text-gris-fonce hover:bg-gris-clair hover:text-text rounded-lg border border-transparent' }}">
|
||||||
|
Gérer mes mots de passe
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
{# Onglet : Mon organisation (ne s'affiche que si on a le rôle adéquat) #}
|
||||||
|
{% if is_granted('ROLE_ADMIN_ORGANISATION') %}
|
||||||
|
<li>
|
||||||
|
<a href="#"
|
||||||
|
class="px-4 py-2 text-sm font-semibold transition-colors block text-gris-fonce hover:bg-gris-clair hover:text-text rounded-lg border border-transparent">
|
||||||
|
Mon organisation
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="flex-shrink-0 mt-4 md:mt-0">
|
||||||
|
<a href="{{ path('app_logout') }}"
|
||||||
|
class="px-4 py-2 text-sm font-bold bg-danger text-white rounded-lg hover:bg-danger-hover transition-colors shadow flex items-center gap-2">
|
||||||
|
Se déconnecter
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</nav>
|
||||||
@@ -2,16 +2,94 @@
|
|||||||
<html lang="fr">
|
<html lang="fr">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<title>{% block title %}Welcome!{% endblock %}</title>
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<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><text y=%221.3em%22 x=%220.2em%22 font-size=%2276%22 fill=%22%23fff%22>sf</text></svg>">
|
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
||||||
|
<title>{% block title %}Association Kaz{% endblock %}</title>
|
||||||
|
<link rel="icon" href="{{ asset("img/logo.svg") }}">
|
||||||
|
|
||||||
{% block stylesheets %}
|
{% block stylesheets %}
|
||||||
|
<link rel="stylesheet" href="{{ asset('styles/app.css') }}">
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block javascripts %}
|
{% block javascripts %}
|
||||||
{% block importmap %}{{ importmap('app') }}{% endblock %}
|
{% block importmap %}{{ importmap('app') }}{% endblock %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
|
{% block navbar %}
|
||||||
|
{{ include('_navbar.html.twig') }}
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
{# Contenu principal #}
|
||||||
|
<main class="flex-grow">
|
||||||
|
{# Affichage des messages flash (Succès ou Erreur) #}
|
||||||
|
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 mt-4">
|
||||||
|
{% for label, messages in app.flashes %}
|
||||||
|
{% for message in messages %}
|
||||||
|
<div class="flex items-center p-4 mb-4 rounded-lg border shadow-sm
|
||||||
|
{{ label == 'success' ? 'bg-green-50 border-green-200 text-green-800' :
|
||||||
|
label == 'error' ? 'bg-red-50 border-red-200 text-red-800' :
|
||||||
|
label == 'warning' ? 'bg-yellow-50 border-yellow-200 text-yellow-800' :
|
||||||
|
'bg-blue-50 border-blue-200 text-blue-800' }}"
|
||||||
|
role="alert">
|
||||||
|
|
||||||
|
{# Icône dynamique #}
|
||||||
|
<svg class="flex-shrink-0 w-5 h-5 mr-3" fill="currentColor" viewBox="0 0 20 20">
|
||||||
|
{% if label == 'success' %}
|
||||||
|
<path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z" clip-rule="evenodd"></path>
|
||||||
|
{% else %}
|
||||||
|
<path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z" clip-rule="evenodd"></path>
|
||||||
|
{% endif %}
|
||||||
|
</svg>
|
||||||
|
|
||||||
|
<div class="text-sm font-bold">
|
||||||
|
{{ message }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{# Bouton Fermer #}
|
||||||
|
<button type="button"
|
||||||
|
onclick="this.parentElement.remove()"
|
||||||
|
class="text-lg font-bold hover:opacity-70 transition-opacity ml-4">
|
||||||
|
×
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
{% endfor %}
|
||||||
|
{% endfor %}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{# Contenu principal de chaque page #}
|
||||||
{% block body %}{% endblock %}
|
{% block body %}{% endblock %}
|
||||||
|
|
||||||
|
</main>
|
||||||
|
{# Gestion du pied-de-page du site #}
|
||||||
|
<footer class="bg-white border-t border-gris-clair py-6 sm:py-8 mt-auto w-full font-sora">
|
||||||
|
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 flex flex-col md:flex-row justify-between items-center gap-4">
|
||||||
|
<div class="text-sm text-gris-fonce flex items-center gap-2 justify-center md:justify-start">
|
||||||
|
{# Logo de l'association #}
|
||||||
|
<img src="{{ asset('img/logo.svg') }}"
|
||||||
|
alt="Logo de l'association"
|
||||||
|
class="h-6 w-auto object-contain opacity-80 hover:opacity-100 transition-opacity">
|
||||||
|
|
||||||
|
{# Le texte et les liens #}
|
||||||
|
<span>
|
||||||
|
© {{ 'now'|date('Y') }} | Kaz, le numérique sobre, libre, éthique et local.
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<ul class="flex flex-wrap justify-center gap-4 sm:gap-6 text-sm text-gris-fonce">
|
||||||
|
<li>
|
||||||
|
<a href="https://kaz.bzh/mentions-legales/" class="hover:text-bouton transition-colors">Mentions légales et statuts</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="https://status.kaz.bzh/status/kaz" class="hover:text-bouton transition-colors">Santé des services Kaz</a>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<a href="https://kaz.bzh/contact/" class="hover:text-bouton transition-colors">Contact</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</footer>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -1 +0,0 @@
|
|||||||
error404.html.twig
|
|
||||||
107
templates/home/home.html.twig
Normal file
107
templates/home/home.html.twig
Normal file
@@ -0,0 +1,107 @@
|
|||||||
|
{% extends 'base.html.twig' %}
|
||||||
|
|
||||||
|
{% block title %}Accueil | {{ parent() }}{% endblock %}
|
||||||
|
|
||||||
|
{% block body %}
|
||||||
|
<div class="min-h-screen bg-bg-primaire py-8 w-full font-sora">
|
||||||
|
<div class="max-w-6xl mx-auto px-4 sm:px-6 lg:px-8">
|
||||||
|
|
||||||
|
{# Bloc "message d'accueil" #}
|
||||||
|
<h1 class="text-4xl font-caveat text-text mb-6 text-center sm:text-center">
|
||||||
|
Page d'accueil
|
||||||
|
</h1>
|
||||||
|
|
||||||
|
<div class="bg-white rounded-xl shadow-sm border border-gris-clair p-6 sm:p-8 mb-10">
|
||||||
|
<h2 class="text-xl font-bold text-title mb-4 text-center">
|
||||||
|
Bienvenue sur ton espace kaznaute <span class="text-bouton">{{ app.user ? app.user.userIdentifier : 'visiteur' }}</span> !
|
||||||
|
</h2>
|
||||||
|
|
||||||
|
{# Zone réservée pour les futures données de l'API
|
||||||
|
TODO : Gérer les données de l'API #}
|
||||||
|
<div class="bg-bouton/10 border border-bouton/30 rounded-lg p-5">
|
||||||
|
<h3 class="font-semibold text-title mb-3 flex items-center gap-2">
|
||||||
|
Votre abonnement actuellement :
|
||||||
|
</h3>
|
||||||
|
|
||||||
|
<ul class="space-y-2 text-sm text-text">
|
||||||
|
<li class="flex flex-col sm:flex-row sm:items-center gap-1 sm:gap-2">
|
||||||
|
<span class="font-semibold text-gris-fonce">Formule souscrite :</span>
|
||||||
|
{# TODO API : Remplacer par la vraie variable #}
|
||||||
|
<span class="italic opacity-70">Ajouter la vraie valeur</span>
|
||||||
|
</li>
|
||||||
|
<li class="flex flex-col sm:flex-row sm:items-center gap-1 sm:gap-2">
|
||||||
|
<span class="font-semibold text-gris-fonce">Date de validité :</span>
|
||||||
|
{# TODO API : Remplacer par la vraie variable #}
|
||||||
|
<span class="italic opacity-70">Ajouter la vraie valeur</span>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
{# Bloc "que souhaitez-vous faire ?" #}
|
||||||
|
<h2 class="text-2xl font-bold text-title mb-6 text-center sm:text-left">
|
||||||
|
Que souhaitez-vous faire ?
|
||||||
|
</h2>
|
||||||
|
{# Gestion du responsive #}
|
||||||
|
<div class="grid grid-cols-1 sm:grid-cols-2 gap-4 sm:gap-6">
|
||||||
|
|
||||||
|
{# LIGNE 1 : Profil & Offre #}
|
||||||
|
<a href="{{ path('app_user')|default('#') }}" class="group flex items-center p-5 bg-white border border-gris-clair rounded-xl shadow-sm hover:shadow-md hover:border-bouton transition-all duration-200">
|
||||||
|
<div class="flex-shrink-0 bg-blue-50 text-blue-600 rounded-lg p-3 group-hover:bg-blue-600 group-hover:text-white transition-colors">
|
||||||
|
<span class="text-2xl block">👤</span>
|
||||||
|
</div>
|
||||||
|
<div class="ml-4">
|
||||||
|
<h3 class="text-lg font-semibold text-title group-hover:text-bouton transition-colors">Mon Profil</h3>
|
||||||
|
<p class="text-sm text-gris-fonce">Consulter et modifier mes informations</p>
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
|
|
||||||
|
<a href="#" class="group flex items-center p-5 bg-white border border-gris-clair rounded-xl shadow-sm hover:shadow-md hover:border-bouton transition-all duration-200">
|
||||||
|
<div class="flex-shrink-0 bg-green-50 text-green-600 rounded-lg p-3 group-hover:bg-green-600 group-hover:text-white transition-colors">
|
||||||
|
<span class="text-2xl block">💳</span>
|
||||||
|
</div>
|
||||||
|
<div class="ml-4">
|
||||||
|
<h3 class="text-lg font-semibold text-title group-hover:text-bouton transition-colors">Mon Offre</h3>
|
||||||
|
<p class="text-sm text-gris-fonce">Gérer mon adhésion KAZ</p>
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
|
|
||||||
|
{# LIGNE 2 : Sécurité & Organisation/Contact #}
|
||||||
|
|
||||||
|
<a href="{{ path('app_user_edit_password') }}" class="group flex items-center p-5 bg-white border border-gris-clair rounded-xl shadow-sm hover:shadow-md hover:border-bouton transition-all duration-200">
|
||||||
|
<div class="flex-shrink-0 bg-orange-50 text-orange-600 rounded-lg p-3 group-hover:bg-orange-600 group-hover:text-white transition-colors">
|
||||||
|
<span class="text-2xl block">🔒</span>
|
||||||
|
</div>
|
||||||
|
<div class="ml-4">
|
||||||
|
<h3 class="text-lg font-semibold text-title group-hover:text-bouton transition-colors">Sécurité</h3>
|
||||||
|
<p class="text-sm text-gris-fonce">Modifier mes mots de passe</p>
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
|
|
||||||
|
{# Si la personne gère une asso, on montre l'organisation. Sinon, un bouton Contact pour garder la grille de 6 éléments équilibrée #}
|
||||||
|
{% if is_granted('ROLE_ADMIN_ORGANISATION') %}
|
||||||
|
<a href="#" class="group flex items-center p-5 bg-white border border-bouton/30 rounded-xl shadow-sm hover:shadow-md hover:border-bouton transition-all duration-200">
|
||||||
|
<div class="flex-shrink-0 bg-bouton/20 text-bouton rounded-lg p-3 group-hover:bg-bouton group-hover:text-white transition-colors">
|
||||||
|
<span class="text-2xl block">🏢</span>
|
||||||
|
</div>
|
||||||
|
<div class="ml-4">
|
||||||
|
<h3 class="text-lg font-semibold text-title group-hover:text-bouton transition-colors">Mon Organisation</h3>
|
||||||
|
<p class="text-sm text-gris-fonce">Espace de gestion du bureau</p>
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
|
{% else %}
|
||||||
|
<a href="https://kaz.bzh/contact/" class="group flex items-center p-5 bg-white border border-gris-clair rounded-xl shadow-sm hover:shadow-md hover:border-bouton transition-all duration-200">
|
||||||
|
<div class="flex-shrink-0 bg-purple-50 text-purple-600 rounded-lg p-3 group-hover:bg-purple-600 group-hover:text-white transition-colors">
|
||||||
|
<span class="text-2xl block">✉️</span>
|
||||||
|
</div>
|
||||||
|
<div class="ml-4">
|
||||||
|
<h3 class="text-lg font-semibold text-title group-hover:text-bouton transition-colors">Nous contacter</h3>
|
||||||
|
<p class="text-sm text-gris-fonce">Besoin d'aide ou d'assistance ?</p>
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% endblock %}
|
||||||
90
templates/security/login.html.twig
Normal file
90
templates/security/login.html.twig
Normal file
@@ -0,0 +1,90 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="fr">
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title>Page de connexion | Association KAZ</title>
|
||||||
|
|
||||||
|
{% block importmap %}{{ importmap('app') }}{% endblock %}
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body class="min-h-screen bg-bg-primaire font-sora text-text flex flex-col justify-between items-center p-4 sm:p-8">
|
||||||
|
<div class="flex-none"></div>
|
||||||
|
<main class="w-full max-w-md bg-white p-8 rounded-xl shadow-lg border border-gris-clair">
|
||||||
|
|
||||||
|
<header class="flex justify-center mb-6">
|
||||||
|
<img src="{{ asset('img/logo.svg') }}"
|
||||||
|
alt="Logo association"
|
||||||
|
class="h-16 md:h-24 w-auto object-contain">
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<h1 class="text-4xl text-center mb-8 font-caveat text-text">Se connecter</h1>
|
||||||
|
|
||||||
|
{% if error %}
|
||||||
|
<div class="bg-danger/10 border border-danger text-danger px-4 py-3 rounded-lg mb-6 text-sm" role="alert">
|
||||||
|
{{ error.messageKey|trans(error.messageData, 'security') }}
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
<form method="post" class="space-y-5">
|
||||||
|
{# champ adresse-mail #}
|
||||||
|
<div class="space-y-1">
|
||||||
|
<label for="username" class="block text-sm font-semibold text-text">
|
||||||
|
Adresse-mail :
|
||||||
|
</label>
|
||||||
|
<input type="email" value="{{ last_username }}" name="_username" id="username"
|
||||||
|
class="w-full px-4 py-3 border border-gris-clair rounded-lg focus:outline-none focus:border-bouton focus:ring-1 focus:ring-bouton placeholder-gris-moyen transition-shadow"
|
||||||
|
placeholder="Saisissez votre e-mail" required autofocus autocomplete="email">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{# champ "mot de passe" #}
|
||||||
|
<div class="space-y-1">
|
||||||
|
<label for="password" class="block text-sm font-semibold text-text">
|
||||||
|
Mot de passe :
|
||||||
|
</label>
|
||||||
|
<input type="password" name="_password" id="password"
|
||||||
|
class="w-full px-4 py-3 border border-gris-clair rounded-lg focus:outline-none focus:border-bouton focus:ring-1 focus:ring-bouton placeholder-gris-moyen transition-shadow"
|
||||||
|
placeholder="Saisissez votre mot de passe" required autocomplete="current-password">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{# checkbox "se souvenir de moi" #}
|
||||||
|
<div class="flex items-center pt-1">
|
||||||
|
<input type="checkbox" name="_remember_me" id="remember_me"
|
||||||
|
class="w-4 h-4 text-bouton border-gris-clair rounded focus:ring-bouton cursor-pointer">
|
||||||
|
<label for="remember_me" class="ml-2 text-sm text-gris-fonce cursor-pointer select-none">
|
||||||
|
Se souvenir de moi
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="flex flex-col sm:flex-row gap-4 pt-2">
|
||||||
|
<input type="hidden" name="_csrf_token" value="{{ csrf_token('authenticate') }}">
|
||||||
|
<button type="submit"
|
||||||
|
class="flex-1 py-3 bg-bouton hover:bg-bouton-hover text-text font-bold rounded-lg shadow transition-colors">
|
||||||
|
Se connecter
|
||||||
|
</button>
|
||||||
|
|
||||||
|
<a href="https://kaz.bzh/offres/"
|
||||||
|
target="_blank"
|
||||||
|
rel="noopener noreferrer"
|
||||||
|
class="flex-1 flex items-center justify-center py-3 border border-gris-moyen text-text hover:bg-gris-clair font-bold rounded-lg transition-colors text-center">
|
||||||
|
M'inscrire
|
||||||
|
</a>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="text-center pt-4">
|
||||||
|
{# TODO : faire route vers mot de passe oublié #}
|
||||||
|
<a href="#"
|
||||||
|
class="text-sm font-semibold text-title hover:text-bouton transition-colors">
|
||||||
|
Mot de passe oublié ?
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</main>
|
||||||
|
|
||||||
|
<footer class="mt-8 text-center text-sm text-gris-fonce w-full">
|
||||||
|
© {{ 'now'|date('Y') }} | Kaz, le numérique sobre, libre, éthique et local.
|
||||||
|
</footer>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
74
templates/user/edit_password.html.twig
Normal file
74
templates/user/edit_password.html.twig
Normal file
@@ -0,0 +1,74 @@
|
|||||||
|
{% extends 'base.html.twig' %}
|
||||||
|
|
||||||
|
{% block title %}Modifier mes mots de passe | {{ parent() }}{% endblock %}
|
||||||
|
|
||||||
|
{% block body %}
|
||||||
|
<div class="min-h-screen bg-bg-primaire flex items-center justify-center p-4 font-sora">
|
||||||
|
<div class="max-w-md w-full bg-white rounded-2xl shadow-xl p-8 border-t-4 border-bouton">
|
||||||
|
|
||||||
|
<h1 class="font-caveat text-4xl text-text mb-6 text-center">
|
||||||
|
Sécurité du compte
|
||||||
|
</h1>
|
||||||
|
|
||||||
|
{{ form_start(form) }}
|
||||||
|
<div class="space-y-4">
|
||||||
|
{# Champ Ancien Mot de Passe #}
|
||||||
|
<div class="space-y-1">
|
||||||
|
{{ form_label(form.oldPassword, 'Mot de passe actuel', {
|
||||||
|
'label_attr': {'class': 'block text-sm font-semibold text-text'}
|
||||||
|
}) }}
|
||||||
|
{{ form_widget(form.oldPassword, {
|
||||||
|
'attr': {'class': 'w-full px-4 py-3 border border-gris-clair rounded-lg focus:outline-none focus:border-bouton focus:ring-1 focus:ring-bouton placeholder-gris-moyen transition-shadow'}
|
||||||
|
}) }}
|
||||||
|
|
||||||
|
{# Affichage message pour les erreurs de saisie de l'ancien mot de passe #}
|
||||||
|
<div class="text-red-500 text-xs mt-1 italic">
|
||||||
|
{{ form_errors(form.oldPassword) }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{# Champs Nouveau Mot de Passe #}
|
||||||
|
<div class="space-y-4 pt-2">
|
||||||
|
{# Affichage de l'erreur si les deux champs ne correspondent pas #}
|
||||||
|
<div class="text-red-500 text-xs italic">
|
||||||
|
{{ form_errors(form.newPassword) }}
|
||||||
|
</div>
|
||||||
|
<div class="space-y-1">
|
||||||
|
{{ form_label(form.newPassword.first, 'Nouveau mot de passe', {
|
||||||
|
'label_attr': {'class': 'block text-sm font-semibold text-text'}
|
||||||
|
}) }}
|
||||||
|
{{ form_widget(form.newPassword.first, {
|
||||||
|
'attr': {'class': 'w-full px-4 py-3 border border-gris-clair rounded-lg focus:outline-none focus:border-bouton focus:ring-1 focus:ring-bouton transition-shadow'}
|
||||||
|
}) }}
|
||||||
|
|
||||||
|
{# Affichage de l'erreur de longueur (min 8 caractères) #}
|
||||||
|
<div class="text-red-500 text-xs mt-1 italic">
|
||||||
|
{{ form_errors(form.newPassword.first) }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="space-y-1">
|
||||||
|
{{ form_label(form.newPassword.second, 'Confirmer le nouveau mot de passe', {
|
||||||
|
'label_attr': {'class': 'block text-sm font-semibold text-text'}
|
||||||
|
}) }}
|
||||||
|
{{ form_widget(form.newPassword.second, {
|
||||||
|
'attr': {'class': 'w-full px-4 py-3 border border-gris-clair rounded-lg focus:outline-none focus:border-bouton focus:ring-1 focus:ring-bouton transition-shadow'}
|
||||||
|
}) }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="text-red-500 text-xs mt-1">
|
||||||
|
{{ form_errors(form.newPassword) }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{# Bouton de validation #}
|
||||||
|
<button type="submit"
|
||||||
|
class="w-full bg-bouton hover:bg-bouton-hover text-text font-bold py-3 rounded-lg shadow-md transition-colors mt-6">
|
||||||
|
Mettre à jour mon mot de passe
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
{{ form_end(form) }}
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% endblock %}
|
||||||
@@ -1,2 +1,135 @@
|
|||||||
{# templates/hellp.html.twig #}
|
{% extends 'base.html.twig' %}
|
||||||
<h1>Hello ! {{ name }}</h1>
|
|
||||||
|
{% block title %}Accueil | {{ parent() }}{% endblock %}
|
||||||
|
|
||||||
|
{% block body %}
|
||||||
|
<div class="min-h-screen bg-bg-primaire py-8 w-full font-sora">
|
||||||
|
|
||||||
|
{{ form_start(form, {'attr': {'class': 'max-w-6xl mx-auto px-4 sm:px-6 lg:px-8 grid md:grid-cols-3 gap-8'}}) }}
|
||||||
|
|
||||||
|
{# TODO: voir si c'est pertinent avec l'API et s'il y a l'utilité d'une photo de profil #}
|
||||||
|
{# Gestion de la colone avec le choix de la photo de profil #}
|
||||||
|
<div class="flex flex-col text-text items-center">
|
||||||
|
|
||||||
|
{# Affichage de la photo de profil #}
|
||||||
|
<div class="w-full md:w-64 flex-shrink-0 mt-20">
|
||||||
|
<div class="border-2 border-black p-1 bg-white shadow-[8px_8px_0px_0px_rgba(0,0,0,1)]">
|
||||||
|
{% if userData.photo %}
|
||||||
|
<img src="{{ asset('uploads/images/' ~ userData.photo) }}"
|
||||||
|
alt="Photo de profil"
|
||||||
|
class="w-full aspect-[4/3] object-cover">
|
||||||
|
{% else %}
|
||||||
|
<div class="w-full aspect-[4/3] bg-gray-50 flex items-center justify-center text-6xl">
|
||||||
|
👤
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<p class="text-2xl text-title font-caveat mt-4"> Ma photo</p>
|
||||||
|
|
||||||
|
{# Gestion du dépôt d'un fichier image #}
|
||||||
|
<div class="w-full mt-2">
|
||||||
|
{{ form_label(form.image, 'Choisir un fichier', {
|
||||||
|
'label_attr': {'class': 'block mb-2.5 text-sm font-medium text-gris-fonce'}
|
||||||
|
}) }}
|
||||||
|
{{ form_widget(form.image, {
|
||||||
|
'attr': {
|
||||||
|
'class': 'cursor-pointer bg-white border border-gris-clair text-text text-sm rounded-lg focus:outline-none focus:ring-1 focus:ring-bouton focus:border-bouton block w-full shadow-sm placeholder-gris-moyen file:mr-4 file:py-2.5 file:px-4 file:border-0 file:border-r file:border-gris-clair file:bg-gris-clair file:text-gris-fonce hover:file:bg-gris-moyen file:cursor-pointer transition-colors',
|
||||||
|
'aria-describedby': 'file_input_help'
|
||||||
|
}
|
||||||
|
}) }}
|
||||||
|
<p class="mt-1 text-sm text-gris-moyen" id="file_input_help">
|
||||||
|
JPG, JPEG ou PNG (Taille max : 2Mo).
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{# Gestion de la colonne avec les "infos persos" #}
|
||||||
|
<div class="md:col-span-2">
|
||||||
|
<h1 class="text-4xl font-caveat text-text mb-6 text-center sm:text-center">Mon profil</h1>
|
||||||
|
<h2 class="text-2xl font-caveat text-text mb-6 text-center sm:text-center">Mes informations personnelles</h2>
|
||||||
|
|
||||||
|
{# Gestion du formulaire qui regroupe toutes les infos perso #}
|
||||||
|
<div class="flex flex-col gap-6">
|
||||||
|
|
||||||
|
{# Champ NOM et Prénom #}
|
||||||
|
<div class="grid grid-cols-2 gap-4">
|
||||||
|
<div class="space-y-1">
|
||||||
|
{{ form_label(form.firstName, 'NOM :', {
|
||||||
|
'label_attr': {'class': 'block text-sm font-semibold text-text'}
|
||||||
|
}) }}
|
||||||
|
{{ form_widget(form.firstName, {
|
||||||
|
'attr': {'class': 'w-full px-4 py-3 border border-gris-clair rounded-lg focus:outline-none focus:border-bouton focus:ring-1 focus:ring-bouton placeholder-gris-moyen transition-shadow'}
|
||||||
|
}) }}
|
||||||
|
{# Implémentation d'un message d'errer en cas de problème #}
|
||||||
|
<div class="text-red-500 text-xs mt-1 italic font-sora">
|
||||||
|
{{ form_errors(form.firstName) }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="space-y-1">
|
||||||
|
{{ form_label(form.lastName, 'Prénom :', {
|
||||||
|
'label_attr': {'class': 'block text-sm font-semibold text-text'}
|
||||||
|
}) }}
|
||||||
|
{{ form_widget(form.lastName, {
|
||||||
|
'attr': {'class': 'w-full px-4 py-3 border border-gris-clair rounded-lg focus:outline-none focus:border-bouton focus:ring-1 focus:ring-bouton placeholder-gris-moyen transition-shadow'}
|
||||||
|
}) }}
|
||||||
|
{# Implémentation d'un message d'errer en cas de problème #}
|
||||||
|
<div class="text-red-500 text-xs mt-1 italic font-sora">
|
||||||
|
{{ form_errors(form.lastName) }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{# Champ Téléphone #}
|
||||||
|
<div class="space-y-1">
|
||||||
|
{{ form_label(form.telephone, 'Numéro de téléphone', {
|
||||||
|
'label_attr': {'class': 'block text-sm font-semibold text-text'}
|
||||||
|
}) }}
|
||||||
|
{{ form_widget(form.telephone) }}
|
||||||
|
{# Implémentation d'un message d'errer en cas de problème #}
|
||||||
|
<div class="text-red-500 text-xs mt-1 italic">
|
||||||
|
{{ form_errors(form.telephone) }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{# Champ E-mail #}
|
||||||
|
<div class="space-y-1">
|
||||||
|
{{ form_label(form.email, 'E-mail :', {
|
||||||
|
'label_attr': {'class': 'block text-sm font-semibold text-text'}
|
||||||
|
}) }}
|
||||||
|
{{ form_widget(form.email, {
|
||||||
|
'attr': {'class': 'w-full px-4 py-3 border border-gris-clair rounded-lg focus:outline-none focus:border-bouton focus:ring-1 focus:ring-bouton placeholder-gris-moyen transition-shadow'}
|
||||||
|
}) }}
|
||||||
|
{# Implémentation d'un message d'errer en cas de problème #}
|
||||||
|
<div class="text-red-500 text-xs mt-1 italic font-sora">
|
||||||
|
{{ form_errors(form.email) }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{# Champ E-mail de secours #}
|
||||||
|
<div class="space-y-1">
|
||||||
|
{{ form_label(form.alternateEmail, 'E-mail de secours :', {
|
||||||
|
'label_attr': {'class': 'block text-sm font-semibold text-text'}
|
||||||
|
}) }}
|
||||||
|
{{ form_widget(form.alternateEmail, {
|
||||||
|
'attr': {'class': 'w-full px-4 py-3 border border-gris-clair rounded-lg focus:outline-none focus:border-bouton focus:ring-1 focus:ring-bouton placeholder-gris-moyen transition-shadow'}
|
||||||
|
}) }}
|
||||||
|
{# Implémentation d'un message d'errer en cas de problème #}
|
||||||
|
<div class="text-red-500 text-xs mt-1 italic font-sora">
|
||||||
|
{{ form_errors(form.alternateEmail) }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="flex flex-col sm:flex-row gap-4 pt-2">
|
||||||
|
<button type="submit"
|
||||||
|
class="flex-1 py-3 bg-bouton hover:bg-bouton-hover text-text font-bold rounded-lg shadow transition-colors">
|
||||||
|
Valider
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{{ form_end(form) }}
|
||||||
|
</div>
|
||||||
|
{% endblock %}
|
||||||
|
|||||||
11
templates/user/profil_infos.html.twig
Normal file
11
templates/user/profil_infos.html.twig
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
{% extends 'base.html.twig' %}
|
||||||
|
|
||||||
|
{% block title %}Accueil | {{ parent() }}{% endblock %}
|
||||||
|
|
||||||
|
{% block body %}
|
||||||
|
<div class="min-h-screen bg-bg-primaire py-8 w-full font-sora">
|
||||||
|
<div>
|
||||||
|
<span>Identifiant : {{ user.identifiantKaz }}</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% endblock %}
|
||||||
0
translations/.gitignore
vendored
Normal file
0
translations/.gitignore
vendored
Normal file
Reference in New Issue
Block a user