Compare commits

..

30 commits
master ... dev

Author SHA1 Message Date
ee8012c4e0
NOTICKET: Refactor Project Layout
All checks were successful
Quality Check / QS Backend (push) Successful in 16s
Quality Check / QS Frontend (push) Successful in 34s
2024-07-30 05:59:42 +02:00
9e60830cd2
#4: Basic Header
All checks were successful
Quality Check / QS Backend (push) Successful in 19s
Quality Check / QS Mixed (push) Successful in 35s
Quality Check / QS Frontend (push) Successful in 41s
2024-07-14 21:53:55 +02:00
2fa02a3214
#5: Basic Burger menu 2024-07-14 21:53:28 +02:00
e776683a18
#3: Setup Tailwind and Flowbite
All checks were successful
Quality Check / QS Backend (push) Successful in 20s
Quality Check / QS Mixed (push) Successful in 35s
Quality Check / QS Frontend (push) Successful in 41s
2024-07-14 16:26:52 +02:00
651df3b0f1
#1: QS Workflow
All checks were successful
Quality Check / QS Backend (push) Successful in 20s
Quality Check / QS Mixed (push) Successful in 32s
Quality Check / QS Frontend (push) Successful in 38s
2024-07-13 21:25:44 +02:00
37a63c29cc
#1: Restructure
Some checks failed
Quality Check / Check (push) Failing after 3s
2024-07-13 12:30:13 +02:00
9c94416a70
#1: Add an OpenAPI Spec File
Some checks failed
Quality Check / Check (push) Failing after 11s
2024-04-22 22:58:36 +02:00
a9f6e950fc
#1: Switch Config to PHP
Some checks are pending
Quality Check / Check (push) Waiting to run
2024-04-22 22:28:41 +02:00
a5f1725109
#1: Setup Config 2024-04-22 21:19:59 +02:00
f96c46ff99
#1: Fix Check & Compose.yaml to be more Specific
Some checks are pending
Quality Check / Check (push) Waiting to run
2024-04-22 19:30:59 +02:00
620348a305 devcontainer.json gelöscht
Some checks failed
Quality Check / Check (push) Failing after 8s
2024-04-12 10:33:45 +00:00
a7b9b9ea67 devcontainer.json hinzugefügt
Some checks failed
Quality Check / Check (push) Failing after 15s
2024-04-12 10:32:52 +00:00
b6f2f9a1f7 .gitea/workflows/quality.yml aktualisiert
Some checks failed
Quality Check / Check (push) Failing after 9s
2024-03-24 14:35:50 +00:00
512427a13d Update Runner Image
Some checks failed
Quality Check / Check (push) Failing after 39s
2024-03-04 23:08:52 +00:00
b835677348
NOTICKET: fix config
Some checks failed
Quality Check / Check (push) Failing after 9s
2024-02-29 23:17:09 +01:00
a6603432a5
#1 [Ticket] Improve Makefile
Some checks failed
Quality Check / Check (push) Failing after 14s
2024-02-19 22:23:38 +01:00
8496de3c84
#1 [Ticket] Cleanup 2024-02-19 22:23:25 +01:00
2d8927af40
#1 [Ticket] Adding Twig CS Fixer 2024-02-19 22:23:07 +01:00
c86d85c99f
#1 [Ticket] Make Submodules track their Master branch 2024-02-19 16:54:47 +01:00
4a9047e306
#1 [Ticket] Test CI
Some checks failed
Quality Check / Check (push) Failing after 26s
2024-02-11 09:53:56 +01:00
c98e88273e
#1 [Ticket] Test CI
Some checks reported warnings
Quality Check / Check (push) Has been cancelled
2024-02-11 09:53:15 +01:00
6bd04c5a2a
#1 [Ticket] Test CI
Some checks failed
Quality Check / Check (push) Failing after 21s
2024-02-10 22:49:12 +01:00
4c43336cab
#1 [Ticket] Test CI
Some checks failed
Quality Check / Check (push) Failing after 34s
2024-02-10 22:27:37 +01:00
4a3db9cf6b
#1 [Ticket] Test CI
Some checks failed
Quality Check / Check (push) Failing after 0s
2024-02-10 22:02:58 +01:00
3185a264eb
#1 [Ticket] Test CI
Some checks failed
Quality Check / Check (push) Failing after 0s
2024-02-10 20:37:19 +01:00
4d2bc8f366
#1 [Ticket] Test CI
Some checks failed
Quality Check / Check (push) Failing after 0s
2024-02-10 20:07:48 +01:00
c1cd1848a9
#1 [Ticket] Test CI
Some checks failed
Quality Check / Check (push) Failing after 0s
2024-02-10 18:29:27 +01:00
f19f01ab28
#1 [Ticket] Test CI
Some checks failed
Quality Check / Check (push) Failing after 34s
2024-02-06 23:39:38 +01:00
10f7c90819
#1 [Ticket] Configure Toolings 2024-02-04 05:39:13 +01:00
3352c6f21a
[#1] [Ticket] Setup Makefile 2024-02-04 03:48:46 +01:00
135 changed files with 28997 additions and 11895 deletions

8
.env Normal file
View file

@ -0,0 +1,8 @@
###> symfony/framework-bundle ###
APP_ENV=dev
APP_SECRET=6d06c4db3a2052db7e13ad3cec58a28d
###< symfony/framework-bundle ###
###> doctrine/doctrine-bundle ###
DATABASE_URL="mysql://root:empty@127.0.0.1:3306/app?serverVersion=8.0.32&charset=utf8mb4"
###< doctrine/doctrine-bundle ###

7
.env.test Normal file
View file

@ -0,0 +1,7 @@
# define your env variables for the test env here
KERNEL_CLASS='App\Framework\Kernel'
APP_SECRET='$ecretf0rt3st'
SYMFONY_DEPRECATIONS_HELPER=999999
PANTHER_APP_ENV=panther
PANTHER_ERROR_SCREENSHOT_DIR=./var/error-screenshots
TEST_TOKEN="_test"

47
.eslintrc.json Normal file
View file

@ -0,0 +1,47 @@
{
"env": {
"browser": true,
"es6": true
},
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/strict"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": "latest",
"sourceType": "module"
},
"plugins": [
"@typescript-eslint"
],
"rules": {
"indent": [
"error",
4
],
"linebreak-style": [
"error",
"unix"
],
"quotes": [
"error",
"single"
],
"semi": [
"error",
"always"
],
"strict": "error",
"array-bracket-newline": "error",
"yoda": "error",
"@typescript-eslint/array-type": [
"error",
{
"default": "generic"
}
],
"@typescript-eslint/ban-tslint-comment": "off",
"@typescript-eslint/no-non-null-assertion": "off"
}
}

42
.gitea/workflows/qs.yml Normal file
View file

@ -0,0 +1,42 @@
name: "Quality Check"
on: push
jobs:
qs_frontend:
name: "QS Frontend"
runs-on: "ubuntu-latest"
container:
image: "git.euph.dev/actions/runner-php-8.3:latest"
steps:
- name: "Checkout"
uses: "https://git.euph.dev/actions/checkout@v3"
- name: "Install Dependencies"
run: |
parallel --halt soon,fail=1 ::: \
"composer check-platform-reqs && composer install --no-scripts --audit" \
"npm install --no-fund"
- name: "TS Validation"
run: "node node_modules/typescript/bin/tsc --noEmit"
- name: "Stylelint"
run: "node node_modules/stylelint/bin/stylelint.mjs src"
- name: "ESLint"
run: "node node_modules/eslint/bin/eslint.js src"
- name: "Twig CS Fixer"
run: "vendor/bin/twig-cs-fixer lint"
qs_backend:
name: "QS Backend"
runs-on: "ubuntu-latest"
container:
image: "git.euph.dev/actions/runner-php-8.3:latest"
steps:
- name: "Checkout"
uses: "https://git.euph.dev/actions/checkout@v3"
- name: "Install Dependencies"
run: |
composer check-platform-reqs
composer install --no-scripts --audit
- name: "PHP CS Fixer"
run: "vendor/bin/php-cs-fixer fix --dry-run --allow-risky=yes"
- name: "PHP Stan"
run: "vendor/bin/phpstan analyze"

35
.gitignore vendored
View file

