Add sign-up form

master
Julien Rosset 5 years ago
parent 988cbba2d2
commit 9aff89e29a

4
.gitignore vendored

@ -20,3 +20,7 @@
npm-debug.log npm-debug.log
yarn-error.log yarn-error.log
###< symfony/webpack-encore-bundle ### ###< symfony/webpack-encore-bundle ###
###> liip/imagine-bundle ###
/public/media/cache/
###< liip/imagine-bundle ###

@ -25,9 +25,12 @@
<excludeFolder url="file://$MODULE_DIR$/vendor/doctrine/sql-formatter" /> <excludeFolder url="file://$MODULE_DIR$/vendor/doctrine/sql-formatter" />
<excludeFolder url="file://$MODULE_DIR$/vendor/easycorp/easy-log-handler" /> <excludeFolder url="file://$MODULE_DIR$/vendor/easycorp/easy-log-handler" />
<excludeFolder url="file://$MODULE_DIR$/vendor/egulias/email-validator" /> <excludeFolder url="file://$MODULE_DIR$/vendor/egulias/email-validator" />
<excludeFolder url="file://$MODULE_DIR$/vendor/imagine/imagine" />
<excludeFolder url="file://$MODULE_DIR$/vendor/jms/metadata" />
<excludeFolder url="file://$MODULE_DIR$/vendor/laminas/laminas-code" /> <excludeFolder url="file://$MODULE_DIR$/vendor/laminas/laminas-code" />
<excludeFolder url="file://$MODULE_DIR$/vendor/laminas/laminas-eventmanager" /> <excludeFolder url="file://$MODULE_DIR$/vendor/laminas/laminas-eventmanager" />
<excludeFolder url="file://$MODULE_DIR$/vendor/laminas/laminas-zendframework-bridge" /> <excludeFolder url="file://$MODULE_DIR$/vendor/laminas/laminas-zendframework-bridge" />
<excludeFolder url="file://$MODULE_DIR$/vendor/liip/imagine-bundle" />
<excludeFolder url="file://$MODULE_DIR$/vendor/monolog/monolog" /> <excludeFolder url="file://$MODULE_DIR$/vendor/monolog/monolog" />
<excludeFolder url="file://$MODULE_DIR$/vendor/nikic/php-parser" /> <excludeFolder url="file://$MODULE_DIR$/vendor/nikic/php-parser" />
<excludeFolder url="file://$MODULE_DIR$/vendor/ocramius/package-versions" /> <excludeFolder url="file://$MODULE_DIR$/vendor/ocramius/package-versions" />
@ -101,6 +104,7 @@
<excludeFolder url="file://$MODULE_DIR$/vendor/symfony/service-contracts" /> <excludeFolder url="file://$MODULE_DIR$/vendor/symfony/service-contracts" />
<excludeFolder url="file://$MODULE_DIR$/vendor/symfony/stopwatch" /> <excludeFolder url="file://$MODULE_DIR$/vendor/symfony/stopwatch" />
<excludeFolder url="file://$MODULE_DIR$/vendor/symfony/string" /> <excludeFolder url="file://$MODULE_DIR$/vendor/symfony/string" />
<excludeFolder url="file://$MODULE_DIR$/vendor/symfony/templating" />
<excludeFolder url="file://$MODULE_DIR$/vendor/symfony/test-pack" /> <excludeFolder url="file://$MODULE_DIR$/vendor/symfony/test-pack" />
<excludeFolder url="file://$MODULE_DIR$/vendor/symfony/translation" /> <excludeFolder url="file://$MODULE_DIR$/vendor/symfony/translation" />
<excludeFolder url="file://$MODULE_DIR$/vendor/symfony/translation-contracts" /> <excludeFolder url="file://$MODULE_DIR$/vendor/symfony/translation-contracts" />
@ -116,6 +120,7 @@
<excludeFolder url="file://$MODULE_DIR$/vendor/symfony/yaml" /> <excludeFolder url="file://$MODULE_DIR$/vendor/symfony/yaml" />
<excludeFolder url="file://$MODULE_DIR$/vendor/twig/extra-bundle" /> <excludeFolder url="file://$MODULE_DIR$/vendor/twig/extra-bundle" />
<excludeFolder url="file://$MODULE_DIR$/vendor/twig/twig" /> <excludeFolder url="file://$MODULE_DIR$/vendor/twig/twig" />
<excludeFolder url="file://$MODULE_DIR$/vendor/vich/uploader-bundle" />
<excludeFolder url="file://$MODULE_DIR$/vendor/webimpress/safe-writer" /> <excludeFolder url="file://$MODULE_DIR$/vendor/webimpress/safe-writer" />
<excludeFolder url="file://$MODULE_DIR$/vendor/webmozart/assert" /> <excludeFolder url="file://$MODULE_DIR$/vendor/webmozart/assert" />
</content> </content>

@ -114,6 +114,11 @@
<path value="$PROJECT_DIR$/vendor/symfony/polyfill-php80" /> <path value="$PROJECT_DIR$/vendor/symfony/polyfill-php80" />
<path value="$PROJECT_DIR$/vendor/symfony/deprecation-contracts" /> <path value="$PROJECT_DIR$/vendor/symfony/deprecation-contracts" />
<path value="$PROJECT_DIR$/vendor/doctrine/sql-formatter" /> <path value="$PROJECT_DIR$/vendor/doctrine/sql-formatter" />
<path value="$PROJECT_DIR$/vendor/symfony/templating" />
<path value="$PROJECT_DIR$/vendor/jms/metadata" />
<path value="$PROJECT_DIR$/vendor/liip/imagine-bundle" />
<path value="$PROJECT_DIR$/vendor/imagine/imagine" />
<path value="$PROJECT_DIR$/vendor/vich/uploader-bundle" />
</include_path> </include_path>
</component> </component>
<component name="PhpProjectSharedConfiguration" php_language_level="7.4" /> <component name="PhpProjectSharedConfiguration" php_language_level="7.4" />

@ -1,7 +1,7 @@
form { form {
text-align: left; text-align: left;
label { .col-form-label {
text-align: right; text-align: right;
} }
@ -9,3 +9,16 @@ form {
text-align: center; text-align: center;
} }
} }
.invalid-feedback, .valid-feedback {
width: 600%;
text-align: left;
}
.col-form-label.required {
color: rgb(200, 0, 0);
&::before {
content: '* ';
}
}

@ -0,0 +1,14 @@
body {
text-align: center;
}
#sign-up {
width: 50%;
border: 1px solid rgba(0, 0, 0, .25);
padding: 10px;
margin: 0 auto;
fieldset {
margin-top: 20px;
}
}

@ -0,0 +1,5 @@
import bsCustomFileInput from 'bs-custom-file-input';
$(document).ready(function () {
bsCustomFileInput.init();
});

@ -0,0 +1,2 @@
require('../../css/pages/security/sign-up.scss');
require('../../js/forms-file.js');

