Compare commits

..

No commits in common. "master" and "v1.14.0" have entirely different histories.

72 changed files with 13650 additions and 6182 deletions

7
.env
View file

@ -9,7 +9,6 @@
# Real environment variables win over .env files. # Real environment variables win over .env files.
# #
# DO NOT DEFINE PRODUCTION SECRETS IN THIS FILE NOR IN ANY OTHER COMMITTED 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). # 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 # https://symfony.com/doc/current/best_practices.html#use-environment-variables-for-infrastructure-configuration
@ -20,7 +19,7 @@ APP_SECRET=
###< symfony/framework-bundle ### ###< symfony/framework-bundle ###
###> symfony/mailer ### ###> symfony/mailer ###
# MAILER_DSN=smtp://localhost MAILER_DSN=smtp://localhost
###< symfony/mailer ### ###< symfony/mailer ###
###> doctrine/doctrine-bundle ### ###> doctrine/doctrine-bundle ###
@ -28,6 +27,6 @@ APP_SECRET=
# IMPORTANT: You MUST configure your server version, either here or in config/packages/doctrine.yaml # IMPORTANT: You MUST configure your server version, either here or in config/packages/doctrine.yaml
# #
DATABASE_URL="sqlite:///%kernel.project_dir%/var/data.db" DATABASE_URL="sqlite:///%kernel.project_dir%/var/data.db"
# DATABASE_URL="mysql://app:!ChangeMe!@127.0.0.1:3306/app?serverVersion=8&charset=utf8mb4" # DATABASE_URL="mysql://db_user:db_password@127.0.0.1:3306/db_name?serverVersion=5.7"
# DATABASE_URL="postgresql://app:!ChangeMe!@127.0.0.1:5432/app?serverVersion=14&charset=utf8" # DATABASE_URL="postgresql://db_user:db_password@127.0.0.1:5432/db_name?serverVersion=13&charset=utf8"
###< doctrine/doctrine-bundle ### ###< doctrine/doctrine-bundle ###

View file

@ -4,4 +4,3 @@ APP_SECRET='$ecretf0rt3st'
SYMFONY_DEPRECATIONS_HELPER=999999 SYMFONY_DEPRECATIONS_HELPER=999999
PANTHER_APP_ENV=panther PANTHER_APP_ENV=panther
PANTHER_ERROR_SCREENSHOT_DIR=./var/error-screenshots PANTHER_ERROR_SCREENSHOT_DIR=./var/error-screenshots
DATABASE_URL="sqlite:///%kernel.project_dir%/var/data_tests.db"

6
.gitignore vendored
View file