@ -1 +1,36 @@
###> symfony/framework-bundle ###
/.env.local.php
/.env.*.local
/config/secrets/prod/prod.decrypt.private.php
/public/bundles/
/var/
/vendor/
###< symfony/framework-bundle ###
###> friendsofphp/php-cs-fixer ###
/.php-cs-fixer.cache
###< friendsofphp/php-cs-fixer ###
###> symfony/webpack-encore-bundle ###
/node_modules/
/public/build/
npm-debug.log
yarn-error.log
###< symfony/webpack-encore-bundle ###
###> phpunit/phpunit ###
/phpunit.xml
.phpunit.result.cache
###< phpunit/phpunit ###
###> symfony/phpunit-bridge ###
.phpunit.result.cache
/phpunit.xml
###< symfony/phpunit-bridge ###
###> vincentlanglet/twig-cs-fixer ###
/.twig-cs-fixer.cache
###< vincentlanglet/twig-cs-fixer ###
.idea/ .idea/
.vscode/

9
.gitmodules vendored
View file

@ -1,9 +0,0 @@
[submodule "License"]
path = License
url = git@git.euph.dev:Euph/License.git
[submodule "Code_of_Conduct"]
path = Code_of_Conduct
url = git@git.euph.dev:Euph/Code_of_Conduct.git
[submodule "Code_Standards"]
path = Code_Standards
url = git@git.euph.dev:Euph/Code_Standards.wiki.git

43
.php-cs-fixer.php Normal file
View file

@ -0,0 +1,43 @@
<?php
$finder = PhpCsFixer\Finder::create()
->in(__DIR__ . '/src')
->in(__DIR__ . '/tests');
$config = new PhpCsFixer\Config();
return $config->setRules([
//Symfony
'@Symfony' => true,
'@Symfony:risky' => true,
//PHP Version Migration
'@PHP74Migration' => true,
'@PHP74Migration:risky' => true,
'@PHP80Migration' => true,
'@PHP80Migration:risky' => true,
//PHPUnit Version Migration
'@PHPUnit84Migration:risky' => true,
//General
'array_indentation' => true,
'compact_nullable_typehint' => true,
'concat_space' => ['spacing' => 'one'],
'method_chaining_indentation' => true,
'multiline_whitespace_before_semicolons' => ['strategy' => 'new_line_for_chained_calls'],
'ordered_imports' => ['imports_order' => ['class', 'function', 'const']],
'phpdoc_order' => true,
'visibility_required' => ['elements' => ['property', 'method', 'const']],
'yoda_style' => false,
'octal_notation' => false,
'php_unit_test_case_static_method_calls' => ['call_type' => 'this'],
'global_namespace_import' => [
'import_classes' => true,
'import_constants' => true,
'import_functions' => true,
],
'no_superfluous_phpdoc_tags' => [
'allow_mixed' => true,
'remove_inheritdoc' => true,
],
])->setFinder($finder);

1
.php-version Normal file
View file

@ -0,0 +1 @@
8.3

4
.stylelintignore Normal file
View file

@ -0,0 +1,4 @@
*.ts
*.twig
*.json
*.php

16
.stylelintrc.json Normal file
View file

@ -0,0 +1,16 @@
{
"extends": [
"stylelint-config-standard-scss",
"stylelint-config-tailwindcss/scss"
],
"plugins": [
"stylelint-scss"
],
"rules": {
"custom-property-empty-line-before": null,
"declaration-empty-line-before": null,
"media-feature-range-notation": null,
"import-notation": "string",
"scss/no-global-function-names": null
}
}

11
.twig-cs-fixer.php Normal file
View file

@ -0,0 +1,11 @@
<?php
$ruleset = new TwigCsFixer\Ruleset\Ruleset();
$ruleset->addStandard(new TwigCsFixer\Standard\Twig());
$ruleset->addRule(new TwigCsFixer\Rules\Whitespace\EmptyLinesRule());
$config = new TwigCsFixer\Config\Config();
$config->setRuleset($ruleset);
$config->allowNonFixableRules();
return $config;

@ -1 +0,0 @@
Subproject commit e39bf1b8cad84f838e1c1f8df1f299d223d4582a

@ -1 +0,0 @@
Subproject commit 15a145970f5e4ae7cb2a71b74e99fa02c8302c28

205
Justfile Normal file
View file

@ -0,0 +1,205 @@
_default:
@bin/just/choose.sh {{ source_file() }} choose
alias i := install
alias start := up
alias stop := halt
alias clean := fresh
screen_frontend_session_name := "euph-website_frontend"
linter_options := "All\nPHP\nTS\nSCSS\nTwig"
migration_options := "Generate\nExecute\n"
suite_options := "All\nUnit\nIntegration\nWeb"
# Checks whether the requriements are met
[group('main')]
check:
#!/bin/bash
source bin/just/colors.sh
source bin/just/check.sh
printf "${BLUE_BG}${BLACK_FG} Checking Justfile Requirements ${CLEAR}\n"
check_cmd "jq" "jq"
check_cmd "fzf" "fzf"
check_cmd "screen" "screen"
check_cmd "grep" "grep"
check_cmd "printf" "Printf"
check_cmd "sed" "sed"
check_cmd "awk" "awk"
check_cmd "cut" "cut"
check_cmd "highlight" "highlight"
if ((error > 0 )); then
exit 1
fi
echo ""
printf "${BLUE_BG}${BLACK_FG} Checking Backend Requirements ${CLEAR}\n"
check_cmd "php" "Php"
check_cmd "composer" "Composer"
check_cmd "symfony" "Symfony cli"
current_composer_version=$(composer --version 2>/dev/null | awk '{print $3}' | cut -d '.' -f 1)
if [ "${current_composer_version}" = "2" ]; then
printf >&2 "${GREEN_FG}✔ Composer${BLUE_FG} Version ${GREEN_FG}${current_composer_version}${BLUE_FG} is ${GREEN_FG}installed${BLUE_FG}.\n"
else
printf >&2 "${RED_FG}✘ Wrong Composer Version${YELLOW_FG} is installed!\n Version ${RED_FG}2${YELLOW_FG} is ${RED_FG}required${YELLOW_FG}.\n"
error = 1
fi
required_php_version=$(cat .php-version)
current_php_version=$(symfony php -r "echo PHP_MAJOR_VERSION.'.'.PHP_MINOR_VERSION;")
if [ "${current_php_version}" = "${required_php_version}" ]; then
printf >&2 "${GREEN_FG}✔ PHP${BLUE_FG} Version ${GREEN_FG}${current_php_version}${BLUE_FG} is ${GREEN_FG}installed${BLUE_FG}.\n"
else
printf >&2 "${RED_FG}✘ Wrong PHP Version${YELLOW_FG} is installed!\n Version ${RED_FG}${required_php_version}${YELLOW_FG} is ${RED_FG}required${YELLOW_FG}.\n"
symfony local:php:list
error = 1
fi
check "[ $(php -m | grep -c PDO) -eq 1 ]" "Php PDO"
check "[ $(php -m | grep -c pdo_mysql) -eq 1 ]" "Php Mysql PDO"
check_cmd "docker" "Docker"
if echo "$(docker compose version 2>&1)" | grep -q '[0-9]\+\.[0-9]\+\.[0-9]\+'; then
printf >&2 "${GREEN_FG}✔ Docker Compose${BLUE_FG} is ${GREEN_FG}installed${BLUE_FG}.\n"
else
printf >&2 "${RED_FG}✘ Docker Compose${YELLOW_FG} is ${RED_FG}not installed${YELLOW_FG}! \n"
error=1
fi
if ((error > 0 )); then
exit 1
fi
echo ""
printf "${BLUE_BG}${BLACK_FG} Checking Frontend Requirements ${CLEAR}\n"
check_cmd "volta" "Volta"
check_cmd "node" "Node"
check_cmd "npm" "NPM"
required_node_version=$( \
cat package.json \
| jq .volta.node \
| cut -c 2- \
| cut -d '.' -f 1 \
)
current_major_node_version=$(node -v | cut -c 2- | cut -d '.' -f 1)
current_node_version=$(node -v | cut -c 2-)
if [ "${current_major_node_version}" = "${required_node_version}" ]; then
printf >&2 "${GREEN_FG}✔ Node${BLUE_FG} Version ${GREEN_FG}${current_node_version}${BLUE_FG} is ${GREEN_FG}installed${BLUE_FG}.\n"
else
printf >&2 "${RED_FG}✘ Wrong Node Version${YELLOW_FG} is installed!\n Version ${RED_FG}${required_node_version}${YELLOW_FG} is ${RED_FG}required${YELLOW_FG}.\n"
error = 1
fi
if ((error > 0 )); then
exit 1
fi
echo ""
# Installs the dependencies
[group('main')]
install:
parallel ::: "composer install" "npm i --no-fund"
# Starts the local Development Setup
[group('main')]
up: halt check
#!/bin/bash
source bin/just/colors.sh
docker compose up -d
symfony local:server:start -d --no-tls
screen -dmS {{ screen_frontend_session_name }} npm run watch >> /dev/null
if [ $? -eq 0 ]; then
printf "${GREEN_FG}Frontend was started${CLEAR}\n"
else
printf "${RED_FG}Frontend didn't start${CLEAR}\n"
fi
# Stops the local Development Setup
[group('main')]
halt:
#!/bin/bash
source bin/just/colors.sh
symfony local:server:stop
docker compose down
screen -XS {{ screen_frontend_session_name }} quit >> /dev/null
if [ $? -eq 0 ]; then
printf "${GREEN_FG}Frontend was stopped${CLEAR}\n"
fi
[group('main')]
attach:
#!/bin/bash
source bin/just/colors.sh
if screen -ls | grep -q {{ screen_frontend_session_name }}; then
screen -r {{ screen_frontend_session_name }}
else
printf "${RED_FG}Frontend is down${CLEAR}\n"
fi
# Starts the local Development Setup Fresh, with no Cache and the reseted test Data
[group('main')]
fresh: halt install up
@just backend::demo-data
# Lints all Files, or if specified only a specifc Set
[group('utility')]
lint linter="":
#!/bin/bash
chosen_linter=$(
printf "{{ linter_options }}" |\
fzf --header="Which linters should be run?" --height 8 -i -q "{{ linter }}" -1
)
case "$chosen_linter" in
*All*) \
parallel ::: \
"vendor/bin/php-cs-fixer fix --allow-risky=yes" \
"npm run lint:ts:fix" \
"npm run lint:scss:fix" \
"vendor/bin/twig-cs-fixer lint --fix && php bin/console lint:twig" \
;;
*PHP*) vendor/bin/php-cs-fixer fix --allow-risky=yes ;;
*TS*) npm run lint:ts:fix ;;
*SCSS*) npm run lint:scss:fix ;;
*Twig*) vendor/bin/twig-cs-fixer lint --fix && php bin/console lint:twig ;;
esac
# Runs the Static Code Analysis
[group('utility')]
stan:
@vendor/bin/phpstan analyze --memory-limit=2G
# Runs all Tests, or if specified only a specific Suite
[group('utility')]
test suite="":
#!/bin/bash
chosen_suite=$(
printf "{{ suite_options }}" |\
fzf --header="which tests should be run?" --height 7 -i -q "{{ suite }}" -1
)
if [ "$chosen_suite" != "All" ]; then
suite_arg="--testsuite $chosen_suite"
fi
symfony console doctrine:database:drop --if-exists --force --env=test
symfony console doctrine:database:create --env=test
symfony console doctrine:schema:update --force --complete --env=test
symfony console doctrine:fixtures:load -n --env=test
symfony console cache:clear --env=test
vendor/bin/phpunit $suite_arg
# Create and Execute Migrations
[group('utility')]
migration migration="":
#!/bin/bash
chosen_migration=$(
printf "{{ migration_options }}" |\
fzf --header="Which migration action to perform?" --height 7 -i -q "{{ migration }}" -1
)
case "$chosen_migration" in
*Generate*) symfony console doctrine:migrations:diff ;;
*Execute*) symfony console doctrine:migrations:migrate ;;
esac
# Sets up a Fresh Data Set
[group('utility')]
demo-data:
#!/bin/bash
symfony console doctrine:database:drop --if-exists --force
symfony console doctrine:database:create
symfony console doctrine:migrations:migrate -n
symfony console doctrine:fixtures:load -n
symfony console cache:clear