@ -11,6 +11,7 @@
"doctrine/doctrine-bundle": "*", "doctrine/doctrine-bundle": "*",
"doctrine/doctrine-migrations-bundle": "2.*.*", "doctrine/doctrine-migrations-bundle": "2.*.*",
"doctrine/orm": "*", "doctrine/orm": "*",
"liip/imagine-bundle": "^2.3",
"sensio/framework-extra-bundle": "^5.5", "sensio/framework-extra-bundle": "^5.5",
"symfony/apache-pack": "^1.0", "symfony/apache-pack": "^1.0",
"symfony/asset": "5.*.*", "symfony/asset": "5.*.*",
@ -37,7 +38,8 @@
"symfony/validator": "5.*.*", "symfony/validator": "5.*.*",
"symfony/web-link": "5.*.*", "symfony/web-link": "5.*.*",
"symfony/webpack-encore-bundle": "^1.7", "symfony/webpack-encore-bundle": "^1.7",
"symfony/yaml": "5.*.*" "symfony/yaml": "5.*.*",
"vich/uploader-bundle": "^1.14"
}, },
"require-dev": { "require-dev": {
"symfony/debug-pack": "*", "symfony/debug-pack": "*",

510
composer.lock generated

@ -4,23 +4,23 @@
"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": "b95652040ba10ba1825a39e3277a3516", "content-hash": "bc0c41b59b1d77103f486d35f01f35ff",
"packages": [ "packages": [
{ {
"name": "doctrine/annotations", "name": "doctrine/annotations",
"version": "1.10.3", "version": "1.10.3",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/doctrine/annotations.git", "url": "https://github.com/doctrine/annotations.git",
"reference": "5db60a4969eba0e0c197a19c077780aadbc43c5d" "reference": "5db60a4969eba0e0c197a19c077780aadbc43c5d"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/doctrine/annotations/zipball/5db60a4969eba0e0c197a19c077780aadbc43c5d", "url": "https://api.github.com/repos/doctrine/annotations/zipball/5db60a4969eba0e0c197a19c077780aadbc43c5d",
"reference": "5db60a4969eba0e0c197a19c077780aadbc43c5d", "reference": "5db60a4969eba0e0c197a19c077780aadbc43c5d",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"doctrine/lexer": "1.*", "doctrine/lexer": "1.*",
"ext-tokenizer": "*", "ext-tokenizer": "*",
"php": "^7.1 || ^8.0" "php": "^7.1 || ^8.0"
@ -1254,36 +1254,152 @@
} }
}, },
"notification-url": "https://packagist.org/downloads/", "notification-url": "https://packagist.org/downloads/",
"license": [ "license": [
"MIT" "MIT"
], ],
"authors": [ "authors": [
{ {
"name": "Eduardo Gulias Davis" "name": "Eduardo Gulias Davis"
} }
], ],
"description": "A library for validating emails against several RFCs", "description": "A library for validating emails against several RFCs",
"homepage": "https://github.com/egulias/EmailValidator", "homepage": "https://github.com/egulias/EmailValidator",
"keywords": [ "keywords": [
"email", "email",
"emailvalidation", "emailvalidation",
"emailvalidator", "emailvalidator",
"validation", "validation",
"validator" "validator"
], ],
"time": "2020-06-16T20:11:17+00:00" "time": "2020-06-16T20:11:17+00:00"
}, },
{ {
"name": "laminas/laminas-code", "name": "imagine/imagine",
"version": "3.4.1", "version": "1.2.3",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/laminas/laminas-code.git", "url": "https://github.com/avalanche123/Imagine.git",
"reference": "cb2361e5bb4410b681462d8e4f912bc5dabf84ab"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/avalanche123/Imagine/zipball/cb2361e5bb4410b681462d8e4f912bc5dabf84ab",
"reference": "cb2361e5bb4410b681462d8e4f912bc5dabf84ab",
"shasum": ""
},
"require": {
"php": ">=5.3.2"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "2.2.*",
"phpunit/phpunit": "^4.8 || ^5.7 || ^6.5 || ^7.5 || ^8.4"
},
"suggest": {
"ext-gd": "to use the GD implementation",
"ext-gmagick": "to use the Gmagick implementation",
"ext-imagick": "to use the Imagick implementation"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-develop": "0.7-dev"
}
},
"autoload": {
"psr-4": {
"Imagine\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Bulat Shakirzyanov",
"email": "mallluhuct@gmail.com",
"homepage": "http://avalanche123.com"
}
],
"description": "Image processing for PHP 5.3",
"homepage": "http://imagine.readthedocs.org/",
"keywords": [
"drawing",
"graphics",
"image manipulation",
"image processing"
],
"time": "2019-12-04T09:55:33+00:00"
},
{
"name": "jms/metadata",
"version": "2.3.0",
"source": {
"type": "git",
"url": "https://github.com/schmittjoh/metadata.git",
"reference": "6eb35fce7142234946d58d13e1aa829e9b78b095"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/schmittjoh/metadata/zipball/6eb35fce7142234946d58d13e1aa829e9b78b095",
"reference": "6eb35fce7142234946d58d13e1aa829e9b78b095",
"shasum": ""
},
"require": {
"php": "^7.2"
},
"require-dev": {
"doctrine/cache": "^1.0",
"doctrine/coding-standard": "^4.0",
"phpunit/phpunit": "^7.0",
"symfony/cache": "^3.1|^4.0|^5.0",
"symfony/dependency-injection": "^3.1|^4.0|^5.0"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "2.x-dev"
}
},
"autoload": {
"psr-4": {
"Metadata\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Johannes M. Schmitt",
"email": "schmittjoh@gmail.com"
},
{
"name": "Asmir Mustafic",
"email": "goetas@gmail.com"
}
],
"description": "Class/method/property metadata management in PHP",
"keywords": [
"annotations",
"metadata",
"xml",
"yaml"
],
"time": "2020-06-06T16:52:59+00:00"
},
{
"name": "laminas/laminas-code",
"version": "3.4.1",
"source": {
"type": "git",
"url": "https://github.com/laminas/laminas-code.git",
"reference": "1cb8f203389ab1482bf89c0e70a04849bacd7766" "reference": "1cb8f203389ab1482bf89c0e70a04849bacd7766"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/laminas/laminas-code/zipball/1cb8f203389ab1482bf89c0e70a04849bacd7766", "url": "https://api.github.com/repos/laminas/laminas-code/zipball/1cb8f203389ab1482bf89c0e70a04849bacd7766",
"reference": "1cb8f203389ab1482bf89c0e70a04849bacd7766", "reference": "1cb8f203389ab1482bf89c0e70a04849bacd7766",
"shasum": "" "shasum": ""
}, },
@ -1423,7 +1539,7 @@
"module": "Laminas\\ZendFrameworkBridge" "module": "Laminas\\ZendFrameworkBridge"
} }
}, },
"autoload": { "autoload": {
"files": [ "files": [
"src/autoload.php" "src/autoload.php"
], ],
@ -1432,29 +1548,128 @@
} }
}, },
"notification-url": "https://packagist.org/downloads/", "notification-url": "https://packagist.org/downloads/",
"license": [ "license": [
"BSD-3-Clause" "BSD-3-Clause"
], ],
"description": "Alias legacy ZF class names to Laminas Project equivalents.", "description": "Alias legacy ZF class names to Laminas Project equivalents.",
"keywords": [ "keywords": [
"ZendFramework", "ZendFramework",
"autoloading", "autoloading",
"laminas", "laminas",
"zf" "zf"
], ],
"time": "2020-05-20T16:45:56+00:00" "time": "2020-05-20T16:45:56+00:00"
}, },
{ {
"name": "monolog/monolog", "name": "liip/imagine-bundle",
"version": "2.3.1",
"source": {
"type": "git",
"url": "https://github.com/liip/LiipImagineBundle.git",
"reference": "d0819fc9b1cd4e9e16db204467b6fe1a5316a163"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/liip/LiipImagineBundle/zipball/d0819fc9b1cd4e9e16db204467b6fe1a5316a163",
"reference": "d0819fc9b1cd4e9e16db204467b6fe1a5316a163",
"shasum": ""
},
"require": {
"imagine/imagine": "^0.7.1|^1.1",
"php": "^7.1",
"symfony/filesystem": "^3.4|^4.3|^5.0",
"symfony/finder": "^3.4|^4.3|^5.0",
"symfony/framework-bundle": "^3.4|^4.3|^5.0",
"symfony/mime": "^4.3|^5.0",
"symfony/options-resolver": "^3.4|^4.3|^5.0",
"symfony/process": "^3.4|^4.3|^5.0",
"symfony/templating": "^3.4|^4.3|^5.0",
"twig/twig": "^1.40|^2.9|^3.0"
},
"require-dev": {
"amazonwebservices/aws-sdk-for-php": "^1.0",
"aws/aws-sdk-php": "^2.4",
"doctrine/cache": "^1.1",
"doctrine/orm": "^2.3",
"enqueue/enqueue-bundle": "^0.9|^0.10",
"ext-gd": "*",
"friendsofphp/php-cs-fixer": "^2.10",
"league/flysystem": "^1.0",
"psr/log": "^1.0",
"symfony/browser-kit": "^3.4|^4.3|^5.0",
"symfony/console": "^3.4|^4.3|^5.0",
"symfony/dependency-injection": "^3.4|^4.3|^5.0",
"symfony/form": "^3.4|^4.3|^5.0",
"symfony/phpunit-bridge": "^4.3|^5.0",
"symfony/validator": "^3.4|^4.3|^5.0",
"symfony/yaml": "^3.4|^4.3|^5.0"
},
"suggest": {
"alcaeus/mongo-php-adapter": "required on PHP >= 7.0 to use mongo components with mongodb extension",
"amazonwebservices/aws-sdk-for-php": "required to use AWS version 1 cache resolver",
"aws/aws-sdk-php": "required to use AWS version 2/3 cache resolver",
"doctrine/mongodb-odm": "required to use mongodb-backed doctrine components",
"enqueue/enqueue-bundle": "^0.9 add if you like to process images in background",
"ext-exif": "required to read EXIF metadata from images",
"ext-gd": "required to use gd driver",
"ext-gmagick": "required to use gmagick driver",
"ext-imagick": "required to use imagick driver",
"ext-mongo": "required for mongodb components on PHP <7.0",
"ext-mongodb": "required for mongodb components on PHP >=7.0",
"league/flysystem": "required to use FlySystem data loader or cache resolver",
"monolog/monolog": "A psr/log compatible logger is required to enable logging"
},
"type": "symfony-bundle",
"extra": {
"branch-alias": {
"dev-1.0": "1.7-dev",
"dev-master": "2.x-dev"
}
},
"autoload": {
"psr-4": {
"Liip\\ImagineBundle\\": ""
},
"exclude-from-classmap": [
"/Tests/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Liip and other contributors",
"homepage": "https://github.com/liip/LiipImagineBundle/contributors"
}
],
"description": "This bundle provides an image manipulation abstraction toolkit for Symfony-based projects.",
"homepage": "http://liip.ch",
"keywords": [
"bundle",
"image",
"imagine",
"liip",
"manipulation",
"photos",
"pictures",
"symfony",
"transformation"
],
"time": "2020-06-26T05:55:54+00:00"
},
{
"name": "monolog/monolog",
"version": "2.1.0", "version": "2.1.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/Seldaek/monolog.git", "url": "https://github.com/Seldaek/monolog.git",
"reference": "38914429aac460e8e4616c8cb486ecb40ec90bb1" "reference": "38914429aac460e8e4616c8cb486ecb40ec90bb1"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/Seldaek/monolog/zipball/38914429aac460e8e4616c8cb486ecb40ec90bb1", "url": "https://api.github.com/repos/Seldaek/monolog/zipball/38914429aac460e8e4616c8cb486ecb40ec90bb1",
"reference": "38914429aac460e8e4616c8cb486ecb40ec90bb1", "reference": "38914429aac460e8e4616c8cb486ecb40ec90bb1",
"shasum": "" "shasum": ""
}, },
@ -5544,16 +5759,72 @@
"time": "2020-06-11T12:16:36+00:00" "time": "2020-06-11T12:16:36+00:00"
}, },
{ {
"name": "symfony/translation", "name": "symfony/templating",
"version": "v5.1.2", "version": "v5.1.2",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/translation.git", "url": "https://github.com/symfony/templating.git",
"reference": "d3f0347e70029067ab690bfa9ff121c1c929ee4e"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/templating/zipball/d3f0347e70029067ab690bfa9ff121c1c929ee4e",
"reference": "d3f0347e70029067ab690bfa9ff121c1c929ee4e",
"shasum": ""
},
"require": {
"php": ">=7.2.5",
"symfony/polyfill-ctype": "~1.8"
},
"require-dev": {
"psr/log": "~1.0"
},
"suggest": {
"psr/log-implementation": "For using debug logging in loaders"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "5.1-dev"
}
},
"autoload": {
"psr-4": {
"Symfony\\Component\\Templating\\": ""
},
"exclude-from-classmap": [
"/Tests/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Fabien Potencier",
"email": "fabien@symfony.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Symfony Templating Component",
"homepage": "https://symfony.com",
"time": "2020-05-28T08:20:44+00:00"
},
{
"name": "symfony/translation",
"version": "v5.1.2",
"source": {
"type": "git",
"url": "https://github.com/symfony/translation.git",
"reference": "d387f07d4c15f9c09439cf3f13ddbe0b2c5e8be2" "reference": "d387f07d4c15f9c09439cf3f13ddbe0b2c5e8be2"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/translation/zipball/d387f07d4c15f9c09439cf3f13ddbe0b2c5e8be2", "url": "https://api.github.com/repos/symfony/translation/zipball/d387f07d4c15f9c09439cf3f13ddbe0b2c5e8be2",
"reference": "d387f07d4c15f9c09439cf3f13ddbe0b2c5e8be2", "reference": "d387f07d4c15f9c09439cf3f13ddbe0b2c5e8be2",
"shasum": "" "shasum": ""
}, },
@ -6393,18 +6664,18 @@
}, },
"require-dev": { "require-dev": {
"twig/cssinliner-extra": "^2.12|^3.0", "twig/cssinliner-extra": "^2.12|^3.0",
"twig/html-extra": "^2.12|^3.0", "twig/html-extra": "^2.12|^3.0",
"twig/inky-extra": "^2.12|^3.0", "twig/inky-extra": "^2.12|^3.0",
"twig/intl-extra": "^2.12|^3.0", "twig/intl-extra": "^2.12|^3.0",
"twig/markdown-extra": "^2.12|^3.0" "twig/markdown-extra": "^2.12|^3.0"
}, },
"type": "symfony-bundle", "type": "symfony-bundle",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-master": "3.0-dev" "dev-master": "3.0-dev"
} }
}, },
"autoload": { "autoload": {
"psr-4": { "psr-4": {
"Twig\\Extra\\TwigExtraBundle\\": "src/" "Twig\\Extra\\TwigExtraBundle\\": "src/"
} }
@ -6431,35 +6702,35 @@
"time": "2020-05-21T09:56:39+00:00" "time": "2020-05-21T09:56:39+00:00"
}, },
{ {
"name": "twig/twig", "name": "twig/twig",
"version": "v3.0.4", "version": "v3.0.4",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/twigphp/Twig.git", "url": "https://github.com/twigphp/Twig.git",
"reference": "582bdbdc173027ebfba3c93dc750a40b8f9ebc02" "reference": "582bdbdc173027ebfba3c93dc750a40b8f9ebc02"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/twigphp/Twig/zipball/582bdbdc173027ebfba3c93dc750a40b8f9ebc02", "url": "https://api.github.com/repos/twigphp/Twig/zipball/582bdbdc173027ebfba3c93dc750a40b8f9ebc02",
"reference": "582bdbdc173027ebfba3c93dc750a40b8f9ebc02", "reference": "582bdbdc173027ebfba3c93dc750a40b8f9ebc02",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": ">=7.2.5", "php": ">=7.2.5",
"symfony/polyfill-ctype": "^1.8", "symfony/polyfill-ctype": "^1.8",
"symfony/polyfill-mbstring": "^1.3" "symfony/polyfill-mbstring": "^1.3"
}, },
"require-dev": { "require-dev": {
"psr/container": "^1.0", "psr/container": "^1.0",
"symfony/phpunit-bridge": "^4.4.9|^5.0.9" "symfony/phpunit-bridge": "^4.4.9|^5.0.9"
}, },
"type": "library", "type": "library",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-master": "3.0-dev" "dev-master": "3.0-dev"
} }
}, },
"autoload": { "autoload": {
"psr-4": { "psr-4": {
"Twig\\": "src/" "Twig\\": "src/"
} }
@ -6485,24 +6756,123 @@
"role": "Project Founder" "role": "Project Founder"
} }
], ],
"description": "Twig, the flexible, fast, and secure template language for PHP", "description": "Twig, the flexible, fast, and secure template language for PHP",
"homepage": "https://twig.symfony.com", "homepage": "https://twig.symfony.com",
"keywords": [ "keywords": [
"templating" "templating"
], ],
"time": "2020-07-05T13:18:14+00:00" "time": "2020-07-05T13:18:14+00:00"
}, },
{ {
"name": "webimpress/safe-writer", "name": "vich/uploader-bundle",
"version": "2.0.1", "version": "1.14.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/webimpress/safe-writer.git", "url": "https://github.com/dustin10/VichUploaderBundle.git",
"reference": "8e9b4402a959983fd7effddae1dd81d587687d96"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/dustin10/VichUploaderBundle/zipball/8e9b4402a959983fd7effddae1dd81d587687d96",
"reference": "8e9b4402a959983fd7effddae1dd81d587687d96",
"shasum": ""
},
"require": {
"ext-simplexml": "*",
"jms/metadata": "^2.1",
"php": "^7.2",
"symfony/config": "^4.4 || ^5.0",
"symfony/console": "^4.4 || ^5.0",
"symfony/dependency-injection": "^4.4 || ^5.0",
"symfony/event-dispatcher-contracts": "^1.1 || ^2.0",
"symfony/form": "^4.4 || ^5.0",
"symfony/http-foundation": "^4.4 || ^5.0",
"symfony/http-kernel": "^4.4 || ^5.0",
"symfony/mime": "^4.4 || ^5.0",
"symfony/property-access": "^4.4 || ^5.0",
"symfony/string": "^5.0"
},
"require-dev": {
"alcaeus/mongo-php-adapter": "^1.1",
"doctrine/doctrine-bundle": "^2.0.3",
"doctrine/mongodb-odm": "^1.2",
"doctrine/orm": "^2.7",
"ext-sqlite3": "*",
"knplabs/knp-gaufrette-bundle": "^0.7",
"kphoen/rusty": "dev-update-php-parser",
"league/flysystem-bundle": "^1.4",
"league/flysystem-memory": "^1.0",
"matthiasnoback/symfony-dependency-injection-test": "^4.1",
"mikey179/vfsstream": "^1.6",
"oneup/flysystem-bundle": "^3.3",
"phpunit/phpunit": "^8.5",
"symfony/asset": "^4.4 || ^5.0",
"symfony/browser-kit": "^4.4 || ^5.0",
"symfony/css-selector": "^4.4 || ^5.0",
"symfony/doctrine-bridge": "^4.4 || ^5.0",
"symfony/dom-crawler": "^4.4 || ^5.0",
"symfony/framework-bundle": "^4.4 || ^5.0",
"symfony/phpunit-bridge": "^4.3 || ^5.0",
"symfony/security-csrf": "^4.4 || ^5.0",
"symfony/translation": "^4.4 || ^5.0",
"symfony/twig-bridge": "^4.4 || ^5.0",
"symfony/twig-bundle": "^4.4 || ^5.0",
"symfony/validator": "^4.4 || ^5.0",
"symfony/var-dumper": "^4.4 || ^5.0",
"symfony/yaml": "^4.4 || ^5.0"
},
"suggest": {
"doctrine/doctrine-bundle": "For integration with Doctrine",
"doctrine/mongodb-odm-bundle": "For integration with Doctrine ODM",
"doctrine/orm": "For integration with Doctrine ORM",
"doctrine/phpcr-odm": "For integration with Doctrine PHPCR",
"knplabs/knp-gaufrette-bundle": "For integration with Gaufrette",
"liip/imagine-bundle": "To generate image thumbnails",
"ocramius/proxy-manager": "To use lazy services",
"oneup/flysystem-bundle": "For integration with Flysystem",
"symfony/asset": "To generate better links",
"symfony/yaml": "To use YAML mapping"
},
"type": "symfony-bundle",
"extra": {
"branch-alias": {
"dev-master": "1.15.x-dev"
}
},
"autoload": {
"psr-4": {
"Vich\\UploaderBundle\\": "src"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Dustin Dobervich",
"email": "ddobervich@gmail.com"
}
],
"description": "Ease file uploads attached to entities",
"homepage": "https://github.com/dustin10/VichUploaderBundle",
"keywords": [
"file uploads",
"upload"
],
"time": "2020-06-12T08:48:15+00:00"
},
{
"name": "webimpress/safe-writer",
"version": "2.0.1",
"source": {
"type": "git",
"url": "https://github.com/webimpress/safe-writer.git",
"reference": "d6e879960febb307c112538997316371f1e95b12" "reference": "d6e879960febb307c112538997316371f1e95b12"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/webimpress/safe-writer/zipball/d6e879960febb307c112538997316371f1e95b12", "url": "https://api.github.com/repos/webimpress/safe-writer/zipball/d6e879960febb307c112538997316371f1e95b12",
"reference": "d6e879960febb307c112538997316371f1e95b12", "reference": "d6e879960febb307c112538997316371f1e95b12",
"shasum": "" "shasum": ""
}, },

