diff --git a/.env b/.env
index dc4fb09..f25add0 100644
--- a/.env
+++ b/.env
@@ -15,5 +15,5 @@ APP_SECRET=d28750a79bbdda939b77d930e53a3ae2
# Format described at http://docs.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/configuration.html#connecting-using-a-url
# For an SQLite database, use: "sqlite:///%kernel.project_dir%/var/data.db"
# Configure your db driver and server_version in config/packages/doctrine.yaml
-DATABASE_URL=mysql://db_user:db_password@127.0.0.1:3306/db_name
+DATABASE_URL=mysql://admin:admin@127.0.0.1:3306/testing-platform
###< doctrine/doctrine-bundle ###
diff --git a/.gitignore b/.gitignore
index b6291f1..82333d9 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,5 @@
-
+.idea/
+/uploads/photos/
###> symfony/framework-bundle ###
/.env.local
/.env.*.local
@@ -6,3 +7,7 @@
/var/
/vendor/
###< symfony/framework-bundle ###
+
+###> symfony/web-server-bundle ###
+/.web-server-pid
+###< symfony/web-server-bundle ###
diff --git a/.idea/misc.xml b/.idea/misc.xml
new file mode 100644
index 0000000..28a804d
--- /dev/null
+++ b/.idea/misc.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/modules.xml b/.idea/modules.xml
new file mode 100644
index 0000000..e7271a3
--- /dev/null
+++ b/.idea/modules.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/php.xml b/.idea/php.xml
new file mode 100644
index 0000000..acec127
--- /dev/null
+++ b/.idea/php.xml
@@ -0,0 +1,76 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/testing-platform.iml b/.idea/testing-platform.iml
new file mode 100644
index 0000000..aa3f9c4
--- /dev/null
+++ b/.idea/testing-platform.iml
@@ -0,0 +1,79 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
new file mode 100644
index 0000000..94a25f7
--- /dev/null
+++ b/.idea/vcs.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
new file mode 100644
index 0000000..fc78fb0
--- /dev/null
+++ b/.idea/workspace.xml
@@ -0,0 +1,804 @@
+
+
+
+
+
+
+
+
+
+
+
+ $PROJECT_DIR$/composer.json
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ make
+ doct
+ orm
+ /tmp/phpPtmuq1
+ tmp
+ getTargetDirectory
+ getTarget
+ EXCEPTION
+ $targetDir
+ role
+ 'id'
+ 4
+ photos_directory
+ resolver
+ User
+ local
+
+
+
+
+
+ $PROJECT_DIR$/vendor/twig
+ $PROJECT_DIR$
+ $PROJECT_DIR$/public
+
+
+
+
+
+
+
+
+
+
+
+ true
+ DEFINITION_ORDER
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1543408254985
+
+
+ 1543408254985
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ file://$PROJECT_DIR$/src/Entity/Roles.php
+ 22
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/composer.json b/composer.json
index 91fdeac..014ccaa 100644
--- a/composer.json
+++ b/composer.json
@@ -1,63 +1,73 @@
{
- "type": "project",
- "license": "proprietary",
- "require": {
- "php": "^7.1.3",
- "ext-ctype": "*",
- "ext-iconv": "*",
- "easycorp/easyadmin-bundle": "^1.17",
- "symfony/console": "4.1.*",
- "symfony/flex": "^1.1",
- "symfony/framework-bundle": "4.1.*",
- "symfony/twig-bundle": "4.1.*",
- "symfony/yaml": "4.1.*"
+ "type": "project",
+ "license": "proprietary",
+ "require": {
+ "php": "^7.1.3",
+ "ext-ctype": "*",
+ "ext-iconv": "*",
+ "doctrine/annotations": "^1.6",
+ "easycorp/easyadmin-bundle": "^1.17",
+ "sensio/framework-extra-bundle": "^5.2",
+ "symfony/asset": "4.1.*",
+ "symfony/console": "4.1.*",
+ "symfony/flex": "^1.1",
+ "symfony/form": "4.1.*",
+ "symfony/framework-bundle": "4.1.*",
+ "symfony/maker-bundle": "^1.9",
+ "symfony/orm-pack": "^1.0",
+ "symfony/security-bundle": "4.1.*",
+ "symfony/twig-bundle": "4.1.*",
+ "symfony/validator": "4.1.*",
+ "symfony/yaml": "4.1.*"
+ },
+ "require-dev": {
+ "symfony/dotenv": "4.1.*",
+ "symfony/var-dumper": "4.1.*",
+ "symfony/web-server-bundle": "4.1.*"
+ },
+ "config": {
+ "preferred-install": {
+ "*": "dist"
},
- "require-dev": {
- "symfony/dotenv": "4.1.*"
- },
- "config": {
- "preferred-install": {
- "*": "dist"
- },
- "sort-packages": true
- },
- "autoload": {
- "psr-4": {
- "App\\": "src/"
- }
- },
- "autoload-dev": {
- "psr-4": {
- "App\\Tests\\": "tests/"
- }
- },
- "replace": {
- "paragonie/random_compat": "2.*",
- "symfony/polyfill-ctype": "*",
- "symfony/polyfill-iconv": "*",
- "symfony/polyfill-php71": "*",
- "symfony/polyfill-php70": "*",
- "symfony/polyfill-php56": "*"
- },
- "scripts": {
- "auto-scripts": {
- "cache:clear": "symfony-cmd",
- "assets:install %PUBLIC_DIR%": "symfony-cmd"
- },
- "post-install-cmd": [
- "@auto-scripts"
- ],
- "post-update-cmd": [
- "@auto-scripts"
- ]
- },
- "conflict": {
- "symfony/symfony": "*"
+ "sort-packages": true
+ },
+ "autoload": {
+ "psr-4": {
+ "App\\": "src/"
+ }
+ },
+ "autoload-dev": {
+ "psr-4": {
+ "App\\Tests\\": "tests/"
+ }
+ },
+ "replace": {
+ "paragonie/random_compat": "2.*",
+ "symfony/polyfill-ctype": "*",
+ "symfony/polyfill-iconv": "*",
+ "symfony/polyfill-php71": "*",
+ "symfony/polyfill-php70": "*",
+ "symfony/polyfill-php56": "*"
+ },
+ "scripts": {
+ "auto-scripts": {
+ "cache:clear": "symfony-cmd",
+ "assets:install %PUBLIC_DIR%": "symfony-cmd"
},
- "extra": {
- "symfony": {
- "allow-contrib": false,
- "require": "4.1.*"
- }
+ "post-install-cmd": [
+ "@auto-scripts"
+ ],
+ "post-update-cmd": [
+ "@auto-scripts"
+ ]
+ },
+ "conflict": {
+ "symfony/symfony": "*"
+ },
+ "extra": {
+ "symfony": {
+ "allow-contrib": false,
+ "require": "4.1.*"
}
+ }
}
diff --git a/composer.lock b/composer.lock
index aa5a396..f949845 100644
--- a/composer.lock
+++ b/composer.lock
@@ -1,10 +1,10 @@
{
"_readme": [
"This file locks the dependencies of your project to a known state",
- "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#composer-lock-the-lock-file",
"This file is @generated automatically"
],
- "content-hash": "77aa6c12c34cc17fe4973dd3a238f274",
+ "content-hash": "7340206a52c14eff2fd513ae3b410478",
"packages": [
{
"name": "doctrine/annotations",
@@ -378,16 +378,16 @@
},
{
"name": "doctrine/doctrine-bundle",
- "version": "1.9.1",
+ "version": "1.10.0",
"source": {
"type": "git",
"url": "https://github.com/doctrine/DoctrineBundle.git",
- "reference": "703fad32e4c8cbe609caf45a71a1d4266c830f0f"
+ "reference": "82d2c63cd09acbde2332f55d9aa7b28aefe4983d"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/doctrine/DoctrineBundle/zipball/703fad32e4c8cbe609caf45a71a1d4266c830f0f",
- "reference": "703fad32e4c8cbe609caf45a71a1d4266c830f0f",
+ "url": "https://api.github.com/repos/doctrine/DoctrineBundle/zipball/82d2c63cd09acbde2332f55d9aa7b28aefe4983d",
+ "reference": "82d2c63cd09acbde2332f55d9aa7b28aefe4983d",
"shasum": ""
},
"require": {
@@ -405,8 +405,8 @@
},
"require-dev": {
"doctrine/orm": "~2.4",
+ "php-coveralls/php-coveralls": "^2.1",
"phpunit/phpunit": "^4.8.36|^5.7|^6.4",
- "satooshi/php-coveralls": "^1.0",
"symfony/phpunit-bridge": "~2.7|~3.0|~4.0",
"symfony/property-info": "~2.8|~3.0|~4.0",
"symfony/validator": "~2.7|~3.0|~4.0",
@@ -421,7 +421,7 @@
"type": "symfony-bundle",
"extra": {
"branch-alias": {
- "dev-master": "1.8.x-dev"
+ "dev-master": "1.9.x-dev"
}
},
"autoload": {
@@ -459,7 +459,7 @@
"orm",
"persistence"
],
- "time": "2018-04-19T14:07:39+00:00"
+ "time": "2018-11-30T13:53:17+00:00"
},
{
"name": "doctrine/doctrine-cache-bundle",
@@ -552,6 +552,67 @@
],
"time": "2018-11-09T06:25:35+00:00"
},
+ {
+ "name": "doctrine/doctrine-migrations-bundle",
+ "version": "v1.3.1",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/doctrine/DoctrineMigrationsBundle.git",
+ "reference": "a9e506369f931351a2a6dd2aef588a822802b1b7"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/doctrine/DoctrineMigrationsBundle/zipball/a9e506369f931351a2a6dd2aef588a822802b1b7",
+ "reference": "a9e506369f931351a2a6dd2aef588a822802b1b7",
+ "shasum": ""
+ },
+ "require": {
+ "doctrine/doctrine-bundle": "~1.0",
+ "doctrine/migrations": "^1.1",
+ "php": ">=5.4.0",
+ "symfony/framework-bundle": "~2.7|~3.3|~4.0"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^4.8.36"
+ },
+ "type": "symfony-bundle",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.3-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Doctrine\\Bundle\\MigrationsBundle\\": ""
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Symfony Community",
+ "homepage": "http://symfony.com/contributors"
+ },
+ {
+ "name": "Doctrine Project",
+ "homepage": "http://www.doctrine-project.org"
+ },
+ {
+ "name": "Fabien Potencier",
+ "email": "fabien@symfony.com"
+ }
+ ],
+ "description": "Symfony DoctrineMigrationsBundle",
+ "homepage": "http://www.doctrine-project.org",
+ "keywords": [
+ "dbal",
+ "migrations",
+ "schema"
+ ],
+ "time": "2017-11-01T09:13:26+00:00"
+ },
{
"name": "doctrine/event-manager",
"version": "v1.0.0",
@@ -801,17 +862,91 @@
],
"time": "2014-09-09T13:34:57+00:00"
},
+ {
+ "name": "doctrine/migrations",
+ "version": "v1.8.1",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/doctrine/migrations.git",
+ "reference": "215438c0eef3e5f9b7da7d09c6b90756071b43e6"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/doctrine/migrations/zipball/215438c0eef3e5f9b7da7d09c6b90756071b43e6",
+ "reference": "215438c0eef3e5f9b7da7d09c6b90756071b43e6",
+ "shasum": ""
+ },
+ "require": {
+ "doctrine/dbal": "~2.6",
+ "ocramius/proxy-manager": "^1.0|^2.0",
+ "php": "^7.1",
+ "symfony/console": "~3.3|^4.0"
+ },
+ "require-dev": {
+ "doctrine/coding-standard": "^1.0",
+ "doctrine/orm": "~2.5",
+ "jdorn/sql-formatter": "~1.1",
+ "mikey179/vfsstream": "^1.6",
+ "phpunit/phpunit": "~7.0",
+ "squizlabs/php_codesniffer": "^3.0",
+ "symfony/yaml": "~3.3|^4.0"
+ },
+ "suggest": {
+ "jdorn/sql-formatter": "Allows to generate formatted SQL with the diff command.",
+ "symfony/yaml": "Allows the use of yaml for migration configuration files."
+ },
+ "bin": [
+ "bin/doctrine-migrations"
+ ],
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "v1.8.x-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Doctrine\\DBAL\\Migrations\\": "lib/Doctrine/DBAL/Migrations",
+ "Doctrine\\Migrations\\": "lib/Doctrine/Migrations"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Benjamin Eberlei",
+ "email": "kontakt@beberlei.de"
+ },
+ {
+ "name": "Jonathan Wage",
+ "email": "jonwage@gmail.com"
+ },
+ {
+ "name": "Michael Simonson",
+ "email": "contact@mikesimonson.com"
+ }
+ ],
+ "description": "Database Schema migrations using Doctrine DBAL",
+ "homepage": "https://www.doctrine-project.org/projects/migrations.html",
+ "keywords": [
+ "database",
+ "migrations"
+ ],
+ "time": "2018-06-06T21:00:30+00:00"
+ },
{
"name": "doctrine/orm",
"version": "v2.6.3",
"source": {
"type": "git",
- "url": "https://github.com/doctrine/doctrine2.git",
+ "url": "https://github.com/doctrine/orm.git",
"reference": "434820973cadf2da2d66e7184be370084cc32ca8"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/doctrine/doctrine2/zipball/434820973cadf2da2d66e7184be370084cc32ca8",
+ "url": "https://api.github.com/repos/doctrine/orm/zipball/434820973cadf2da2d66e7184be370084cc32ca8",
"reference": "434820973cadf2da2d66e7184be370084cc32ca8",
"shasum": ""
},
@@ -1042,16 +1177,16 @@
},
{
"name": "easycorp/easyadmin-bundle",
- "version": "v1.17.16",
+ "version": "v1.17.17",
"source": {
"type": "git",
"url": "https://github.com/EasyCorp/EasyAdminBundle.git",
- "reference": "4594ee30d9a7368539530292387bc8374a6d85c1"
+ "reference": "8151a185e5783b464847d539c715d29182ef0569"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/EasyCorp/EasyAdminBundle/zipball/4594ee30d9a7368539530292387bc8374a6d85c1",
- "reference": "4594ee30d9a7368539530292387bc8374a6d85c1",
+ "url": "https://api.github.com/repos/EasyCorp/EasyAdminBundle/zipball/8151a185e5783b464847d539c715d29182ef0569",
+ "reference": "8151a185e5783b464847d539c715d29182ef0569",
"shasum": ""
},
"require": {
@@ -1123,7 +1258,7 @@
"backend",
"generator"
],
- "time": "2018-11-23T19:01:56+00:00"
+ "time": "2018-11-29T19:23:25+00:00"
},
{
"name": "jdorn/sql-formatter",
@@ -1175,6 +1310,176 @@
],
"time": "2014-01-12T16:20:24+00:00"
},
+ {
+ "name": "nikic/php-parser",
+ "version": "v4.1.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/nikic/PHP-Parser.git",
+ "reference": "d0230c5c77a7e3cfa69446febf340978540958c0"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/d0230c5c77a7e3cfa69446febf340978540958c0",
+ "reference": "d0230c5c77a7e3cfa69446febf340978540958c0",
+ "shasum": ""
+ },
+ "require": {
+ "ext-tokenizer": "*",
+ "php": ">=7.0"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "^6.5 || ^7.0"
+ },
+ "bin": [
+ "bin/php-parse"
+ ],
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "4.1-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "PhpParser\\": "lib/PhpParser"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Nikita Popov"
+ }
+ ],
+ "description": "A PHP parser written in PHP",
+ "keywords": [
+ "parser",
+ "php"
+ ],
+ "time": "2018-10-10T09:24:14+00:00"
+ },
+ {
+ "name": "ocramius/package-versions",
+ "version": "1.3.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/Ocramius/PackageVersions.git",
+ "reference": "4489d5002c49d55576fa0ba786f42dbb009be46f"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/Ocramius/PackageVersions/zipball/4489d5002c49d55576fa0ba786f42dbb009be46f",
+ "reference": "4489d5002c49d55576fa0ba786f42dbb009be46f",
+ "shasum": ""
+ },
+ "require": {
+ "composer-plugin-api": "^1.0.0",
+ "php": "^7.1.0"
+ },
+ "require-dev": {
+ "composer/composer": "^1.6.3",
+ "ext-zip": "*",
+ "infection/infection": "^0.7.1",
+ "phpunit/phpunit": "^7.0.0"
+ },
+ "type": "composer-plugin",
+ "extra": {
+ "class": "PackageVersions\\Installer",
+ "branch-alias": {
+ "dev-master": "2.0.x-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "PackageVersions\\": "src/PackageVersions"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Marco Pivetta",
+ "email": "ocramius@gmail.com"
+ }
+ ],
+ "description": "Composer plugin that provides efficient querying for installed package versions (no runtime IO)",
+ "time": "2018-02-05T13:05:30+00:00"
+ },
+ {
+ "name": "ocramius/proxy-manager",
+ "version": "2.2.2",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/Ocramius/ProxyManager.git",
+ "reference": "14b137b06b0f911944132df9d51e445a35920ab1"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/Ocramius/ProxyManager/zipball/14b137b06b0f911944132df9d51e445a35920ab1",
+ "reference": "14b137b06b0f911944132df9d51e445a35920ab1",
+ "shasum": ""
+ },
+ "require": {
+ "ocramius/package-versions": "^1.1.3",
+ "php": "^7.2.0",
+ "zendframework/zend-code": "^3.3.0"
+ },
+ "require-dev": {
+ "couscous/couscous": "^1.6.1",
+ "ext-phar": "*",
+ "humbug/humbug": "1.0.0-RC.0@RC",
+ "nikic/php-parser": "^3.1.1",
+ "padraic/phpunit-accelerator": "dev-master@DEV",
+ "phpbench/phpbench": "^0.12.2",
+ "phpstan/phpstan": "dev-master#856eb10a81c1d27c701a83f167dc870fd8f4236a as 0.9.999",
+ "phpstan/phpstan-phpunit": "dev-master#5629c0a1f4a9c417cb1077cf6693ad9753895761",
+ "phpunit/phpunit": "^6.4.3",
+ "squizlabs/php_codesniffer": "^2.9.1"
+ },
+ "suggest": {
+ "ocramius/generated-hydrator": "To have very fast object to array to object conversion for ghost objects",
+ "zendframework/zend-json": "To have the JsonRpc adapter (Remote Object feature)",
+ "zendframework/zend-soap": "To have the Soap adapter (Remote Object feature)",
+ "zendframework/zend-xmlrpc": "To have the XmlRpc adapter (Remote Object feature)"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "3.0.x-dev"
+ }
+ },
+ "autoload": {
+ "psr-0": {
+ "ProxyManager\\": "src"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Marco Pivetta",
+ "email": "ocramius@gmail.com",
+ "homepage": "http://ocramius.github.io/"
+ }
+ ],
+ "description": "A library providing utilities to generate, instantiate and generally operate with Object Proxies",
+ "homepage": "https://github.com/Ocramius/ProxyManager",
+ "keywords": [
+ "aop",
+ "lazy loading",
+ "proxy",
+ "proxy pattern",
+ "service proxies"
+ ],
+ "time": "2018-09-27T13:45:01+00:00"
+ },
{
"name": "pagerfanta/pagerfanta",
"version": "v2.0.1",
@@ -1434,18 +1739,89 @@
],
"time": "2017-10-23T01:57:42+00:00"
},
+ {
+ "name": "sensio/framework-extra-bundle",
+ "version": "v5.2.4",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/sensiolabs/SensioFrameworkExtraBundle.git",
+ "reference": "1fdf591c4b388e62dbb2579de89c1560b33f865d"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/sensiolabs/SensioFrameworkExtraBundle/zipball/1fdf591c4b388e62dbb2579de89c1560b33f865d",
+ "reference": "1fdf591c4b388e62dbb2579de89c1560b33f865d",
+ "shasum": ""
+ },
+ "require": {
+ "doctrine/common": "^2.2",
+ "symfony/config": "^3.3|^4.0",
+ "symfony/dependency-injection": "^3.3|^4.0",
+ "symfony/framework-bundle": "^3.4|^4.0",
+ "symfony/http-kernel": "^3.3|^4.0"
+ },
+ "require-dev": {
+ "doctrine/doctrine-bundle": "^1.6",
+ "doctrine/orm": "^2.5",
+ "symfony/browser-kit": "^3.3|^4.0",
+ "symfony/dom-crawler": "^3.3|^4.0",
+ "symfony/expression-language": "^3.3|^4.0",
+ "symfony/finder": "^3.3|^4.0",
+ "symfony/monolog-bridge": "^3.0|^4.0",
+ "symfony/monolog-bundle": "^3.2",
+ "symfony/phpunit-bridge": "^3.4.19|^4.1.8",
+ "symfony/psr-http-message-bridge": "^0.3",
+ "symfony/security-bundle": "^3.3|^4.0",
+ "symfony/twig-bundle": "^3.3|^4.0",
+ "symfony/yaml": "^3.3|^4.0",
+ "twig/twig": "~1.12|~2.0",
+ "zendframework/zend-diactoros": "^1.3"
+ },
+ "suggest": {
+ "symfony/expression-language": "",
+ "symfony/psr-http-message-bridge": "To use the PSR-7 converters",
+ "symfony/security-bundle": ""
+ },
+ "type": "symfony-bundle",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "5.2.x-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Sensio\\Bundle\\FrameworkExtraBundle\\": ""
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Fabien Potencier",
+ "email": "fabien@symfony.com"
+ }
+ ],
+ "description": "This bundle provides a way to configure your controllers with annotations",
+ "keywords": [
+ "annotations",
+ "controllers"
+ ],
+ "time": "2018-12-11T16:59:23+00:00"
+ },
{
"name": "symfony/asset",
- "version": "v4.1.8",
+ "version": "v4.1.10",
"source": {
"type": "git",
"url": "https://github.com/symfony/asset.git",
- "reference": "5327166969f35307510138c4f47a5110cd9395f5"
+ "reference": "445af147d72720a3c4ab46e76e9a5f266a4dc74c"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/asset/zipball/5327166969f35307510138c4f47a5110cd9395f5",
- "reference": "5327166969f35307510138c4f47a5110cd9395f5",
+ "url": "https://api.github.com/repos/symfony/asset/zipball/445af147d72720a3c4ab46e76e9a5f266a4dc74c",
+ "reference": "445af147d72720a3c4ab46e76e9a5f266a4dc74c",
"shasum": ""
},
"require": {
@@ -1488,7 +1864,7 @@
],
"description": "Symfony Asset Component",
"homepage": "https://symfony.com",
- "time": "2018-11-11T19:51:29+00:00"
+ "time": "2019-01-03T09:05:57+00:00"
},
{
"name": "symfony/cache",
@@ -2579,35 +2955,101 @@
"time": "2018-11-11T19:51:29+00:00"
},
{
- "name": "symfony/options-resolver",
- "version": "v4.1.8",
+ "name": "symfony/maker-bundle",
+ "version": "v1.9.0",
"source": {
"type": "git",
- "url": "https://github.com/symfony/options-resolver.git",
- "reference": "31e5523373cb06163079ef46d0a2d507d70fe064"
+ "url": "https://github.com/symfony/maker-bundle.git",
+ "reference": "e873047b6022a0343c9354f65d5d47b9e351dd53"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/options-resolver/zipball/31e5523373cb06163079ef46d0a2d507d70fe064",
- "reference": "31e5523373cb06163079ef46d0a2d507d70fe064",
+ "url": "https://api.github.com/repos/symfony/maker-bundle/zipball/e873047b6022a0343c9354f65d5d47b9e351dd53",
+ "reference": "e873047b6022a0343c9354f65d5d47b9e351dd53",
"shasum": ""
},
"require": {
- "php": "^7.1.3"
+ "doctrine/inflector": "^1.2",
+ "nikic/php-parser": "^4.0",
+ "php": "^7.0.8",
+ "symfony/config": "^3.4|^4.0",
+ "symfony/console": "^3.4|^4.0",
+ "symfony/dependency-injection": "^3.4|^4.0",
+ "symfony/filesystem": "^3.4|^4.0",
+ "symfony/finder": "^3.4|^4.0",
+ "symfony/framework-bundle": "^3.4|^4.0",
+ "symfony/http-kernel": "^3.4|^4.0"
},
- "type": "library",
+ "require-dev": {
+ "allocine/twigcs": "^3.0",
+ "doctrine/doctrine-bundle": "^1.8",
+ "doctrine/orm": "^2.3",
+ "friendsofphp/php-cs-fixer": "^2.8",
+ "symfony/phpunit-bridge": "^3.4|^4.0",
+ "symfony/process": "^3.4|^4.0",
+ "symfony/yaml": "^3.4|^4.0"
+ },
+ "type": "symfony-bundle",
"extra": {
"branch-alias": {
- "dev-master": "4.1-dev"
+ "dev-master": "1.0-dev"
}
},
"autoload": {
"psr-4": {
- "Symfony\\Component\\OptionsResolver\\": ""
- },
- "exclude-from-classmap": [
- "/Tests/"
- ]
+ "Symfony\\Bundle\\MakerBundle\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Symfony Maker helps you create empty commands, controllers, form classes, tests and more so you can forget about writing boilerplate code.",
+ "homepage": "https://symfony.com/doc/current/bundles/SymfonyMakerBundle/index.html",
+ "keywords": [
+ "code generator",
+ "generator",
+ "scaffold",
+ "scaffolding"
+ ],
+ "time": "2018-11-03T18:25:11+00:00"
+ },
+ {
+ "name": "symfony/options-resolver",
+ "version": "v4.1.8",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/options-resolver.git",
+ "reference": "31e5523373cb06163079ef46d0a2d507d70fe064"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/options-resolver/zipball/31e5523373cb06163079ef46d0a2d507d70fe064",
+ "reference": "31e5523373cb06163079ef46d0a2d507d70fe064",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^7.1.3"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "4.1-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Symfony\\Component\\OptionsResolver\\": ""
+ },
+ "exclude-from-classmap": [
+ "/Tests/"
+ ]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
@@ -2632,6 +3074,34 @@
],
"time": "2018-11-11T19:51:29+00:00"
},
+ {
+ "name": "symfony/orm-pack",
+ "version": "v1.0.5",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/orm-pack.git",
+ "reference": "1b58f752cd917a08c9c8df020781d9c46a2275b1"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/orm-pack/zipball/1b58f752cd917a08c9c8df020781d9c46a2275b1",
+ "reference": "1b58f752cd917a08c9c8df020781d9c46a2275b1",
+ "shasum": ""
+ },
+ "require": {
+ "doctrine/doctrine-bundle": "^1.6.10",
+ "doctrine/doctrine-migrations-bundle": "^1.3",
+ "doctrine/orm": "^2.5.11",
+ "php": "^7.0"
+ },
+ "type": "symfony-pack",
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "description": "A pack for the Doctrine ORM",
+ "time": "2017-12-12T01:47:50+00:00"
+ },
{
"name": "symfony/polyfill-intl-icu",
"version": "v1.10.0",
@@ -3552,6 +4022,113 @@
"templating"
],
"time": "2018-07-13T07:18:09+00:00"
+ },
+ {
+ "name": "zendframework/zend-code",
+ "version": "3.3.1",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/zendframework/zend-code.git",
+ "reference": "c21db169075c6ec4b342149f446e7b7b724f95eb"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/zendframework/zend-code/zipball/c21db169075c6ec4b342149f446e7b7b724f95eb",
+ "reference": "c21db169075c6ec4b342149f446e7b7b724f95eb",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^7.1",
+ "zendframework/zend-eventmanager": "^2.6 || ^3.0"
+ },
+ "require-dev": {
+ "doctrine/annotations": "~1.0",
+ "ext-phar": "*",
+ "phpunit/phpunit": "^6.2.3",
+ "zendframework/zend-coding-standard": "^1.0.0",
+ "zendframework/zend-stdlib": "^2.7 || ^3.0"
+ },
+ "suggest": {
+ "doctrine/annotations": "Doctrine\\Common\\Annotations >=1.0 for annotation features",
+ "zendframework/zend-stdlib": "Zend\\Stdlib component"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "3.3.x-dev",
+ "dev-develop": "3.4.x-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Zend\\Code\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "description": "provides facilities to generate arbitrary code using an object oriented interface",
+ "homepage": "https://github.com/zendframework/zend-code",
+ "keywords": [
+ "code",
+ "zf2"
+ ],
+ "time": "2018-08-13T20:36:59+00:00"
+ },
+ {
+ "name": "zendframework/zend-eventmanager",
+ "version": "3.2.1",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/zendframework/zend-eventmanager.git",
+ "reference": "a5e2583a211f73604691586b8406ff7296a946dd"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/zendframework/zend-eventmanager/zipball/a5e2583a211f73604691586b8406ff7296a946dd",
+ "reference": "a5e2583a211f73604691586b8406ff7296a946dd",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^5.6 || ^7.0"
+ },
+ "require-dev": {
+ "athletic/athletic": "^0.1",
+ "container-interop/container-interop": "^1.1.0",
+ "phpunit/phpunit": "^5.7.27 || ^6.5.8 || ^7.1.2",
+ "zendframework/zend-coding-standard": "~1.0.0",
+ "zendframework/zend-stdlib": "^2.7.3 || ^3.0"
+ },
+ "suggest": {
+ "container-interop/container-interop": "^1.1.0, to use the lazy listeners feature",
+ "zendframework/zend-stdlib": "^2.7.3 || ^3.0, to use the FilterChain feature"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "3.2-dev",
+ "dev-develop": "3.3-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Zend\\EventManager\\": "src/"
+ }
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "description": "Trigger and listen to events within a PHP application",
+ "homepage": "https://github.com/zendframework/zend-eventmanager",
+ "keywords": [
+ "event",
+ "eventmanager",
+ "events",
+ "zf2"
+ ],
+ "time": "2018-04-25T15:33:34+00:00"
}
],
"packages-dev": [
@@ -3611,6 +4188,244 @@
"environment"
],
"time": "2018-11-26T10:26:29+00:00"
+ },
+ {
+ "name": "symfony/polyfill-php72",
+ "version": "v1.10.0",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/polyfill-php72.git",
+ "reference": "9050816e2ca34a8e916c3a0ae8b9c2fccf68b631"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/9050816e2ca34a8e916c3a0ae8b9c2fccf68b631",
+ "reference": "9050816e2ca34a8e916c3a0ae8b9c2fccf68b631",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.3"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.9-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Symfony\\Polyfill\\Php72\\": ""
+ },
+ "files": [
+ "bootstrap.php"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Nicolas Grekas",
+ "email": "p@tchwork.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Symfony polyfill backporting some PHP 7.2+ features to lower PHP versions",
+ "homepage": "https://symfony.com",
+ "keywords": [
+ "compatibility",
+ "polyfill",
+ "portable",
+ "shim"
+ ],
+ "time": "2018-09-21T13:07:52+00:00"
+ },
+ {
+ "name": "symfony/process",
+ "version": "v4.1.8",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/process.git",
+ "reference": "471f6e24172366a97365baaae588ddaafbba9b20"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/process/zipball/471f6e24172366a97365baaae588ddaafbba9b20",
+ "reference": "471f6e24172366a97365baaae588ddaafbba9b20",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^7.1.3"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "4.1-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Symfony\\Component\\Process\\": ""
+ },
+ "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 Process Component",
+ "homepage": "https://symfony.com",
+ "time": "2018-11-20T16:14:00+00:00"
+ },
+ {
+ "name": "symfony/var-dumper",
+ "version": "v4.1.8",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/var-dumper.git",
+ "reference": "42a55e4a4a7421124636f6f15845187704be0423"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/var-dumper/zipball/42a55e4a4a7421124636f6f15845187704be0423",
+ "reference": "42a55e4a4a7421124636f6f15845187704be0423",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^7.1.3",
+ "symfony/polyfill-mbstring": "~1.0",
+ "symfony/polyfill-php72": "~1.5"
+ },
+ "conflict": {
+ "phpunit/phpunit": "<4.8.35|<5.4.3,>=5.0",
+ "symfony/console": "<3.4"
+ },
+ "require-dev": {
+ "ext-iconv": "*",
+ "symfony/process": "~3.4|~4.0",
+ "twig/twig": "~1.34|~2.4"
+ },
+ "suggest": {
+ "ext-iconv": "To convert non-UTF-8 strings to UTF-8 (or symfony/polyfill-iconv in case ext-iconv cannot be used).",
+ "ext-intl": "To show region name in time zone dump",
+ "symfony/console": "To use the ServerDumpCommand and/or the bin/var-dump-server script"
+ },
+ "bin": [
+ "Resources/bin/var-dump-server"
+ ],
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "4.1-dev"
+ }
+ },
+ "autoload": {
+ "files": [
+ "Resources/functions/dump.php"
+ ],
+ "psr-4": {
+ "Symfony\\Component\\VarDumper\\": ""
+ },
+ "exclude-from-classmap": [
+ "/Tests/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "MIT"
+ ],
+ "authors": [
+ {
+ "name": "Nicolas Grekas",
+ "email": "p@tchwork.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
+ }
+ ],
+ "description": "Symfony mechanism for exploring and dumping PHP variables",
+ "homepage": "https://symfony.com",
+ "keywords": [
+ "debug",
+ "dump"
+ ],
+ "time": "2018-11-20T16:14:00+00:00"
+ },
+ {
+ "name": "symfony/web-server-bundle",
+ "version": "v4.1.8",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/symfony/web-server-bundle.git",
+ "reference": "46e499c664c226be4c8d985567aa2f6a77152909"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/symfony/web-server-bundle/zipball/46e499c664c226be4c8d985567aa2f6a77152909",
+ "reference": "46e499c664c226be4c8d985567aa2f6a77152909",
+ "shasum": ""
+ },
+ "require": {
+ "php": "^7.1.3",
+ "symfony/config": "~3.4|~4.0",
+ "symfony/console": "~3.4|~4.0",
+ "symfony/dependency-injection": "~3.4|~4.0",
+ "symfony/http-kernel": "~3.4|~4.0",
+ "symfony/polyfill-ctype": "~1.8",
+ "symfony/process": "^3.4.2|^4.0.2"
+ },
+ "suggest": {
+ "symfony/expression-language": "For using the filter option of the log server.",
+ "symfony/monolog-bridge": "For using the log server."
+ },
+ "type": "symfony-bundle",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "4.1-dev"
+ }
+ },
+ "autoload": {
+ "psr-4": {
+ "Symfony\\Bundle\\WebServerBundle\\": ""
+ },
+ "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 WebServerBundle",
+ "homepage": "https://symfony.com",
+ "time": "2018-11-11T19:51:29+00:00"
}
],
"aliases": [],
diff --git a/config/bundles.php b/config/bundles.php
index ea8ec0c..2c6e682 100644
--- a/config/bundles.php
+++ b/config/bundles.php
@@ -7,4 +7,8 @@
Doctrine\Bundle\DoctrineCacheBundle\DoctrineCacheBundle::class => ['all' => true],
Doctrine\Bundle\DoctrineBundle\DoctrineBundle::class => ['all' => true],
EasyCorp\Bundle\EasyAdminBundle\EasyAdminBundle::class => ['all' => true],
+ Symfony\Bundle\MakerBundle\MakerBundle::class => ['dev' => true],
+ Symfony\Bundle\WebServerBundle\WebServerBundle::class => ['dev' => true],
+ Doctrine\Bundle\MigrationsBundle\DoctrineMigrationsBundle::class => ['all' => true],
+ Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle::class => ['all' => true],
];
diff --git a/config/packages/doctrine_migrations.yaml b/config/packages/doctrine_migrations.yaml
new file mode 100644
index 0000000..3bf0fbc
--- /dev/null
+++ b/config/packages/doctrine_migrations.yaml
@@ -0,0 +1,5 @@
+doctrine_migrations:
+ dir_name: '%kernel.project_dir%/src/Migrations'
+ # namespace is arbitrary but should be different from App\Migrations
+ # as migrations classes should NOT be autoloaded
+ namespace: DoctrineMigrations
diff --git a/config/packages/framework.yaml b/config/packages/framework.yaml
index 8b24418..84f5c7c 100644
--- a/config/packages/framework.yaml
+++ b/config/packages/framework.yaml
@@ -1,4 +1,5 @@
framework:
+ validation: { enable_annotations: true }
secret: '%env(APP_SECRET)%'
#default_locale: en
#csrf_protection: true
diff --git a/config/packages/sensio_framework_extra.yaml b/config/packages/sensio_framework_extra.yaml
new file mode 100644
index 0000000..1821ccc
--- /dev/null
+++ b/config/packages/sensio_framework_extra.yaml
@@ -0,0 +1,3 @@
+sensio_framework_extra:
+ router:
+ annotations: false
diff --git a/config/packages/twig.yaml b/config/packages/twig.yaml
index d1582a2..34d0832 100644
--- a/config/packages/twig.yaml
+++ b/config/packages/twig.yaml
@@ -1,4 +1,5 @@
twig:
+ form_themes: ['bootstrap_4_layout.html.twig']
default_path: '%kernel.project_dir%/templates'
debug: '%kernel.debug%'
- strict_variables: '%kernel.debug%'
+ strict_variables: '%kernel.debug%'
\ No newline at end of file
diff --git a/config/services.yaml b/config/services.yaml
index 776e6ce..5b60545 100644
--- a/config/services.yaml
+++ b/config/services.yaml
@@ -5,6 +5,7 @@
# https://symfony.com/doc/current/best_practices/configuration.html#application-related-configuration
parameters:
locale: 'en'
+ photos_directory: '%kernel.project_dir%/public/uploads/photos'
services:
# default configuration for services in *this* file
@@ -29,3 +30,10 @@ services:
# add more service definitions when explicit configuration is needed
# please note that last definitions always *replace* previous ones
+ App\Service\FileUploader:
+ arguments:
+ $targetDirectory: '%photos_directory%'
+ App\EventListener\PhotoUploadListener:
+ tags:
+ - { name: doctrine.event_listener, event: prePersist }
+ - { name: doctrine.event_listener, event: preUpdate }
\ No newline at end of file
diff --git a/public/index.php b/public/index.php
index e30f90c..67f28fa 100644
--- a/public/index.php
+++ b/public/index.php
@@ -25,3 +25,6 @@
$response = $kernel->handle($request);
$response->send();
$kernel->terminate($request, $response);
+echo '
';
+echo '';
+echo '';
\ No newline at end of file
diff --git a/public/uploads/photos/016c914b7b72b3def24c6725a8061544.png b/public/uploads/photos/016c914b7b72b3def24c6725a8061544.png
new file mode 100644
index 0000000..d0bfcf2
Binary files /dev/null and b/public/uploads/photos/016c914b7b72b3def24c6725a8061544.png differ
diff --git a/public/uploads/photos/05f9ee4c8d7e941cd0e98e9569568e11.png b/public/uploads/photos/05f9ee4c8d7e941cd0e98e9569568e11.png
new file mode 100644
index 0000000..d0bfcf2
Binary files /dev/null and b/public/uploads/photos/05f9ee4c8d7e941cd0e98e9569568e11.png differ
diff --git a/public/uploads/photos/07ba7fe5a4fc3fb375eef2d34c52b9ba.png b/public/uploads/photos/07ba7fe5a4fc3fb375eef2d34c52b9ba.png
new file mode 100644
index 0000000..d0bfcf2
Binary files /dev/null and b/public/uploads/photos/07ba7fe5a4fc3fb375eef2d34c52b9ba.png differ
diff --git a/public/uploads/photos/0e19c39d51671b8967c853ce3079ee12.png b/public/uploads/photos/0e19c39d51671b8967c853ce3079ee12.png
new file mode 100644
index 0000000..d0bfcf2
Binary files /dev/null and b/public/uploads/photos/0e19c39d51671b8967c853ce3079ee12.png differ
diff --git a/public/uploads/photos/254ad7dab45642babdecbd0e11b45621.png b/public/uploads/photos/254ad7dab45642babdecbd0e11b45621.png
new file mode 100644
index 0000000..d0bfcf2
Binary files /dev/null and b/public/uploads/photos/254ad7dab45642babdecbd0e11b45621.png differ
diff --git a/public/uploads/photos/268de21325935b87f57abde1a7008b80.png b/public/uploads/photos/268de21325935b87f57abde1a7008b80.png
new file mode 100644
index 0000000..d0bfcf2
Binary files /dev/null and b/public/uploads/photos/268de21325935b87f57abde1a7008b80.png differ
diff --git a/public/uploads/photos/2a88bc242e79da9c4073c58765f52bbe.png b/public/uploads/photos/2a88bc242e79da9c4073c58765f52bbe.png
new file mode 100644
index 0000000..d0bfcf2
Binary files /dev/null and b/public/uploads/photos/2a88bc242e79da9c4073c58765f52bbe.png differ
diff --git a/public/uploads/photos/37fb37e1c8724c8012aea8973f9345de.png b/public/uploads/photos/37fb37e1c8724c8012aea8973f9345de.png
new file mode 100644
index 0000000..d0bfcf2
Binary files /dev/null and b/public/uploads/photos/37fb37e1c8724c8012aea8973f9345de.png differ
diff --git a/public/uploads/photos/3dbb06b06e4f79e1c05a2862f6085c52.png b/public/uploads/photos/3dbb06b06e4f79e1c05a2862f6085c52.png
new file mode 100644
index 0000000..d0bfcf2
Binary files /dev/null and b/public/uploads/photos/3dbb06b06e4f79e1c05a2862f6085c52.png differ
diff --git a/public/uploads/photos/459d9a230172382fa7511051a5122d38.png b/public/uploads/photos/459d9a230172382fa7511051a5122d38.png
new file mode 100644
index 0000000..d0bfcf2
Binary files /dev/null and b/public/uploads/photos/459d9a230172382fa7511051a5122d38.png differ
diff --git a/public/uploads/photos/4cfdc17c6ad0aa03c4274e4a3f0115f1.png b/public/uploads/photos/4cfdc17c6ad0aa03c4274e4a3f0115f1.png
new file mode 100644
index 0000000..d0bfcf2
Binary files /dev/null and b/public/uploads/photos/4cfdc17c6ad0aa03c4274e4a3f0115f1.png differ
diff --git a/public/uploads/photos/5d0f1a0b8d4a59a3844a9b792c97a238.jpeg b/public/uploads/photos/5d0f1a0b8d4a59a3844a9b792c97a238.jpeg
new file mode 100644
index 0000000..ddbf474
Binary files /dev/null and b/public/uploads/photos/5d0f1a0b8d4a59a3844a9b792c97a238.jpeg differ
diff --git a/public/uploads/photos/5fb668283a44287b30cdaf04c5419964.png b/public/uploads/photos/5fb668283a44287b30cdaf04c5419964.png
new file mode 100644
index 0000000..d0bfcf2
Binary files /dev/null and b/public/uploads/photos/5fb668283a44287b30cdaf04c5419964.png differ
diff --git a/public/uploads/photos/6310e2f8ce084cda04d027e06dd56b4e.png b/public/uploads/photos/6310e2f8ce084cda04d027e06dd56b4e.png
new file mode 100644
index 0000000..d0bfcf2
Binary files /dev/null and b/public/uploads/photos/6310e2f8ce084cda04d027e06dd56b4e.png differ
diff --git a/public/uploads/photos/6af162ba265ca1f5545f54b3e3287e83.jpeg b/public/uploads/photos/6af162ba265ca1f5545f54b3e3287e83.jpeg
new file mode 100644
index 0000000..ddbf474
Binary files /dev/null and b/public/uploads/photos/6af162ba265ca1f5545f54b3e3287e83.jpeg differ
diff --git a/public/uploads/photos/724efdf6a84537b70013402767ea19e4.png b/public/uploads/photos/724efdf6a84537b70013402767ea19e4.png
new file mode 100644
index 0000000..d0bfcf2
Binary files /dev/null and b/public/uploads/photos/724efdf6a84537b70013402767ea19e4.png differ
diff --git a/public/uploads/photos/7cf90f795984642dd73bc8696a2aa2d0.png b/public/uploads/photos/7cf90f795984642dd73bc8696a2aa2d0.png
new file mode 100644
index 0000000..d0bfcf2
Binary files /dev/null and b/public/uploads/photos/7cf90f795984642dd73bc8696a2aa2d0.png differ
diff --git a/public/uploads/photos/97a1e5fcd558e00c92f8f170d8d8a083.png b/public/uploads/photos/97a1e5fcd558e00c92f8f170d8d8a083.png
new file mode 100644
index 0000000..d0bfcf2
Binary files /dev/null and b/public/uploads/photos/97a1e5fcd558e00c92f8f170d8d8a083.png differ
diff --git a/public/uploads/photos/9aa9c19c72658cae62e689d2b7a76a77.png b/public/uploads/photos/9aa9c19c72658cae62e689d2b7a76a77.png
new file mode 100644
index 0000000..d0bfcf2
Binary files /dev/null and b/public/uploads/photos/9aa9c19c72658cae62e689d2b7a76a77.png differ
diff --git a/public/uploads/photos/bf54bc680eaf328898b3db57c3fd3a08.png b/public/uploads/photos/bf54bc680eaf328898b3db57c3fd3a08.png
new file mode 100644
index 0000000..d0bfcf2
Binary files /dev/null and b/public/uploads/photos/bf54bc680eaf328898b3db57c3fd3a08.png differ
diff --git a/public/uploads/photos/c0a01a0241b87245e8e8571bdc579b56.png b/public/uploads/photos/c0a01a0241b87245e8e8571bdc579b56.png
new file mode 100644
index 0000000..d7dde68
Binary files /dev/null and b/public/uploads/photos/c0a01a0241b87245e8e8571bdc579b56.png differ
diff --git a/public/uploads/photos/c15db627a5ce169038af14394c77ca60.png b/public/uploads/photos/c15db627a5ce169038af14394c77ca60.png
new file mode 100644
index 0000000..d0bfcf2
Binary files /dev/null and b/public/uploads/photos/c15db627a5ce169038af14394c77ca60.png differ
diff --git a/public/uploads/photos/c5ff08dcfcf6fc8fb5fd5cb6fbf7b680.png b/public/uploads/photos/c5ff08dcfcf6fc8fb5fd5cb6fbf7b680.png
new file mode 100644
index 0000000..d0bfcf2
Binary files /dev/null and b/public/uploads/photos/c5ff08dcfcf6fc8fb5fd5cb6fbf7b680.png differ
diff --git a/public/uploads/photos/c83de3aea0256758b8298acc500cd1cb.jpeg b/public/uploads/photos/c83de3aea0256758b8298acc500cd1cb.jpeg
new file mode 100644
index 0000000..ddbf474
Binary files /dev/null and b/public/uploads/photos/c83de3aea0256758b8298acc500cd1cb.jpeg differ
diff --git a/public/uploads/photos/d1b6e2aa80e4f8fe0c464949d2336579.png b/public/uploads/photos/d1b6e2aa80e4f8fe0c464949d2336579.png
new file mode 100644
index 0000000..d0bfcf2
Binary files /dev/null and b/public/uploads/photos/d1b6e2aa80e4f8fe0c464949d2336579.png differ
diff --git a/public/uploads/photos/d4d294acdd42d72ace06d0023a9b976c.png b/public/uploads/photos/d4d294acdd42d72ace06d0023a9b976c.png
new file mode 100644
index 0000000..d0bfcf2
Binary files /dev/null and b/public/uploads/photos/d4d294acdd42d72ace06d0023a9b976c.png differ
diff --git a/public/uploads/photos/d65fd7b238ede10e9f8c53ef8a204691.png b/public/uploads/photos/d65fd7b238ede10e9f8c53ef8a204691.png
new file mode 100644
index 0000000..d0bfcf2
Binary files /dev/null and b/public/uploads/photos/d65fd7b238ede10e9f8c53ef8a204691.png differ
diff --git a/public/uploads/photos/fcd6da20e022c3f79d82b4cb38b91f29.png b/public/uploads/photos/fcd6da20e022c3f79d82b4cb38b91f29.png
new file mode 100644
index 0000000..d0bfcf2
Binary files /dev/null and b/public/uploads/photos/fcd6da20e022c3f79d82b4cb38b91f29.png differ
diff --git a/public/uploads/photos/fd548bed13e52550f9298571e4240dfb.png b/public/uploads/photos/fd548bed13e52550f9298571e4240dfb.png
new file mode 100644
index 0000000..d0bfcf2
Binary files /dev/null and b/public/uploads/photos/fd548bed13e52550f9298571e4240dfb.png differ
diff --git a/src/Controller/UserController.php b/src/Controller/UserController.php
new file mode 100644
index 0000000..1f316ec
--- /dev/null
+++ b/src/Controller/UserController.php
@@ -0,0 +1,174 @@
+createForm(TypeRegistration::class, $user);
+ $form->handleRequest($request);
+
+
+ if ($form->isSubmitted() && $form->isValid()) {
+ $em = $this->getDoctrine()->getManager();
+
+
+ $file = $user->getPhoto();
+ $fileName = $fileUploader->upload($file);
+
+ $user->setPhoto($fileName);
+
+ try {
+ $file->move(
+ $this->getParameter('photos_directory'),
+ $fileName
+ );
+ } catch (FileException $e) {
+ echo 'EXCEPTION';
+ }
+ $user->setPhoto($fileName);
+ $em->persist($user);
+ $em->flush();
+ dump($form->getData());
+ };
+
+
+ return $this->render('user/registration.html.twig', array(
+ 'form' => $form->createView(),
+ 'user' => $user
+ ));
+ }
+
+ /**
+ * @return string
+ */
+ private function generateUniqueFileName()
+ {
+ return md5(uniqid());
+ }
+
+
+ /**
+ * @Route("/user/edit/{id}", name="edit_user")
+ */
+ public function editAction(Request $request, FileUploader $fileUploader, User $user)
+ {
+ $form = $this->createForm(TypeRegistration::class, $user);
+ $form->handleRequest($request);
+ if ($form->isSubmitted() && $form->isValid()) {
+ $user = $form->getData();
+ $em = $this->getDoctrine()->getManager();
+ $file = $user->getPhoto();
+ $fileName = $fileUploader->upload($file);
+
+ $user->setPhoto($fileName);
+
+ try {
+ $file->move(
+ $this->getParameter('photos_directory'),
+ $fileName
+ );
+ } catch (FileException $e) {
+ echo 'EXCEPTION';
+ }
+ $user->setPhoto($fileName);
+
+ $em->persist($user);
+ $em->flush();
+ $this->addFlash('success', 'User updated!');
+ return $this->redirectToRoute('user_list');
+ }
+ return $this->render('edit/edit.html.twig', [
+ 'form' => $form->createView()
+ ]);
+ }
+
+
+
+ /**
+ * @Route("/user/edit/{id}")
+ */
+ public function updateAction($id)
+{
+
+ $em = $this->getDoctrine()->getManager();
+ $user = $em->getRepository(User::class)->find($id);
+
+ if (!$user) {
+ throw $this->createNotFoundException(
+ 'No user found for id '.$id
+ );
+ }
+ $new_name = 'New User name!';
+
+ $user->setName($new_name);
+ $em->flush();
+
+ return $this->redirectToRoute('user_list');
+ }
+
+ /**
+ * @Route("/userList/list", name="user_list")
+ */
+
+ public function showUserList()
+ {
+ $repository = $this->getDoctrine()->getRepository(User::class);
+ $users = $repository->findAll();
+ return $this->render('userList/list.html.twig', [
+ 'users'=>$users
+
+ ]);
+ }
+
+
+
+ /**
+ * @Route("/delete/{id}", name="deleteUser")
+ */
+ public function deleteAction($id)
+ {
+ $em = $this->getDoctrine()->getManager();
+ $user = $em->getRepository(User::class)->find($id);
+ $em->remove($user);
+ $em->flush();
+ return $this->redirectToRoute('user_list');
+ }
+
+ /**
+ * @Route("/overview/overview/{id}", name="user_overview")
+ */
+ public function overviewAction($id)
+ {
+ $em = $this->getDoctrine()->getManager();
+ $user = $em->getRepository(User::class)->find($id);
+ $a = dump($user);
+ return $this->render('/overview/overview.html.twig', [
+ 'id'=>$id,
+ 'user'=>$user,
+ 'a'=>$a
+ ]);
+ }
+}
\ No newline at end of file
diff --git a/src/Controller/test.php b/src/Controller/test.php
new file mode 100644
index 0000000..6fd871e
--- /dev/null
+++ b/src/Controller/test.php
@@ -0,0 +1,90 @@
+render('user/index.html.twig', ['users' => $userRepository->findAll()]);
+ }
+
+ /**
+ * @Route("/new", name="user_new", methods="GET|POST")
+ */
+ public function new(Request $request): Response
+ {
+ $user = new User();
+ $form = $this->createForm(UserType::class, $user);
+ $form->handleRequest($request);
+
+ if ($form->isSubmitted() && $form->isValid()) {
+ $em = $this->getDoctrine()->getManager();
+ $em->persist($user);
+ $em->flush();
+
+ return $this->redirectToRoute('user_index');
+ }
+
+ return $this->render('user/new.html.twig', [
+ 'user' => $user,
+ 'form' => $form->createView(),
+ ]);
+ }
+
+ /**
+ * @Route("/{id}", name="user_show", methods="GET")
+ */
+ public function show(User $user): Response
+ {
+ return $this->render('user/show.html.twig', ['user' => $user]);
+ }
+
+ /**
+ * @Route("/{id}/edit", name="user_edit", methods="GET|POST")
+ */
+ public function edit(Request $request, User $user): Response
+ {
+ $form = $this->createForm(UserType::class, $user);
+ $form->handleRequest($request);
+
+ if ($form->isSubmitted() && $form->isValid()) {
+ $this->getDoctrine()->getManager()->flush();
+
+ return $this->redirectToRoute('user_index', ['id' => $user->getId()]);
+ }
+
+ return $this->render('user/edit.html.twig', [
+ 'user' => $user,
+ 'form' => $form->createView(),
+ ]);
+ }
+
+ /**
+ * @Route("/{id}", name="user_delete", methods="DELETE")
+ */
+ public function delete(Request $request, User $user): Response
+ {
+ if ($this->isCsrfTokenValid('delete'.$user->getId(), $request->request->get('_token'))) {
+ $em = $this->getDoctrine()->getManager();
+ $em->remove($user);
+ $em->flush();
+ }
+
+ return $this->redirectToRoute('user_index');
+ }
+}
diff --git a/src/Entity/Roles.php b/src/Entity/Roles.php
new file mode 100644
index 0000000..2aa732e
--- /dev/null
+++ b/src/Entity/Roles.php
@@ -0,0 +1,42 @@
+id;
+ }
+
+ public function getName(): ?string
+ {
+ return $this->name;
+ }
+
+ public function setName(string $name): self
+ {
+ $this->name = $name;
+
+ return $this;
+ }
+
+}
\ No newline at end of file
diff --git a/src/Entity/User.php b/src/Entity/User.php
new file mode 100644
index 0000000..9e69850
--- /dev/null
+++ b/src/Entity/User.php
@@ -0,0 +1,163 @@
+role = new ArrayCollection();
+ }
+
+
+ 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;
+ }
+ public function getSecondName(): ?string
+ {
+ return $this->secondName;
+ }
+ public function setSecondName(string $secondName): self
+ {
+ $this->secondName = $secondName;
+ return $this;
+ }
+ public function getEmail(): ?string
+ {
+ return $this->email;
+ }
+ public function setEmail(string $email): self
+ {
+ $this->email = $email;
+ return $this;
+ }
+ public function getPassword(): ?string
+ {
+ return $this->password;
+ }
+ public function setPassword(string $password): self
+ {
+ $this->password = $password;
+ return $this;
+ }
+ public function getPhone(): ?string
+ {
+ return $this->phone;
+ }
+ public function setPhone(string $phone): self
+ {
+ $this->phone = $phone;
+ return $this;
+ }
+ public function getPhoto()
+ {
+ return $this->photo;
+ }
+ public function setPhoto($photo)
+ {
+ $this->photo = $photo;
+ return $this;
+ }
+ /**
+ * @return Collection|Roles[]
+ */
+ public function getRole(): Collection
+ {
+ return $this->role;
+ }
+
+ public function addRole(Roles $role): self
+ {
+ if (!$this->role->contains($role)) {
+ $this->role[] = $role;
+ }
+
+ return $this;
+ }
+
+ public function removeRole(Roles $role): self
+ {
+ if ($this->role->contains($role)) {
+ $this->role->removeElement($role);
+ }
+
+ return $this;
+ }
+}
\ No newline at end of file
diff --git a/src/EventListener/PhotoUploadListener.php b/src/EventListener/PhotoUploadListener.php
new file mode 100644
index 0000000..13bccc8
--- /dev/null
+++ b/src/EventListener/PhotoUploadListener.php
@@ -0,0 +1,48 @@
+uploader = $uploader;
+ }
+
+ public function prePersist(LifecycleEventArgs $args)
+ {
+ $entity = $args->getEntity();
+
+ $this->uploadFile($entity);
+ }
+
+ public function preUpdate(PreUpdateEventArgs $args)
+ {
+ $entity = $args->getEntity();
+
+ $this->uploadFile($entity);
+ }
+
+ private function uploadFile($entity)
+ {
+ // загрузка работает только для сущностей User
+ if (!$entity instanceof User) {
+ return;
+ }
+
+ $file = $entity->getPhoto();
+
+ // загружать только новые файлы
+ if ($file instanceof UploadedFile) {
+ $fileName = $this->uploader->upload($file);
+ $entity->setPhoto($fileName);
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/Form/TypeRegistration.php b/src/Form/TypeRegistration.php
new file mode 100644
index 0000000..e08f554
--- /dev/null
+++ b/src/Form/TypeRegistration.php
@@ -0,0 +1,54 @@
+add('name', TextType::class)
+ ->add('secondName', TextType::class)
+ ->add('email', EmailType::class)
+ ->add('password', PasswordType::class)
+ ->add('phone', NumberType::class)
+ ->add('photo', FileType::class)
+ ->add('role', EntityType::class, [
+ 'multiple'=> true,
+ 'expanded'=> true,
+ 'class'=> 'App\Entity\Roles',
+ 'choice_label' => 'name',
+ 'choice_value' => function (Roles $entity = null) {
+ return $entity ? $entity->getId() : '';
+ },
+ ])
+ ->add('save', SubmitType::class, ['label' => 'Create user']);
+
+ }
+ public function configureOptions( OptionsResolver $resolver ) {
+ $resolver->setDefaults( [
+ 'data_class' => User::class,
+ 'User' => User::class
+
+// 'validation_groups' => false,
+ ] );
+ }
+}
\ No newline at end of file
diff --git a/src/Form/UserType.php b/src/Form/UserType.php
new file mode 100644
index 0000000..976f8c9
--- /dev/null
+++ b/src/Form/UserType.php
@@ -0,0 +1,31 @@
+add('name')
+ ->add('secondName')
+ ->add('email')
+ ->add('password')
+ ->add('phone')
+ ->add('photo')
+ ->add('role')
+ ;
+ }
+
+ public function configureOptions(OptionsResolver $resolver)
+ {
+ $resolver->setDefaults([
+ 'data_class' => User::class,
+ ]);
+ }
+}
diff --git a/src/Migrations/.gitignore b/src/Migrations/.gitignore
new file mode 100644
index 0000000..e69de29
diff --git a/src/Migrations/Version20181217073913.php b/src/Migrations/Version20181217073913.php
new file mode 100644
index 0000000..bfa736a
--- /dev/null
+++ b/src/Migrations/Version20181217073913.php
@@ -0,0 +1,28 @@
+abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.');
+
+ $this->addSql('ALTER TABLE user DROP name');
+ }
+
+ 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 name VARCHAR(255) NOT NULL COLLATE utf8mb4_unicode_ci');
+ }
+}
diff --git a/src/Migrations/Version20181217074012.php b/src/Migrations/Version20181217074012.php
new file mode 100644
index 0000000..07eecd1
--- /dev/null
+++ b/src/Migrations/Version20181217074012.php
@@ -0,0 +1,28 @@
+abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.');
+
+ $this->addSql('ALTER TABLE user DROP second_name');
+ }
+
+ 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 second_name VARCHAR(255) NOT NULL COLLATE utf8mb4_unicode_ci');
+ }
+}
diff --git a/src/Migrations/Version20181217074114.php b/src/Migrations/Version20181217074114.php
new file mode 100644
index 0000000..6a0eb11
--- /dev/null
+++ b/src/Migrations/Version20181217074114.php
@@ -0,0 +1,28 @@
+abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \'mysql\'.');
+
+ $this->addSql('ALTER TABLE user ADD name VARCHAR(255) NOT NULL, ADD second_name VARCHAR(255) NOT NULL, ADD email VARCHAR(255) NOT NULL, ADD password VARCHAR(255) NOT NULL, ADD phone INT NOT NULL, ADD photo VARCHAR(255) NOT 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 DROP name, DROP second_name, DROP email, DROP password, DROP phone, DROP photo');
+ }
+}
diff --git a/src/Repository/RolesRepository.php b/src/Repository/RolesRepository.php
new file mode 100644
index 0000000..d43bae7
--- /dev/null
+++ b/src/Repository/RolesRepository.php
@@ -0,0 +1,50 @@
+createQueryBuilder('r')
+ ->andWhere('r.exampleField = :val')
+ ->setParameter('val', $value)
+ ->orderBy('r.id', 'ASC')
+ ->setMaxResults(10)
+ ->getQuery()
+ ->getResult()
+ ;
+ }
+ */
+
+ /*
+ public function findOneBySomeField($value): ?Roles
+ {
+ return $this->createQueryBuilder('r')
+ ->andWhere('r.exampleField = :val')
+ ->setParameter('val', $value)
+ ->getQuery()
+ ->getOneOrNullResult()
+ ;
+ }
+ */
+}
diff --git a/src/Repository/TestRepository.php b/src/Repository/TestRepository.php
new file mode 100644
index 0000000..c626a79
--- /dev/null
+++ b/src/Repository/TestRepository.php
@@ -0,0 +1,50 @@
+createQueryBuilder('t')
+ ->andWhere('t.exampleField = :val')
+ ->setParameter('val', $value)
+ ->orderBy('t.id', 'ASC')
+ ->setMaxResults(10)
+ ->getQuery()
+ ->getResult()
+ ;
+ }
+ */
+
+ /*
+ public function findOneBySomeField($value): ?Test
+ {
+ return $this->createQueryBuilder('t')
+ ->andWhere('t.exampleField = :val')
+ ->setParameter('val', $value)
+ ->getQuery()
+ ->getOneOrNullResult()
+ ;
+ }
+ */
+}
diff --git a/src/Repository/UserRepository.php b/src/Repository/UserRepository.php
new file mode 100644
index 0000000..8e82202
--- /dev/null
+++ b/src/Repository/UserRepository.php
@@ -0,0 +1,50 @@
+createQueryBuilder('u')
+ ->andWhere('u.exampleField = :val')
+ ->setParameter('val', $value)
+ ->orderBy('u.id', 'ASC')
+ ->setMaxResults(10)
+ ->getQuery()
+ ->getResult()
+ ;
+ }
+ */
+
+ /*
+ public function findOneBySomeField($value): ?User
+ {
+ return $this->createQueryBuilder('u')
+ ->andWhere('u.exampleField = :val')
+ ->setParameter('val', $value)
+ ->getQuery()
+ ->getOneOrNullResult()
+ ;
+ }
+ */
+}
diff --git a/src/Repository/UsersRepository.php b/src/Repository/UsersRepository.php
new file mode 100644
index 0000000..def06cd
--- /dev/null
+++ b/src/Repository/UsersRepository.php
@@ -0,0 +1,50 @@
+createQueryBuilder('u')
+ ->andWhere('u.exampleField = :val')
+ ->setParameter('val', $value)
+ ->orderBy('u.id', 'ASC')
+ ->setMaxResults(10)
+ ->getQuery()
+ ->getResult()
+ ;
+ }
+ */
+
+ /*
+ public function findOneBySomeField($value): ?Users
+ {
+ return $this->createQueryBuilder('u')
+ ->andWhere('u.exampleField = :val')
+ ->setParameter('val', $value)
+ ->getQuery()
+ ->getOneOrNullResult()
+ ;
+ }
+ */
+}
diff --git a/src/Service/FileUploader.php b/src/Service/FileUploader.php
new file mode 100644
index 0000000..6401a02
--- /dev/null
+++ b/src/Service/FileUploader.php
@@ -0,0 +1,31 @@
+targetDirectory = $targetDirectory;
+ }
+
+ public function upload(UploadedFile $file)
+ {
+ $fileName = md5(uniqid()).'.'.$file->guessExtension();
+ try {
+ $file->move($this->getTargetDirectory(), $fileName);
+ } catch (FileException $e) {
+ // ... handle exception if something happens during file upload
+ }
+ return $fileName;
+ }
+
+ public function getTargetDirectory()
+ {
+ return $this->targetDirectory;
+ }
+}
\ No newline at end of file
diff --git a/symfony.lock b/symfony.lock
index c31bcc3..2465ee2 100644
--- a/symfony.lock
+++ b/symfony.lock
@@ -32,6 +32,15 @@
"doctrine/doctrine-cache-bundle": {
"version": "1.3.5"
},
+ "doctrine/doctrine-migrations-bundle": {
+ "version": "1.2",
+ "recipe": {
+ "repo": "github.com/symfony/recipes",
+ "branch": "master",
+ "version": "1.2",
+ "ref": "c1431086fec31f17fbcfe6d6d7e92059458facc1"
+ }
+ },
"doctrine/event-manager": {
"version": "v1.0.0"
},
@@ -44,6 +53,9 @@
"doctrine/lexer": {
"version": "v1.0.1"
},
+ "doctrine/migrations": {
+ "version": "v1.8.1"
+ },
"doctrine/orm": {
"version": "v2.6.3"
},
@@ -65,6 +77,15 @@
"jdorn/sql-formatter": {
"version": "v1.2.17"
},
+ "nikic/php-parser": {
+ "version": "v4.1.0"
+ },
+ "ocramius/package-versions": {
+ "version": "1.3.0"
+ },
+ "ocramius/proxy-manager": {
+ "version": "2.2.2"
+ },
"pagerfanta/pagerfanta": {
"version": "v2.0.1"
},
@@ -80,6 +101,15 @@
"psr/simple-cache": {
"version": "1.0.1"
},
+ "sensio/framework-extra-bundle": {
+ "version": "5.2",
+ "recipe": {
+ "repo": "github.com/symfony/recipes",
+ "branch": "master",
+ "version": "5.2",
+ "ref": "fb7e19da7f013d0d422fa9bce16f5c510e27609b"
+ }
+ },
"symfony/asset": {
"version": "v4.1.8"
},
@@ -152,15 +182,33 @@
"symfony/intl": {
"version": "v4.1.8"
},
+ "symfony/maker-bundle": {
+ "version": "1.0",
+ "recipe": {
+ "repo": "github.com/symfony/recipes",
+ "branch": "master",
+ "version": "1.0",
+ "ref": "fadbfe33303a76e25cb63401050439aa9b1a9c7f"
+ }
+ },
"symfony/options-resolver": {
"version": "v4.1.8"
},
+ "symfony/orm-pack": {
+ "version": "v1.0.5"
+ },
"symfony/polyfill-intl-icu": {
"version": "v1.10.0"
},
"symfony/polyfill-mbstring": {
"version": "v1.10.0"
},
+ "symfony/polyfill-php72": {
+ "version": "v1.10.0"
+ },
+ "symfony/process": {
+ "version": "v4.1.8"
+ },
"symfony/property-access": {
"version": "v4.1.8"
},
@@ -215,6 +263,18 @@
"ref": "0cdc982334f45d554957a6167e030482795bf9d7"
}
},
+ "symfony/var-dumper": {
+ "version": "v4.1.8"
+ },
+ "symfony/web-server-bundle": {
+ "version": "3.3",
+ "recipe": {
+ "repo": "github.com/symfony/recipes",
+ "branch": "master",
+ "version": "3.3",
+ "ref": "dae9b39fd6717970be7601101ce5aa960bf53d9a"
+ }
+ },
"symfony/yaml": {
"version": "v4.1.8"
},
@@ -229,5 +289,11 @@
},
"twig/twig": {
"version": "v2.5.0"
+ },
+ "zendframework/zend-code": {
+ "version": "3.3.1"
+ },
+ "zendframework/zend-eventmanager": {
+ "version": "3.2.1"
}
}
diff --git a/templates/base.html.twig b/templates/base.html.twig
index 043f42d..3395711 100644
--- a/templates/base.html.twig
+++ b/templates/base.html.twig
@@ -1,12 +1,20 @@
-
-
- {% block title %}Welcome!{% endblock %}
- {% block stylesheets %}{% endblock %}
-
-
- {% block body %}{% endblock %}
- {% block javascripts %}{% endblock %}
-
-
+
+
+ {% block title %}Welcome!{% endblock %}
+ {% block stylesheets %}
+
+
+ {% endblock %}
+
+
+{% block body %}
+{% endblock %}
+{% block javascripts %}
+
+
+
+{% endblock %}
+
+