@ -1 +0,0 @@
Subproject commit 3b4ec4a2573d549cb77a5d2533eacbde1d51498d

View file

@ -1,3 +1 @@
# Euph Website # Euph Website
**License**: [license](https://git.euph.dev/Euph/License)

View file

@ -1,20 +0,0 @@
# In all environments, the following files are loaded if they exist,
# the latter taking precedence over the former:
#
# * .env contains default values for the environment variables needed by the app
# * .env.local uncommitted file with local overrides
# * .env.$APP_ENV committed environment-specific defaults
# * .env.$APP_ENV.local uncommitted environment-specific overrides
#
# Real environment variables win over .env files.
#
# DO NOT DEFINE PRODUCTION SECRETS IN THIS FILE NOR IN ANY OTHER COMMITTED FILES.
# https://symfony.com/doc/current/configuration/secrets.html
#
# Run "composer dump-env prod" to compile .env files for production use (requires symfony/flex >=1.2).
# https://symfony.com/doc/current/best_practices.html#use-environment-variables-for-infrastructure-configuration
###> symfony/framework-bundle ###
APP_ENV=dev
APP_SECRET=3a451032bf2c8c9a639dfb642ce825d0
###< symfony/framework-bundle ###

16
app/.gitignore vendored
View file

@ -1,16 +0,0 @@
###> symfony/framework-bundle ###
/.env.local
/.env.local.php
/.env.*.local
/config/secrets/prod/prod.decrypt.private.php
/public/bundles/
/var/
/vendor/
###< symfony/framework-bundle ###
###> symfony/webpack-encore-bundle ###
/node_modules/
/public/build/
npm-debug.log
yarn-error.log
###< symfony/webpack-encore-bundle ###

View file

@ -1,9 +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.scss';

View file

@ -1,10 +0,0 @@
import { startStimulusApp } from '@symfony/stimulus-bridge';
// Registers Stimulus controllers from controllers.json and in the controllers/ directory
export const app = startStimulusApp(require.context(
'@symfony/stimulus-bridge/lazy-controller-loader!./controllers',
true,
/\.[jt]sx?$/
));
// register any custom, 3rd party controllers here
// app.register('some_controller_name', SomeImportedController);

View file

@ -1,4 +0,0 @@
{
"controllers": [],
"entrypoints": []
}

View file

@ -1,16 +0,0 @@
import { Controller } from '@hotwired/stimulus';
/*
* This is an example Stimulus controller!
*
* Any element with a data-controller="hello" attribute will cause
* this controller to be executed. The name "hello" comes from the filename:
* hello_controller.js -> "hello"
*
* Delete this file or adapt it for your use!
*/
export default class extends Controller {
connect() {
this.element.textContent = 'Hello Stimulus! Edit me in assets/controllers/hello_controller.js';
}
}

View file

@ -1,3 +0,0 @@
body {
background-color: lightgray;
}

View file

@ -1 +0,0 @@
{}

View file

@ -1,71 +0,0 @@
{
"type": "project",
"license": "proprietary",
"minimum-stability": "stable",
"prefer-stable": true,
"require": {
"php": ">=8.1",
"ext-ctype": "*",
"ext-iconv": "*",
"symfony/asset": "6.3.*",
"symfony/console": "6.3.*",
"symfony/dotenv": "6.3.*",
"symfony/flex": "^2",
"symfony/framework-bundle": "6.3.*",
"symfony/runtime": "6.3.*",
"symfony/stimulus-bundle": "^2.12",
"symfony/twig-bundle": "6.3.*",
"symfony/webpack-encore-bundle": "^2.1",
"symfony/yaml": "6.3.*",
"twig/extra-bundle": "^2.12|^3.0",
"twig/twig": "^2.12|^3.0"
},
"config": {
"allow-plugins": {
"php-http/discovery": true,
"symfony/flex": true,
"symfony/runtime": true
},
"sort-packages": true
},
"autoload": {
"psr-4": {
"App\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"App\\Tests\\": "tests/"
}
},
"replace": {
"symfony/polyfill-ctype": "*",
"symfony/polyfill-iconv": "*",
"symfony/polyfill-php72": "*",
"symfony/polyfill-php73": "*",
"symfony/polyfill-php74": "*",
"symfony/polyfill-php80": "*",
"symfony/polyfill-php81": "*"
},
"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": "*"
},
"extra": {
"symfony": {
"allow-contrib": false,
"require": "6.3.*"
}
}
}

3052
app/composer.lock generated

File diff suppressed because it is too large Load diff

View file

@ -1,9 +0,0 @@
<?php
return [
Symfony\Bundle\FrameworkBundle\FrameworkBundle::class => ['all' => true],
Symfony\WebpackEncoreBundle\WebpackEncoreBundle::class => ['all' => true],
Symfony\UX\StimulusBundle\StimulusBundle::class => ['all' => true],
Symfony\Bundle\TwigBundle\TwigBundle::class => ['all' => true],
Twig\Extra\TwigExtraBundle\TwigExtraBundle::class => ['all' => true],
];

View file

@ -1,25 +0,0 @@
# see https://symfony.com/doc/current/reference/configuration/framework.html
framework:
secret: '%env(APP_SECRET)%'
#csrf_protection: true
http_method_override: false
handle_all_throwables: true
# 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.
session:
handler_id: null
cookie_secure: auto
cookie_samesite: lax
storage_factory_id: session.storage.factory.native
#esi: true
#fragments: true
php_errors:
log: true
when@test:
framework:
test: true
session:
storage_factory_id: session.storage.factory.mock_file