@ -1,16 +1,18 @@
<?php <?php
return [ return [
Symfony\Bundle\FrameworkBundle\FrameworkBundle::class => ['all' => true], Symfony\Bundle\FrameworkBundle\FrameworkBundle::class => ['all' => true],
Symfony\Bundle\TwigBundle\TwigBundle::class => ['all' => true], Symfony\Bundle\TwigBundle\TwigBundle::class => ['all' => true],
Twig\Extra\TwigExtraBundle\TwigExtraBundle::class => ['all' => true], Twig\Extra\TwigExtraBundle\TwigExtraBundle::class => ['all' => true],
Symfony\Bundle\WebProfilerBundle\WebProfilerBundle::class => ['dev' => true, 'test' => true], Symfony\Bundle\WebProfilerBundle\WebProfilerBundle::class => ['dev' => true, 'test' => true],
Symfony\Bundle\MonologBundle\MonologBundle::class => ['all' => true], Symfony\Bundle\MonologBundle\MonologBundle::class => ['all' => true],
Symfony\Bundle\DebugBundle\DebugBundle::class => ['dev' => true, 'test' => true], Symfony\Bundle\DebugBundle\DebugBundle::class => ['dev' => true, 'test' => true],
Doctrine\Bundle\DoctrineBundle\DoctrineBundle::class => ['all' => true], Doctrine\Bundle\DoctrineBundle\DoctrineBundle::class => ['all' => true],
Doctrine\Bundle\MigrationsBundle\DoctrineMigrationsBundle::class => ['all' => true], Doctrine\Bundle\MigrationsBundle\DoctrineMigrationsBundle::class => ['all' => true],
Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle::class => ['all' => true], Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle::class => ['all' => true],
Symfony\Bundle\SecurityBundle\SecurityBundle::class => ['all' => true], Symfony\Bundle\SecurityBundle\SecurityBundle::class => ['all' => true],
Symfony\Bundle\MakerBundle\MakerBundle::class => ['dev' => true], Symfony\Bundle\MakerBundle\MakerBundle::class => ['dev' => true],
Symfony\WebpackEncoreBundle\WebpackEncoreBundle::class => ['all' => true], Symfony\WebpackEncoreBundle\WebpackEncoreBundle::class => ['all' => true],
Vich\UploaderBundle\VichUploaderBundle::class => ['all' => true],
Liip\ImagineBundle\LiipImagineBundle::class => ['all' => true],
]; ];