@ -12,6 +12,7 @@
###< symfony/framework-bundle ### ###< symfony/framework-bundle ###
###> symfony/phpunit-bridge ### ###> symfony/phpunit-bridge ###
.phpunit
.phpunit.result.cache .phpunit.result.cache
/phpunit.xml /phpunit.xml
###< symfony/phpunit-bridge ### ###< symfony/phpunit-bridge ###
@ -28,8 +29,3 @@ yarn-error.log
/public/media/ /public/media/
/migrations/* /migrations/*
!/migrations/.gitkeep !/migrations/.gitkeep
###> phpunit/phpunit ###
/phpunit.xml
.phpunit.result.cache
###< phpunit/phpunit ###

View file

@ -1,49 +0,0 @@
matrix:
PHP_VERSION:
- 8.0
- 8.1
services:
db:
image: mariadb:10.3
environment:
- MARIADB_ROOT_PASSWORD=root
steps:
db_wait:
image: gitnet.fr/deblan/timeout:latest
commands:
- /bin/timeout -t 30 -v -c 'while true; do nc -z -v db 3306 2>&1 | grep succeeded && exit 0; sleep 0.5; done'
db_create:
image: mariadb:10.3
commands:
- mysql -hdb -uroot -proot -e "CREATE DATABASE app"
config:
image: deblan/php:${PHP_VERSION}
commands:
- echo APP_ENV=prod >> .env.local
- echo APP_SECRET=$(openssl rand -hex 32) >> .env.local
- echo DATABASE_URL=mysql://root:root@db/app >> .env.local
composer:
image: deblan/php:${PHP_VERSION}
commands:
- apt-get update && apt-get -y install git
- composer install --no-scripts
db_migrate:
image: deblan/php:${PHP_VERSION}
environment:
- PHP=php
commands:
- ./bin/doctrine-migrate
node:
image: node:16-slim
commands:
- yarn
- test -d public/js || mkdir public/js
- test -f public/js/fos_js_routes.json || echo "{}" > public/js/fos_js_routes.json
- npm run build

View file

@ -1,99 +1,8 @@
## [Unreleased] ## [Unreleased]
## [v1.25.1] - 2024-05-13
### Fixed
* fix murph-npm version
## [v1.25.0] - 2024-05-12
### Changed
* upgrade murph/murph-core
## [v1.23.0] - 2023-09-28
### Changed
* upgrade murph/murph-core
## [v1.22.0] - 2023-09-28
### Added ### Added
* update woodpecker ci base file
### Fixed
* fix #1: add UniqueEntity constraint in the User entity
### Changed
* upgrade murph/murph-core
## [1.21.0] - 2023-08-11
### Changed
* upgrade murph/murph-core
## [1.20.0] - 2023-07-27
### Fixed
* fix collection widget: allow_add/allow_delete and prototype
### Added
* add user admin controller and simples views in default files
* add chdir in the console entrypoint
### Changed
* upgrade murph/murph-core
## [1.19.0] - 2023-04-15
### Changed
* upgrade murph/murph-core
## [1.18.0] - 2023-01-13
### Added
* feat(dep): update dependencies
* feat(update): apply new recipe for phpunit
* feat(update): apply recipes:update doctrine/doctrine-bundle
* feat(update): apply recipes:update doctrine/doctrine-migrations-bundle
* feat(update): apply recipes:update liip/imagine-bundle
* feat(update): apply recipes:update stof/doctrine-extensions-bundle
* feat(update): apply recipes:update symfony/apache-pack
* feat(update): apply recipes:update symfony/console
* feat(update): apply recipes:update symfony/debug-bundle
* feat(update): apply recipes:update symfony/flex
* feat(update): apply recipes:update symfony/mailer
* feat(update): apply recipes:update symfony/framework-bundle
* feat(update): apply recipes:update symfony/monolog-bundle
* feat(update): apply recipes:update symfony/routing
* feat(update): apply recipes:update symfony/security-bundle
* feat(update): apply recipes:update symfony/translation
* feat(update): apply recipes:update symfony/twig-bundle
* feat(update): apply recipes:update symfony/validator
* feat(update): apply recipes:update symfony/web-profiler-bundle
* feat(update): apply recipes:update symfony/webpack-encore-bundle
* feat(update): apply recipes:update scheb/2fa-bundle
### Fixed
* fix(config): fix typo in 2fa conf
* fix(config): fix firewall config
## [1.17.0] - 2022-11-19
### Changed
* upgrade murph/murph-core
* replace annotation with attributes
* use encore from node_modules in npm scripts
## [1.16.0]
### Added
* add a admin dashboard controller
* add meta description in base.html.twig
### Fixed ### Fixed
### Changed ### Changed
* upgrade murph/murph-core
## [1.15.0]
### Changed
* upgrade murph/murph-core
## [1.14.3]
### Added
* add blocks in default template
### Changed
* upgrade murph/murph-core
## [1.14.2]
## [1.14.1]
### Fixed
* fix missing envvar in makefile (npm)
## [1.14.0] ## [1.14.0]
### Changed ### Changed

View file

@ -1,7 +1,6 @@
COMPOSER_BIN ?= composer COMPOSER_BIN ?= composer
PHP_BIN ?= php8.1 PHP_BIN ?= php8.1
YARN_BIN ?= yarn YARN_BIN ?= yarn
NPM_BIN ?= npm
all: build all: build

View file

@ -1,12 +0,0 @@
# Security Policy
## Supported Versions
| Version | Supported |
| ---------- | --------- |
| >= 2.0 | :x: |
| >= 1.0 | :white_check_mark: |
## Reporting a Vulnerability
If you discover a security vulnerability within Murph, send an email to security [at] murph-project.org.

View file

@ -11,33 +11,6 @@ Build:
## [Unreleased] ## [Unreleased]
## Upgrade to v1.17.0
Replace all annotations with PHP8 attributes and change the doctrine configuration:
```
# config/packages/doctrine.yaml
doctrine:
...
orm:
...
mappings:
App\Core\Entity:
type: attribute
...
App\Entity:
type: attribute
...
```
## Upgrade to v1.15.0
```
cd public/vendor
ln -rs ../../node_modules/grapesjs-plugin-export .
ln -rs ../../node_modules/grapesjs-parser-postcss .
```
## Upgrade to v1.10.0 ## Upgrade to v1.10.0
### Commands ### Commands

View file

@ -3,17 +3,41 @@
use App\Kernel; use App\Kernel;
use Symfony\Bundle\FrameworkBundle\Console\Application; use Symfony\Bundle\FrameworkBundle\Console\Application;
use Symfony\Component\Console\Input\ArgvInput;
use Symfony\Component\Dotenv\Dotenv;
use Symfony\Component\ErrorHandler\Debug;
if (!is_file(dirname(__DIR__).'/vendor/autoload_runtime.php')) { if (!in_array(PHP_SAPI, ['cli', 'phpdbg', 'embed'], true)) {
throw new LogicException('Symfony Runtime is missing. Try running "composer require symfony/runtime".'); echo 'Warning: The console should be invoked via the CLI version of PHP, not the '.PHP_SAPI.' SAPI'.PHP_EOL;
} }
require_once dirname(__DIR__).'/vendor/autoload_runtime.php'; set_time_limit(0);
chdir(__DIR__.'/../'); require dirname(__DIR__).'/vendor/autoload.php';
return function (array $context) { if (!class_exists(Application::class) || !class_exists(Dotenv::class)) {
$kernel = new Kernel($context['APP_ENV'], (bool) $context['APP_DEBUG']); throw new LogicException('You need to add "symfony/framework-bundle" and "symfony/dotenv" as Composer dependencies.');
}
return new Application($kernel); $input = new ArgvInput();
}; if (null !== $env = $input->getParameterOption(['--env', '-e'], null, true)) {
putenv('APP_ENV='.$_SERVER['APP_ENV'] = $_ENV['APP_ENV'] = $env);
}
if ($input->hasParameterOption('--no-debug', true)) {
putenv('APP_DEBUG='.$_SERVER['APP_DEBUG'] = $_ENV['APP_DEBUG'] = '0');
}
(new Dotenv())->bootEnv(dirname(__DIR__).'/.env');
if ($_SERVER['APP_DEBUG']) {
umask(0000);
if (class_exists(Debug::class)) {
Debug::enable();
}
}
$kernel = new Kernel($_SERVER['APP_ENV'], (bool) $_SERVER['APP_DEBUG']);
$application = new Application($kernel);
$application->run($input);

View file

@ -1,19 +1,13 @@
#!/usr/bin/env php #!/usr/bin/env php
<?php <?php
if (!ini_get('date.timezone')) { if (!file_exists(dirname(__DIR__).'/vendor/symfony/phpunit-bridge/bin/simple-phpunit.php')) {
ini_set('date.timezone', 'UTC'); echo "Unable to find the `simple-phpunit.php` script in `vendor/symfony/phpunit-bridge/bin/`.\n";
exit(1);
} }
if (is_file(dirname(__DIR__).'/vendor/phpunit/phpunit/phpunit')) { if (false === getenv('SYMFONY_PHPUNIT_DIR')) {
define('PHPUNIT_COMPOSER_INSTALL', dirname(__DIR__).'/vendor/autoload.php'); putenv('SYMFONY_PHPUNIT_DIR='.__DIR__.'/.phpunit');
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';
} }
require dirname(__DIR__).'/vendor/symfony/phpunit-bridge/bin/simple-phpunit.php';

View file

@ -7,14 +7,14 @@
"prefer-stable": true, "prefer-stable": true,
"require": { "require": {
"php": ">=8.0.0", "php": ">=8.0.0",
"murph/murph-core": "^1.25" "murph/murph-core": "^1.14,>=1.14.0"
}, },
"require-dev": { "require-dev": {
"symfony/browser-kit": "^5.4", "symfony/browser-kit": "^5.4",
"symfony/css-selector": "^5.4", "symfony/css-selector": "^5.4",
"symfony/debug-bundle": "^5.4", "symfony/debug-bundle": "^5.4",
"symfony/maker-bundle": "^1.0", "symfony/maker-bundle": "^1.0",
"symfony/phpunit-bridge": "^6.2", "symfony/phpunit-bridge": "^5.4",
"symfony/stopwatch": "^5.4", "symfony/stopwatch": "^5.4",
"symfony/var-dumper": "^5.4", "symfony/var-dumper": "^5.4",
"symfony/web-profiler-bundle": "^5.4" "symfony/web-profiler-bundle": "^5.4"
@ -26,8 +26,7 @@
}, },
"sort-packages": true, "sort-packages": true,
"allow-plugins": { "allow-plugins": {
"symfony/flex": true, "symfony/flex": true
"symfony/runtime": true
} }
}, },
"autoload": { "autoload": {

View file

@ -6,7 +6,7 @@ return [
Symfony\Bundle\TwigBundle\TwigBundle::class => ['all' => true], Symfony\Bundle\TwigBundle\TwigBundle::class => ['all' => true],
Symfony\Bundle\WebProfilerBundle\WebProfilerBundle::class => ['dev' => true, 'test' => true], Symfony\Bundle\WebProfilerBundle\WebProfilerBundle::class => ['dev' => true, 'test' => true],
Symfony\Bundle\MonologBundle\MonologBundle::class => ['all' => true], Symfony\Bundle\MonologBundle\MonologBundle::class => ['all' => true],
Symfony\Bundle\DebugBundle\DebugBundle::class => ['dev' => true], Symfony\Bundle\DebugBundle\DebugBundle::class => ['dev' => true, 'test' => true],
Symfony\Bundle\MakerBundle\MakerBundle::class => ['dev' => true], Symfony\Bundle\MakerBundle\MakerBundle::class => ['dev' => true],
Doctrine\Bundle\DoctrineBundle\DoctrineBundle::class => ['all' => true], Doctrine\Bundle\DoctrineBundle\DoctrineBundle::class => ['all' => true],
Doctrine\Bundle\MigrationsBundle\DoctrineMigrationsBundle::class => ['all' => true], Doctrine\Bundle\MigrationsBundle\DoctrineMigrationsBundle::class => ['all' => true],

View file

@ -18,7 +18,6 @@ core:
# - image/png # - image/png
# - image/jpg # - image/jpg
# - image/jpeg # - image/jpeg
# - image/webp
# - image/gif # - image/gif
# - image/svg+xml # - image/svg+xml
# - video/mp4 # - video/mp4

View file

@ -0,0 +1,3 @@
framework:
assets:
json_manifest_path: '%kernel.project_dir%/public/build/manifest.json'

View file

@ -1,5 +0,0 @@
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,4 @@
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,19 @@
monolog:
handlers:
main:
type: stream
path: "%kernel.logs_dir%/%kernel.environment%.log"
level: debug
channels: ["!event"]
# uncomment to get logging in your browser
# you may have to allow bigger header sizes in your Web server configuration
#firephp:
# type: firephp
# level: info
#chromephp:
# type: chromephp
# level: info
console:
type: console
process_psr_3_messages: false
channels: ["!event", "!doctrine", "!console"]

View file

@ -0,0 +1,6 @@
web_profiler:
toolbar: true
intercept_redirects: false
framework:
profiler: { only_exceptions: false }

View file

@ -4,7 +4,7 @@ doctrine:
# IMPORTANT: You MUST configure your server version, # IMPORTANT: You MUST configure your server version,
# either here or in the DATABASE_URL env var (see .env file) # either here or in the DATABASE_URL env var (see .env file)
#server_version: '14' #server_version: '13'
orm: orm:
auto_generate_proxy_classes: true auto_generate_proxy_classes: true
naming_strategy: doctrine.orm.naming_strategy.underscore_number_aware naming_strategy: doctrine.orm.naming_strategy.underscore_number_aware
@ -12,13 +12,13 @@ doctrine:
mappings: mappings:
App\Core\Entity: App\Core\Entity:
is_bundle: false is_bundle: false
type: attribute type: annotation
dir: '%kernel.project_dir%/vendor/murph/murph-core/src/core/Entity' dir: '%kernel.project_dir%/vendor/murph/murph-core/src/core/Entity'
prefix: 'App\Core\Entity' prefix: 'App\Core\Entity'
alias: App\Core\Entity alias: App\Core\Entity
App\Entity: App\Entity:
is_bundle: false is_bundle: false
type: attribute type: annotation
dir: '%kernel.project_dir%/src/Entity' dir: '%kernel.project_dir%/src/Entity'
prefix: 'App\Entity' prefix: 'App\Entity'
alias: App\Entity alias: App\Entity
@ -28,29 +28,3 @@ doctrine:
dir: "%kernel.project_dir%/vendor/gedmo/doctrine-extensions/src/Tree/Entity" dir: "%kernel.project_dir%/vendor/gedmo/doctrine-extensions/src/Tree/Entity"
alias: GedmoTree # (optional) it will default to the name set for the mapping alias: GedmoTree # (optional) it will default to the name set for the mapping
is_bundle: false is_bundle: false
when@test:
doctrine:
dbal:
# "TEST_TOKEN" is typically set by ParaTest
dbname_suffix: '_test%env(default::TEST_TOKEN)%'
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

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

View file

@ -2,7 +2,7 @@
framework: framework:
secret: '%env(APP_SECRET)%' secret: '%env(APP_SECRET)%'
#csrf_protection: true #csrf_protection: true
http_method_override: false #http_method_override: true
# Enables session support. Note that the session will ONLY be started if you read or write from it. # Enables session support. Note that the session will ONLY be started if you read or write from it.
# Remove or comment this section to explicitly disable session support. # Remove or comment this section to explicitly disable session support.
@ -10,15 +10,8 @@ framework:
handler_id: null handler_id: null
cookie_secure: auto cookie_secure: auto
cookie_samesite: lax cookie_samesite: lax
storage_factory_id: session.storage.factory.native
#esi: true #esi: true
#fragments: true #fragments: true
php_errors: php_errors:
log: true log: true
when@test:
framework:
test: true
session:
storage_factory_id: session.storage.factory.mock_file

View file

@ -1,4 +1,4 @@
# Documentation on how to configure the bundle can be found at: https://symfony.com/doc/current/bundles/LiipImagineBundle/basic-usage.html # See dos how to configure the bundle: https://symfony.com/doc/current/bundles/LiipImagineBundle/basic-usage.html
liip_imagine: liip_imagine:
# valid drivers options include "gd" or "gmagick" or "imagick" # valid drivers options include "gd" or "gmagick" or "imagick"
driver: "imagick" driver: "imagick"

View file

@ -1,61 +0,0 @@
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"]
# uncomment to get logging in your browser
# you may have to allow bigger header sizes in your Web server configuration
#firephp:
# type: firephp
# level: info
#chromephp:
# type: chromephp
# level: info
console:
type: console
process_psr_3_messages: false
channels: ["!event", "!doctrine", "!console"]
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: php://stderr
level: debug
formatter: monolog.formatter.json
console:
type: console
process_psr_3_messages: false
channels: ["!event", "!doctrine"]
deprecation:
type: stream
channels: [deprecation]
path: php://stderr

View file

@ -0,0 +1,8 @@
# As of Symfony 5.1, deprecations are logged in the dedicated "deprecation" channel when it exists
#monolog:
# channels: [deprecation]
# handlers:
# deprecation:
# type: stream
# channels: [deprecation]
# path: "%kernel.logs_dir%/%kernel.environment%.deprecations.log"

View file

@ -0,0 +1,20 @@
doctrine:
orm:
auto_generate_proxy_classes: false
metadata_cache_driver:
type: pool
pool: doctrine.system_cache_pool
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,16 @@
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
console:
type: console
process_psr_3_messages: false
channels: ["!event", "!doctrine"]

View file

@ -0,0 +1,3 @@
framework:
router:
strict_requirements: null

View file

@ -0,0 +1,4 @@
#webpack_encore:
# Cache the entrypoints.json (rebuild Symfony's cache when entrypoints.json changes)
# Available in version 1.2
#cache: true

View file

@ -5,8 +5,3 @@ framework:
# Configure how to generate URLs in non-HTTP contexts, such as CLI commands. # Configure how to generate URLs in non-HTTP contexts, such as CLI commands.
# See https://symfony.com/doc/current/routing.html#generating-urls-in-commands # See https://symfony.com/doc/current/routing.html#generating-urls-in-commands
#default_uri: http://localhost #default_uri: http://localhost
when@prod:
framework:
router:
strict_requirements: null

View file

@ -2,7 +2,7 @@
scheb_two_factor: scheb_two_factor:
google: google:
enabled: true enabled: true
issuer: "Murph" issuer: "Muprh"
server_name: server_name:
digits: 6 digits: 6
window: 1 window: 1

View file

@ -3,16 +3,7 @@ security:
App\Entity\User: App\Entity\User:
algorithm: auto algorithm: auto
access_decision_manager:
strategy: consensus
allow_if_all_abstain: false
# https://symfony.com/doc/current/security.html#where-do-users-come-from-user-providers # https://symfony.com/doc/current/security.html#where-do-users-come-from-user-providers
enable_authenticator_manager: true
# https://symfony.com/doc/current/security.html#registering-the-user-hashing-passwords
password_hashers:
Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface: 'auto'
# https://symfony.com/doc/current/security.html#loading-the-user-the-user-provider
providers: providers:
# used to reload user from session & other features (e.g. switch_user) # used to reload user from session & other features (e.g. switch_user)
app_user_provider: app_user_provider:
@ -29,6 +20,7 @@ security:
pattern: ^/(_(profiler|wdt)|css|images|js)/ pattern: ^/(_(profiler|wdt)|css|images|js)/
security: false security: false
main: main:
anonymous: ~
two_factor: two_factor:
auth_form_path: 2fa_login # The route name you have used in the routes.yaml auth_form_path: 2fa_login # The route name you have used in the routes.yaml
check_path: 2fa_login_check # The route name you have used in the routes.yaml check_path: 2fa_login_check # The route name you have used in the routes.yaml
@ -38,7 +30,7 @@ security:
form_login: form_login:
login_path: auth_login login_path: auth_login
check_path: auth_login check_path: auth_login
enable_csrf: true csrf_token_generator: security.csrf.token_manager
logout: logout:
path: auth_logout path: auth_logout
target: / target: /
@ -47,8 +39,6 @@ security:
lifetime: 604800 lifetime: 604800
path: / path: /
entry_point: form_login
# Easy way to control access for large sections of your site # Easy way to control access for large sections of your site
# Note: Only the *first* access control that matches will be used # Note: Only the *first* access control that matches will be used
access_control: access_control:
@ -62,16 +52,3 @@ security:
- { path: ^/admin/file_manager, roles: ROLE_WRITER } - { path: ^/admin/file_manager, roles: ROLE_WRITER }
- { path: ^/admin, roles: ROLE_USER } - { path: ^/admin, roles: ROLE_USER }
- { path: ^/_internal, roles: IS_AUTHENTICATED_ANONYMOUSLY } - { path: ^/_internal, roles: IS_AUTHENTICATED_ANONYMOUSLY }
when@test:
security:
password_hashers:
# By default, password hashers are resource intensive and take time. This is
# important to generate secure password hashes. In tests however, secure hashes
# are not important, waste resources and increase test times. The following
# reduces the work factor to the lowest possible values.
Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface:
algorithm: auto
cost: 4 # Lowest possible value for bcrypt
time_cost: 3 # Lowest possible value for argon
memory_cost: 10 # Lowest possible value for argon

View file

@ -1,4 +1,4 @@
# Read the documentation: https://symfony.com/doc/current/bundles/StofDoctrineExtensionsBundle/index.html # Read the documentation: https://symfony.com/doc/current/bundles/StofDoctrineExtensionsBundle/index.html
# See the official DoctrineExtensions documentation for more details: https://github.com/doctrine-extensions/DoctrineExtensions/tree/main/doc # See the official DoctrineExtensions documentation for more details: https://github.com/Atlantic18/DoctrineExtensions/tree/master/doc/
stof_doctrine_extensions: stof_doctrine_extensions:
default_locale: en_US default_locale: en_US

View file

@ -0,0 +1,4 @@
framework:
test: true
session:
storage_id: session.storage.mock_file

View file

@ -0,0 +1,12 @@
monolog:
handlers:
main:
type: fingers_crossed
action_level: error
handler: nested
excluded_http_codes: [404, 405]
channels: ["!event"]
nested:
type: stream
path: "%kernel.logs_dir%/%kernel.environment%.log"
level: debug

View file

@ -0,0 +1,2 @@
twig:
strict_variables: true

View file

@ -0,0 +1,3 @@
framework:
validation:
not_compromised_password: false

View file

@ -0,0 +1,6 @@
web_profiler:
toolbar: false
intercept_redirects: false
framework:
profiler: { collect: false }

View file

@ -0,0 +1,2 @@
#webpack_encore:
# strict_mode: false

View file

@ -6,10 +6,3 @@ framework:
- '%kernel.project_dir%/vendor/murph/murph-core/src/core/Resources/translations' - '%kernel.project_dir%/vendor/murph/murph-core/src/core/Resources/translations'
fallbacks: fallbacks:
- en - en
# providers:
# crowdin:
# dsn: '%env(CROWDIN_DSN)%'
# loco:
# dsn: '%env(LOCO_DSN)%'
# lokalise:
# dsn: '%env(LOKALISE_DSN)%'

View file

@ -4,7 +4,3 @@ twig:
paths: paths:
'%kernel.project_dir%/templates/core/': Core '%kernel.project_dir%/templates/core/': Core
'%kernel.project_dir%/vendor/murph/murph-core/src/core/Resources/views/': Core '%kernel.project_dir%/vendor/murph/murph-core/src/core/Resources/views/': Core
when@test:
twig:
strict_variables: true

View file

@ -6,8 +6,3 @@ framework:
# For instance, basic validation constraints will be inferred from Doctrine's metadata. # For instance, basic validation constraints will be inferred from Doctrine's metadata.
#auto_mapping: #auto_mapping:
# App\Entity\: [] # App\Entity\: []
when@test:
framework:
validation:
not_compromised_password: false

View file

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

View file

@ -7,12 +7,7 @@ webpack_encore:
# Set attributes that will be rendered on all script and link tags # Set attributes that will be rendered on all script and link tags
script_attributes: script_attributes:
defer: true defer: true
# Uncomment (also under link_attributes) if using Turbo Drive
# https://turbo.hotwired.dev/handbook/drive#reloading-when-assets-change
# 'data-turbo-track': reload
# link_attributes: # link_attributes:
# Uncomment if using Turbo Drive
# 'data-turbo-track': reload
# If using Encore.enableIntegrityHashes() and need the crossorigin attribute (default: false, or use 'anonymous' or 'use-credentials') # If using Encore.enableIntegrityHashes() and need the crossorigin attribute (default: false, or use 'anonymous' or 'use-credentials')
# crossorigin: 'anonymous' # crossorigin: 'anonymous'
@ -25,21 +20,11 @@ webpack_encore:
# If you have multiple builds: # If you have multiple builds:
# builds: # builds:
# frontend: '%kernel.project_dir%/public/frontend/build' # pass "frontend" as the 3rg arg to the Twig functions
# pass the build name as the 3rd argument to the Twig functions
# {{ encore_entry_script_tags('entry1', null, 'frontend') }} # {{ encore_entry_script_tags('entry1', null, 'frontend') }}
framework: # frontend: '%kernel.project_dir%/public/frontend/build'
assets:
json_manifest_path: '%kernel.project_dir%/public/build/manifest.json'
#when@prod: # Cache the entrypoints.json (rebuild Symfony's cache when entrypoints.json changes)
# webpack_encore: # Put in config/packages/prod/webpack_encore.yaml
# # Cache the entrypoints.json (rebuild Symfony's cache when entrypoints.json changes) # cache: true
# # Available in version 1.2
# cache: true
#when@test:
# webpack_encore:
# strict_mode: false

View file

@ -0,0 +1,3 @@
_errors:
resource: '@FrameworkBundle/Resources/config/routing/errors.xml'
prefix: /_error

View file

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

View file

@ -1,4 +0,0 @@
when@dev:
_errors:
resource: '@FrameworkBundle/Resources/config/routing/errors.xml'
prefix: /_error

View file

@ -1,7 +1,7 @@
2fa_login: 2fa_login:
path: /2fa path: /2fa
defaults: defaults:
_controller: "scheb_two_factor.form_controller::form" _controller: "scheb_two_factor.form_controller:form"
2fa_login_check: 2fa_login_check:
path: /2fa_check path: /2fa_check

View file

@ -1,8 +0,0 @@
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

View file

@ -2,7 +2,7 @@
# Files in the packages/ subdirectory configure your dependencies. # 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 # 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 # https://symfony.com/doc/current/best_practices/configuration.html#application-related-configuration
parameters: parameters:
services: services:
@ -11,29 +11,22 @@ services:
autowire: true # Automatically injects dependencies in your services. autowire: true # Automatically injects dependencies in your services.
autoconfigure: true # Automatically registers your services as commands, event subscribers, etc. autoconfigure: true # Automatically registers your services as commands, event subscribers, etc.
# Murph services # 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\Core\: App\Core\:
resource: '../vendor/murph/murph-core/src/core/' resource: '../vendor/murph/murph-core/src/core/'
exclude: exclude:
- '../vendor/murph/murph-core/src/core/DependencyInjection/' - '../vendor/murph/murph-core/src/core/DependencyInjection/'
- '../vendor/murph/murph-core/src/core/Entity/' - '../vendor/murph/murph-core/src/core/Entity/'
# Redirections
App\Core\EventListener\RedirectListener: App\Core\EventListener\RedirectListener:
tags: tags:
- { name: kernel.event_listener, event: kernel.exception } - { name: kernel.event_listener, event: kernel.exception }
# Analytics
App\Core\EventListener\AnalyticListener: App\Core\EventListener\AnalyticListener:
tags: tags:
- { name: kernel.event_listener, event: kernel.request } - { name: kernel.event_listener, event: kernel.request }
# A/B Testing
App\Core\EventListener\AbListener:
tags:
- { name: kernel.event_listener, event: kernel.request }
- { name: kernel.event_listener, event: kernel.response }
App\: App\:
resource: '../src/' resource: '../src/'
exclude: exclude:

11023
package-lock.json generated Normal file

File diff suppressed because it is too large Load diff

View file

@ -2,10 +2,10 @@
"license": "UNLICENSED", "license": "UNLICENSED",
"private": true, "private": true,
"scripts": { "scripts": {
"dev-server": "./node_modules/.bin/encore dev-server", "dev-server": "encore dev-server",
"dev": "./node_modules/.bin/encore dev", "dev": "encore dev",
"watch": "./node_modules/.bin/encore dev --watch", "watch": "encore dev --watch",
"build": "./node_modules/.bin/encore production --progress" "build": "encore production --progress"
}, },
"dependencies": { "dependencies": {
"murph-project": "^1" "murph-project": "^1"

View file

@ -2,19 +2,17 @@
<!-- https://phpunit.readthedocs.io/en/latest/configuration.html --> <!-- https://phpunit.readthedocs.io/en/latest/configuration.html -->
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" <phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd" xsi:noNamespaceSchemaLocation="bin/.phpunit/phpunit.xsd"
backupGlobals="false" backupGlobals="false"
colors="true" colors="true"
bootstrap="tests/bootstrap.php" bootstrap="tests/bootstrap.php"
convertDeprecationsToExceptions="false"
> >
<php> <php>
<ini name="display_errors" value="1" />
<ini name="error_reporting" value="-1" /> <ini name="error_reporting" value="-1" />
<server name="APP_ENV" value="test" force="true" /> <server name="APP_ENV" value="test" force="true" />
<server name="SHELL_VERBOSITY" value="-1" /> <server name="SHELL_VERBOSITY" value="-1" />
<server name="SYMFONY_PHPUNIT_REMOVE" value="" /> <server name="SYMFONY_PHPUNIT_REMOVE" value="" />
<server name="SYMFONY_PHPUNIT_VERSION" value="9.5" /> <server name="SYMFONY_PHPUNIT_VERSION" value="8.5" />
</php> </php>
<testsuites> <testsuites>
@ -23,11 +21,11 @@
</testsuite> </testsuite>
</testsuites> </testsuites>
<coverage processUncoveredFiles="true"> <filter>
<include> <whitelist processUncoveredFilesFromWhitelist="true">
<directory suffix=".php">src</directory> <directory suffix=".php">src</directory>
</include> </whitelist>
</coverage> </filter>
<listeners> <listeners>
<listener class="Symfony\Bridge\PhpUnit\SymfonyTestsListener" /> <listener class="Symfony\Bridge\PhpUnit\SymfonyTestsListener" />

View file

@ -18,10 +18,6 @@ DirectoryIndex index.php
</IfModule> </IfModule>
<IfModule mod_rewrite.c> <IfModule mod_rewrite.c>
# This Option needs to be enabled for RewriteRule, otherwise it will show an error like
# 'Options FollowSymLinks or SymLinksIfOwnerMatch is off which implies that RewriteRule directive is forbidden'
Options +FollowSymlinks
RewriteEngine On RewriteEngine On
# Determine the RewriteBase automatically and set it as environment variable. # Determine the RewriteBase automatically and set it as environment variable.

View file

@ -1,9 +1,22 @@
<?php <?php
use App\Kernel; use App\Kernel;
use Symfony\Component\Dotenv\Dotenv;
use Symfony\Component\ErrorHandler\Debug;
use Symfony\Component\HttpFoundation\Request;
require_once dirname(__DIR__).'/vendor/autoload_runtime.php'; require dirname(__DIR__).'/vendor/autoload.php';
return function (array $context) { (new Dotenv())->bootEnv(dirname(__DIR__).'/.env');
return new Kernel($context['APP_ENV'], (bool) $context['APP_DEBUG']);
}; if ($_SERVER['APP_DEBUG']) {
umask(0000);
Debug::enable();
}
$kernel = new Kernel($_SERVER['APP_ENV'], (bool) $_SERVER['APP_DEBUG']);
$request = Request::createFromGlobals();
$response = $kernel->handle($request);
$response->send();
$kernel->terminate($request, $response);

View file

@ -1 +0,0 @@
../../node_modules/grapesjs-component-code-editor

View file

@ -1 +0,0 @@
../../node_modules/grapesjs-parser-postcss

View file

@ -1,17 +0,0 @@
<?php
namespace App\Controller;
use App\Core\Controller\Dashboard\DashboardAdminController as Controller;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
#[Route(path: '/admin')]
class DashboardAdminController extends Controller
{
#[Route(path: '/', name: 'admin_dashboard_index')]
public function index(): Response
{
return $this->render('admin/dashboard.html.twig');
}
}

View file

@ -1,79 +0,0 @@
<?php
namespace App\Controller;
use App\Core\Controller\User\UserAdminController as BaseUserAdminController;
use App\Core\Crud\CrudConfiguration;
use App\Core\Factory\UserFactory as Factory;
use App\Core\Manager\EntityManager;
use App\Core\Security\TokenGenerator;
use App\Entity\User as Entity;
use App\Repository\UserRepositoryQuery as RepositoryQuery;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpFoundation\Session\Session;
use Symfony\Component\Routing\Annotation\Route;
class UserAdminController extends BaseUserAdminController
{
#[Route(path: '/admin/user/{page}', name: 'admin_user_index', methods: ['GET'], requirements: ['page' => '\d+'])]
public function index(RepositoryQuery $query, Request $request, Session $session, int $page = 1): Response
{
return parent::index($query, $request, $session, $page);
}
#[Route(path: '/admin/user/new', name: 'admin_user_new', methods: ['GET', 'POST'])]
public function new(Factory $factory, EntityManager $entityManager, Request $request, TokenGenerator $tokenGenerator): Response
{
return parent::new($factory, $entityManager, $request, $tokenGenerator);
}
#[Route(path: '/admin/user/show/{entity}', name: 'admin_user_show', methods: ['GET'])]
public function show(Entity $entity): Response
{
return parent::show($entity);
}
#[Route(path: '/admin/user/filter', name: 'admin_user_filter', methods: ['GET'])]
public function filter(Session $session): Response
{
return parent::filter($session);
}
#[Route(path: '/admin/user/edit/{entity}', name: 'admin_user_edit', methods: ['GET', 'POST'])]
public function edit(Entity $entity, EntityManager $entityManager, Request $request): Response
{
return parent::edit($entity, $entityManager, $request);
}
#[Route(path: '/admin/user/inline_edit/{entity}/{context}/{label}', name: 'admin_user_inline_edit', methods: ['GET', 'POST'])]
public function inlineEdit(string $context, string $label, Entity $entity, EntityManager $entityManager, Request $request): Response
{
return parent::inlineEdit($context, $label, $entity, $entityManager, $request);
}
#[Route(path: '/admin/user/delete/{entity}', name: 'admin_user_delete', methods: ['DELETE', 'POST'])]
public function delete(Entity $entity, EntityManager $entityManager, Request $request): Response
{
return parent::delete($entity, $entityManager, $request);
}
#[Route(path: '/admin/user/resetting_request/{entity}', name: 'admin_user_resetting_request', methods: ['POST'])]
public function requestResetting(Entity $entity, EventDispatcherInterface $eventDispatcher, Request $request): Response
{
return parent::requestResetting($entity, $eventDispatcher, $request);
}
protected function getConfiguration(): CrudConfiguration
{
if ($this->configuration) {
return $this->configuration;
}
return parent::getConfiguration()
->setView('form', 'admin/user_admin/_form.html.twig')
->setView('show_entity', 'admin/user_admin/_show.html.twig')
;
}
}

View file

@ -11,7 +11,9 @@ use App\Core\Form\Site\Page\TextBlockType;
use Doctrine\ORM\Mapping as ORM; use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Form\FormBuilderInterface; use Symfony\Component\Form\FormBuilderInterface;
#[ORM\Entity] /**
* @ORM\Entity
*/
class SimplePage extends Page class SimplePage extends Page
{ {
public function buildForm(FormBuilderInterface $builder, array $options) public function buildForm(FormBuilderInterface $builder, array $options)

View file

@ -9,47 +9,65 @@ use Doctrine\ORM\Mapping as ORM;
use Scheb\TwoFactorBundle\Model\Google\TwoFactorInterface; use Scheb\TwoFactorBundle\Model\Google\TwoFactorInterface;
use Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface; use Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface;
use Symfony\Component\Security\Core\User\UserInterface; use Symfony\Component\Security\Core\User\UserInterface;
use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
#[ORM\Entity(repositoryClass: UserRepository::class)] /**
#[ORM\HasLifecycleCallbacks] * @ORM\Entity(repositoryClass=UserRepository::class)
#[UniqueEntity('email')] * @ORM\HasLifecycleCallbacks()
*/
class User implements PasswordAuthenticatedUserInterface, UserInterface, TwoFactorInterface, EntityInterface class User implements PasswordAuthenticatedUserInterface, UserInterface, TwoFactorInterface, EntityInterface
{ {
use Timestampable; use Timestampable;
#[ORM\Id] /**
#[ORM\GeneratedValue] * @ORM\Id
#[ORM\Column(type: 'integer')] * @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id; private $id;
#[ORM\Column(type: 'string', length: 180, unique: true)] /**
* @ORM\Column(type="string", length=180, unique=true)
*/
private $email; private $email;
#[ORM\Column(type: 'json')] /**
* @ORM\Column(type="json")
*/
private $roles = []; private $roles = [];
/** /**
* @var string The hashed password * @var string The hashed password
* @ORM\Column(type="string")
*/ */
#[ORM\Column(type: 'string')]
private $password; private $password;
#[ORM\Column(type: 'string', length: 255, nullable: true)] /**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $displayName; private $displayName;
#[ORM\Column(type: 'string', length: 255, nullable: true)] /**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $totpSecret; private $totpSecret;
#[ORM\Column(type: 'datetime', nullable: true)] /**
* @ORM\Column(type="datetime", nullable=true)
*/
private $passwordRequestedAt; private $passwordRequestedAt;
#[ORM\Column(type: 'string', length: 255, nullable: true)] /**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private $confirmationToken; private $confirmationToken;
#[ORM\Column(type: 'boolean', options: ['default' => 0])] /**
* @ORM\Column(type="boolean", options={"default"=0})
*/
private $isAdmin; private $isAdmin;
#[ORM\Column(type: 'boolean', options: ['default' => 0])] /**
* @ORM\Column(type="boolean", options={"default"=0})
*/
private $isWriter; private $isWriter;
public function __construct() public function __construct()

View file

@ -2,17 +2,37 @@
namespace App; namespace App;
use App\Core\DependencyInjection\Compiler\BuilderBlockPass;
use Symfony\Bundle\FrameworkBundle\Kernel\MicroKernelTrait; use Symfony\Bundle\FrameworkBundle\Kernel\MicroKernelTrait;
use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
use Symfony\Component\HttpKernel\Kernel as BaseKernel; use Symfony\Component\HttpKernel\Kernel as BaseKernel;
use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\Routing\Loader\Configurator\RoutingConfigurator;
class Kernel extends BaseKernel class Kernel extends BaseKernel
{ {
use MicroKernelTrait; use MicroKernelTrait;
protected function build(ContainerBuilder $container): void protected function configureContainer(ContainerConfigurator $container): void
{ {
$container->addCompilerPass(new BuilderBlockPass()); $container->import('../config/{packages}/*.yaml');
$container->import('../config/{packages}/'.$this->environment.'/*.yaml');
if (is_file(\dirname(__DIR__).'/config/services.yaml')) {
$container->import('../config/services.yaml');
$container->import('../config/{services}_'.$this->environment.'.yaml');
} elseif (is_file($path = \dirname(__DIR__).'/config/services.php')) {
(require $path)($container->withPath($path), $this);
}
}
protected function configureRoutes(RoutingConfigurator $routes): void
{
$routes->import('../config/{routes}/'.$this->environment.'/*.yaml');
$routes->import('../config/{routes}/*.yaml');
if (is_file(\dirname(__DIR__).'/config/routes.yaml')) {
$routes->import('../config/routes.yaml');
} elseif (is_file($path = \dirname(__DIR__).'/config/routes.php')) {
(require $path)($routes->withPath($path), $this);
}
} }
} }

View file

@ -1,51 +0,0 @@
<?php
namespace App\Security\Voter;
use App\Core\Entity\EntityInterface;
use Symfony\Component\Security\Core\Authentication\Token\TokenInterface;
use Symfony\Component\Security\Core\Authorization\Voter\Voter;
use Symfony\Component\Security\Core\User\UserInterface;
class EntityVoter extends Voter
{
public const EDIT = 'edit';
public const VIEW = 'show';
public const DELETE = 'delete';
protected function supports(string $attribute, mixed $subject): bool
{
// replace with your own logic
// https://symfony.com/doc/current/security/voters.html
return in_array($attribute, [self::EDIT, self::VIEW, self::DELETE])
&& $subject instanceof EntityInterface;
}
protected function voteOnAttribute(string $attribute, mixed $subject, TokenInterface $token): bool
{
$user = $token->getUser();
if (!$user instanceof UserInterface) {
return false;
}
switch ($attribute) {
case self::EDIT:
return true;
break;
case self::VIEW:
return true;
break;
case self::DELETE:
return true;
break;
}
return false;
}
}

View file

@ -51,26 +51,27 @@
"version": "v0.5.3" "version": "v0.5.3"
}, },
"doctrine/doctrine-bundle": { "doctrine/doctrine-bundle": {
"version": "2.8", "version": "2.0",
"recipe": { "recipe": {
"repo": "github.com/symfony/recipes", "repo": "github.com/symfony/recipes",
"branch": "main", "branch": "master",
"version": "2.4", "version": "2.0",
"ref": "5b7882dd9d05ef9b7e71fceed66af1ea573a70d4" "ref": "40631978d2c4adc9b11220b13eba539b727c36a8"
}, },
"files": [ "files": [
"config/packages/doctrine.yaml", "config/packages/doctrine.yaml",
"config/packages/prod/doctrine.yaml",
"src/Entity/.gitignore", "src/Entity/.gitignore",
"src/Repository/.gitignore" "src/Repository/.gitignore"
] ]
}, },
"doctrine/doctrine-migrations-bundle": { "doctrine/doctrine-migrations-bundle": {
"version": "3.2", "version": "2.2",
"recipe": { "recipe": {
"repo": "github.com/symfony/recipes", "repo": "github.com/symfony/recipes",
"branch": "main", "branch": "master",
"version": "3.1", "version": "2.2",
"ref": "1d01ec03c6ecbd67c3375c5478c9a423ae5d6a33" "ref": "baaa439e3e3179e69e3da84b671f0a3e4a2f56ad"
}, },
"files": [ "files": [
"config/packages/doctrine_migrations.yaml", "config/packages/doctrine_migrations.yaml",
@ -147,12 +148,12 @@
"version": "4.0.0" "version": "4.0.0"
}, },
"liip/imagine-bundle": { "liip/imagine-bundle": {
"version": "2.10", "version": "1.8",
"recipe": { "recipe": {
"repo": "github.com/symfony/recipes-contrib", "repo": "github.com/symfony/recipes-contrib",
"branch": "main", "branch": "master",
"version": "1.8", "version": "1.8",
"ref": "d1227d002b70d1a1f941d91845fcd7ac7fbfc929" "ref": "5a5bdc2d0e2533ed6935d5ae562f2b318a8fc1ee"
}, },
"files": [ "files": [
"config/packages/liip_imagine.yaml", "config/packages/liip_imagine.yaml",
@ -192,20 +193,6 @@
"phpdocumentor/type-resolver": { "phpdocumentor/type-resolver": {
"version": "1.4.0" "version": "1.4.0"
}, },
"phpunit/phpunit": {
"version": "9.5",
"recipe": {
"repo": "github.com/symfony/recipes",
"branch": "main",
"version": "9.3",
"ref": "a6249a6c4392e9169b87abf93225f7f9f59025e6"
},
"files": [
".env.test",
"phpunit.xml.dist",
"tests/bootstrap.php"
]
},
"psr/cache": { "psr/cache": {
"version": "1.0.1" "version": "1.0.1"
}, },
@ -228,12 +215,12 @@
"version": "4.1.1" "version": "4.1.1"
}, },
"scheb/2fa-bundle": { "scheb/2fa-bundle": {
"version": "5.13", "version": "5.0",
"recipe": { "recipe": {
"repo": "github.com/symfony/recipes", "repo": "github.com/symfony/recipes-contrib",
"branch": "main", "branch": "master",
"version": "5.0", "version": "5.0",
"ref": "0a83961ef50ff91812b229a6f0caf28431d94aec" "ref": "95d9da4bffdc29417c209141cae8292e40d6af19"
}, },
"files": [ "files": [
"config/packages/scheb_2fa.yaml", "config/packages/scheb_2fa.yaml",
@ -277,12 +264,12 @@
"version": "v10.0.1" "version": "v10.0.1"
}, },
"stof/doctrine-extensions-bundle": { "stof/doctrine-extensions-bundle": {
"version": "1.7", "version": "1.2",
"recipe": { "recipe": {
"repo": "github.com/symfony/recipes-contrib", "repo": "github.com/symfony/recipes-contrib",
"branch": "main", "branch": "master",
"version": "1.2", "version": "1.2",
"ref": "e805aba9eff5372e2d149a9ff56566769e22819d" "ref": "6c1ceb662f8997085f739cd089bfbef67f245983"
}, },
"files": [ "files": [
"config/packages/stof_doctrine_extensions.yaml" "config/packages/stof_doctrine_extensions.yaml"
@ -292,9 +279,9 @@
"version": "1.0", "version": "1.0",
"recipe": { "recipe": {
"repo": "github.com/symfony/recipes-contrib", "repo": "github.com/symfony/recipes-contrib",
"branch": "main", "branch": "master",
"version": "1.0", "version": "1.0",
"ref": "efb318193e48384eb5c5aadff15396ed698f8ffc" "ref": "71599f5b0fdeeeec0fb90e9b17c85e6f5e1350c1"
}, },
"files": [ "files": [
"public/.htaccess" "public/.htaccess"
@ -316,12 +303,12 @@
"version": "v5.2.4" "version": "v5.2.4"
}, },
"symfony/console": { "symfony/console": {
"version": "5.4", "version": "5.1",
"recipe": { "recipe": {
"repo": "github.com/symfony/recipes", "repo": "github.com/symfony/recipes",
"branch": "main", "branch": "master",
"version": "5.3", "version": "5.1",
"ref": "da0c8be8157600ad34f10ff0c9cc91232522e047" "ref": "c6d02bdfba9da13c22157520e32a602dbee8a75c"
}, },
"files": [ "files": [
"bin/console" "bin/console"
@ -331,15 +318,15 @@
"version": "v5.2.4" "version": "v5.2.4"
}, },
"symfony/debug-bundle": { "symfony/debug-bundle": {
"version": "5.4", "version": "4.1",
"recipe": { "recipe": {
"repo": "github.com/symfony/recipes", "repo": "github.com/symfony/recipes",
"branch": "main", "branch": "master",
"version": "5.3", "version": "4.1",
"ref": "5aa8aa48234c8eb6dbdd7b3cd5d791485d2cec4b" "ref": "f8863cbad2f2e58c4b65fa1eac892ab189971bea"
}, },
"files": [ "files": [
"config/packages/debug.yaml" "config/packages/dev/debug.yaml"
] ]
}, },
"symfony/dependency-injection": { "symfony/dependency-injection": {
@ -376,12 +363,12 @@
"version": "v5.2.4" "version": "v5.2.4"
}, },
"symfony/flex": { "symfony/flex": {
"version": "2.2", "version": "1.0",
"recipe": { "recipe": {
"repo": "github.com/symfony/recipes", "repo": "github.com/symfony/recipes",
"branch": "main", "branch": "master",
"version": "1.0", "version": "1.0",
"ref": "146251ae39e06a95be0fe3d13c807bcf3938b172" "ref": "c0eeb50665f0f77226616b6038a9b06c03752d8e"
}, },
"files": [ "files": [
".env" ".env"
@ -391,18 +378,19 @@
"version": "v5.2.5" "version": "v5.2.5"
}, },
"symfony/framework-bundle": { "symfony/framework-bundle": {
"version": "5.4", "version": "5.2",
"recipe": { "recipe": {
"repo": "github.com/symfony/recipes", "repo": "github.com/symfony/recipes",
"branch": "main", "branch": "master",
"version": "5.4", "version": "5.2",
"ref": "3cd216a4d007b78d8554d44a5b1c0a446dab24fb" "ref": "6ec87563dcc85cd0c48856dcfbfc29610506d250"
}, },
"files": [ "files": [
"config/packages/cache.yaml", "config/packages/cache.yaml",
"config/packages/framework.yaml", "config/packages/framework.yaml",
"config/packages/test/framework.yaml",
"config/preload.php", "config/preload.php",
"config/routes/framework.yaml", "config/routes/dev/framework.yaml",
"config/services.yaml", "config/services.yaml",
"public/index.php", "public/index.php",
"src/Controller/.gitignore", "src/Controller/.gitignore",
@ -425,12 +413,12 @@
"version": "v5.2.4" "version": "v5.2.4"
}, },
"symfony/mailer": { "symfony/mailer": {
"version": "5.4", "version": "4.3",
"recipe": { "recipe": {
"repo": "github.com/symfony/recipes", "repo": "github.com/symfony/recipes",
"branch": "main", "branch": "master",
"version": "4.3", "version": "4.3",
"ref": "2bf89438209656b85b9a49238c4467bff1b1f939" "ref": "15658c2a0176cda2e7dba66276a2030b52bd81b2"
}, },
"files": [ "files": [
"config/packages/mailer.yaml" "config/packages/mailer.yaml"
@ -452,15 +440,18 @@
"version": "v5.2.5" "version": "v5.2.5"
}, },
"symfony/monolog-bundle": { "symfony/monolog-bundle": {
"version": "3.8", "version": "3.3",
"recipe": { "recipe": {
"repo": "github.com/symfony/recipes", "repo": "github.com/symfony/recipes",
"branch": "main", "branch": "master",
"version": "3.7", "version": "3.3",
"ref": "213676c4ec929f046dfde5ea8e97625b81bc0578" "ref": "d7249f7d560f6736115eee1851d02a65826f0a56"
}, },
"files": [ "files": [
"config/packages/monolog.yaml" "config/packages/dev/monolog.yaml",
"config/packages/prod/deprecations.yaml",
"config/packages/prod/monolog.yaml",
"config/packages/test/monolog.yaml"
] ]
}, },
"symfony/notifier": { "symfony/notifier": {
@ -482,12 +473,12 @@
"version": "v6.0.2" "version": "v6.0.2"
}, },
"symfony/phpunit-bridge": { "symfony/phpunit-bridge": {
"version": "6.2", "version": "5.1",
"recipe": { "recipe": {
"repo": "github.com/symfony/recipes", "repo": "github.com/symfony/recipes",
"branch": "main", "branch": "master",
"version": "5.3", "version": "5.1",
"ref": "819d3d2ffa4590eba0b8f4f3e5e89415ee4e45c3" "ref": "bf16921ef8309a81d9f046e9b6369c46bcbd031f"
}, },
"files": [ "files": [
".env.test", ".env.test",
@ -533,25 +524,26 @@
"version": "v5.2.4" "version": "v5.2.4"
}, },
"symfony/routing": { "symfony/routing": {
"version": "5.4", "version": "5.1",
"recipe": { "recipe": {
"repo": "github.com/symfony/recipes", "repo": "github.com/symfony/recipes",
"branch": "main", "branch": "master",
"version": "5.3", "version": "5.1",
"ref": "85de1d8ae45b284c3c84b668171d2615049e698f" "ref": "b4f3e7c95e38b606eef467e8a42a8408fc460c43"
}, },
"files": [ "files": [
"config/packages/prod/routing.yaml",
"config/packages/routing.yaml", "config/packages/routing.yaml",
"config/routes.yaml" "config/routes.yaml"
] ]
}, },
"symfony/security-bundle": { "symfony/security-bundle": {
"version": "5.4", "version": "5.1",
"recipe": { "recipe": {
"repo": "github.com/symfony/recipes", "repo": "github.com/symfony/recipes",
"branch": "main", "branch": "master",
"version": "5.3", "version": "5.1",
"ref": "98f1f2b0d635908c2b40f3675da2d23b1a069d30" "ref": "0a4bae19389d3b9cba1ca0102e3b2bccea724603"
}, },
"files": [ "files": [
"config/packages/security.yaml" "config/packages/security.yaml"
@ -582,12 +574,12 @@
"version": "v5.2.4" "version": "v5.2.4"
}, },
"symfony/translation": { "symfony/translation": {
"version": "5.4", "version": "3.3",
"recipe": { "recipe": {
"repo": "github.com/symfony/recipes", "repo": "github.com/symfony/recipes",
"branch": "main", "branch": "master",
"version": "5.3", "version": "3.3",
"ref": "da64f5a2b6d96f5dc24914517c0350a5f91dee43" "ref": "2ad9d2545bce8ca1a863e50e92141f0b9d87ffcd"
}, },
"files": [ "files": [
"config/packages/translation.yaml", "config/packages/translation.yaml",
@ -601,27 +593,29 @@
"version": "v5.2.5" "version": "v5.2.5"
}, },
"symfony/twig-bundle": { "symfony/twig-bundle": {
"version": "5.4", "version": "5.0",
"recipe": { "recipe": {
"repo": "github.com/symfony/recipes", "repo": "github.com/symfony/recipes",
"branch": "main", "branch": "master",
"version": "5.4", "version": "5.0",
"ref": "bb2178c57eee79e6be0b297aa96fc0c0def81387" "ref": "fab9149bbaa4d5eca054ed93f9e1b66cc500895d"
}, },
"files": [ "files": [
"config/packages/test/twig.yaml",
"config/packages/twig.yaml", "config/packages/twig.yaml",
"templates/base.html.twig" "templates/base.html.twig"
] ]
}, },
"symfony/validator": { "symfony/validator": {
"version": "5.4", "version": "4.3",
"recipe": { "recipe": {
"repo": "github.com/symfony/recipes", "repo": "github.com/symfony/recipes",
"branch": "main", "branch": "master",
"version": "5.3", "version": "4.3",
"ref": "c32cfd98f714894c4f128bb99aa2530c1227603c" "ref": "d902da3e4952f18d3bf05aab29512eb61cabd869"
}, },
"files": [ "files": [
"config/packages/test/validator.yaml",
"config/packages/validator.yaml" "config/packages/validator.yaml"
] ]
}, },
@ -635,25 +629,26 @@
"version": "v5.2.5" "version": "v5.2.5"
}, },
"symfony/web-profiler-bundle": { "symfony/web-profiler-bundle": {
"version": "5.4", "version": "3.3",
"recipe": { "recipe": {
"repo": "github.com/symfony/recipes", "repo": "github.com/symfony/recipes",
"branch": "main", "branch": "master",
"version": "5.3", "version": "3.3",
"ref": "24bbc3d84ef2f427f82104f766014e799eefcc3e" "ref": "6bdfa1a95f6b2e677ab985cd1af2eae35d62e0f6"
}, },
"files": [ "files": [
"config/packages/web_profiler.yaml", "config/packages/dev/web_profiler.yaml",
"config/routes/web_profiler.yaml" "config/packages/test/web_profiler.yaml",
"config/routes/dev/web_profiler.yaml"
] ]
}, },
"symfony/webpack-encore-bundle": { "symfony/webpack-encore-bundle": {
"version": "1.16", "version": "1.9",
"recipe": { "recipe": {
"repo": "github.com/symfony/recipes", "repo": "github.com/symfony/recipes",
"branch": "main", "branch": "master",
"version": "1.10", "version": "1.9",
"ref": "f8fc53f1942f76679e9ee3c25fd44865355707b5" "ref": "9399a0bfc6ee7a0c019f952bca46d6a6045dd451"
}, },
"files": [ "files": [
"assets/app.js", "assets/app.js",
@ -661,6 +656,9 @@
"assets/controllers.json", "assets/controllers.json",
"assets/controllers/hello_controller.js", "assets/controllers/hello_controller.js",
"assets/styles/app.css", "assets/styles/app.css",
"config/packages/assets.yaml",
"config/packages/prod/webpack_encore.yaml",
"config/packages/test/webpack_encore.yaml",
"config/packages/webpack_encore.yaml", "config/packages/webpack_encore.yaml",
"package.json", "package.json",
"webpack.config.js" "webpack.config.js"

View file

@ -1,5 +0,0 @@
{% extends '@Core/admin/layout.html.twig' %}
{% block body %}
<iframe src="https://doc.murph-project.org" frameborder="0" marginheight="0" marginwidth="0" width="100%" style="height: calc(100vh - 65px)"></iframe>
{% endblock %}

View file

@ -1 +0,0 @@
{{ include('@Core/user/user_admin/_form.html.twig') }}

View file

@ -1 +0,0 @@
{{ include('@Core/user/user_admin/_show.html.twig') }}

View file

@ -8,23 +8,21 @@
<link rel="icon" type="image/x-icon" href="{{ asset('build/images/core/logo.svg') }}" /> <link rel="icon" type="image/x-icon" href="{{ asset('build/images/core/logo.svg') }}" />
{%- block opengraph -%} {%- block opengraph -%}
<meta property="og:title" content="{%- block ogTitle -%}{{ _page.ogTitle }}{%- endblock -%}" /> <meta property="og:title" content="{{ _page.ogTitle }}" />
<meta property="og:description" content="{%- block ogDescription -%}{{ _page.ogDescription }}{%- endblock -%}" /> <meta property="og:description" content="{{ _page.ogDescription }}" />
<meta property="og:type" content="{%- block ogType -%}website{%- endblock -%}" /> <meta property="og:type" content="website" />
<meta property="og:url" content="{%- block opengraphUri -%}{{ app.request.uri }}{%- endblock -%}" /> <meta property="og:url" content="{{ app.request.uri }}" />
{%- if _page.ogImage -%} {%- if _page.ogImage -%}
<meta property="og:image" content="{%- block ogImage -%}{{ absolute_url(asset(_page.ogImage)) }}{%- endblock -%}" /> <meta property="og:image" content="{{ absolute_url(asset(_page.ogImage)) }}" />
{%- endif -%} {%- endif -%}
{%- endblock -%} {%- endblock -%}
<meta name="description" content="{%- block pageDescription -%}{{- _page.metaDescription -}}{%- endblock -%}"/>
{%- block stylesheets -%} {%- block stylesheets -%}
{{ encore_entry_link_tags('app') }} {{ encore_entry_link_tags('app') }}
{%- endblock -%} {%- endblock -%}
<title>{%- block pageTitle -%}{{ _page.metaTitle }}{%- endblock -%}</title> <title>{{ _page.metaTitle }}</title>
</head> </head>
<body> <body>

View file

@ -0,0 +1,13 @@
{% extends '@Core/admin/layout.html.twig' %}
{% block body %}
<div class="bg-light pl-5 pr-4 pt-5 pb-5">
<div class="d-flex">
<div class="mr-auto w-50">
<h1 class="display-5">
{{ 'Dashboard'|trans }}
</h1>
</div>
</div>
</div>
{% endblock %}

View file

@ -9,7 +9,3 @@ if (file_exists(dirname(__DIR__).'/config/bootstrap.php')) {
} elseif (method_exists(Dotenv::class, 'bootEnv')) { } elseif (method_exists(Dotenv::class, 'bootEnv')) {
(new Dotenv())->bootEnv(dirname(__DIR__).'/.env'); (new Dotenv())->bootEnv(dirname(__DIR__).'/.env');
} }
if ($_SERVER['APP_DEBUG']) {
umask(0000);
}

View file

@ -11,7 +11,7 @@ Encore
.setOutputPath('public/build/') .setOutputPath('public/build/')
// public path used by the web server to access the output path // public path used by the web server to access the output path
.setPublicPath('/build') .setPublicPath('/build')
// only needed for CDN's or subdirectory deploy // only needed for CDN's or sub-directory deploy
//.setManifestKeyPrefix('build/') //.setManifestKeyPrefix('build/')
/* /*
@ -44,15 +44,14 @@ Encore
// enables hashed filenames (e.g. app.abc123.css) // enables hashed filenames (e.g. app.abc123.css)
.enableVersioning(Encore.isProduction()) .enableVersioning(Encore.isProduction())
// configure Babel .configureBabel((config) => {
// .configureBabel((config) => { config.plugins.push('@babel/plugin-proposal-class-properties');
// config.plugins.push('@babel/a-babel-plugin'); })
// })
// enables and configure @babel/preset-env polyfills // enables @babel/preset-env polyfills
.configureBabelPresetEnv((config) => { .configureBabelPresetEnv((config) => {
config.useBuiltIns = 'usage'; config.useBuiltIns = 'usage';
config.corejs = '3.23'; config.corejs = 3;
}) })
.copyFiles({ .copyFiles({

7681
yarn.lock

File diff suppressed because it is too large Load diff