minor updates
This commit is contained in:
parent
e2f82a9b4a
commit
59d3663cab
|
@ -1,12 +0,0 @@
|
||||||
/*
|
|
||||||
* Welcome to your app's main JavaScript file!
|
|
||||||
*
|
|
||||||
* We recommend including the built version of this JavaScript file
|
|
||||||
* (and its CSS file) in your base layout (base.html.twig).
|
|
||||||
*/
|
|
||||||
|
|
||||||
// any CSS you import will output into a single css file (app.css in this case)
|
|
||||||
import './styles/app.css';
|
|
||||||
|
|
||||||
// start the Stimulus application
|
|
||||||
import './bootstrap';
|
|
|
@ -19,12 +19,14 @@
|
||||||
"symfony/flex": "^1.3.1",
|
"symfony/flex": "^1.3.1",
|
||||||
"symfony/framework-bundle": "5.3.*",
|
"symfony/framework-bundle": "5.3.*",
|
||||||
"symfony/mailer": "5.3.*",
|
"symfony/mailer": "5.3.*",
|
||||||
|
"symfony/monolog-bundle": "^3.7",
|
||||||
"symfony/proxy-manager-bridge": "5.3.*",
|
"symfony/proxy-manager-bridge": "5.3.*",
|
||||||
"symfony/security-bundle": "5.3.*",
|
"symfony/security-bundle": "5.3.*",
|
||||||
"symfony/twig-bundle": "^5.2",
|
"symfony/twig-bundle": "^5.2",
|
||||||
"symfony/validator": "5.3.*",
|
"symfony/validator": "5.3.*",
|
||||||
"symfony/webpack-encore-bundle": "^1.11",
|
"symfony/webpack-encore-bundle": "^1.11",
|
||||||
"symfony/yaml": "5.3.*",
|
"symfony/yaml": "5.3.*",
|
||||||
|
"symfonycasts/reset-password-bundle": "^1.8",
|
||||||
"symfonycasts/verify-email-bundle": "^1.5",
|
"symfonycasts/verify-email-bundle": "^1.5",
|
||||||
"twig/extra-bundle": "^2.12|^3.0",
|
"twig/extra-bundle": "^2.12|^3.0",
|
||||||
"twig/intl-extra": "^3.3",
|
"twig/intl-extra": "^3.3",
|
||||||
|
|
|
@ -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": "8933f3ecbe9471974eca76a88ea9b2a4",
|
"content-hash": "34381deb043c87393a1f92bbeab2aaff",
|
||||||
"packages": [
|
"packages": [
|
||||||
{
|
{
|
||||||
"name": "composer/package-versions-deprecated",
|
"name": "composer/package-versions-deprecated",
|
||||||
|
@ -1949,6 +1949,102 @@
|
||||||
],
|
],
|
||||||
"time": "2021-02-25T21:54:58+00:00"
|
"time": "2021-02-25T21:54:58+00:00"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "monolog/monolog",
|
||||||
|
"version": "2.2.0",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/Seldaek/monolog.git",
|
||||||
|
"reference": "1cb1cde8e8dd0f70cc0fe51354a59acad9302084"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/Seldaek/monolog/zipball/1cb1cde8e8dd0f70cc0fe51354a59acad9302084",
|
||||||
|
"reference": "1cb1cde8e8dd0f70cc0fe51354a59acad9302084",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"php": ">=7.2",
|
||||||
|
"psr/log": "^1.0.1"
|
||||||
|
},
|
||||||
|
"provide": {
|
||||||
|
"psr/log-implementation": "1.0.0"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"aws/aws-sdk-php": "^2.4.9 || ^3.0",
|
||||||
|
"doctrine/couchdb": "~1.0@dev",
|
||||||
|
"elasticsearch/elasticsearch": "^7",
|
||||||
|
"graylog2/gelf-php": "^1.4.2",
|
||||||
|
"mongodb/mongodb": "^1.8",
|
||||||
|
"php-amqplib/php-amqplib": "~2.4",
|
||||||
|
"php-console/php-console": "^3.1.3",
|
||||||
|
"phpspec/prophecy": "^1.6.1",
|
||||||
|
"phpstan/phpstan": "^0.12.59",
|
||||||
|
"phpunit/phpunit": "^8.5",
|
||||||
|
"predis/predis": "^1.1",
|
||||||
|
"rollbar/rollbar": "^1.3",
|
||||||
|
"ruflin/elastica": ">=0.90 <7.0.1",
|
||||||
|
"swiftmailer/swiftmailer": "^5.3|^6.0"
|
||||||
|
},
|
||||||
|
"suggest": {
|
||||||
|
"aws/aws-sdk-php": "Allow sending log messages to AWS services like DynamoDB",
|
||||||
|
"doctrine/couchdb": "Allow sending log messages to a CouchDB server",
|
||||||
|
"elasticsearch/elasticsearch": "Allow sending log messages to an Elasticsearch server via official client",
|
||||||
|
"ext-amqp": "Allow sending log messages to an AMQP server (1.0+ required)",
|
||||||
|
"ext-mbstring": "Allow to work properly with unicode symbols",
|
||||||
|
"ext-mongodb": "Allow sending log messages to a MongoDB server (via driver)",
|
||||||
|
"graylog2/gelf-php": "Allow sending log messages to a GrayLog2 server",
|
||||||
|
"mongodb/mongodb": "Allow sending log messages to a MongoDB server (via library)",
|
||||||
|
"php-amqplib/php-amqplib": "Allow sending log messages to an AMQP server using php-amqplib",
|
||||||
|
"php-console/php-console": "Allow sending log messages to Google Chrome",
|
||||||
|
"rollbar/rollbar": "Allow sending log messages to Rollbar",
|
||||||
|
"ruflin/elastica": "Allow sending log messages to an Elastic Search server"
|
||||||
|
},
|
||||||
|
"type": "library",
|
||||||
|
"extra": {
|
||||||
|
"branch-alias": {
|
||||||
|
"dev-main": "2.x-dev"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"Monolog\\": "src/Monolog"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"MIT"
|
||||||
|
],
|
||||||
|
"authors": [
|
||||||
|
{
|
||||||
|
"name": "Jordi Boggiano",
|
||||||
|
"email": "j.boggiano@seld.be",
|
||||||
|
"homepage": "https://seld.be"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"description": "Sends your logs to files, sockets, inboxes, databases and various web services",
|
||||||
|
"homepage": "https://github.com/Seldaek/monolog",
|
||||||
|
"keywords": [
|
||||||
|
"log",
|
||||||
|
"logging",
|
||||||
|
"psr-3"
|
||||||
|
],
|
||||||
|
"support": {
|
||||||
|
"issues": "https://github.com/Seldaek/monolog/issues",
|
||||||
|
"source": "https://github.com/Seldaek/monolog/tree/2.2.0"
|
||||||
|
},
|
||||||
|
"funding": [
|
||||||
|
{
|
||||||
|
"url": "https://github.com/Seldaek",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"url": "https://tidelift.com/funding/github/packagist/monolog/monolog",
|
||||||
|
"type": "tidelift"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"time": "2020-12-14T13:15:25+00:00"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "nikic/php-parser",
|
"name": "nikic/php-parser",
|
||||||
"version": "v4.10.5",
|
"version": "v4.10.5",
|
||||||
|
@ -4183,6 +4279,170 @@
|
||||||
],
|
],
|
||||||
"time": "2021-05-26T17:43:10+00:00"
|
"time": "2021-05-26T17:43:10+00:00"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "symfony/monolog-bridge",
|
||||||
|
"version": "v5.3.0",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/symfony/monolog-bridge.git",
|
||||||
|
"reference": "84841557874df015ef2843aa16ac63d09f97c7b9"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/symfony/monolog-bridge/zipball/84841557874df015ef2843aa16ac63d09f97c7b9",
|
||||||
|
"reference": "84841557874df015ef2843aa16ac63d09f97c7b9",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"monolog/monolog": "^1.25.1|^2",
|
||||||
|
"php": ">=7.2.5",
|
||||||
|
"symfony/deprecation-contracts": "^2.1",
|
||||||
|
"symfony/http-kernel": "^5.3",
|
||||||
|
"symfony/service-contracts": "^1.1|^2"
|
||||||
|
},
|
||||||
|
"conflict": {
|
||||||
|
"symfony/console": "<4.4",
|
||||||
|
"symfony/http-foundation": "<5.3"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"symfony/console": "^4.4|^5.0",
|
||||||
|
"symfony/http-client": "^4.4|^5.0",
|
||||||
|
"symfony/mailer": "^4.4|^5.0",
|
||||||
|
"symfony/messenger": "^4.4|^5.0",
|
||||||
|
"symfony/mime": "^4.4|^5.0",
|
||||||
|
"symfony/security-core": "^4.4|^5.0",
|
||||||
|
"symfony/var-dumper": "^4.4|^5.0"
|
||||||
|
},
|
||||||
|
"suggest": {
|
||||||
|
"symfony/console": "For the possibility to show log messages in console commands depending on verbosity settings.",
|
||||||
|
"symfony/http-kernel": "For using the debugging handlers together with the response life cycle of the HTTP kernel.",
|
||||||
|
"symfony/var-dumper": "For using the debugging handlers like the console handler or the log server handler."
|
||||||
|
},
|
||||||
|
"type": "symfony-bridge",
|
||||||
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"Symfony\\Bridge\\Monolog\\": ""
|
||||||
|
},
|
||||||
|
"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": "Provides integration for Monolog with various Symfony components",
|
||||||
|
"homepage": "https://symfony.com",
|
||||||
|
"support": {
|
||||||
|
"source": "https://github.com/symfony/monolog-bridge/tree/v5.3.0"
|
||||||
|
},
|
||||||
|
"funding": [
|
||||||
|
{
|
||||||
|
"url": "https://symfony.com/sponsor",
|
||||||
|
"type": "custom"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"url": "https://github.com/fabpot",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
|
||||||
|
"type": "tidelift"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"time": "2021-05-26T17:43:10+00:00"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "symfony/monolog-bundle",
|
||||||
|
"version": "v3.7.0",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/symfony/monolog-bundle.git",
|
||||||
|
"reference": "4054b2e940a25195ae15f0a49ab0c51718922eb4"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/symfony/monolog-bundle/zipball/4054b2e940a25195ae15f0a49ab0c51718922eb4",
|
||||||
|
"reference": "4054b2e940a25195ae15f0a49ab0c51718922eb4",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"monolog/monolog": "~1.22 || ~2.0",
|
||||||
|
"php": ">=7.1.3",
|
||||||
|
"symfony/config": "~4.4 || ^5.0",
|
||||||
|
"symfony/dependency-injection": "^4.4 || ^5.0",
|
||||||
|
"symfony/http-kernel": "~4.4 || ^5.0",
|
||||||
|
"symfony/monolog-bridge": "~4.4 || ^5.0"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"symfony/console": "~4.4 || ^5.0",
|
||||||
|
"symfony/phpunit-bridge": "^5.1",
|
||||||
|
"symfony/yaml": "~4.4 || ^5.0"
|
||||||
|
},
|
||||||
|
"type": "symfony-bundle",
|
||||||
|
"extra": {
|
||||||
|
"branch-alias": {
|
||||||
|
"dev-master": "3.x-dev"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"Symfony\\Bundle\\MonologBundle\\": ""
|
||||||
|
},
|
||||||
|
"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 MonologBundle",
|
||||||
|
"homepage": "https://symfony.com",
|
||||||
|
"keywords": [
|
||||||
|
"log",
|
||||||
|
"logging"
|
||||||
|
],
|
||||||
|
"support": {
|
||||||
|
"issues": "https://github.com/symfony/monolog-bundle/issues",
|
||||||
|
"source": "https://github.com/symfony/monolog-bundle/tree/v3.7.0"
|
||||||
|
},
|
||||||
|
"funding": [
|
||||||
|
{
|
||||||
|
"url": "https://symfony.com/sponsor",
|
||||||
|
"type": "custom"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"url": "https://github.com/fabpot",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
|
||||||
|
"type": "tidelift"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"time": "2021-03-31T07:20:47+00:00"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/options-resolver",
|
"name": "symfony/options-resolver",
|
||||||
"version": "v5.3.0",
|
"version": "v5.3.0",
|
||||||
|
@ -6904,6 +7164,57 @@
|
||||||
],
|
],
|
||||||
"time": "2021-05-26T17:43:10+00:00"
|
"time": "2021-05-26T17:43:10+00:00"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name": "symfonycasts/reset-password-bundle",
|
||||||
|
"version": "v1.8.0",
|
||||||
|
"source": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "https://github.com/SymfonyCasts/reset-password-bundle.git",
|
||||||
|
"reference": "a41cceff06039e586619b1505af05f77b22b41b5"
|
||||||
|
},
|
||||||
|
"dist": {
|
||||||
|
"type": "zip",
|
||||||
|
"url": "https://api.github.com/repos/SymfonyCasts/reset-password-bundle/zipball/a41cceff06039e586619b1505af05f77b22b41b5",
|
||||||
|
"reference": "a41cceff06039e586619b1505af05f77b22b41b5",
|
||||||
|
"shasum": ""
|
||||||
|
},
|
||||||
|
"require": {
|
||||||
|
"php": ">=7.2.5",
|
||||||
|
"symfony/config": "^4.4 | ^5.0",
|
||||||
|
"symfony/dependency-injection": "^4.4 | ^5.0",
|
||||||
|
"symfony/deprecation-contracts": "^2.2",
|
||||||
|
"symfony/http-kernel": "^4.4 | ^5.0"
|
||||||
|
},
|
||||||
|
"conflict": {
|
||||||
|
"doctrine/orm": "<2.7",
|
||||||
|
"symfony/framework-bundle": "<4.4",
|
||||||
|
"symfony/http-foundation": "<4.4"
|
||||||
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"doctrine/doctrine-bundle": "^2.0.3",
|
||||||
|
"doctrine/orm": "^2.7",
|
||||||
|
"friendsofphp/php-cs-fixer": "^3.0",
|
||||||
|
"symfony/framework-bundle": "^4.4 | ^5.0",
|
||||||
|
"symfony/phpunit-bridge": "^5.0",
|
||||||
|
"vimeo/psalm": "^4.3"
|
||||||
|
},
|
||||||
|
"type": "symfony-bundle",
|
||||||
|
"autoload": {
|
||||||
|
"psr-4": {
|
||||||
|
"SymfonyCasts\\Bundle\\ResetPassword\\": "src/"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"notification-url": "https://packagist.org/downloads/",
|
||||||
|
"license": [
|
||||||
|
"MIT"
|
||||||
|
],
|
||||||
|
"description": "Symfony bundle that adds password reset functionality.",
|
||||||
|
"support": {
|
||||||
|
"issues": "https://github.com/SymfonyCasts/reset-password-bundle/issues",
|
||||||
|
"source": "https://github.com/SymfonyCasts/reset-password-bundle/tree/v1.8.0"
|
||||||
|
},
|
||||||
|
"time": "2021-05-05T18:21:50+00:00"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name": "symfonycasts/verify-email-bundle",
|
"name": "symfonycasts/verify-email-bundle",
|
||||||
"version": "v1.5.0",
|
"version": "v1.5.0",
|
||||||
|
|
|
@ -13,4 +13,6 @@ return [
|
||||||
SymfonyCasts\Bundle\VerifyEmail\SymfonyCastsVerifyEmailBundle::class => ['all' => true],
|
SymfonyCasts\Bundle\VerifyEmail\SymfonyCastsVerifyEmailBundle::class => ['all' => true],
|
||||||
Symfony\WebpackEncoreBundle\WebpackEncoreBundle::class => ['all' => true],
|
Symfony\WebpackEncoreBundle\WebpackEncoreBundle::class => ['all' => true],
|
||||||
Knp\Bundle\TimeBundle\KnpTimeBundle::class => ['all' => true],
|
Knp\Bundle\TimeBundle\KnpTimeBundle::class => ['all' => true],
|
||||||
|
SymfonyCasts\Bundle\ResetPassword\SymfonyCastsResetPasswordBundle::class => ['all' => true],
|
||||||
|
Symfony\Bundle\MonologBundle\MonologBundle::class => ['all' => true],
|
||||||
];
|
];
|
||||||
|
|
|
@ -0,0 +1,19 @@
|
||||||
|
monolog:
|
||||||
|
handlers:
|
||||||
|
main:
|
||||||
|
type: stream
|
||||||
|
path: "%kernel.logs_dir%/%kernel.environment%.log"
|
||||||
|
level: debug
|
||||||
|
channels: ["!event"]
|
||||||
|
# uncomment to get logging in your browser
|
||||||
|
# you may have to allow bigger header sizes in your Web server configuration
|
||||||
|
#firephp:
|
||||||
|
# type: firephp
|
||||||
|
# level: info
|
||||||
|
#chromephp:
|
||||||
|
# type: chromephp
|
||||||
|
# level: info
|
||||||
|
console:
|
||||||
|
type: console
|
||||||
|
process_psr_3_messages: false
|
||||||
|
channels: ["!event", "!doctrine", "!console"]
|
|
@ -7,9 +7,10 @@ framework:
|
||||||
# Enables session support. Note that the session will ONLY be started if you read or write from it.
|
# Enables session support. Note that the session will ONLY be started if you read or write from it.
|
||||||
# Remove or comment this section to explicitly disable session support.
|
# Remove or comment this section to explicitly disable session support.
|
||||||
session:
|
session:
|
||||||
handler_id: null
|
enabled: true
|
||||||
cookie_secure: auto
|
handler_id: Symfony\Component\HttpFoundation\Session\Storage\Handler\PdoSessionHandler
|
||||||
cookie_samesite: lax
|
cookie_secure: 'auto'
|
||||||
|
cookie_samesite: 'lax'
|
||||||
|
|
||||||
#esi: true
|
#esi: true
|
||||||
#fragments: true
|
#fragments: true
|
||||||
|
|
|
@ -0,0 +1,8 @@
|
||||||
|
# As of Symfony 5.1, deprecations are logged in the dedicated "deprecation" channel when it exists
|
||||||
|
#monolog:
|
||||||
|
# channels: [deprecation]
|
||||||
|
# handlers:
|
||||||
|
# deprecation:
|
||||||
|
# type: stream
|
||||||
|
# channels: [deprecation]
|
||||||
|
# path: php://stderr
|
|
@ -0,0 +1,17 @@
|
||||||
|
monolog:
|
||||||
|
handlers:
|
||||||
|
main:
|
||||||
|
type: fingers_crossed
|
||||||
|
action_level: error
|
||||||
|
handler: nested
|
||||||
|
excluded_http_codes: [404, 405]
|
||||||
|
buffer_size: 50 # How many messages should be saved? Prevent memory leaks
|
||||||
|
nested:
|
||||||
|
type: stream
|
||||||
|
path: php://stderr
|
||||||
|
level: debug
|
||||||
|
formatter: monolog.formatter.json
|
||||||
|
console:
|
||||||
|
type: console
|
||||||
|
process_psr_3_messages: false
|
||||||
|
channels: ["!event", "!doctrine"]
|
|
@ -0,0 +1,2 @@
|
||||||
|
symfonycasts_reset_password:
|
||||||
|
request_password_repository: App\Repository\ResetPasswordRequestRepository
|
|
@ -0,0 +1,12 @@
|
||||||
|
monolog:
|
||||||
|
handlers:
|
||||||
|
main:
|
||||||
|
type: fingers_crossed
|
||||||
|
action_level: error
|
||||||
|
handler: nested
|
||||||
|
excluded_http_codes: [404, 405]
|
||||||
|
channels: ["!event"]
|
||||||
|
nested:
|
||||||
|
type: stream
|
||||||
|
path: "%kernel.logs_dir%/%kernel.environment%.log"
|
||||||
|
level: debug
|
|
@ -1,2 +1,3 @@
|
||||||
twig:
|
twig:
|
||||||
default_path: '%kernel.project_dir%/templates'
|
default_path: '%kernel.project_dir%/templates'
|
||||||
|
form_themes: ['bootstrap_4_layout.html.twig']
|
||||||
|
|
|
@ -27,5 +27,9 @@ services:
|
||||||
resource: '../src/Controller/'
|
resource: '../src/Controller/'
|
||||||
tags: ['controller.service_arguments']
|
tags: ['controller.service_arguments']
|
||||||
|
|
||||||
|
|
||||||
|
Symfony\Component\HttpFoundation\Session\Storage\Handler\PdoSessionHandler:
|
||||||
|
arguments:
|
||||||
|
- '%env(DATABASE_URL)%'
|
||||||
# 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
|
||||||
|
|
|
@ -0,0 +1,32 @@
|
||||||
|
<?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 Version20210609175005 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 reset_password_request (id INT AUTO_INCREMENT NOT NULL, user_id INT NOT NULL, selector VARCHAR(20) NOT NULL, hashed_token VARCHAR(100) NOT NULL, requested_at DATETIME NOT NULL COMMENT \'(DC2Type:datetime_immutable)\', expires_at DATETIME NOT NULL COMMENT \'(DC2Type:datetime_immutable)\', INDEX IDX_7CE748AA76ED395 (user_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB');
|
||||||
|
$this->addSql('ALTER TABLE reset_password_request ADD CONSTRAINT FK_7CE748AA76ED395 FOREIGN KEY (user_id) REFERENCES user (id)');
|
||||||
|
}
|
||||||
|
|
||||||
|
public function down(Schema $schema): void
|
||||||
|
{
|
||||||
|
// this down() migration is auto-generated, please modify it to your needs
|
||||||
|
$this->addSql('DROP TABLE reset_password_request');
|
||||||
|
}
|
||||||
|
}
|
10
package.json
10
package.json
|
@ -2,8 +2,11 @@
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@symfony/stimulus-bridge": "^2.0.0",
|
"@symfony/stimulus-bridge": "^2.0.0",
|
||||||
"@symfony/webpack-encore": "^1.0.0",
|
"@symfony/webpack-encore": "^1.0.0",
|
||||||
|
"bootstrap": "^5.0.1",
|
||||||
"core-js": "^3.0.0",
|
"core-js": "^3.0.0",
|
||||||
"file-loader": "^6.0.0",
|
"file-loader": "^6.0.0",
|
||||||
|
"jquery": "^3.6.0",
|
||||||
|
"popper.js": "^1.16.1",
|
||||||
"regenerator-runtime": "^0.13.2",
|
"regenerator-runtime": "^0.13.2",
|
||||||
"sass": "^1.34.0",
|
"sass": "^1.34.0",
|
||||||
"sass-loader": "^11.0.0",
|
"sass-loader": "^11.0.0",
|
||||||
|
@ -21,7 +24,8 @@
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@fortawesome/fontawesome-free": "^5.15.3",
|
"@fortawesome/fontawesome-free": "^5.15.3",
|
||||||
"@popperjs/core": "^2.9.2",
|
"@popperjs/core": "^2.9.2",
|
||||||
"bootstrap": "^5.0.1",
|
"copy-webpack-plugin": "^9.0.0",
|
||||||
"copy-webpack-plugin": "^9.0.0"
|
"webpack": "^5.38.1"
|
||||||
}
|
},
|
||||||
|
"peerDependencies": {}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,176 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Controller;
|
||||||
|
|
||||||
|
use App\Entity\User;
|
||||||
|
use App\Form\ChangePasswordFormType;
|
||||||
|
use App\Form\ResetPasswordRequestFormType;
|
||||||
|
use Symfony\Bridge\Twig\Mime\TemplatedEmail;
|
||||||
|
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
||||||
|
use Symfony\Component\HttpFoundation\RedirectResponse;
|
||||||
|
use Symfony\Component\HttpFoundation\Request;
|
||||||
|
use Symfony\Component\HttpFoundation\Response;
|
||||||
|
use Symfony\Component\Mailer\MailerInterface;
|
||||||
|
use Symfony\Component\Mime\Address;
|
||||||
|
use Symfony\Component\Routing\Annotation\Route;
|
||||||
|
use Symfony\Component\Security\Core\Encoder\UserPasswordEncoderInterface;
|
||||||
|
use SymfonyCasts\Bundle\ResetPassword\Controller\ResetPasswordControllerTrait;
|
||||||
|
use SymfonyCasts\Bundle\ResetPassword\Exception\ResetPasswordExceptionInterface;
|
||||||
|
use SymfonyCasts\Bundle\ResetPassword\ResetPasswordHelperInterface;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class ResetPasswordController
|
||||||
|
* @package App\Controller
|
||||||
|
*/
|
||||||
|
#[Route('/reset-password')]
|
||||||
|
class ResetPasswordController extends AbstractController
|
||||||
|
{
|
||||||
|
use ResetPasswordControllerTrait;
|
||||||
|
|
||||||
|
private $resetPasswordHelper;
|
||||||
|
|
||||||
|
public function __construct(ResetPasswordHelperInterface $resetPasswordHelper)
|
||||||
|
{
|
||||||
|
$this->resetPasswordHelper = $resetPasswordHelper;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Display & process form to request a password reset.
|
||||||
|
*/
|
||||||
|
#[Route('', name: 'app_forgot_password_request')]
|
||||||
|
public function request(Request $request, MailerInterface $mailer): Response
|
||||||
|
{
|
||||||
|
$form = $this->createForm(ResetPasswordRequestFormType::class);
|
||||||
|
$form->handleRequest($request);
|
||||||
|
|
||||||
|
if ($form->isSubmitted() && $form->isValid()) {
|
||||||
|
return $this->processSendingPasswordResetEmail(
|
||||||
|
$form->get('email')->getData(),
|
||||||
|
$mailer
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this->render('security/request.html.twig', [
|
||||||
|
'requestForm' => $form->createView(),
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Confirmation page after a user has requested a password reset.
|
||||||
|
*/
|
||||||
|
#[Route('/check-email', name: 'app_check_email')]
|
||||||
|
public function checkEmail(): Response
|
||||||
|
{
|
||||||
|
// Generate a fake token if the user does not exist or someone hit this page directly.
|
||||||
|
// This prevents exposing whether or not a user was found with the given email address or not
|
||||||
|
if (null === ($resetToken = $this->getTokenObjectFromSession())) {
|
||||||
|
$resetToken = $this->resetPasswordHelper->generateFakeResetToken();
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this->render('security/check_email.html.twig', [
|
||||||
|
'resetToken' => $resetToken,
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Validates and process the reset URL that the user clicked in their email.
|
||||||
|
*/
|
||||||
|
#[Route('/reset/{token}', name: 'app_reset_password')]
|
||||||
|
public function reset(Request $request, UserPasswordEncoderInterface $passwordEncoder, string $token = null): Response
|
||||||
|
{
|
||||||
|
if ($token) {
|
||||||
|
// We store the token in session and remove it from the URL, to avoid the URL being
|
||||||
|
// loaded in a browser and potentially leaking the token to 3rd party JavaScript.
|
||||||
|
$this->storeTokenInSession($token);
|
||||||
|
|
||||||
|
return $this->redirectToRoute('app_reset_password');
|
||||||
|
}
|
||||||
|
|
||||||
|
$token = $this->getTokenFromSession();
|
||||||
|
if ($token === null) {
|
||||||
|
throw $this->createNotFoundException('No reset password token found in the URL or in the session.');
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
$user = $this->resetPasswordHelper->validateTokenAndFetchUser($token);
|
||||||
|
} catch (ResetPasswordExceptionInterface $e) {
|
||||||
|
$this->addFlash('reset_password_error', sprintf(
|
||||||
|
'There was a problem validating your reset request - %s',
|
||||||
|
$e->getReason()
|
||||||
|
));
|
||||||
|
|
||||||
|
return $this->redirectToRoute('app_forgot_password_request');
|
||||||
|
}
|
||||||
|
|
||||||
|
// The token is valid; allow the user to change their password.
|
||||||
|
$form = $this->createForm(ChangePasswordFormType::class);
|
||||||
|
$form->handleRequest($request);
|
||||||
|
|
||||||
|
if ($form->isSubmitted() && $form->isValid()) {
|
||||||
|
// A password reset token should be used only once, remove it.
|
||||||
|
$this->resetPasswordHelper->removeResetRequest($token);
|
||||||
|
|
||||||
|
// Encode the plain password, and set it.
|
||||||
|
$encodedPassword = $passwordEncoder->encodePassword(
|
||||||
|
$user,
|
||||||
|
$form->get('plainPassword')->getData()
|
||||||
|
);
|
||||||
|
|
||||||
|
$user->setPassword($encodedPassword);
|
||||||
|
$this->getDoctrine()->getManager()->flush();
|
||||||
|
|
||||||
|
// The session is cleaned up after the password has been changed.
|
||||||
|
$this->cleanSessionAfterReset();
|
||||||
|
|
||||||
|
return $this->redirectToRoute('blogs');
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this->render('security/reset.html.twig', [
|
||||||
|
'resetForm' => $form->createView(),
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
|
||||||
|
private function processSendingPasswordResetEmail(string $emailFormData, MailerInterface $mailer): RedirectResponse
|
||||||
|
{
|
||||||
|
$user = $this->getDoctrine()->getRepository(User::class)->findOneBy([
|
||||||
|
'email' => $emailFormData,
|
||||||
|
]);
|
||||||
|
|
||||||
|
// Do not reveal whether a user account was found or not.
|
||||||
|
if (!$user) {
|
||||||
|
return $this->redirectToRoute('app_check_email');
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
$resetToken = $this->resetPasswordHelper->generateResetToken($user);
|
||||||
|
} catch (ResetPasswordExceptionInterface $e) {
|
||||||
|
// If you want to tell the user why a reset email was not sent, uncomment
|
||||||
|
// the lines below and change the redirect to 'app_forgot_password_request'.
|
||||||
|
// Caution: This may reveal if a user is registered or not.
|
||||||
|
//
|
||||||
|
// $this->addFlash('reset_password_error', sprintf(
|
||||||
|
// 'There was a problem handling your password reset request - %s',
|
||||||
|
// $e->getReason()
|
||||||
|
// ));
|
||||||
|
|
||||||
|
return $this->redirectToRoute('app_check_email');
|
||||||
|
}
|
||||||
|
|
||||||
|
$email = (new TemplatedEmail())
|
||||||
|
->from(new Address('tracer@24unix.net', '24unix.net'))
|
||||||
|
->to($user->getEmail())
|
||||||
|
->subject('Your password reset request')
|
||||||
|
->htmlTemplate('security/email.html.twig')
|
||||||
|
->context([
|
||||||
|
'resetToken' => $resetToken,
|
||||||
|
])
|
||||||
|
;
|
||||||
|
|
||||||
|
$mailer->send($email);
|
||||||
|
|
||||||
|
// Store the token object in session for retrieval in check-email route.
|
||||||
|
$this->setTokenObjectInSession($resetToken);
|
||||||
|
|
||||||
|
return $this->redirectToRoute('app_check_email');
|
||||||
|
}
|
||||||
|
}
|
|
@ -2,17 +2,24 @@
|
||||||
|
|
||||||
namespace App\Controller;
|
namespace App\Controller;
|
||||||
|
|
||||||
|
use App\Entity\User;
|
||||||
|
use App\Form\RegistrationFormType;
|
||||||
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;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Class SecurityController
|
||||||
|
* @package App\Controller
|
||||||
|
*/
|
||||||
class SecurityController extends AbstractController
|
class SecurityController extends AbstractController
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* @Route("/login", name="app_login")
|
* @Route("/login", name="app_login")
|
||||||
*/
|
*/
|
||||||
public function login(AuthenticationUtils $authenticationUtils): Response
|
public function login( AuthenticationUtils $authenticationUtils): Response
|
||||||
{
|
{
|
||||||
// if ($this->getUser()) {
|
// if ($this->getUser()) {
|
||||||
// return $this->redirectToRoute('target_path');
|
// return $this->redirectToRoute('target_path');
|
||||||
|
|
|
@ -0,0 +1,18 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Controller;
|
||||||
|
|
||||||
|
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
||||||
|
use Symfony\Component\HttpFoundation\Response;
|
||||||
|
use Symfony\Component\Routing\Annotation\Route;
|
||||||
|
|
||||||
|
class UserController extends AbstractController
|
||||||
|
{
|
||||||
|
#[Route('/user', name: 'user')]
|
||||||
|
public function index(): Response
|
||||||
|
{
|
||||||
|
return $this->render('user/index.html.twig', [
|
||||||
|
'controller_name' => 'UserController',
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,45 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Entity;
|
||||||
|
|
||||||
|
use App\Repository\ResetPasswordRequestRepository;
|
||||||
|
use Doctrine\ORM\Mapping as ORM;
|
||||||
|
use SymfonyCasts\Bundle\ResetPassword\Model\ResetPasswordRequestInterface;
|
||||||
|
use SymfonyCasts\Bundle\ResetPassword\Model\ResetPasswordRequestTrait;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ORM\Entity(repositoryClass=ResetPasswordRequestRepository::class)
|
||||||
|
*/
|
||||||
|
class ResetPasswordRequest implements ResetPasswordRequestInterface
|
||||||
|
{
|
||||||
|
use ResetPasswordRequestTrait;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ORM\Id
|
||||||
|
* @ORM\GeneratedValue
|
||||||
|
* @ORM\Column(type="integer")
|
||||||
|
*/
|
||||||
|
private $id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @ORM\ManyToOne(targetEntity=User::class)
|
||||||
|
* @ORM\JoinColumn(nullable=false)
|
||||||
|
*/
|
||||||
|
private $user;
|
||||||
|
|
||||||
|
public function __construct(object $user, \DateTimeInterface $expiresAt, string $selector, string $hashedToken)
|
||||||
|
{
|
||||||
|
$this->user = $user;
|
||||||
|
$this->initialize($expiresAt, $selector, $hashedToken);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getId(): ?int
|
||||||
|
{
|
||||||
|
return $this->id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getUser(): object
|
||||||
|
{
|
||||||
|
return $this->user;
|
||||||
|
}
|
||||||
|
}
|
|
@ -8,13 +8,16 @@ use Doctrine\Common\Collections\Collection;
|
||||||
use Doctrine\ORM\Mapping as ORM;
|
use Doctrine\ORM\Mapping as ORM;
|
||||||
use JetBrains\PhpStorm\Pure;
|
use JetBrains\PhpStorm\Pure;
|
||||||
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
|
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
|
||||||
|
use Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface;
|
||||||
use Symfony\Component\Security\Core\User\UserInterface;
|
use Symfony\Component\Security\Core\User\UserInterface;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ORM\Entity(repositoryClass=UserRepository::class)
|
* @ORM\Entity(repositoryClass=UserRepository::class)
|
||||||
* @UniqueEntity(fields={"username"}, message="There is already an account with this username")
|
* @UniqueEntity(fields={"username"}, message="There is already an account with this username")
|
||||||
|
* @ORM\HasLifecycleCallbacks
|
||||||
|
* @method string getUserIdentifier()
|
||||||
*/
|
*/
|
||||||
class User implements UserInterface
|
class User implements UserInterface, PasswordAuthenticatedUserInterface
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* @ORM\Id
|
* @ORM\Id
|
||||||
|
@ -297,4 +300,20 @@ class User implements UserInterface
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function __call(string $name, array $arguments)
|
||||||
|
{
|
||||||
|
// TODO: Implement @method string getUserIdentifier()
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets triggered only on insert
|
||||||
|
|
||||||
|
* @ORM\PrePersist
|
||||||
|
*/
|
||||||
|
public function onPrePersist()
|
||||||
|
{
|
||||||
|
$this->createdAt = new \DateTime();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,51 @@
|
||||||
|
<?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 ChangePasswordFormType extends AbstractType
|
||||||
|
{
|
||||||
|
public function buildForm(FormBuilderInterface $builder, array $options): void
|
||||||
|
{
|
||||||
|
$builder
|
||||||
|
->add('plainPassword', RepeatedType::class, [
|
||||||
|
'type' => PasswordType::class,
|
||||||
|
'first_options' => [
|
||||||
|
'attr' => ['autocomplete' => 'new-password'],
|
||||||
|
'constraints' => [
|
||||||
|
new NotBlank([
|
||||||
|
'message' => 'Please enter a password',
|
||||||
|
]),
|
||||||
|
new Length([
|
||||||
|
'min' => 6,
|
||||||
|
'minMessage' => 'Your password should be at least {{ limit }} characters',
|
||||||
|
// max length allowed by Symfony for security reasons
|
||||||
|
'max' => 4096,
|
||||||
|
]),
|
||||||
|
],
|
||||||
|
'label' => 'New password',
|
||||||
|
],
|
||||||
|
'second_options' => [
|
||||||
|
'attr' => ['autocomplete' => 'new-password'],
|
||||||
|
'label' => 'Repeat Password',
|
||||||
|
],
|
||||||
|
'invalid_message' => 'The password fields must match.',
|
||||||
|
// Instead of being set onto the object directly,
|
||||||
|
// this is read and encoded in the controller
|
||||||
|
'mapped' => false,
|
||||||
|
])
|
||||||
|
;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function configureOptions(OptionsResolver $resolver): void
|
||||||
|
{
|
||||||
|
$resolver->setDefaults([]);
|
||||||
|
}
|
||||||
|
}
|
|
@ -5,6 +5,7 @@ namespace App\Form;
|
||||||
use App\Entity\User;
|
use App\Entity\User;
|
||||||
use Symfony\Component\Form\AbstractType;
|
use Symfony\Component\Form\AbstractType;
|
||||||
use Symfony\Component\Form\Extension\Core\Type\CheckboxType;
|
use Symfony\Component\Form\Extension\Core\Type\CheckboxType;
|
||||||
|
use Symfony\Component\Form\Extension\Core\Type\EmailType;
|
||||||
use Symfony\Component\Form\Extension\Core\Type\PasswordType;
|
use Symfony\Component\Form\Extension\Core\Type\PasswordType;
|
||||||
use Symfony\Component\Form\FormBuilderInterface;
|
use Symfony\Component\Form\FormBuilderInterface;
|
||||||
use Symfony\Component\OptionsResolver\OptionsResolver;
|
use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||||
|
@ -43,7 +44,9 @@ class RegistrationFormType extends AbstractType
|
||||||
]),
|
]),
|
||||||
],
|
],
|
||||||
])
|
])
|
||||||
;
|
->add('firstName')
|
||||||
|
->add('lastName')
|
||||||
|
->add('email', EmailType::class);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function configureOptions(OptionsResolver $resolver)
|
public function configureOptions(OptionsResolver $resolver)
|
||||||
|
|
|
@ -0,0 +1,31 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Form;
|
||||||
|
|
||||||
|
use Symfony\Component\Form\AbstractType;
|
||||||
|
use Symfony\Component\Form\Extension\Core\Type\EmailType;
|
||||||
|
use Symfony\Component\Form\FormBuilderInterface;
|
||||||
|
use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||||
|
use Symfony\Component\Validator\Constraints\NotBlank;
|
||||||
|
|
||||||
|
class ResetPasswordRequestFormType extends AbstractType
|
||||||
|
{
|
||||||
|
public function buildForm(FormBuilderInterface $builder, array $options): void
|
||||||
|
{
|
||||||
|
$builder
|
||||||
|
->add('email', EmailType::class, [
|
||||||
|
'attr' => ['autocomplete' => 'email'],
|
||||||
|
'constraints' => [
|
||||||
|
new NotBlank([
|
||||||
|
'message' => 'Please enter your email',
|
||||||
|
]),
|
||||||
|
],
|
||||||
|
])
|
||||||
|
;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function configureOptions(OptionsResolver $resolver): void
|
||||||
|
{
|
||||||
|
$resolver->setDefaults([]);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,31 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace App\Repository;
|
||||||
|
|
||||||
|
use App\Entity\ResetPasswordRequest;
|
||||||
|
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
|
||||||
|
use Doctrine\Persistence\ManagerRegistry;
|
||||||
|
use SymfonyCasts\Bundle\ResetPassword\Model\ResetPasswordRequestInterface;
|
||||||
|
use SymfonyCasts\Bundle\ResetPassword\Persistence\Repository\ResetPasswordRequestRepositoryTrait;
|
||||||
|
use SymfonyCasts\Bundle\ResetPassword\Persistence\ResetPasswordRequestRepositoryInterface;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @method ResetPasswordRequest|null find($id, $lockMode = null, $lockVersion = null)
|
||||||
|
* @method ResetPasswordRequest|null findOneBy(array $criteria, array $orderBy = null)
|
||||||
|
* @method ResetPasswordRequest[] findAll()
|
||||||
|
* @method ResetPasswordRequest[] findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null)
|
||||||
|
*/
|
||||||
|
class ResetPasswordRequestRepository extends ServiceEntityRepository implements ResetPasswordRequestRepositoryInterface
|
||||||
|
{
|
||||||
|
use ResetPasswordRequestRepositoryTrait;
|
||||||
|
|
||||||
|
public function __construct(ManagerRegistry $registry)
|
||||||
|
{
|
||||||
|
parent::__construct($registry, ResetPasswordRequest::class);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function createResetPasswordRequest(object $user, \DateTimeInterface $expiresAt, string $selector, string $hashedToken): ResetPasswordRequestInterface
|
||||||
|
{
|
||||||
|
return new ResetPasswordRequest($user, $expiresAt, $selector, $hashedToken);
|
||||||
|
}
|
||||||
|
}
|
|
@ -10,6 +10,7 @@ use Symfony\Component\HttpFoundation\Request;
|
||||||
use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
|
use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
|
||||||
use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
|
use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
|
||||||
use Symfony\Component\Security\Core\Encoder\UserPasswordEncoderInterface;
|
use Symfony\Component\Security\Core\Encoder\UserPasswordEncoderInterface;
|
||||||
|
use Symfony\Component\Security\Core\Exception\AuthenticationException;
|
||||||
use Symfony\Component\Security\Core\Exception\InvalidCsrfTokenException;
|
use Symfony\Component\Security\Core\Exception\InvalidCsrfTokenException;
|
||||||
use Symfony\Component\Security\Core\Exception\UsernameNotFoundException;
|
use Symfony\Component\Security\Core\Exception\UsernameNotFoundException;
|
||||||
use Symfony\Component\Security\Core\Security;
|
use Symfony\Component\Security\Core\Security;
|
||||||
|
@ -145,7 +146,7 @@ class AppAuthenticator extends AbstractFormLoginAuthenticator implements Passwor
|
||||||
*
|
*
|
||||||
* @throws AuthenticationException
|
* @throws AuthenticationException
|
||||||
*/
|
*/
|
||||||
public function checkCredentials($credentials, UserInterface $user)
|
public function checkCredentials($credentials, UserInterface $user): bool
|
||||||
{
|
{
|
||||||
//return true;
|
//return true;
|
||||||
return $this->passwordEncoder->isPasswordValid($user, $credentials['password']);
|
return $this->passwordEncoder->isPasswordValid($user, $credentials['password']);
|
||||||
|
|
33
symfony.lock
33
symfony.lock
|
@ -109,6 +109,9 @@
|
||||||
"laminas/laminas-zendframework-bridge": {
|
"laminas/laminas-zendframework-bridge": {
|
||||||
"version": "1.2.0"
|
"version": "1.2.0"
|
||||||
},
|
},
|
||||||
|
"monolog/monolog": {
|
||||||
|
"version": "2.2.0"
|
||||||
|
},
|
||||||
"nikic/php-parser": {
|
"nikic/php-parser": {
|
||||||
"version": "v4.10.5"
|
"version": "v4.10.5"
|
||||||
},
|
},
|
||||||
|
@ -246,6 +249,24 @@
|
||||||
"symfony/mime": {
|
"symfony/mime": {
|
||||||
"version": "v5.2.9"
|
"version": "v5.2.9"
|
||||||
},
|
},
|
||||||
|
"symfony/monolog-bridge": {
|
||||||
|
"version": "v5.3.0"
|
||||||
|
},
|
||||||
|
"symfony/monolog-bundle": {
|
||||||
|
"version": "3.7",
|
||||||
|
"recipe": {
|
||||||
|
"repo": "github.com/symfony/recipes",
|
||||||
|
"branch": "master",
|
||||||
|
"version": "3.7",
|
||||||
|
"ref": "329f6a5ef2e7aa033f802be833ef8d1268dd0848"
|
||||||
|
},
|
||||||
|
"files": [
|
||||||
|
"config/packages/dev/monolog.yaml",
|
||||||
|
"config/packages/prod/deprecations.yaml",
|
||||||
|
"config/packages/prod/monolog.yaml",
|
||||||
|
"config/packages/test/monolog.yaml"
|
||||||
|
]
|
||||||
|
},
|
||||||
"symfony/options-resolver": {
|
"symfony/options-resolver": {
|
||||||
"version": "v5.2.4"
|
"version": "v5.2.4"
|
||||||
},
|
},
|
||||||
|
@ -438,6 +459,18 @@
|
||||||
"symfony/yaml": {
|
"symfony/yaml": {
|
||||||
"version": "v5.2.9"
|
"version": "v5.2.9"
|
||||||
},
|
},
|
||||||
|
"symfonycasts/reset-password-bundle": {
|
||||||
|
"version": "1.0",
|
||||||
|
"recipe": {
|
||||||
|
"repo": "github.com/symfony/recipes",
|
||||||
|
"branch": "master",
|
||||||
|
"version": "1.0",
|
||||||
|
"ref": "97c1627c0384534997ae1047b93be517ca16de43"
|
||||||
|
},
|
||||||
|
"files": [
|
||||||
|
"config/packages/reset_password.yaml"
|
||||||
|
]
|
||||||
|
},
|
||||||
"symfonycasts/verify-email-bundle": {
|
"symfonycasts/verify-email-bundle": {
|
||||||
"version": "v1.5.0"
|
"version": "v1.5.0"
|
||||||
},
|
},
|
||||||
|
|
|
@ -9,20 +9,25 @@
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
<div class="collapse navbar-collapse" id="CollapsingNavbar">
|
<div class="collapse navbar-collapse" id="CollapsingNavbar">
|
||||||
<ul class="navbar-nav ml-auto">
|
<ul class="navbar-nav ms-auto">
|
||||||
<li class="nav-item dropdown my-2 my-lg-0">
|
<form class="d-flex">
|
||||||
|
<input class="form-control me-2 my-2" type="search" placeholder="Search" aria-label="Search">
|
||||||
|
<button class="btn" type="submit">Search</button>
|
||||||
|
</form>
|
||||||
|
{% if is_granted('ROLE_USER') %}
|
||||||
|
<li class="nav-item dropdown me-auto my-2 my-lg-0">
|
||||||
<button type="button" id="navbar-dropdown" data-bs-target="#dropdown-menu" data-bs-toggle="dropdown"
|
<button type="button" id="navbar-dropdown" data-bs-target="#dropdown-menu" data-bs-toggle="dropdown"
|
||||||
class="btn btn-primary dropdown-toggle ml-auto button-login">
|
class="btn btn-primary dropdown-toggle ml-auto button-login">
|
||||||
{{ app.user.username }}
|
{{ app.user.username }}
|
||||||
</button>
|
</button>
|
||||||
|
|
||||||
{% if is_granted('ROLE_USER') %}
|
<div class="dropdown-menu dropdown-menu-dark dropdown-menu-end" id="dropdown-menu"
|
||||||
<div class="dropdown-menu dropdown-menu-dark dropdown-menu-end" id="dropdown-menu" aria-labelledby="navbar-dropdown">
|
aria-labelledby="navbar-dropdown">
|
||||||
<a class="dropdown-item" href="{{ path('user') }}">
|
<a class="dropdown-item" href="{{ path('user') }}">
|
||||||
<span class="fas fa-user" aria-hidden="true"></span>
|
<span class="fas fa-user" aria-hidden="true"></span>
|
||||||
Profile</a>
|
Profile</a>
|
||||||
<a class="dropdown-item" href="#">
|
<a class="dropdown-item" href="#">
|
||||||
<span class="fas fa-cog" aria-hidden="true"></span>
|
<span class="fas fa-wrench" aria-hidden="true"></span>
|
||||||
Settings</a>
|
Settings</a>
|
||||||
<div class="dropdown-divider"></div>
|
<div class="dropdown-divider"></div>
|
||||||
{% if is_granted('ROLE_ADMIN') %}
|
{% if is_granted('ROLE_ADMIN') %}
|
||||||
|
@ -34,7 +39,7 @@
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<a class="dropdown-item" href="{{ path('app_logout') }}">
|
<a class="dropdown-item" href="{{ path('app_logout') }}">
|
||||||
<span class="fas fa-sign-out-alt" aria-hidden="true"></span>
|
<span class="fas fa-sign-out-alt" aria-hidden="true"></span>
|
||||||
Logout
|
Logout
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
@ -43,7 +48,7 @@
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="btn btn-primary button-login" href="{{ path('app_login') }}" role="button"
|
<a class="btn btn-primary button-login" href="{{ path('app_login') }}" role="button"
|
||||||
id="buttonLogin">
|
id="buttonLogin">
|
||||||
Login
|
<span class="fas fa-sign-out-alt me-2" aria-hidden="true"></span>Sign In
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
<title>{% block title %}Spookie{% endblock %}</title>
|
<title>{% block title %}Spookie{% endblock %}</title>
|
||||||
|
|
||||||
{% block stylesheets %}
|
{% block stylesheets %}
|
||||||
|
|
|
@ -1,12 +1,80 @@
|
||||||
|
{# templates/blog/blog_show.html.twig #}
|
||||||
{% extends 'base.html.twig' %}
|
{% extends 'base.html.twig' %}
|
||||||
|
|
||||||
{% block title %}
|
{% block title %} Blogpost {% endblock %}
|
||||||
|
|
||||||
{% endblock %}
|
|
||||||
|
|
||||||
{% block body %}
|
{% block body %}
|
||||||
Blogtest
|
|
||||||
|
<div class="container box">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<div class="show-article-container p-3 mt-4">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<img class="show-article-img" src="{{ asset('build/images/asteroid.jpeg') }}" alt="asteroid">
|
||||||
|
<div class="show-article-title-container d-inline-block pl-3 align-middle">
|
||||||
|
<span class="show-article-title ">{{ blog.title }}</span>
|
||||||
|
<br>
|
||||||
|
<span class="align-left article-details">
|
||||||
|
<img class="article-author-img rounded-circle" src="{{ asset('build/images/alien-profile.png') }}" alt="profile">
|
||||||
|
{{ blog.author }}
|
||||||
|
</span>
|
||||||
|
<span class="pl-2 article-details">{{ blog.createdAt | ago }} updated: {{ blog.editedAt | ago }} </span>
|
||||||
|
<span class="pl-2 article-details">
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<div class="article-text">
|
||||||
{{ blog.content }}
|
{{ blog.content }}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<p class="share-icons mb-5">
|
||||||
|
<span class="pr-1">Share:</span>
|
||||||
|
<i class="pr-1 fa-2x fab fa-facebook-square"></i>
|
||||||
|
<i class="pr-1 fa-2x fab fa-twitter-square"></i>
|
||||||
|
<i class="pr-1 fa-2x fab fa-reddit-square"></i>
|
||||||
|
<i class="pr-1 fa-2x fa fa-share-alt-square"></i>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<h3>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
<i class="pr-3 fa fa-comment"></i>Comments</h3>
|
||||||
|
|
||||||
|
-->
|
||||||
|
<hr>
|
||||||
|
|
||||||
|
<div class="row mb-5">
|
||||||
|
<div class="col-sm-12">
|
||||||
|
<img class="comment-img rounded-circle" src="{{ asset('build/images/alien-profile.png') }}" alt="profile">
|
||||||
|
<div class="comment-container d-inline-block pl-3 align-top">
|
||||||
|
<span class="commenter-name">Amy Oort</span>
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="articleText"></label>
|
||||||
|
<textarea class="form-control comment-form" id="articleText" rows="1"></textarea>
|
||||||
|
</div>
|
||||||
|
<button type="submit" class="btn btn-primary">Comment</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,21 +0,0 @@
|
||||||
{% extends 'base.html.twig' %}
|
|
||||||
|
|
||||||
{% block title %}Register{% endblock %}
|
|
||||||
|
|
||||||
{% block body %}
|
|
||||||
{% for flashError in app.flashes('verify_email_error') %}
|
|
||||||
<div class="alert alert-danger" role="alert">{{ flashError }}</div>
|
|
||||||
{% endfor %}
|
|
||||||
|
|
||||||
<h1>Register</h1>
|
|
||||||
|
|
||||||
{{ form_start(registrationForm) }}
|
|
||||||
{{ form_row(registrationForm.username) }}
|
|
||||||
{{ form_row(registrationForm.plainPassword, {
|
|
||||||
label: 'Password'
|
|
||||||
}) }}
|
|
||||||
{{ form_row(registrationForm.agreeTerms) }}
|
|
||||||
|
|
||||||
<button type="submit" class="btn">Register</button>
|
|
||||||
{{ form_end(registrationForm) }}
|
|
||||||
{% endblock %}
|
|
|
@ -0,0 +1,11 @@
|
||||||
|
{% extends 'base.html.twig' %}
|
||||||
|
|
||||||
|
{% block title %}Password Reset Email Sent{% endblock %}
|
||||||
|
|
||||||
|
{% block body %}
|
||||||
|
<p>
|
||||||
|
If an account matching your email exists, then an email was just sent that contains a link that you can use to reset your password.
|
||||||
|
This link will expire in {{ resetToken.expirationMessageKey|trans(resetToken.expirationMessageData, 'ResetPasswordBundle') }}.
|
||||||
|
</p>
|
||||||
|
<p>If you don't receive an email please check your spam folder or <a href="{{ path('app_forgot_password_request') }}">try again</a>.</p>
|
||||||
|
{% endblock %}
|
|
@ -0,0 +1,9 @@
|
||||||
|
<h1>Hi!</h1>
|
||||||
|
|
||||||
|
<p>To reset your password, please visit the following link</p>
|
||||||
|
|
||||||
|
<a href="{{ url('app_reset_password', {token: resetToken.token}) }}">{{ url('app_reset_password', {token: resetToken.token}) }}</a>
|
||||||
|
|
||||||
|
<p>This link will expire in {{ resetToken.expirationMessageKey|trans(resetToken.expirationMessageData, 'ResetPasswordBundle') }}.</p>
|
||||||
|
|
||||||
|
<p>Cheers!</p>
|
|
@ -3,26 +3,36 @@
|
||||||
{% block title %}Log in!{% endblock %}
|
{% block title %}Log in!{% endblock %}
|
||||||
|
|
||||||
{% block body %}
|
{% block body %}
|
||||||
<form method="post">
|
|
||||||
{% if error %}
|
|
||||||
<div class="alert alert-danger">{{ error.messageKey|trans(error.messageData, 'security') }}</div>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{% if app.user %}
|
{% for flashError in app.flashes('verify_email_error') %}
|
||||||
<div class="mb-3">
|
<div class="alert alert-danger" role="alert">{{ flashError }}</div>
|
||||||
You are logged in as {{ app.user.username }}, <a href="{{ path('app_logout') }}">Logout</a>
|
{% endfor %}
|
||||||
|
|
||||||
|
<form method="post">
|
||||||
|
|
||||||
|
<div class="container">
|
||||||
|
<div class="d-flex justify-content-center h-100">
|
||||||
|
<div class="card-header">
|
||||||
|
<h3>Please Sign in</h3>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
<div class="card">
|
||||||
|
<div class="card-body">
|
||||||
|
|
||||||
<h1 class="h3 mb-3 font-weight-normal">Please sign in</h1>
|
<div class="input-group form-group">
|
||||||
<label for="inputUsername">Username</label>
|
<div class="input-group-prepend">
|
||||||
<input type="text" value="{{ last_username }}" name="username" id="inputUsername" class="form-control" autocomplete="username" required autofocus>
|
<span class="input-group-text"><i class="fas fa-user"></i></span>
|
||||||
<label for="inputPassword">Password</label>
|
</div>
|
||||||
<input type="password" name="password" id="inputPassword" class="form-control" autocomplete="current-password" required>
|
<input type="text" value="{{ last_username }}" name="username" id="inputUsername"
|
||||||
|
class="form-control" autocomplete="username" required autofocus>
|
||||||
|
</div>
|
||||||
|
|
||||||
<input type="hidden" name="_csrf_token"
|
<div class="input-group form-group">
|
||||||
value="{{ csrf_token('authenticate') }}"
|
<div class="input-group-prepend">
|
||||||
>
|
<span class="input-group-text"><i class="fas fa-key"></i></span>
|
||||||
|
</div>
|
||||||
|
<input type="password" name="password" id="inputPassword" class="form-control"
|
||||||
|
autocomplete="current-password" required>
|
||||||
|
</div>
|
||||||
|
|
||||||
{#
|
{#
|
||||||
Uncomment this section and add a remember_me option below your firewall to activate remember me functionality.
|
Uncomment this section and add a remember_me option below your firewall to activate remember me functionality.
|
||||||
|
@ -35,8 +45,29 @@
|
||||||
</div>
|
</div>
|
||||||
#}
|
#}
|
||||||
|
|
||||||
<button class="btn btn-lg btn-primary" type="submit">
|
<button type="submit" class="submit-button">Sign In</button>
|
||||||
Sign in
|
<input type="hidden" name="_csrf_token" value="{{ csrf_token('authenticate') }}">
|
||||||
</button>
|
</div>
|
||||||
</form>
|
|
||||||
|
<div class="card-footer">
|
||||||
|
<div class="d-flex justify-content-center links">
|
||||||
|
Don't have an account yet? <a href=" {{ path('app_register') }}">Register!</a>
|
||||||
|
</div>
|
||||||
|
<div class="d-flex justify-content-center">
|
||||||
|
<a href="{{ path('app_forgot_password_request') }}">Forgot your password?</a>
|
||||||
|
</div>
|
||||||
|
<!--
|
||||||
|
<div class="d-flex justify-content-center social_icon">
|
||||||
|
<span><i class="fab fa-apple"></i></span>
|
||||||
|
<span><i class="fab fa-facebook"></i></span>
|
||||||
|
<span><i class="fab fa-google-plus"></i></span>
|
||||||
|
<span><i class="fab fa-twitter"></i></span>
|
||||||
|
</div>
|
||||||
|
-->
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</form>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
|
@ -0,0 +1,81 @@
|
||||||
|
{% extends 'base.html.twig' %}
|
||||||
|
|
||||||
|
{% block title %}Register{% endblock %}
|
||||||
|
|
||||||
|
{% block body %}
|
||||||
|
{% for flashError in app.flashes('verify_email_error') %}
|
||||||
|
<div class="alert alert-danger" role="alert">{{ flashError }}</div>
|
||||||
|
{% endfor %}
|
||||||
|
|
||||||
|
<div class="container">
|
||||||
|
<div class="d-flex justify-content-center h-100">
|
||||||
|
<div class="card-header">
|
||||||
|
<h3>Register</h3>
|
||||||
|
</div>
|
||||||
|
<div class="card">
|
||||||
|
<div class="card-body">
|
||||||
|
{{ form_start(registrationForm) }}
|
||||||
|
|
||||||
|
<div class="input-group form-group">
|
||||||
|
<div class="input-group-prepend">
|
||||||
|
<span class="input-group-text"><i class="fas fa-user"></i></span>
|
||||||
|
</div>
|
||||||
|
{{ form_widget(registrationForm.username, {'attr': {'placeholder':'Username'}} ) }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="input-group form-group">
|
||||||
|
<div class="input-group-prepend">
|
||||||
|
<span class="input-group-text"><i class="fas fa-key"></i></span>
|
||||||
|
</div>
|
||||||
|
{{ form_widget(registrationForm.plainPassword, {'attr': {'placeholder':'Password'}} ) }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="input-group form-group">
|
||||||
|
<div class="input-group-prepend">
|
||||||
|
<span class="input-group-text"></span>
|
||||||
|
</div>
|
||||||
|
{{ form_widget(registrationForm.firstName, {'attr': {'placeholder':'First Name'}} ) }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="input-group form-group">
|
||||||
|
<div class="input-group-prepend">
|
||||||
|
<span class="input-group-text"></span>
|
||||||
|
</div>
|
||||||
|
{{ form_widget(registrationForm.lastName, {'attr': {'placeholder':'Last Name'}} ) }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="input-group form-group">
|
||||||
|
<div class="input-group-prepend">
|
||||||
|
<span class="input-group-text"><i class="fas fa-envelope-square"></i></span>
|
||||||
|
</div>
|
||||||
|
{{ form_widget(registrationForm.email, {'attr': {'placeholder':'eMail'}} ) }}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{{ form_row(registrationForm.agreeTerms) }}
|
||||||
|
|
||||||
|
<button type="submit" class="submit-button">Register</button>
|
||||||
|
{{ form_end(registrationForm) }}
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="card-footer">
|
||||||
|
<div class="d-flex justify-content-center links">
|
||||||
|
Already have an account? <a href=" {{ path('app_login') }}">Sign In!</a>
|
||||||
|
</div>
|
||||||
|
<div class="d-flex justify-content-center">
|
||||||
|
<a href="#">Forgot your password?</a>
|
||||||
|
</div>
|
||||||
|
<!--
|
||||||
|
<div class="d-flex justify-content-center social_icon">
|
||||||
|
<span><i class="fab fa-apple"></i></span>
|
||||||
|
<span><i class="fab fa-facebook"></i></span>
|
||||||
|
<span><i class="fab fa-google-plus"></i></span>
|
||||||
|
<span><i class="fab fa-twitter"></i></span>
|
||||||
|
</div>
|
||||||
|
-->
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{% endblock %}
|
|
@ -0,0 +1,22 @@
|
||||||
|
{% extends 'base.html.twig' %}
|
||||||
|
|
||||||
|
{% block title %}Reset your password{% endblock %}
|
||||||
|
|
||||||
|
{% block body %}
|
||||||
|
{% for flashError in app.flashes('reset_password_error') %}
|
||||||
|
<div class="alert alert-danger" role="alert">{{ flashError }}</div>
|
||||||
|
{% endfor %}
|
||||||
|
<h1>Reset your password</h1>
|
||||||
|
|
||||||
|
{{ form_start(requestForm) }}
|
||||||
|
{{ form_row(requestForm.email) }}
|
||||||
|
<div>
|
||||||
|
<small>
|
||||||
|
Enter your email address and we we will send you a
|
||||||
|
link to reset your password.
|
||||||
|
</small>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<button class="btn btn-primary">Send password reset email</button>
|
||||||
|
{{ form_end(requestForm) }}
|
||||||
|
{% endblock %}
|
|
@ -0,0 +1,12 @@
|
||||||
|
{% extends 'base.html.twig' %}
|
||||||
|
|
||||||
|
{% block title %}Reset your password{% endblock %}
|
||||||
|
|
||||||
|
{% block body %}
|
||||||
|
<h1>Reset your password</h1>
|
||||||
|
|
||||||
|
{{ form_start(resetForm) }}
|
||||||
|
{{ form_row(resetForm.plainPassword) }}
|
||||||
|
<button class="btn btn-primary">Reset password</button>
|
||||||
|
{{ form_end(resetForm) }}
|
||||||
|
{% endblock %}
|
|
@ -0,0 +1,20 @@
|
||||||
|
{% extends 'base.html.twig' %}
|
||||||
|
|
||||||
|
{% block title %}Hello UserController!{% endblock %}
|
||||||
|
|
||||||
|
{% block body %}
|
||||||
|
<style>
|
||||||
|
.example-wrapper { margin: 1em auto; max-width: 800px; width: 95%; font: 18px/1.5 sans-serif; }
|
||||||
|
.example-wrapper code { background: #F5F5F5; padding: 2px 6px; }
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<div class="example-wrapper">
|
||||||
|
<h1>Hello {{ controller_name }}! ✅</h1>
|
||||||
|
|
||||||
|
This friendly message is coming from:
|
||||||
|
<ul>
|
||||||
|
<li>Your controller at <code><a href="{{ '/Users/tracer/Projects/24unix.net/24unix.net_web/24unix/src/Controller/UserController.php'|file_link(0) }}">src/Controller/UserController.php</a></code></li>
|
||||||
|
<li>Your template at <code><a href="{{ '/Users/tracer/Projects/24unix.net/24unix.net_web/24unix/templates/user/index.html.twig'|file_link(0) }}">templates/user/index.html.twig</a></code></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
{% endblock %}
|
|
@ -9,7 +9,7 @@ if (!Encore.isRuntimeEnvironmentConfigured()) {
|
||||||
const CopyWebpackPlugin = require("copy-webpack-plugin");
|
const CopyWebpackPlugin = require("copy-webpack-plugin");
|
||||||
|
|
||||||
Encore
|
Encore
|
||||||
// directory where compiled assets will be stored
|
// directory where compiled assets will be stored
|
||||||
.setOutputPath("public/build/")
|
.setOutputPath("public/build/")
|
||||||
.copyFiles({
|
.copyFiles({
|
||||||
from: "./assets/images",
|
from: "./assets/images",
|
||||||
|
@ -73,8 +73,8 @@ Encore
|
||||||
// requires WebpackEncoreBundle 1.4 or higher
|
// requires WebpackEncoreBundle 1.4 or higher
|
||||||
//.enableIntegrityHashes(Encore.isProduction())
|
//.enableIntegrityHashes(Encore.isProduction())
|
||||||
|
|
||||||
// uncomment if you're having problems with a jQuery plugin
|
// uncomment if you're having problems with a jQuery plugin
|
||||||
//.autoProvidejQuery()
|
.autoProvidejQuery()
|
||||||
|
|
||||||
// uncomment if you use API Platform Admin (composer req api-admin)
|
// uncomment if you use API Platform Admin (composer req api-admin)
|
||||||
//.enableReactPreset()
|
//.enableReactPreset()
|
||||||
|
|
|
@ -4834,7 +4834,7 @@ webpack-sources@^2.3.0:
|
||||||
source-list-map "^2.0.1"
|
source-list-map "^2.0.1"
|
||||||
source-map "^0.6.1"
|
source-map "^0.6.1"
|
||||||
|
|
||||||
webpack@^5.35:
|
webpack@^5.35, webpack@^5.38.1:
|
||||||
version "5.38.1"
|
version "5.38.1"
|
||||||
resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.38.1.tgz#5224c7f24c18e729268d3e3bc97240d6e880258e"
|
resolved "https://registry.yarnpkg.com/webpack/-/webpack-5.38.1.tgz#5224c7f24c18e729268d3e3bc97240d6e880258e"
|
||||||
integrity sha512-OqRmYD1OJbHZph6RUMD93GcCZy4Z4wC0ele4FXyYF0J6AxO1vOSuIlU1hkS/lDlR9CDYBz64MZRmdbdnFFoT2g==
|
integrity sha512-OqRmYD1OJbHZph6RUMD93GcCZy4Z4wC0ele4FXyYF0J6AxO1vOSuIlU1hkS/lDlR9CDYBz64MZRmdbdnFFoT2g==
|
||||||
|
|
Loading…
Reference in New Issue