@ -0,0 +1,14 @@
liip_imagine:
driver: "gd"
resolvers:
default:
web_path: ~
filter_sets:
cache: ~
user_avater:
filters:
scale:
dim: [120, 120]

@ -1,7 +1,3 @@
framework: framework:
router: router:
utf8: true utf8: true
# Configure how to generate URLs in non-HTTP contexts, such as CLI commands.
# See https://symfony.com/doc/current/routing.html#generating-urls-in-commands
#default_uri: http://localhost

@ -1,7 +1,7 @@
security: security:
encoders: encoders:
App\Entity\User: App\Entity\User:
algorithm: auto algorithm: bcrypt
providers: providers:
app_user_provider: app_user_provider:
entity: entity:

@ -1,3 +1,4 @@
twig: twig:
default_path: '%kernel.project_dir%/templates' default_path: '%kernel.project_dir%/templates'
form_themes: ['bootstrap_4_horizontal_layout.html.twig'] form_themes:
- 'bootstrap_4_horizontal_layout.html.twig'

@ -0,0 +1,9 @@
vich_uploader:
db_driver: orm
mappings:
user_avatar:
namer: Vich\UploaderBundle\Naming\UniqidNamer
upload_destination: "%kernel.project_dir%/public/files/user_avatar"
uri_prefix: /files/user_avatar
inject_on_load: true

@ -0,0 +1,2 @@
_liip_imagine:
resource: "@LiipImagineBundle/Resources/config/routing.yaml"

@ -26,3 +26,6 @@ services:
# add more service definitions when explicit configuration is needed # add more service definitions when explicit configuration is needed
# please note that last definitions always *replace* previous ones # please note that last definitions always *replace* previous ones
App\Doctrine\CryptPasswordListener:
tags:
- { name: 'doctrine.event_subscriber' }

@ -19,7 +19,8 @@
}, },
"dependencies": { "dependencies": {
"@fortawesome/fontawesome-free": "^5.13.0", "@fortawesome/fontawesome-free": "^5.13.0",
"jquery": "^3.5.1", "bs-custom-file-input": "^1.3.4",
"jquery-ui": "^1.12.1" "jquery": "^3.5.1",
"jquery-ui": "^1.12.1"
} }
} }

@ -2,9 +2,12 @@
namespace App\Controller; namespace App\Controller;
use App\Entity\User;
use App\Form\SecuritySignInForm; use App\Form\SecuritySignInForm;
use App\Form\SecuritySignUpForm;
use Exception; use Exception;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route; use Symfony\Component\Routing\Annotation\Route;
use Symfony\Component\Security\Http\Authentication\AuthenticationUtils; use Symfony\Component\Security\Http\Authentication\AuthenticationUtils;
@ -55,8 +58,34 @@ class SecurityController extends AbstractController {
/** /**
* Show inscription form * Show inscription form
* *
* @param Request $request The request object
*
* @return Response Page response
*
* @Route("/sign-up") * @Route("/sign-up")
*/ */
public function sign_up () { public function sign_up (Request $request) {
$user = new User();
$user->setLanguage($request->getLocale());
$form = $this->createForm(SecuritySignUpForm::class, $user);
$form->handleRequest($request);
if ($form->isSubmitted() && $form->isValid()) {
$user = $form->getData();
$doctrine = $this->getDoctrine()->getManager();
$doctrine->persist($user);
$doctrine->flush();
return $this->redirectToRoute('app_security_sign_in');
}
return $this->render(
'security/sign-up.html.twig',
[
'form' => $form->createView(),
]
);
} }
} }