View file

@ -1,6 +0,0 @@
twig:
default_path: '%kernel.project_dir%/templates'
when@test:
twig:
strict_variables: true

View file

@ -1,5 +0,0 @@
controllers:
resource:
path: ../src/Controller/
namespace: App\Controller
type: attribute

View file

@ -1,24 +0,0 @@
# This file is the entry point to configure your own services.
# Files in the packages/ subdirectory configure your dependencies.
# Put parameters here that don't need to change on each machine where the app is deployed
# https://symfony.com/doc/current/best_practices.html#use-parameters-for-application-configuration
parameters:
services:
# default configuration for services in *this* file
_defaults:
autowire: true # Automatically injects dependencies in your services.
autoconfigure: true # Automatically registers your services as commands, event subscribers, etc.
# makes classes in src/ available to be used as services
# this creates a service per class whose id is the fully-qualified class name
App\:
resource: '../src/'
exclude:
- '../src/DependencyInjection/'
- '../src/Entity/'
- '../src/Kernel.php'
# add more service definitions when explicit configuration is needed
# please note that last definitions always *replace* previous ones

8368
app/package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -1,29 +0,0 @@
{
"devDependencies": {
"@babel/core": "^7.17.0",
"@babel/preset-env": "^7.16.0",
"@hotwired/stimulus": "^3.0.0",
"@symfony/stimulus-bridge": "^3.2.0",
"@symfony/webpack-encore": "^4.0.0",
"core-js": "^3.23.0",
"regenerator-runtime": "^0.13.9",
"sass": "^1.69.5",
"sass-loader": "^13.3.2",
"ts-loader": "^9.5.0",
"typescript": "^5.2.2",
"webpack": "^5.74.0",
"webpack-cli": "^4.10.0",
"webpack-notifier": "^1.15.0"
},
"license": "UNLICENSED",
"private": true,
"scripts": {
"dev-server": "encore dev-server",
"dev": "encore dev",
"watch": "encore dev --watch",
"build": "encore production --progress"
},
"volta": {
"node": "20.9.0"
}
}

View file

@ -1,12 +0,0 @@
<!doctype html>
<html lang="">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Down for Maintenance</title>
</head>
<body>
</body>
</html>

View file

@ -1,104 +0,0 @@
{
"symfony/console": {
"version": "6.3",
"recipe": {
"repo": "github.com/symfony/recipes",
"branch": "main",
"version": "5.3",
"ref": "da0c8be8157600ad34f10ff0c9cc91232522e047"
},
"files": [
"bin/console"
]
},
"symfony/flex": {
"version": "2.4",
"recipe": {
"repo": "github.com/symfony/recipes",
"branch": "main",
"version": "1.0",
"ref": "146251ae39e06a95be0fe3d13c807bcf3938b172"
},
"files": [
".env"
]
},
"symfony/framework-bundle": {
"version": "6.3",
"recipe": {
"repo": "github.com/symfony/recipes",
"branch": "main",
"version": "6.2",
"ref": "af47254c5e4cd543e6af3e4508298ffebbdaddd3"
},
"files": [
"config/packages/cache.yaml",
"config/packages/framework.yaml",
"config/preload.php",
"config/routes/framework.yaml",
"config/services.yaml",
"public/index.php",
"src/Controller/.gitignore",
"src/Kernel.php"
]
},
"symfony/routing": {
"version": "6.3",
"recipe": {
"repo": "github.com/symfony/recipes",
"branch": "main",
"version": "6.2",
"ref": "e0a11b4ccb8c9e70b574ff5ad3dfdcd41dec5aa6"
},
"files": [
"config/packages/routing.yaml",
"config/routes.yaml"
]
},
"symfony/stimulus-bundle": {
"version": "2.12",
"recipe": {
"repo": "github.com/symfony/recipes",
"branch": "main",
"version": "2.9",
"ref": "05c45071c7ecacc1e48f94bc43c1f8d4405fb2b2"
},
"files": [
"assets/bootstrap.js",
"assets/controllers.json",
"assets/controllers/hello_controller.js"
]
},
"symfony/twig-bundle": {
"version": "6.3",
"recipe": {
"repo": "github.com/symfony/recipes",
"branch": "main",
"version": "6.3",
"ref": "b7772eb20e92f3fb4d4fe756e7505b4ba2ca1a2c"
},
"files": [
"config/packages/twig.yaml",
"templates/base.html.twig"
]
},
"symfony/webpack-encore-bundle": {
"version": "2.1",
"recipe": {
"repo": "github.com/symfony/recipes",
"branch": "main",
"version": "2.0",
"ref": "082d754b3bd54b3fc669f278f1eea955cfd23cf5"
},
"files": [
"assets/app.js",
"assets/styles/app.css",
"config/packages/webpack_encore.yaml",
"package.json",
"webpack.config.js"
]
},
"twig/extra-bundle": {
"version": "v3.7.1"
}
}

View file

@ -1,17 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>{% block title %}Welcome!{% endblock %}</title>
<link rel="icon" href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 128 128%22><text y=%221.2em%22 font-size=%2296%22>⚫️</text></svg>">
{% block stylesheets %}
{{ encore_entry_link_tags('app') }}
{% endblock %}
{% block javascripts %}
{{ encore_entry_script_tags('app') }}
{% endblock %}
</head>
<body>
{% block body %}{% endblock %}
</body>
</html>

View file

@ -1,76 +0,0 @@
const Encore = require('@symfony/webpack-encore');
// Manually configure the runtime environment if not already configured yet by the "encore" command.
// It's useful when you use tools that rely on webpack.config.js file.
if (!Encore.isRuntimeEnvironmentConfigured()) {
Encore.configureRuntimeEnvironment(process.env.NODE_ENV || 'dev');
}
Encore
// directory where compiled assets will be stored
.setOutputPath('public/build/')
// public path used by the web server to access the output path
.setPublicPath('/build')
// only needed for CDN's or subdirectory deploy
//.setManifestKeyPrefix('build/')
/*
* ENTRY CONFIG
*
* Each entry will result in one JavaScript file (e.g. app.js)
* and one CSS file (e.g. app.css) if your JavaScript imports CSS.
*/
.addEntry('app', './assets/app.ts')
// When enabled, Webpack "splits" your files into smaller pieces for greater optimization.
.splitEntryChunks()
// enables the Symfony UX Stimulus bridge (used in assets/bootstrap.js)
.enableStimulusBridge('./assets/controllers.json')
// will require an extra script tag for runtime.js
// but, you probably want this, unless you're building a single-page app
.enableSingleRuntimeChunk()
/*
* FEATURE CONFIG
*
* Enable & configure other features below. For a full
* list of features, see:
* https://symfony.com/doc/current/frontend.html#adding-more-features
*/
.cleanupOutputBeforeBuild()
.enableBuildNotifications()
.enableSourceMaps(!Encore.isProduction())
// enables hashed filenames (e.g. app.abc123.css)
.enableVersioning(Encore.isProduction())
// configure Babel
// .configureBabel((config) => {
// config.plugins.push('@babel/a-babel-plugin');
// })
// enables and configure @babel/preset-env polyfills
.configureBabelPresetEnv((config) => {
config.useBuiltIns = 'usage';
config.corejs = '3.23';
})
// enables Sass/SCSS support
.enableSassLoader()
// uncomment if you use TypeScript
.enableTypeScriptLoader()
// uncomment if you use React
//.enableReactPreset()
// uncomment to get integrity="..." attributes on your script & link tags
// requires WebpackEncoreBundle 1.4 or higher
//.enableIntegrityHashes(Encore.isProduction())
// uncomment if you're having problems with a jQuery plugin
//.autoProvidejQuery()
;
module.exports = Encore.getWebpackConfig();

View file

@ -0,0 +1,13 @@
<svg
aria-hidden="true"
xmlns="http://www.w3.org/2000/svg"
xml:space="preserve"
width="32mm"
height="32mm"
viewBox="0 0 32 32"
>
<path
d="M16 0A16 16 0 0 0 0 16a16 16 0 0 0 16 16 16 16 0 0 0 16-16A16 16 0 0 0 16 0zm-.555 1.034 3.304 3.302a7.95 7.95 0 0 1 0 11.243l-2.97 2.971a4.364 4.364 0 0 0 0 6.174l7.852-7.852a8.532 8.532 0 0 0 1.868-4.747l.079-1.093c2.55 2.82 1.891 7.774.267 9.398l-10.47 10.537L6.5 22.09a8.566 8.566 0 0 1 0-12.114l8.945-8.943zm.03 5.936-6.23 6.226a3.512 3.512 0 0 0 0 4.966l.508.507 6.07-6.07a3.732 3.732 0 0 0 0-5.28l-.348-.35z"
fill="currentColor"
/>
</svg>

