Skip to content

Commit f1b4121

Browse files
TheoBironNgob
authored andcommitted
Implemented CRUD user
Installed phpinsights Installed vite-svg-loader instead of using them as components Added symfony mailer & mailhog Added UserDto & update page Added Phpunit & first tests Added Symfony Auth
1 parent 8100799 commit f1b4121

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+6458
-3308
lines changed

.env.dist

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,7 @@ APP_SSO_IDENTITYPROVIDER_X509CERT="MIIDXTCCAkWgAwIBAgIJALmVVuDWu4NYMA0GCSqGSIb3D
3434
APP_SSO_IDENTITYPROVIDER_ENTITYID="http://samltest.${BASE_DOMAIN}/simplesaml/saml2/idp/metadata.php"
3535
APP_SSO_IDENTITYPROVIDER_LOGINURL="http://samltest.${BASE_DOMAIN}/simplesaml/saml2/idp/SSOService.php"
3636
APP_SSO_IDENTITYPROVIDER_LOGOUTURL="http://samltest.${BASE_DOMAIN}/simplesaml/saml2/idp/SSOService.php"
37+
38+
###> symfony/mailer ###
39+
MAILER_DSN=smtp://mail:1025
40+
MAIL_HOST=admin@mail.com

Makefile

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ fdown: sync-env ## stronger down (remove volume / image / orphans)
7979
fup: sync-env ## stronger up (recreate all container and rebuild the image)
8080
DOCKER_BUILDKIT=1 docker compose up -d --force-recreate --build
8181

82+
8283
.PHONY: restart
8384
restart: down up ## Soft Restart
8485

@@ -154,3 +155,14 @@ dump: ## dump database in apps/back/dump/dump.sql (use git lfs)
154155
.PHONY: help
155156
help: ## This help.
156157
@awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST)
158+
159+
.PHONY: network-prune
160+
network-prune: ;\
161+
docker network prune
162+
.PHONY: image-prune
163+
image-prune: ;\
164+
docker image prune -a
165+
.PHONY: system-prune
166+
system-prune: ;\
167+
docker system prune
168+
prune: system-prune image-prune network-prune

apps/back/.env

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,7 @@
2828
# DATABASE_URL="sqlite:///%kernel.project_dir%/var/data.db"
2929
# DATABASE_URL="mysql://app:!ChangeMe!@127.0.0.1:3306/app?serverVersion=8&charset=utf8mb4"
3030
###< doctrine/doctrine-bundle ###
31+
32+
###> symfony/mailer ###
33+
#MAILER_DSN=null://null
34+
###< symfony/mailer ###

apps/back/.gitignore

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,17 @@
1313
/.phpcs-cache
1414
/phpcs.xml
1515
###< squizlabs/php_codesniffer ###
16+
###> friendsofphp/php-cs-fixer ###
17+
/.php-cs-fixer.php
18+
/.php-cs-fixer.cache
19+
###< friendsofphp/php-cs-fixer ###
20+
21+
###> symfony/phpunit-bridge ###
22+
.phpunit.result.cache
23+
/phpunit.xml
24+
###< symfony/phpunit-bridge ###
25+
26+
###> phpunit/phpunit ###
27+
/phpunit.xml
28+
.phpunit.result.cache
29+
###< phpunit/phpunit ###

apps/back/bin/phpunit

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#!/usr/bin/env php
2+
<?php
3+
4+
if (!ini_get('date.timezone')) {
5+
ini_set('date.timezone', 'UTC');
6+
}
7+
8+
if (is_file(dirname(__DIR__).'/vendor/phpunit/phpunit/phpunit')) {
9+
define('PHPUNIT_COMPOSER_INSTALL', dirname(__DIR__).'/vendor/autoload.php');
10+
require PHPUNIT_COMPOSER_INSTALL;
11+
PHPUnit\TextUI\Command::main();
12+
} else {
13+
if (!is_file(dirname(__DIR__).'/vendor/symfony/phpunit-bridge/bin/simple-phpunit.php')) {
14+
echo "Unable to find the `simple-phpunit.php` script in `vendor/symfony/phpunit-bridge/bin/`.\n";
15+
exit(1);
16+
}
17+
18+
require dirname(__DIR__).'/vendor/symfony/phpunit-bridge/bin/simple-phpunit.php';
19+
}