@ -0,0 +1,105 @@
<?php
namespace App\Doctrine;
use App\Entity\User;
use Doctrine\Common\EventSubscriber;
use Doctrine\ORM\Event\LifecycleEventArgs;
use Symfony\Component\Security\Core\Encoder\UserPasswordEncoderInterface;
/**
* Automatically encrypt user password
*
* This is a Doctrine event listener, to ensure the password is *always* encrypted
*
* @package App\Doctrine
* @see User
*
*/
class CryptPasswordListener implements EventSubscriber {
/**
* @var UserPasswordEncoderInterface The user's password encoder service
*/
private UserPasswordEncoderInterface $passwordEncoder;
/**
* Class constructor
*
* Called using auto-wiring
*
* @param UserPasswordEncoderInterface $passwordEncoder The user's password encoder service
*/
public function __construct (UserPasswordEncoderInterface $passwordEncoder) {
$this->passwordEncoder = $passwordEncoder;
}
/**
* @inheritDoc
*/
public function getSubscribedEvents (): array {
return [
'prePersist',
'preUpdate',
];
}
/**
* When entity is inserted in database
*
* Automatically called by Doctrine
*
* @param LifecycleEventArgs $eventArgs The event arguments
*/
public function prePersist (LifecycleEventArgs $eventArgs): void {
// Check if entity is a User, else do nothing
$entity = $eventArgs->getEntity();
if (!$entity instanceof User) {
return;
}
$this->encodePassword($entity);
}
/**
* When entity is updated in database
*
* Automatically called by Doctrine
*
* @param LifecycleEventArgs $eventArgs The event arguments
*/
public function preUpdate (LifecycleEventArgs $eventArgs): void {
// Check if entity is a User, else do nothing
$entity = $eventArgs->getEntity();
if (!$entity instanceof User) {
return;
}
$this->encodePassword($entity);
// Force update of entity
$doctrine = $eventArgs->getEntityManager();
$doctrine->getUnitOfWork()->recomputeSingleEntityChangeSet(
$doctrine->getClassMetadata(get_class($entity)),
$entity
);
}
/**
* Perform teh password encryption (if necessary)
*
* @param User $user The user
*/
private function encodePassword (User $user): void {
// Mot de passe modifié ?
if (empty($user->getPlainPassword())) {
return;
}
// Crypt the password
$user->setPassword(
$this->passwordEncoder->encodePassword(
$user,
$user->getPlainPassword()
)
);
}
}

@ -1,36 +0,0 @@
<?php
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass="App\Repository\LanguageRepository")
*/
class Language {
/**
* @ORM\Id()
* @ORM\GeneratedValue()
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="string", length=50)
*/
private $name;
public function getId (): ?int {
return $this->id;
}
public function getName (): ?string {
return $this->name;
}
public function setName (string $name): self {
$this->name = $name;
return $this;
}
}