After

Width:  |  Height:  |  Size: 664 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

View file

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<browserconfig>
<msapplication>
<tile>
<square150x150logo src="/mstile-150x150.png"/>
<TileColor>#000000</TileColor>
</tile>
</msapplication>
</browserconfig>

Binary file not shown.

After

Width:  |  Height:  |  Size: 611 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 798 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

View file

@ -0,0 +1,12 @@
<svg xmlns="http://www.w3.org/2000/svg" width="256" height="256">
<path
d="M49.87 76.493c-28.61 28.61-28.61 74.992 0 103.598L125.78 256l89.538-90.112c13.89-13.89 19.517-56.259-2.294-80.364l-.666 9.344a72.955 72.955 0 0 1-15.98 40.592l-67.158 67.159a37.34 37.34 0 0 1 0-52.808l25.405-25.405c26.553-26.547 26.553-69.596 0-96.149L126.363 0Zm23.485 70.006a30.029 30.029 0 0 1 0-42.47l53.264-53.254 2.99 2.99a31.928 31.928 0 0 1 0 45.153l-51.917 51.917z"
style="stroke-width:5.12"
/>
<style>
path { fill: #000 }
@media (prefers-color-scheme: dark) {
path{ fill: #fff }
}
</style>
</svg>

After

Width:  |  Height:  |  Size: 658 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

View file

@ -0,0 +1,29 @@
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN"
"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
<svg version="1.0" xmlns="http://www.w3.org/2000/svg"
width="700.000000pt" height="700.000000pt" viewBox="0 0 700.000000 700.000000"
preserveAspectRatio="xMidYMid meet">
<metadata>
Created by potrace 1.14, written by Peter Selinger 2001-2017
</metadata>
<g transform="translate(0.000000,700.000000) scale(0.100000,-0.100000)"
fill="#000000" stroke="none">
<path d="M2349 5893 c-1156 -1158 -1168 -1171 -1293 -1380 -80 -135 -198 -421
-220 -533 -2 -14 -11 -56 -19 -95 -9 -38 -18 -94 -21 -122 -3 -29 -9 -77 -12
-105 -12 -102 -7 -287 11 -433 42 -338 201 -712 414 -975 25 -30 50 -61 56
-68 5 -7 497 -501 1092 -1098 l1082 -1084 172 173 c977 982 2292 2307 2309
2327 136 155 254 464 286 750 2 19 6 55 9 79 7 55 7 274 0 365 -17 221 -83
464 -177 651 -70 141 -213 339 -214 299 -1 -27 -14 -199 -19 -264 -14 -149
-40 -283 -81 -415 -14 -44 -29 -89 -33 -100 -73 -184 -123 -282 -220 -430 -59
-92 -143 -179 -1000 -1038 l-936 -938 -44 48 c-74 81 -134 181 -196 326 -16
36 -40 138 -52 222 -15 99 -4 284 23 375 9 29 17 61 19 71 4 20 38 99 67 154
63 121 125 191 530 598 229 230 441 448 471 485 214 262 356 592 405 937 9 68
9 417 -1 485 -32 225 -109 455 -214 645 -118 213 -167 271 -642 748 l-446 448
-1106 -1108z m1302 -495 c54 -79 112 -213 125 -288 3 -14 7 -32 10 -40 11 -29
14 -213 4 -283 -21 -142 -89 -300 -178 -413 -33 -42 -1428 -1444 -1475 -1482
-14 -12 -25 -4 -89 61 -96 97 -122 129 -168 207 -33 55 -91 189 -89 205 0 3
-5 31 -12 63 -27 134 -7 321 51 463 58 142 87 175 878 966 l756 756 74 -78
c40 -43 91 -104 113 -137z"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.6 KiB

View file

@ -0,0 +1,19 @@
{
"name": "",
"short_name": "",
"icons": [
{
"src": "/android-chrome-192x192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "/android-chrome-512x512.png",
"sizes": "512x512",
"type": "image/png"
}
],
"theme_color": "#ffffff",
"background_color": "#ffffff",
"display": "standalone"
}

View file

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<svg width="256" height="256" xmlns="http://www.w3.org/2000/svg">
<defs/>
<path d="M49.87 76.493c-28.61 28.61-28.61 74.992 0 103.598L125.78 256l89.538-90.112c13.89-13.89 19.517-56.259-2.294-80.364l-.666 9.344a72.955 72.955 0 0 1-15.98 40.592l-67.158 67.159a37.34 37.34 0 0 1 0-52.808l25.405-25.405c26.553-26.547 26.553-69.596 0-96.149L126.363 0Zm23.485 70.006a30.029 30.029 0 0 1 0-42.47l53.264-53.254 2.99 2.99a31.928 31.928 0 0 1 0 45.153l-51.917 51.917z" style="stroke-width: 5.12; fill: white;"/>
</svg>

After

Width:  |  Height:  |  Size: 551 B

View file

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="256" height="256"><path d="M49.87 76.493c-28.61 28.61-28.61 74.992 0 103.598L125.78 256l89.538-90.112c13.89-13.89 19.517-56.259-2.294-80.364l-.666 9.344a72.955 72.955 0 0 1-15.98 40.592l-67.158 67.159a37.34 37.34 0 0 1 0-52.808l25.405-25.405c26.553-26.547 26.553-69.596 0-96.149L126.363 0Zm23.485 70.006a30.029 30.029 0 0 1 0-42.47l53.264-53.254 2.99 2.99a31.928 31.928 0 0 1 0 45.153l-51.917 51.917z" style="stroke-width:5.12"/></svg>

After

Width:  |  Height:  |  Size: 482 B

1
assets/icons/symfony.svg Normal file
View file

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 257"><circle cx="128" cy="128.827" r="128" fill="#1a171b"/><path fill="#fff" d="M183.706 48.124c-12.986.453-24.32 7.61-32.757 17.51c-9.342 10.855-15.557 23.73-20.035 36.872c-8.01-6.565-14.19-15.064-27.041-18.77c-9.933-2.852-20.366-1.674-29.96 5.474c-4.545 3.395-7.676 8.527-9.165 13.351c-3.855 12.537 4.053 23.694 7.645 27.7l7.853 8.416c1.619 1.65 5.518 5.955 3.612 12.127c-2.06 6.71-10.15 11.055-18.448 8.495c-3.706-1.13-9.03-3.891-7.838-7.779c.493-1.59 1.631-2.78 2.241-4.155c.56-1.181.827-2.067.997-2.587c1.516-4.95-.555-11.39-5.857-13.025c-4.946-1.516-10.007-.315-11.969 6.054c-2.225 7.235 1.237 20.366 19.783 26.084c21.729 6.676 40.11-5.155 42.717-20.586c1.642-9.665-2.722-16.845-10.717-26.08l-6.514-7.204c-3.946-3.942-5.301-10.661-1.217-15.825c3.446-4.356 8.354-6.215 16.392-4.029c11.733 3.186 16.963 11.327 25.69 17.893c-3.603 11.819-5.958 23.682-8.09 34.32l-1.299 7.931c-6.238 32.721-11 50.688-23.375 61.003c-2.493 1.773-6.057 4.427-11.429 4.612c-2.816.087-3.726-1.85-3.765-2.694c-.067-1.977 1.599-2.883 2.706-3.773c1.654-.902 4.155-2.398 3.985-7.191c-.18-5.664-4.872-10.575-11.654-10.35c-5.08.173-12.823 4.954-12.532 13.705c.303 9.039 8.728 15.813 21.43 15.384c6.79-.233 21.952-2.997 36.895-20.76c17.392-20.362 22.256-43.705 25.915-60.79l4.084-22.556c2.269.272 4.695.453 7.334.516c21.661.457 32.496-10.763 32.657-18.924c.107-4.939-3.241-9.799-7.928-9.689c-3.355.095-7.57 2.328-8.582 6.968c-.988 4.552 6.893 8.66.733 12.65c-4.376 2.832-12.221 4.828-23.269 3.206l2.009-11.103c4.1-21.055 9.157-46.954 28.341-47.584c1.398-.071 6.514.063 6.633 3.446c.035 1.13-.245 1.418-1.568 4.005c-1.347 2.017-1.855 3.734-1.792 5.707c.185 5.376 4.273 8.909 10.185 8.696c7.916-.256 10.193-7.963 10.063-11.921c-.32-9.3-10.122-15.175-23.1-14.75"/></svg>

After

Width:  |  Height:  |  Size: 1.8 KiB

1
assets/images/.gitkeep Normal file
View file

@ -0,0 +1 @@
a

View file

@ -1,7 +1,7 @@
#!/usr/bin/env php #!/usr/bin/env php
<?php <?php
use App\Kernel; use App\Framework\Kernel;
use Symfony\Bundle\FrameworkBundle\Console\Application; use Symfony\Bundle\FrameworkBundle\Console\Application;
if (!is_file(dirname(__DIR__).'/vendor/autoload_runtime.php')) { if (!is_file(dirname(__DIR__).'/vendor/autoload_runtime.php')) {

1
bin/just/.gitignore vendored Normal file
View file

@ -0,0 +1 @@
.cache/

13
bin/just/check.sh Normal file
View file

@ -0,0 +1,13 @@
#!/bin/bash
check() {
if $1; then
printf >&2 "${GREEN_FG}$2${BLUE_FG} is ${GREEN_FG}installed${BLUE_FG}.\n"
else
printf >&2 "${RED_FG}$2${YELLOW_FG} is ${RED_FG}not installed${YELLOW_FG}! \n"
error=1
fi
}
check_cmd() {
check "$(command -v $1 >/dev/null 2>&1)" "$2"
}

55
bin/just/choose.sh Executable file
View file

@ -0,0 +1,55 @@
#!/bin/bash
justfile=$1
action=$2
content=$3
function preview() {
source "$(dirname ${BASH_SOURCE[0]})/colors.sh"
recipe=$(choose_truncate $content)
if [[ -z "$recipe" ]] || echo $recipe | grep -q "^\["; then
printf "${RED_FG}Select this to Exit${CLEAR}"
elif [[ "$content" == *" ..." ]]; then
hash_highlight "$(just_wrapper --list $recipe)" "conf"
else
hash_highlight "$(just_wrapper --show $recipe)" "sh"
fi
}
function choose() {
script_path="$(pwd)/${BASH_SOURCE[0]}"
choice=$( choose_truncate $(choose_list | fzf --tac --cycle --preview "$script_path $justfile preview {}" ))
if [[ -z "$choice" ]] || echo $choice | grep -q "^\["; then
exit
else
just_wrapper $choice
fi
}
function just_wrapper() {
just --justfile $justfile $@
}
function choose_truncate() {
echo $1 | cut -d ' ' -f1
}
function choose_list() {
just_wrapper -l --no-aliases --list-heading="" | awk '{$1=$1};1'
}
function hash_highlight() {
cache_dir="$(dirname ${BASH_SOURCE[0]})/.cache"
hash=$(echo $1 | md5sum | cut -d ' ' -f1)
file="$cache_dir/$hash"
if [[ -e $file ]]; then
cat $file
else
mkdir -p $cache_dir
data=$(printf "$1" | highlight --out-format xterm256 --syntax "$2")
printf "$data"
printf "$data" > $file
fi
}
case "$action" in
*choose) choose;;
*preview) preview;;
esac

42
bin/just/colors.sh Executable file
View file

@ -0,0 +1,42 @@
#!/bin/sh
# Colors
COLOR_MARKER='\033'
COLOR_START='['
COLOR_END='m'
COLOR_CLEAR='0'
COLOR_FG='3'
COLOR_BG='4'
COLOR_WHITE='8'
COLOR_BLACK='0'
COLOR_RED='1'
COLOR_GREEN='2'
COLOR_YELLOW='3'
COLOR_BLUE='4'
COLOR_MAGENTA='5'
COLOR_CYAN='6'
# Clear Color
CLEAR=${COLOR_MARKER}${COLOR_START}${COLOR_CLEAR}${COLOR_END}
# Set Foreground
WHITE_FG=${COLOR_MARKER}${COLOR_START}${COLOR_WHITE}${COLOR_WHITE}${COLOR_END}
BLACK_FG=${COLOR_MARKER}${COLOR_START}${COLOR_FG}${COLOR_BLACK}${COLOR_END}
RED_FG=${COLOR_MARKER}${COLOR_START}${COLOR_FG}${COLOR_RED}${COLOR_END}
YELLOW_FG=${COLOR_MARKER}${COLOR_START}${COLOR_FG}${COLOR_YELLOW}${COLOR_END}
GREEN_FG=${COLOR_MARKER}${COLOR_START}${COLOR_FG}${COLOR_GREEN}${COLOR_END}
CYAN_FG=${COLOR_MARKER}${COLOR_START}${COLOR_FG}${COLOR_CYAN}${COLOR_END}
BLUE_FG=${COLOR_MARKER}${COLOR_START}${COLOR_FG}${COLOR_BLUE}${COLOR_END}
MAGENTA_FG=${COLOR_MARKER}${COLOR_START}${COLOR_FG}${COLOR_MAGENTA}${COLOR_END}
# Set Background
WHITE_BG=${COLOR_MARKER}${COLOR_START}${COLOR_BG}${COLOR_WHITE}${COLOR_END}
BLACK_BG=${COLOR_MARKER}${COLOR_START}${COLOR_BG}${COLOR_BLACK}${COLOR_END}
RED_BG=${COLOR_MARKER}${COLOR_START}${COLOR_BG}${COLOR_RED}${COLOR_END}
YELLOW_BG=${COLOR_MARKER}${COLOR_START}${COLOR_BG}${COLOR_YELLOW}${COLOR_END}
GREEN_BG=${COLOR_MARKER}${COLOR_START}${COLOR_BG}${COLOR_GREEN}${COLOR_END}
CYAN_BG=${COLOR_MARKER}${COLOR_START}${COLOR_BG}${COLOR_CYAN}${COLOR_END}
BLUE_BG=${COLOR_MARKER}${COLOR_START}${COLOR_BG}${COLOR_BLUE}${COLOR_END}
MAGENTA_BG=${COLOR_MARKER}${COLOR_START}${COLOR_BG}${COLOR_MAGENTA}${COLOR_END}

19
bin/phpunit Executable file
View file

@ -0,0 +1,19 @@
#!/usr/bin/env php
<?php
if (!ini_get('date.timezone')) {
ini_set('date.timezone', 'UTC');
}
if (is_file(dirname(__DIR__).'/vendor/phpunit/phpunit/phpunit')) {
define('PHPUNIT_COMPOSER_INSTALL', dirname(__DIR__).'/vendor/autoload.php');
require PHPUNIT_COMPOSER_INSTALL;
PHPUnit\TextUI\Command::main();
} else {
if (!is_file(dirname(__DIR__).'/vendor/symfony/phpunit-bridge/bin/simple-phpunit.php')) {
echo "Unable to find the `simple-phpunit.php` script in `vendor/symfony/phpunit-bridge/bin/`.\n";
exit(1);
}
require dirname(__DIR__).'/vendor/symfony/phpunit-bridge/bin/simple-phpunit.php';
}

13
compose.yaml Normal file
View file

@ -0,0 +1,13 @@
services:
mysql:
container_name: 'euph-website_mysql'
image: 'mysql:8.0'
ports:
- '3306:3306'
volumes:
- 'mysql_data:/var/lib/mysql'
environment:
MYSQL_ROOT_PASSWORD: 'empty'
volumes:
mysql_data:

109
composer.json Normal file
View file

@ -0,0 +1,109 @@
{
"type": "project",
"license": "proprietary",
"minimum-stability": "stable",
"prefer-stable": true,
"require": {
"php": ">=8.2",
"ext-ctype": "*",
"ext-dom": "*",
"ext-iconv": "*",
"ext-simplexml": "*",
"doctrine/doctrine-bundle": "^2.11",
"doctrine/doctrine-migrations-bundle": "^3.3",
"doctrine/orm": "^2.17",
"league/commonmark": "^2.4",
"nelmio/cors-bundle": "^2.5",
"presta/sitemap-bundle": "^4.1",
"symfony/apache-pack": "^1.0",
"symfony/asset": "7.1.*",
"symfony/console": "7.1.*",
"symfony/dotenv": "7.1.*",
"symfony/finder": "7.1.*",
"symfony/flex": "^2",
"symfony/form": "7.1.*",
"symfony/framework-bundle": "7.1.*",
"symfony/http-client": "7.1.*",
"symfony/monolog-bundle": "^3.0",
"symfony/runtime": "7.1.*",
"symfony/stimulus-bundle": "^2.18",
"symfony/twig-bundle": "7.1.*",
"symfony/uid": "7.1.*",
"symfony/ux-icons": "^2.18",
"symfony/ux-swup": "^2.18",
"symfony/ux-twig-component": "*",
"symfony/validator": "7.1.*",
"symfony/webpack-encore-bundle": "^2.1",
"symfony/yaml": "7.1.*",
"twig/extra-bundle": "^3.8",
"twig/string-extra": "^3.8",
"vich/uploader-bundle": "^2.3",
"webmozart/assert": "^1.11"
},
"config": {
"allow-plugins": {
"php-http/discovery": true,
"symfony/flex": true,
"symfony/runtime": true,
"phpstan/extension-installer": true
},
"sort-packages": true
},
"autoload": {
"psr-4": {
"App\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"App\\Tests\\": "tests/",
"DoctrineFixtures\\": "src/Framework/Fixtures"
}
},
"replace": {
"symfony/polyfill-ctype": "*",
"symfony/polyfill-iconv": "*",
"symfony/polyfill-php72": "*",
"symfony/polyfill-php73": "*",
"symfony/polyfill-php74": "*",
"symfony/polyfill-php80": "*",
"symfony/polyfill-php81": "*"
},
"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": "*"
},
"extra": {
"symfony": {
"allow-contrib": false,
"require": "7.1.*"
}
},
"require-dev": {
"dama/doctrine-test-bundle": "^8.0",
"doctrine/doctrine-fixtures-bundle": "^3.5",
"friendsofphp/php-cs-fixer": "^3.35",
"phpstan/extension-installer": "^1.3",
"phpstan/phpstan": "^1.10",
"phpstan/phpstan-phpunit": "^1.3",
"phpunit/phpunit": "^9.5",
"symfony/browser-kit": "7.1.*",
"symfony/css-selector": "7.1.*",
"symfony/debug-bundle": "7.1.*",
"symfony/phpunit-bridge": "^6.3",
"symfony/stopwatch": "7.1.*",
"symfony/web-profiler-bundle": "7.1.*",
"vincentlanglet/twig-cs-fixer": "^2.4"
}
}

10732
composer.lock generated Normal file

File diff suppressed because it is too large Load diff

22
config/bundles.php Normal file
View file

@ -0,0 +1,22 @@
<?php
return [
Symfony\Bundle\FrameworkBundle\FrameworkBundle::class => ['all' => true],
Symfony\WebpackEncoreBundle\WebpackEncoreBundle::class => ['all' => true],
Symfony\Bundle\TwigBundle\TwigBundle::class => ['all' => true],
Symfony\UX\StimulusBundle\StimulusBundle::class => ['all' => true],
Doctrine\Bundle\DoctrineBundle\DoctrineBundle::class => ['all' => true],
Doctrine\Bundle\MigrationsBundle\DoctrineMigrationsBundle::class => ['all' => true],
Symfony\Bundle\WebProfilerBundle\WebProfilerBundle::class => ['dev' => true, 'test' => true],
Symfony\Bundle\MonologBundle\MonologBundle::class => ['all' => true],
Symfony\Bundle\DebugBundle\DebugBundle::class => ['dev' => true],
Doctrine\Bundle\FixturesBundle\DoctrineFixturesBundle::class => ['dev' => true, 'test' => true],
DAMA\DoctrineTestBundle\DAMADoctrineTestBundle::class => ['test' => true],
Vich\UploaderBundle\VichUploaderBundle::class => ['all' => true],
Twig\Extra\TwigExtraBundle\TwigExtraBundle::class => ['all' => true],
Presta\SitemapBundle\PrestaSitemapBundle::class => ['all' => true],
Nelmio\CorsBundle\NelmioCorsBundle::class => ['all' => true],
Symfony\UX\TwigComponent\TwigComponentBundle::class => ['all' => true],
Symfony\UX\Icons\UXIconsBundle::class => ['all' => true],
Symfony\UX\Swup\SwupBundle::class => ['all' => true],
];

View file

@ -0,0 +1,5 @@
when@test:
dama_doctrine_test:
enable_static_connection: true
enable_static_meta_data_cache: true
enable_static_query_cache: true

View file

@ -0,0 +1,5 @@
when@dev:
debug:
# Forwards VarDumper Data clones to a centralized server allowing to inspect dumps on CLI or in your browser.
# See the "server:dump" command to start a new server.
dump_destination: "tcp://%env(VAR_DUMPER_SERVER)%"

View file

@ -0,0 +1,47 @@
doctrine:
dbal:
url: '%env(resolve:DATABASE_URL)%'
profiling_collect_backtrace: '%kernel.debug%'
orm:
auto_generate_proxy_classes: true
enable_lazy_ghost_objects: true
report_fields_where_declared: true
validate_xml_mapping: true
naming_strategy: doctrine.orm.naming_strategy.underscore_number_aware
auto_mapping: true
mappings:
App:
type: attribute
is_bundle: false
dir: '%kernel.project_dir%/src'
prefix: 'App'
alias: App
when@test:
doctrine:
dbal:
# "TEST_TOKEN" is typically set by ParaTest
connections:
default:
dbname_suffix: '%env(TEST_TOKEN)%'
use_savepoints: true
when@prod:
doctrine:
orm:
auto_generate_proxy_classes: false
proxy_dir: '%kernel.build_dir%/doctrine/orm/Proxies'
query_cache_driver:
type: pool
pool: doctrine.system_cache_pool
result_cache_driver:
type: pool
pool: doctrine.result_cache_pool
framework:
cache:
pools:
doctrine.result_cache_pool:
adapter: cache.app
doctrine.system_cache_pool:
adapter: cache.system

View file

@ -0,0 +1,6 @@
doctrine_migrations:
migrations_paths:
# namespace is arbitrary but should be different from App\Migrations
# as migrations classes should NOT be autoloaded
'DoctrineMigrations': '%kernel.project_dir%/src/Framework/Migrations'
enable_profiler: false

View file

@ -0,0 +1,28 @@
<?php
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
use Symfony\Config\FrameworkConfig;
return static function (FrameworkConfig $framework, ContainerConfigurator $container): void {
$framework->secret('%env(APP_SECRET)%');
$framework->httpMethodOverride(false);
$framework->handleAllThrowables(true);
$framework->session()
->handlerId(null)
->cookieSecure("auto")
->cookieSamesite("lax")
->storageFactoryId("session.storage.factory.native");
$framework->phpErrors(["log" => true]);
if ($container->env() === "test") {
$framework->test(true);
$framework->session()->storageFactoryId("session.storage.factory.mock_file");
}
if ($container->env() === "prod") {
$framework->session()->handlerId('file://%kernel.project_dir%/var/sessions');
}
};

View file

@ -0,0 +1,53 @@
monolog:
channels:
- deprecation # Deprecations are logged in the dedicated "deprecation" channel when it exists
when@dev:
monolog:
handlers:
main:
type: stream
path: "%kernel.logs_dir%/%kernel.environment%.log"
level: debug
channels: [ "!event" ]
console:
type: console
process_psr_3_messages: false
channels: [ "!event", "!doctrine", "!console" ]
when@test:
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
when@prod:
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: "%kernel.logs_dir%/%kernel.environment%.log"
level: debug
formatter: monolog.formatter.json
console:
type: console
process_psr_3_messages: false
channels: [ "!event", "!doctrine" ]
deprecation:
type: stream
channels: [ deprecation ]
path: "%kernel.logs_dir%/%kernel.environment%.log"

View file

@ -0,0 +1,14 @@
nelmio_cors:
defaults:
allow_credentials: false
allow_origin: []
# Allow Hot Reloading CORS
when@dev:
nelmio_cors:
defaults:
origin_regex: false
allow_origin: [ 'http://localhost:3000' ]
allow_headers: ['Content-Type', "X-Requested-With"]
allow_methods: [ 'POST', 'PUT', 'GET', 'DELETE' ]
skip_same_as_origin: true

View file

@ -0,0 +1,2 @@
presta_sitemap:
default_section: default

10
config/packages/twig.yaml Normal file
View file

@ -0,0 +1,10 @@
twig:
default_path: '%kernel.project_dir%/src'
paths:
'%kernel.project_dir%/src/Framework': 'framework'
'%kernel.project_dir%/src/Site': 'site'
'%kernel.project_dir%/src/Component': 'component'
when@test:
twig:
strict_variables: true

View file

@ -0,0 +1,5 @@
twig_component:
anonymous_template_directory: 'Component/'
defaults:
# Namespace & directory for components
App\Component\: 'Component/'

4
config/packages/uid.yaml Normal file
View file

@ -0,0 +1,4 @@
framework:
uid:
default_uuid_version: 7
time_based_uuid_version: 7

View file

@ -0,0 +1,13 @@
framework:
validation:
email_validation_mode: html5
# Enables validator auto-mapping support.
# For instance, basic validation constraints will be inferred from Doctrine's metadata.
#auto_mapping:
# App\Entity\: []
when@test:
framework:
validation:
not_compromised_password: false

View file

@ -0,0 +1,21 @@
vich_uploader:
db_driver: orm
metadata:
type: attribute
mappings:
job_video-thumbnail:
uri_prefix: /assets/videos/jobs/thumbnails
upload_destination: '%kernel.project_dir%/public/assets/videos/jobs/thumbnails'
namer: Vich\UploaderBundle\Naming\SmartUniqueNamer
inject_on_load: false
delete_on_update: true
delete_on_remove: true
when@test:
vich_uploader:
mappings:
job_video-thumbnail:
delete_on_update: false
delete_on_remove: false

View file

@ -0,0 +1,17 @@
when@dev:
web_profiler:
toolbar: true
intercept_redirects: false
framework:
profiler:
only_exceptions: false
collect_serializer_data: true
when@test:
web_profiler:
toolbar: false
intercept_redirects: false
framework:
profiler: { collect: false }

15
config/routes.yaml Normal file
View file

@ -0,0 +1,15 @@
controllers:
resource:
path: '../src/'
namespace: App
type: attribute
presta_sitemap:
resource: "@PrestaSitemapBundle/config/routing.yml"
#when@dev:
# test_style:
# path: /test/styles
# controller: Symfony\Bundle\FrameworkBundle\Controller\TemplateController
# defaults:
# template: 'test/styles.html.twig'

View file

@ -0,0 +1,8 @@
when@dev:
web_profiler_wdt:
resource: '@WebProfilerBundle/Resources/config/routing/wdt.xml'
prefix: /_wdt
web_profiler_profiler:
resource: '@WebProfilerBundle/Resources/config/routing/profiler.xml'
prefix: /_profiler

18
config/services.php Normal file
View file

@ -0,0 +1,18 @@
<?php
declare(strict_types=1);
namespace Symfony\Component\DependencyInjection\Loader\Configurator;
return function(ContainerConfigurator $container): void {
$services = $container->services()
->defaults()
->autowire()
->autoconfigure()
;
$services
->load('App\\', '%kernel.project_dir%/src/')
->exclude('%kernel.project_dir%/src/{DependencyInjection,Entity,Kernel.php}')
;
};

15
config/services_dev.php Normal file
View file

@ -0,0 +1,15 @@
<?php
declare(strict_types=1);
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
return static function (ContainerConfigurator $containerConfigurator): void {
$services = $containerConfigurator->services()
->defaults()
->autowire()
->autoconfigure()
;
$services->load('DoctrineFixtures\\', '%kernel.project_dir%/src/Framework/Fixtures');
};

15
config/services_test.php Normal file
View file

@ -0,0 +1,15 @@
<?php
declare(strict_types=1);
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
return static function (ContainerConfigurator $containerConfigurator): void {
$services = $containerConfigurator->services()
->defaults()
->autowire()
->autoconfigure()
;
$services->load('DoctrineFixtures\\', '.%kernel.project_dir%/src/Framework/Fixtures');
};

16107
package-lock.json generated Normal file

File diff suppressed because it is too large Load diff

64
package.json Normal file
View file

@ -0,0 +1,64 @@
{
"license": "UNLICENSED",
"private": true,
"scripts": {
"dev": "encore dev",
"dev:server": "encore dev-server",
"watch": "encore dev --watch",
"build": "encore production --progress",
"lint:ts": "slint src",
"lint:ts:fix": "eslint src --fix",
"lint:scss": "stylelint src",
"lint:scss:fix": "stylelint src --fix"
},
"devDependencies": {
"@babel/core": "^7.23.3",
"@babel/eslint-parser": "^7.23.3",
"@babel/preset-env": "^7.16.0",
"@hotwired/stimulus": "^3.0.0",
"@popperjs/core": "^2.11.8",
"@swup/debug-plugin": "^3.0",
"@swup/fade-theme": "^1.0",
"@swup/forms-plugin": "^2.0",
"@swup/slide-theme": "^1.0",
"@symfony/stimulus-bridge": "^3.2.0",
"@symfony/ux-swup": "file:vendor/symfony/ux-swup/assets",
"@symfony/webpack-encore": "^4.0.0",
"@typescript-eslint/eslint-plugin": "^6.10.0",
"@typescript-eslint/parser": "^6.10.0",
"autoprefixer": "^10.4.19",
"browser-sync": "^2.29.3",
"browser-sync-webpack-plugin": "^2.3.0",
"core-js": "^3.23.0",
"eslint": "^8.53.0",
"file-loader": "^6.2.0",
"fork-ts-checker-webpack-plugin": "^9.0.0",
"ignore-loader": "^0.1.2",
"postcss": "^8.4.39",
"postcss-loader": "^7.3.4",
"prettier": "^2.8.8",
"regenerator-runtime": "^0.13.9",
"sass": "^1.69.4",
"sass-loader": "^13.3.2",
"stylelint": "^16.2.1",
"stylelint-config-standard-scss": "^13.0.0",
"stylelint-config-tailwindcss": "^0.0.7",
"stylelint-scss": "^6.3.1",
"swup": "^3.0",
"tailwindcss": "^3.4.4",
"ts-loader": "^9.5.0",
"tsconfig-paths-webpack-plugin": "^4.1.0",
"typescript": "^5.2.2",
"webpack": "^5.74.0",
"webpack-cli": "^4.10.0",
"webpack-notifier": "^1.15.0"
},
"volta": {
"node": "20.9.0"
},
"fork-ts-checker": {
"typescript": {
"configFileName": "./tsconfig.json"
}
}
}

2
php.ini Normal file
View file

@ -0,0 +1,2 @@
xdebug.mode = debug
xdebug.start_with_request = trigger

9
phpstan.neon Normal file
View file

@ -0,0 +1,9 @@
parameters:
paths:
- src
- tests
level:
max
tmpDir: var/phpstan
bootstrapFiles:
- ./vendor/autoload.php

49
phpunit.xml.dist Normal file
View file

@ -0,0 +1,49 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- https://phpunit.readthedocs.io/en/latest/configuration.html -->
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
backupGlobals="false"
colors="true"
bootstrap="tests/bootstrap.php"
convertDeprecationsToExceptions="false"
>
<php>
<ini name="display_errors" value="1" />
<ini name="error_reporting" value="-1" />
<server name="APP_ENV" value="test" force="true" />
<server name="SHELL_VERBOSITY" value="-1" />
<server name="SYMFONY_PHPUNIT_REMOVE" value="" />
<server name="SYMFONY_PHPUNIT_VERSION" value="9.5" />
</php>
<testsuites>
<testsuite name="Unit">
<directory>tests/Unit</directory>
</testsuite>
<testsuite name="Integration">
<directory>tests/Integration</directory>
</testsuite>
<testsuite name="Web">
<directory>tests/Web</directory>
</testsuite>
</testsuites>
<coverage processUncoveredFiles="true">
<include>
<directory suffix=".php">src</directory>
</include>
<exclude>
<directory suffix="Entity.php">src/</directory>
<directory suffix="Fixtures.php">src/Framework/Fixtures</directory>
</exclude>
</coverage>
<listeners>
<listener class="Symfony\Bridge\PhpUnit\SymfonyTestsListener" />
</listeners>
<extensions>
<extension class="DAMA\DoctrineTestBundle\PHPUnit\PHPUnitExtension" />
</extensions>
</phpunit>

6
postcss.config.js Normal file
View file

@ -0,0 +1,6 @@
module.exports = {
plugins: {
tailwindcss: {},
autoprefixer: {},
},
}

6
public/.gitignore vendored Normal file
View file

@ -0,0 +1,6 @@
/*
!.gitignore
!index.php
!robots.txt
!.htaccess
!maintenance.html

32
public/.htaccess Normal file
View file

@ -0,0 +1,32 @@
DirectoryIndex index.php
<IfModule mod_negotiation.c>
Options -MultiViews
</IfModule>
<IfModule mod_rewrite.c>
Options +FollowSymlinks
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule .* - [E=BASE:%1]
RewriteCond %{HTTP:Authorization} .+
RewriteRule ^ - [E=HTTP_AUTHORIZATION:%0]
RewriteCond %{DOCUMENT_ROOT}/maintenance.flag -f [NC]
RewriteRule ^ maintenance.html [L]
RewriteCond %{ENV:REDIRECT_STATUS} =""
RewriteRule ^index\.php(?:/(.*)|$) %{ENV:BASE}/$1 [R=301,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ %{ENV:BASE}/index.php [L]
</IfModule>
<IfModule !mod_rewrite.c>
<IfModule mod_alias.c>
RedirectMatch 307 ^/$ /index.php/
</IfModule>
</IfModule>

View file

@ -1,6 +1,6 @@
<?php <?php
use App\Kernel; use App\Framework\Kernel;
require_once dirname(__DIR__).'/vendor/autoload_runtime.php'; require_once dirname(__DIR__).'/vendor/autoload_runtime.php';

Some files were not shown because too many files have changed in this diff Show more