apps/back/composer.json

Lines changed: 22 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -17,20 +17,23 @@
1717
"ramsey/uuid": "^4.5",
1818
"sensio/framework-extra-bundle": "^6.2",
1919
"symfony/apache-pack": "^1.0",
20-
"symfony/console": "5.4.*",
21-
"symfony/dotenv": "5.4.*",
20+
"symfony/console": "6.3.*",
21+
"symfony/dotenv": "6.3.*",
2222
"symfony/flex": "^1.17|^2",
23-
"symfony/framework-bundle": "5.4.*",
23+
"symfony/framework-bundle": "6.3.*",
24+
"symfony/mailer": "6.3.*",
2425
"symfony/monolog-bundle": "^3.8",
25-
"symfony/property-access": "5.4.*",
26-
"symfony/property-info": "5.4.*",
27-
"symfony/proxy-manager-bridge": "5.4.*",
28-
"symfony/runtime": "5.4.*",
29-
"symfony/security-bundle": "5.4.*",
30-
"symfony/serializer": "5.4.*",
31-
"symfony/string": "5.4.*",
32-
"symfony/translation": "5.4.*",
33-
"symfony/yaml": "5.4.*"
26+
"symfony/property-access": "6.3.*",
27+
"symfony/property-info": "6.3.*",
28+
"symfony/proxy-manager-bridge": "6.3.*",
29+
"symfony/runtime": "6.3.*",
30+
"symfony/security-bundle": "6.3.*",
31+
"symfony/serializer": "6.3.*",
32+
"symfony/string": "6.3.*",
33+
"symfony/translation": "6.3.*",
34+
"symfony/twig-bundle": "6.3.*",
35+
"symfony/validator": "6.3.*",
36+
"symfony/yaml": "6.3.*"
3437
},
3538
"config": {
3639
"allow-plugins": {
@@ -74,6 +77,7 @@
7477
"phpstan": "phpstan analyse -c phpstan.neon --ansi",
7578
"cs-check": "phpcs --standard=phpcs.xml.dist",
7679
"cs-fix": "phpcbf --standard=phpcs.xml.dist",
80+
"test": "php bin/phpunit",
7781
"phpmd": "phpmd src/ ansi ./phpmd.xml --ansi",
7882
"console": [
7983
"Composer\\Config::disableProcessTimeout",
@@ -90,18 +94,23 @@
9094
"extra": {
9195
"symfony": {
9296
"allow-contrib": false,
93-
"require": "5.4.*"
97+
"require": "6.3.*"
9498
}
9599
},
96100
"require-dev": {
101+
"dama/doctrine-test-bundle": "^7.2",
97102
"doctrine/coding-standard": "^10.0",
98103
"doctrine/doctrine-fixtures-bundle": "^3.4",
99104
"phpmd/phpmd": "^2.13",
100105
"phpstan/phpstan": "^1.8",
101106
"phpstan/phpstan-doctrine": "^1.3",
107+
"phpunit/phpunit": "^9.5",
102108
"slevomat/coding-standard": "^8.6",
103109
"squizlabs/php_codesniffer": "^3.7",
110+
"symfony/browser-kit": "6.3.*",
111+
"symfony/css-selector": "6.3.*",
104112
"symfony/maker-bundle": "^1.47",
113+
"symfony/phpunit-bridge": "^6.3",
105114
"symplify/phpstan-extensions": "^10.0",
106115
"symplify/phpstan-rules": "^10.0"
107116
}

0 commit comments

Comments
 (0)