@ -1,16 +1,27 @@
<?php <?php
/** @noinspection PhpPrivateFieldCanBeLocalVariableInspection */
namespace App\Entity; namespace App\Entity;
use DateTimeImmutable;
use DateTimeInterface;
use Doctrine\Common\Collections\ArrayCollection; use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection; use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM; use Doctrine\ORM\Mapping as ORM;
use InvalidArgumentException;
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
use Symfony\Component\HttpFoundation\File\File;
use Symfony\Component\Security\Core\User\UserInterface; use Symfony\Component\Security\Core\User\UserInterface;
use Symfony\Component\Validator\Constraints as Assert;
use Vich\UploaderBundle\Entity\File as VichEmbeddedFile;
use Vich\UploaderBundle\Mapping\Annotation as Vich;
/** /**
* User entity * User entity
* *
* @ORM\Entity(repositoryClass="App\Repository\UserRepository") * @ORM\Entity(repositoryClass="App\Repository\UserRepository")
* @UniqueEntity("email")
* @Vich\Uploadable()
*/ */
class User implements UserInterface { class User implements UserInterface {
/** /**
@ -26,6 +37,7 @@ class User implements UserInterface {
* @var string The user email * @var string The user email
* *
* @ORM\Column(type="string", length=180, unique=true) * @ORM\Column(type="string", length=180, unique=true)
* @Assert\Email(mode="html5", message="user.invalid.email")
*/ */
private string $email; private string $email;
@ -42,11 +54,19 @@ class User implements UserInterface {
* @ORM\Column(type="string") * @ORM\Column(type="string")
*/ */
private string $password; private string $password;
/**
* @var string The "clear" password.
* Only used when changing the password
*
* @Assert\NotBlank(message="user.invalid.password")
*/
private string $plainPassword;
/** /**
* @var string The user name * @var string The user name
* *
* @ORM\Column(type="string", length=255) * @ORM\Column(type="string", length=255)
* @Assert\NotBlank(message="user.invalid.name")
*/ */
private string $name; private string $name;
/** /**
@ -54,33 +74,56 @@ class User implements UserInterface {
* *
* @ORM\Column(type="string", length=255, nullable=true) * @ORM\Column(type="string", length=255, nullable=true)
*/ */
private ?string $fist_name; private ?string $firstname;
/** /**
* @var int The user gender * @var string|null The user gender
* 0 = no gender * - male
* 1 = male * - femalle
* 2 = femalle * - genderqueer
* 3 = genderqueer
* *
* @ORM\Column(type="smallint") * @ORM\Column(type="string", length=25, nullable=true)
* @Assert\Choice(callback="getGenders", message="user.invalid.gender")
*/ */
private int $gender; private ?string $gender;
/** /**
* @var string|null The user avatar relative path * @var string The user language code (ISO 639-1)
* *
* @ORM\Column(type="string", length=255, nullable=true) * @ORM\Column(type="string", length=2)
* @Assert\NotBlank(message="user.invalid.language")
* @Assert\Language(message="user.invalid.language")
*/ */
private ?string $avatar; private string $language;
/** /**
* @var Language The user language * @var VichEmbeddedFile|null The user avatar
*
* @ORM\Embedded(class="Vich\UploaderBundle\Entity\File")
*/
private ?VichEmbeddedFile $avatar;
/**
* @var File|null The user avatar "file" (NOT the mapped field)
* *
* @ORM\ManyToOne(targetEntity="App\Entity\Language") * @Vich\UploadableField(
* mapping="user_avatar",
* fileNameProperty="avatar.name",
* size="avatar.size",
* mimeType="avatar.mimeType",
* originalName="avatar.originalName",
* dimensions="avatar.dimensions"
* )
*/
private ?File $avatarFile;
/**
* @var DateTimeInterface|null Date-Time of last update
* Ensure Doctrine event listener is triggered if only avatar change
*
* @ORM\Column(type="datetime")
*/ */
private Language $language; private ?DateTimeInterface $updatedAt;
/** /**
* @var ArrayCollection The user {@see User friends} * @var Collection The user {@see User friends}
* *
* @ORM\ManyToMany(targetEntity="App\Entity\User") * @ORM\ManyToMany(targetEntity="App\Entity\User")
* @ORM\JoinTable( * @ORM\JoinTable(
@ -93,39 +136,52 @@ class User implements UserInterface {
* } * }
* ) * )
*/ */
private ArrayCollection $friends; private Collection $friends;
/** /**
* @var ArrayCollection The user {@see ConfigNotification configured notifications} * @var Collection The user {@see ConfigNotification configured notifications}
* *
* @ORM\OneToMany(targetEntity="App\Entity\ConfigNotification", mappedBy="user", orphanRemoval=true) * @ORM\OneToMany(targetEntity="App\Entity\ConfigNotification", mappedBy="user", orphanRemoval=true)
*/ */
private ArrayCollection $configNotifications; private Collection $configNotifications;
/** /**
* @var ArrayCollection Thue user {@see UserNotification notifications} * @var Collection Thue user {@see UserNotification notifications}
* *
* @ORM\OneToMany(targetEntity="App\Entity\UserNotification", mappedBy="user", orphanRemoval=true) * @ORM\OneToMany(targetEntity="App\Entity\UserNotification", mappedBy="user", orphanRemoval=true)
*/ */
private ArrayCollection $notifications; private Collection $notifications;
/** /**
* @var ArrayCollection The user owned {@see Wish wishes} * @var Collection The user owned {@see Wish wishes}
* *
* @ORM\OneToMany(targetEntity="App\Entity\Wish", mappedBy="owner") * @ORM\OneToMany(targetEntity="App\Entity\Wish", mappedBy="owner")
*/ */
private ArrayCollection $ownedWishes; private Collection $ownedWishes;
/** /**
* @var ArrayCollection The user {@see Participant participations} * @var Collection The user {@see Participant participations}
* *
* @ORM\OneToMany(targetEntity="App\Entity\Participant", mappedBy="user", orphanRemoval=true) * @ORM\OneToMany(targetEntity="App\Entity\Participant", mappedBy="user", orphanRemoval=true)
*/ */
private ArrayCollection $participations; private Collection $participations;
/** /**
* @var ArrayCollection The user {@see Comment comments} * @var Collection The user {@see Comment comments}
* *
* @ORM\OneToMany(targetEntity="App\Entity\Comment", mappedBy="user", orphanRemoval=true) * @ORM\OneToMany(targetEntity="App\Entity\Comment", mappedBy="user", orphanRemoval=true)
*/ */
private ArrayCollection $comments; private Collection $comments;
public function __construct () { public function __construct () {
$this->email = '';
$this->password = '';
$this->plainPassword = '';
$this->name = '';
$this->firstname = null;
$this->gender = null;
$this->language = '';
$this->avatar = new VichEmbeddedFile();
$this->avatarFile = null;
$this->updatedAt = new DateTimeImmutable();
$this->friends = new ArrayCollection(); $this->friends = new ArrayCollection();
$this->configNotifications = new ArrayCollection(); $this->configNotifications = new ArrayCollection();
$this->notifications = new ArrayCollection(); $this->notifications = new ArrayCollection();
@ -133,7 +189,6 @@ class User implements UserInterface {
$this->participations = new ArrayCollection(); $this->participations = new ArrayCollection();
$this->comments = new ArrayCollection(); $this->comments = new ArrayCollection();
} }
public function getId (): ?int { public function getId (): ?int {
return $this->id; return $this->id;
} }
@ -185,18 +240,30 @@ class User implements UserInterface {
return $this; return $this;
} }
public function getPlainPassword (): string {
return (string)$this->plainPassword;
}
public function setPlainPassword (string $password): self {
$this->plainPassword = $password;
$this->password = ''; // Force update of user
// The crypted password will be handled by Doctrine\CryptPasswordListener
return $this;
}
/** /**
* @see UserInterface * @see UserInterface
*/ */
public function getSalt () { public function getSalt () {
// not needed when using the "bcrypt" algorithm in security.yaml // Security.yaml : use "bcrypt" which provide his own salt generator => nothing to do here
} }
/** /**
* @see UserInterface * @see UserInterface
*/ */
public function eraseCredentials () { public function eraseCredentials () {
// If you store any temporary, sensitive data on the user, clear it here // Reset sensitive data, like clear password !
// $this->plainPassword = null; $this->plainPassword = '';
} }
public function getName (): ?string { public function getName (): ?string {
@ -207,38 +274,59 @@ class User implements UserInterface {
return $this; return $this;
} }
public function getFirstname (): ?string {
public function getFistname (): ?string { return $this->firstname;
return $this->fist_name;
} }
public function setFistname (?string $fist_name): self { public function setFirstname (?string $firstname): self {
$this->fist_name = $fist_name; $this->firstname = $firstname;
return $this; return $this;
} }
public function getGender (): ?int { public static function getGenders (): array {
return [
'male',
'female',
'genderqueer',
];
}
public function getGender (): ?string {
return $this->gender; return $this->gender;
} }
public function setGender (int $gender): self { public function setGender (?string $gender): self {
$this->gender = $gender; $this->gender = $gender;
return $this; return $this;
} }
public function getAvatar (): ?string { public function getAvatar (): ?VichEmbeddedFile {
return $this->avatar; return $this->avatar;
} }
public function setAvatar (?string $avatar): self { public function setAvatar (VichEmbeddedFile $avatar): self {
$this->avatar = $avatar; $this->avatar = $avatar;
return $this; return $this;
} }
public function getAvatarFile (): ?File {
return $this->avatarFile;
}
public function setAvatarFile (?File $avatar): self {
$this->avatarFile = $avatar;
if ($avatar !== null) {
$this->updatedAt = new DateTimeImmutable();
}
public function getLanguage (): ?Language { return $this;
}
public function getLanguage (): string {
return $this->language; return $this->language;
} }
public function setLanguage (?Language $language): self { public function setLanguage (string $language): self {
if (mb_strlen($language, 'UTF-8') != 2) {
throw new InvalidArgumentException('The language code must have exactly 2 characters');
}
$this->language = $language; $this->language = $language;
return $this; return $this;

@ -5,7 +5,17 @@ namespace App\Form;
use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\AbstractType;
use Symfony\Component\OptionsResolver\OptionsResolver; use Symfony\Component\OptionsResolver\OptionsResolver;
/**
* FormType using the Bootstrap library
*
* Disable browser-validation and use Bootstrap client-side validation
*
* @package App\Form
*/
abstract class AbstractBootstrapForm extends AbstractType { abstract class AbstractBootstrapForm extends AbstractType {
/**
* @inheritDoc
*/
public function configureOptions (OptionsResolver $resolver) { public function configureOptions (OptionsResolver $resolver) {
parent::configureOptions($resolver); parent::configureOptions($resolver);

@ -14,6 +14,9 @@ use Symfony\Component\OptionsResolver\OptionsResolver;
* @package App\Form * @package App\Form
*/ */
class SecuritySignInForm extends AbstractBootstrapForm { class SecuritySignInForm extends AbstractBootstrapForm {
/**
* @inheritDoc
*/
public function buildForm (FormBuilderInterface $builder, array $options) { public function buildForm (FormBuilderInterface $builder, array $options) {
parent::buildForm($builder, $options); parent::buildForm($builder, $options);
@ -42,6 +45,9 @@ class SecuritySignInForm extends AbstractBootstrapForm {
); );
} }
/**
* @inheritDoc
*/
public function configureOptions (OptionsResolver $resolver) { public function configureOptions (OptionsResolver $resolver) {
parent::configureOptions($resolver); parent::configureOptions($resolver);

@ -0,0 +1,128 @@
<?php
namespace App\Form;
use App\Entity\User;
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
use Symfony\Component\Form\Extension\Core\Type\EmailType;
use Symfony\Component\Form\Extension\Core\Type\LanguageType;
use Symfony\Component\Form\Extension\Core\Type\PasswordType;
use Symfony\Component\Form\Extension\Core\Type\RepeatedType;
use Symfony\Component\Form\Extension\Core\Type\TextType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;
use Symfony\Contracts\Translation\TranslatorInterface;
use Vich\UploaderBundle\Form\Type\VichImageType;
/**
* Security : sign-up form
*
* @package App\Form
*/
class SecuritySignUpForm extends AbstractBootstrapForm {
/**
* @var TranslatorInterface The translation service
*/
private TranslatorInterface $translatorInterface;
/**
* Class constructor
*
* Called using auto-wiring
*
* @param TranslatorInterface $translatorInterface The translation service
*/
public function __construct (TranslatorInterface $translatorInterface) {
$this->translatorInterface = $translatorInterface;
}
/**
* @inheritDoc
*/
public function buildForm (FormBuilderInterface $builder, array $options) {
parent::buildForm($builder, $options);
$builder
->add(
'email',
EmailType::class,
[
'label_format' => 'user.email',
]
)
->add(
'plainPassword',
RepeatedType::class,
[
'type' => PasswordType::class,
'first_options' => [
'label_format' => 'user.password',
],
'second_options' => [
'label_format' => 'user.password_confirm',
],
]
)
->add(
'gender',
ChoiceType::class,
[
'choices' => User::getGenders(),
'choice_label' => function (string $gender) {
return $gender ? $this->translatorInterface->trans('user.genders.' . $gender, [], 'security') : '';
},
'choice_translation_domain' => false,
'label_format' => 'user.gender',
'required' => false,
]
)
->add(
'firstname',
TextType::class,
[
'label_format' => 'user.firstname',
'required' => false,
]
)
->add(
'name',
TextType::class,
[
'label_format' => 'user.name',
]
)
->add(
'language',
LanguageType::class,
[
'choice_self_translation' => true,
'label_format' => 'user.language',
]
)
->add(
'avatarFile',
VichImageType::class,
[
'label_format' => 'user.avatar',
'translation_domain' => 'security',
'required' => false,
'imagine_pattern' => 'url_avatar',
'storage_resolve_method' => VichImageType::STORAGE_RESOLVE_PATH_RELATIVE,
]
);
}
/**
* @inheritDoc
*/
public function configureOptions (OptionsResolver $resolver) {
parent::configureOptions($resolver);
$resolver->setDefaults(
[
'translation_domain' => 'security',
'data_class' => User::class,
]
);
}
}

@ -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 Version20200707131948 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->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.');
$this->addSql('ALTER TABLE user ADD updated_at DATETIME NOT NULL, ADD avatar_original_name VARCHAR(255) DEFAULT NULL, ADD avatar_mime_type VARCHAR(255) DEFAULT NULL, ADD avatar_size INT DEFAULT NULL, ADD avatar_dimensions LONGTEXT DEFAULT NULL COMMENT \'(DC2Type:simple_array)\', DROP inactive, CHANGE gender gender VARCHAR(25) DEFAULT NULL, CHANGE avatar avatar_name VARCHAR(255) DEFAULT NULL'
);
}
public function down (Schema $schema): void {
// this down() migration is auto-generated, please modify it to your needs
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.');
$this->addSql('ALTER TABLE user ADD avatar varchar(255) CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_unicode_ci`, ADD inactive tinyint(1) NOT NULL, DROP updated_at, DROP avatar_name, DROP avatar_original_name, DROP avatar_mime_type, DROP avatar_size, DROP avatar_dimensions, CHANGE gender gender smallint NOT NULL'
);
}
}

@ -0,0 +1,38 @@
<?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 Version20200707135616 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->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.');
$this->addSql('ALTER TABLE user DROP FOREIGN KEY FK_8D93D64982F1BAF4');
$this->addSql('DROP TABLE language');
$this->addSql('DROP INDEX IDX_8D93D64982F1BAF4 ON user');
$this->addSql('ALTER TABLE user ADD language varchar(2) NOT NULL, DROP language_id');
}
public function down (Schema $schema): void {
// this down() migration is auto-generated, please modify it to your needs
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.');
$this->addSql('CREATE TABLE language (id int AUTO_INCREMENT NOT NULL, name varchar(50) CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`, code varchar(2) CHARACTER SET utf8mb4 NOT NULL COLLATE `utf8mb4_unicode_ci`, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE `utf8_unicode_ci` ENGINE = InnoDB COMMENT = \'\' '
);
$this->addSql('ALTER TABLE user ADD language_id int DEFAULT NULL, DROP language');
$this->addSql('ALTER TABLE user ADD CONSTRAINT FK_8D93D64982F1BAF4 FOREIGN KEY (language_id) REFERENCES language (id)');
$this->addSql('CREATE INDEX IDX_8D93D64982F1BAF4 ON user (language_id)');
}
}

@ -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 Version20200709102824 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->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.');
$this->addSql('ALTER TABLE user CHANGE fist_name fistname varchar(255) DEFAULT NULL');
}
public function down (Schema $schema): void {
// this down() migration is auto-generated, please modify it to your needs
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.');
$this->addSql('ALTER TABLE user CHANGE fistname fist_name varchar(255) CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_unicode_ci`');
}
}

@ -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 Version20200709103321 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->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.');
$this->addSql('ALTER TABLE user CHANGE fistname firstname varchar(255) DEFAULT NULL');
}
public function down (Schema $schema): void {
// this down() migration is auto-generated, please modify it to your needs
$this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.');
$this->addSql('ALTER TABLE user CHANGE firstname fistname varchar(255) CHARACTER SET utf8mb4 DEFAULT NULL COLLATE `utf8mb4_unicode_ci`');
}
}

@ -81,6 +81,12 @@
"egulias/email-validator": { "egulias/email-validator": {
"version": "2.1.18" "version": "2.1.18"
}, },
"imagine/imagine": {
"version": "1.2.3"
},
"jms/metadata": {
"version": "2.3.0"
},
"laminas/laminas-code": { "laminas/laminas-code": {
"version": "3.4.1" "version": "3.4.1"
}, },
@ -90,6 +96,19 @@
"laminas/laminas-zendframework-bridge": { "laminas/laminas-zendframework-bridge": {
"version": "1.0.4" "version": "1.0.4"
}, },
"liip/imagine-bundle": {
"version": "1.8",
"recipe": {
"repo": "github.com/symfony/recipes-contrib",
"branch": "master",
"version": "1.8",
"ref": "5a5bdc2d0e2533ed6935d5ae562f2b318a8fc1ee"
},
"files": [
"config/packages/liip_imagine.yaml",
"config/routes/liip_imagine.yaml"
]
},
"monolog/monolog": { "monolog/monolog": {
"version": "2.1.0" "version": "2.1.0"
}, },
@ -441,6 +460,9 @@
"symfony/string": { "symfony/string": {
"version": "v5.1.2" "version": "v5.1.2"
}, },
"symfony/templating": {
"version": "v5.1.2"
},
"symfony/test-pack": { "symfony/test-pack": {
"version": "v1.0.6" "version": "v1.0.6"
}, },
@ -544,6 +566,18 @@
"twig/twig": { "twig/twig": {
"version": "v3.0.4" "version": "v3.0.4"
}, },
"vich/uploader-bundle": {
"version": "1.5",
"recipe": {
"repo": "github.com/symfony/recipes-contrib",
"branch": "master",
"version": "1.5",
"ref": "c4f5755b37fb65b9c6a3cbdae91205c15a137ed4"
},
"files": [
"config/packages/vich_uploader.yaml"
]
},
"webimpress/safe-writer": { "webimpress/safe-writer": {
"version": "2.0.1" "version": "2.0.1"
}, },

@ -0,0 +1,5 @@
<style>
.custom-file-label::after {
content : '{{ 'form.browse'|trans({}, 'messages') }}';
}
</style>

@ -12,8 +12,8 @@
</div> </div>
</div> </div>
{% else %} {% else %}
{# <li><a href="{{ path('app_security_sign_up') }}">{% trans from 'security' %}sign.up{% endtrans %}</a></li>#}
<a href="{{ path('app_security_sign_in') }}">{{ 'sign.in'|trans({}, 'security') }}</a> <a href="{{ path('app_security_sign_in') }}">{{ 'sign.in'|trans({}, 'security') }}</a>
<a href="{{ path('app_security_sign_up') }}">{{ 'sign.up'|trans({}, 'security') }}</a>
{% endif %} {% endif %}
</nav> </nav>
</header> </header>

@ -20,12 +20,14 @@
{% endif %} {% endif %}
{{ form_start(form) }} {{ form_start(form) }}
{{ form_errors(form) }}
{{ form_row(form.email) }} {{ form_row(form.email) }}
{{ form_row(form.password) }} {{ form_row(form.password) }}
{{ form_row(form._remember_me) }} {{ form_row(form._remember_me) }}
<div class="form-group form-buttons"> <div class="form-group form-buttons">
<button class="btn btn-lg btn-primary" type="submit">{{ 'sign.in'|trans }}</button> <button class="btn btn-lg btn-primary" type="submit">{{ 'sign.in'|trans }}</button>
<a class="btn btn-lg btn-secondary" href="#">{{ 'sign.up'|trans }}</a> <a class="btn btn-lg btn-secondary" href="{{ path('app_security_sign_up') }}">{{ 'sign.up'|trans }}</a>
</div> </div>
{{ form_end(form) }} {{ form_end(form) }}
</section> </section>

@ -0,0 +1,46 @@
{% trans_default_domain 'security' %}
{% extends 'base.html.twig' %}
{% block title %}{{ 'sign.up'|trans }}{% endblock %}
{% block stylesheets %}
{{ parent() }}
{{ encore_entry_link_tags('security/sign-up') }}
{% include '_form_browse.html.twig' %}
{% endblock %}
{% block body %}
<section id="sign-up">
<h1>{{ 'sign.up'|trans }}</h1>
{{ form_start(form) }}
{{ form_errors(form) }}
<fieldset>
{{ form_row(form.email) }}
{{ form_row(form.plainPassword.first) }}
{{ form_row(form.plainPassword.second) }}
</fieldset>
<fieldset>
{{ form_row(form.gender) }}
{{ form_row(form.firstname) }}
{{ form_row(form.name) }}
</fieldset>
<fieldset>
{{ form_row(form.language) }}
{{ form_row(form.avatarFile) }}
</fieldset>
<div class="form-group form-buttons">
<button class="btn btn-lg btn-primary" type="submit">{{ 'sign.up'|trans }}</button>
</div>
{{ form_end(form) }}
</section>
{% endblock %}
{% block javascripts %}
{{ parent() }}
{{ encore_entry_script_tags('security/sign-up') }}
{% endblock %}

@ -48,14 +48,23 @@
<!--<ul>--> <!--<ul>-->
<!-- <li>Liste de cadeaux en saisie libre, sans &quot;catalogue&quot; ou liste d'article imposée</li>--> <!-- <li>Liste de cadeaux en saisie libre, sans &quot;catalogue&quot; ou liste d'article imposée</li>-->
<!-- <li>Possibilité d'ajouter des cadeaux non prévus dans la liste du destinataire</li>--> <!-- <li>Possibilité d'ajouter des cadeaux non prévus dans la liste du destinataire</li>-->
<!-- <li>Contact facile avec l'entourage du destinataire d'un cadeau</li>--> <!-- <li>Contact facile avec l'entourage du destinataire d'un cadeau</li>-->
<!-- <li>Échange de messages avec les autres personnes autour d'un cadeau donné</li>--> <!-- <li>Échange de messages avec les autres personnes autour d'un cadeau donné</li>-->
<!-- <li>Appel et suivi de financements à plusieurs d'un cadeau</li>--> <!-- <li>Appel et suivi de financements à plusieurs d'un cadeau</li>-->
<!-- <li>Etc.</li>--> <!-- <li>Etc.</li>-->
<!--</ul>--> <!--</ul>-->
<!--]]></target>--> <!--]]></target>-->
<!-- </segment>--> <!-- </segment>-->
<!-- </unit>--> <!-- </unit>-->
</group>
<group id="form">
<unit id="browse">
<segment>
<source>form.browse</source>
<target>Browse</target>
</segment>
</unit>
</group> </group>
</file> </file>
</xliff> </xliff>

@ -57,5 +57,14 @@
</segment> </segment>
</unit> </unit>
</group> </group>
<group id="form">
<unit id="browse">
<segment>
<source>form.browse</source>
<target>Parcourir</target>
</segment>
</unit>
</group>
</file> </file>
</xliff> </xliff>

@ -1,4 +1,4 @@
<?xml version="1.0"?> <?xml version="1.0" encoding="UTF-8"?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:2.0" version="2.0" srcLang="en" trgLang="en"> <xliff xmlns="urn:oasis:names:tc:xliff:document:2.0" version="2.0" srcLang="en" trgLang="en">
<file id="messages.intl-icu.en"> <file id="messages.intl-icu.en">
<group id="sign"> <group id="sign">
@ -20,6 +20,7 @@
<target>Sign out</target> <target>Sign out</target>
</segment> </segment>
</unit> </unit>
<unit id="remember_me"> <unit id="remember_me">
<segment> <segment>
<source>sign.remember_me</source> <source>sign.remember_me</source>
@ -54,19 +55,60 @@
<target>Password</target> <target>Password</target>
</segment> </segment>
</unit> </unit>
<unit id="password_confirm">
<segment>
<source>user.password_confirm</source>
<target>Password confirm</target>
</segment>
</unit>
<unit id="gender">
<segment>
<source>user.gender</source>
<target>Gender</target>
</segment>
</unit>
<unit id="firstname">
<segment>
<source>user.firstname</source>
<target>First name</target>
</segment>
</unit>
<unit id="name">
<segment>
<source>user.name</source>
<target>Name</target>
</segment>
</unit>
<unit id="language">
<segment>
<source>user.language</source>
<target>Language</target>
</segment>
</unit>
<unit id="avatar">
<segment>
<source>user.avatar</source>
<target>Avatar</target>
</segment>
</unit>
<group id="genders">
<group id="invalid"> <unit id="male">
<unit id="email"> <segment>
<source>user.genders.male</source>
<target>Male</target>
</segment>
</unit>
<unit id="female">
<segment> <segment>
<source>user.invalid.email</source> <source>user.genders.female</source>
<target>You must provide a valid email</target> <target>Female</target>
</segment> </segment>
</unit> </unit>
<unit id="password"> <unit id="genderqueer">
<segment> <segment>
<source>user.invalid.password</source> <source>user.genders.genderqueer</source>
<target>You must provide a password</target> <target>Genderqueer</target>
</segment> </segment>
</unit> </unit>
</group> </group>

@ -8,7 +8,6 @@
<target>Connexion</target> <target>Connexion</target>
</segment> </segment>
</unit> </unit>
<unit id="up"> <unit id="up">
<segment> <segment>
<source>sign.up</source> <source>sign.up</source>
@ -21,6 +20,7 @@
<target>Déconnexion</target> <target>Déconnexion</target>
</segment> </segment>
</unit> </unit>
<unit id="remember_me"> <unit id="remember_me">
<segment> <segment>
<source>sign.remember_me</source> <source>sign.remember_me</source>
@ -55,18 +55,60 @@
<target>Mot de passe</target> <target>Mot de passe</target>
</segment> </segment>
</unit> </unit>
<unit id="password_confirm">
<segment>
<source>user.password_confirm</source>
<target>Confirmation mot de passe</target>
</segment>
</unit>
<unit id="gender">
<segment>
<source>user.gender</source>
<target>Genre</target>
</segment>
</unit>
<unit id="firstname">
<segment>
<source>user.firstname</source>
<target>Prénom</target>
</segment>
</unit>
<unit id="name">
<segment>
<source>user.name</source>
<target>Nom</target>
</segment>
</unit>
<unit id="language">
<segment>
<source>user.language</source>
<target>Langue</target>
</segment>
</unit>
<unit id="avatar">
<segment>
<source>user.avatar</source>
<target>Avatar</target>
</segment>
</unit>
<group id="invalid"> <group id="genders">
<unit id="email"> <unit id="male">
<segment> <segment>
<source>user.invalid.email</source> <source>user.genders.male</source>
<target>Vous devez renseigner une adresse mail valide</target> <target>Masculin</target>
</segment> </segment>
</unit> </unit>
<unit id="password"> <unit id="female">
<segment>
<source>user.genders.female</source>
<target>Féminin</target>
</segment>
</unit>
<unit id="genderqueer">
<segment> <segment>
<source>user.invalid.password</source> <source>user.genders.genderqueer</source>
<target>Vous devez renseigner un mot de passe</target> <target>Genderqueer / Non-Binaire</target>
</segment> </segment>
</unit> </unit>
</group> </group>

@ -1,6 +1,41 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="UTF-8"?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:2.0" version="2.0" srcLang="en" trgLang="en"> <xliff xmlns="urn:oasis:names:tc:xliff:document:2.0" version="2.0" srcLang="en" trgLang="en">
<file id="validators.en"> <file id="validators.intl-icu.en">
<group id="user">
<group id="invalid">
<unit id="email">
<segment>
<source>user.invalid.email</source>
<target>You must provide a valid email</target>
</segment>
</unit>
<unit id="password">
<segment>
<source>user.invalid.password</source>
<target>You must provide a password</target>
</segment>
</unit>
<unit id="gender">
<segment>
<source>user.invalid.gender</source>
<target>You must provide a valid gender</target>
</segment>
</unit>
<unit id="name">
<segment>
<source>user.invalid.name</source>
<target>You must provide a name</target>
</segment>
</unit>
<unit id="language">
<segment>
<source>user.invalid.language</source>
<target>You must provide a valid language</target>
</segment>
</unit>
</group>
</group>
<unit id="zh5oKD9" name="This value should be false."> <unit id="zh5oKD9" name="This value should be false.">
<segment> <segment>
<source>This value should be false.</source> <source>This value should be false.</source>

@ -1,6 +1,41 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="UTF-8"?>
<xliff xmlns="urn:oasis:names:tc:xliff:document:2.0" version="2.0" srcLang="en" trgLang="fr"> <xliff xmlns="urn:oasis:names:tc:xliff:document:2.0" version="2.0" srcLang="en" trgLang="fr">
<file id="validators.fr"> <file id="validators.intl-icu.fr">
<group id="user">
<group id="invalid">
<unit id="email">
<segment>
<source>user.invalid.email</source>
<target>Vous devez renseigner une adresse mail valide</target>
</segment>
</unit>
<unit id="password">
<segment>
<source>user.invalid.password</source>
<target>Vous devez renseigner un mot de passe</target>
</segment>
</unit>
<unit id="gender">
<segment>
<source>user.invalid.gender</source>
<target>Vous devez renseigner un genre valide</target>
</segment>
</unit>
<unit id="name">
<segment>
<source>user.invalid.name</source>
<target>Vous devez renseigner un nom</target>
</segment>
</unit>
<unit id="language">
<segment>
<source>user.invalid.language</source>
<target>Vous devez choisir une langue valide</target>
</segment>
</unit>
</group>
</group>
<unit id="zh5oKD9" name="This value should be false."> <unit id="zh5oKD9" name="This value should be false.">
<segment> <segment>
<source>This value should be false.</source> <source>This value should be false.</source>

@ -45,6 +45,7 @@ Encore
*/ */
.addEntry('main', './assets/js/main.js') .addEntry('main', './assets/js/main.js')
.addEntry('security/sign-in', './assets/js/security/sign-in.js') .addEntry('security/sign-in', './assets/js/security/sign-in.js')
.addEntry('security/sign-up', './assets/js/security/sign-up.js')
// When enabled, Webpack "splits" your files into smaller pieces for greater optimization. // When enabled, Webpack "splits" your files into smaller pieces for greater optimization.
.splitEntryChunks() .splitEntryChunks()

@ -1504,6 +1504,11 @@ browserslist@^4.0.0, browserslist@^4.11.1, browserslist@^4.8.5:
node-releases "^1.1.53" node-releases "^1.1.53"
pkg-up "^2.0.0" pkg-up "^2.0.0"
bs-custom-file-input@^1.3.4:
version "1.3.4"
resolved "https://registry.yarnpkg.com/bs-custom-file-input/-/bs-custom-file-input-1.3.4.tgz#c275cb8d4f1c02ba026324292509fa9a747dbda8"
integrity sha512-NBsQzTnef3OW1MvdKBbMHAYHssCd613MSeJV7z2McXznWtVMnJCy7Ckyc+PwxV6Pk16cu6YBcYWh/ZE0XWNKCA==
buffer-from@^1.0.0: buffer-from@^1.0.0:
version "1.1.1" version "1.1.1"
resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.1.tgz#32713bc028f75c02fdb710d7c7bcec1f2c6070ef" resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.1.tgz#32713bc028f75c02fdb710d7c7bcec1f2c6070ef"

Loading…
Cancel
Save