Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • Comptoir/comptoir-du-libre
  • fgangler/comptoir
2 results
Show changes
Showing
with 394 additions and 0 deletions
framework:
router:
strict_requirements: null
framework:
router:
utf8: true
security:
# https://symfony.com/doc/current/security.html#where-do-users-come-from-user-providers
providers:
users_in_memory: { memory: null }
firewalls:
dev:
pattern: ^/(_(profiler|wdt)|css|images|js)/
security: false
main:
anonymous: lazy
provider: users_in_memory
# activate different ways to authenticate
# https://symfony.com/doc/current/security.html#firewalls-authentication
# https://symfony.com/doc/current/security/impersonating_user.html
# switch_user: true
# Easy way to control access for large sections of your site
# Note: Only the *first* access control that matches will be used
access_control:
# - { path: ^/admin, roles: ROLE_ADMIN }
# - { path: ^/profile, roles: ROLE_USER }
sensio_framework_extra:
router:
annotations: false
framework:
test: true
session:
storage_id: session.storage.mock_file
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
twig:
strict_variables: true
framework:
validation:
not_compromised_password: false
web_profiler:
toolbar: false
intercept_redirects: false
framework:
profiler: { collect: false }
framework:
default_locale: en
translator:
default_path: '%kernel.project_dir%/translations'
fallbacks:
- en
twig:
default_path: '%kernel.project_dir%/templates'
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\: []
#index:
# path: /
# controller: App\Controller\DefaultController::index
controllers:
resource: ../../src/Controller/
type: annotation
kernel:
resource: ../../src/Kernel.php
type: annotation
_errors:
resource: '@FrameworkBundle/Resources/config/routing/errors.xml'
prefix: /_error
web_profiler_wdt:
resource: '@WebProfilerBundle/Resources/config/routing/wdt.xml'
prefix: /_wdt
web_profiler_profiler:
resource: '@WebProfilerBundle/Resources/config/routing/profiler.xml'
prefix: /_profiler
# 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/configuration.html#application-related-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,Entity,Migrations,Tests,Kernel.php}'
# controllers are imported separately to make sure services can be injected
# as action arguments even if you don't extend any base controller class
App\Controller\:
resource: '../src/Controller'
tags: ['controller.service_arguments']
# add more service definitions when explicit configuration is needed
# please note that last definitions always *replace* previous ones
services:
_defaults:
public: true
# If you need to access services in a test, create an alias
# and then fetch that alias from the container. As a convention,
# aliases are prefixed with test. For example:
#
# test.App\Service\MyService: '@App\Service\MyService'
parameters:
git_dir: ..
bin_dir: vendor/bin
ascii:
failed: ~
succeeded: ~
testsuites:
##
## test-suite for the "vendor/bin/grumphp git:commit-msg" command:
git_commit_msg:
tasks:
- git_commit_message
##
## test-suite for the "vendor/bin/grumphp git:pre-commit" command:
## ---> run following tasks only on files in the git "stage" (index) : added by "git add <file>"
git_pre_commit:
tasks:
- composer
- securitychecker
- phpcs
- phpmd
- phplint
- jsonlint
- xmllint
- yamllint
- file_size
# - git_blacklist
##
## test-suite for the "vendor/bin/grumphp run --testsuite linter_testSuite" command:
## ---> run following tasks on the full codebase
linter_testSuite:
tasks:
- phplint
- jsonlint
- xmllint
- yamllint
##
## test-suite for the "vendor/bin/grumphp run --testsuite php_testSuite" command:
## ---> run following tasks on the full codebase
php_testSuite:
tasks:
- phplint
- phpcs
- phpmd
# - phpcpd
tasks:
##
######## git_commit_msg
##################################################################################################
##
## Blacklisted keywords: https://github.com/phpro/grumphp/blob/master/doc/tasks/git_blacklist.md
git_blacklist:
keywords:
- "die("
- "var_dump("
- "exit;"
- "exit();"
- "print_r("
- "dump(" # Symfony function
whitelist_patterns: []
triggered_by: ['php']
regexp_type: G
##
## Git commit message: https://github.com/phpro/grumphp/blob/master/doc/tasks/git_commit_message.md
git_commit_message:
allow_empty_message: false
enforce_capitalized_subject: true
enforce_no_subject_punctuations: false
enforce_no_subject_trailing_period: true
enforce_single_lined_subject: true
type_scope_conventions:
- types:
- build
- ci
- chore
- docs
- feat
- fix
- perf
- refactor
- revert
- style
- test
- scopes: []
max_body_width: 72
max_subject_width: 60
matchers: []
case_insensitive: true
multiline: true
additional_modifiers: ''
##
######## git_pre_commit
##################################################################################################
##
## Composer: https://github.com/phpro/grumphp/blob/master/doc/tasks/composer.md
composer:
file: ./composer.json
no_check_all: false
no_check_lock: false
no_check_publish: false
no_local_repository: false
with_dependencies: false
strict: false
##
## File size: https://github.com/phpro/grumphp/blob/master/doc/tasks/file_size.md
file_size:
max_size: 2M
ignore_patterns: []
##
## Composer Require Checker: https://github.com/phpro/grumphp/blob/master/doc/tasks/composer_require_checker.md
## -----> impossible to install at the moment because conflict between dependencies
# composer_require_checker:
# composer_file: 'composer.json'
# config_file: ~
# ignore_parse_errors: false
# triggered_by: ['composer.json', 'composer.lock', '*.php']
##
## PHP CodeSniffer: https://github.com/phpro/grumphp/blob/master/doc/tasks/phpcs.md
phpcs:
standard: []
severity: ~
error_severity: ~
warning_severity: ~
tab_width: ~
report: full
report_width: ~
whitelist_patterns: []
encoding: ~
ignore_patterns: []
sniffs: []
triggered_by: [php]
exclude: []
##
## PHP Copy/Paste Detector: https://github.com/phpro/grumphp/blob/master/doc/tasks/phpcpd.md
## -----> scan every file, everytime!
## -----> not work with PHP 7.2 and symfony/console 5.0 (need PHP 7.3)
# phpcpd:
# metadata:
# blocking: false
# priority: 0
# directory: ['.']
# exclude: ['vendor', 'tests/Fixture', 'tests/TestCase']
# names_exclude: []
# regexps_exclude: []
# fuzzy: false
# min_lines: 5
# min_tokens: 70
# triggered_by: ['php']
##
## PHP-CS-Fixer 2: https://github.com/phpro/grumphp/blob/master/doc/tasks/phpcsfixer2.md
## -----> not work at the moment with the code source
# phpcsfixer2:
# allow_risky: ~
# cache_file: ~
# config: ~
# rules: []
# using_cache: ~
# config_contains_finder: true
# verbose: true
# diff: false
# triggered_by: ['php']
##
## PHP Mess Detector: https://github.com/phpro/grumphp/blob/master/doc/tasks/phpmd.md
phpmd:
whitelist_patterns: []
exclude: []
ruleset:
- 'cleancode'
- 'codesize'
- 'controversial'
- 'design'
- 'naming'
- 'unusedcode'
triggered_by: ['php']
##
## PhpMnd (detect magic numbers): https://github.com/phpro/grumphp/blob/master/doc/tasks/phpmnd.md
## -----> impossible to install at the moment because conflict between dependencies
# phpmnd:
# directory: .
# whitelist_patterns: []
# exclude: []
# exclude_name: []
# exclude_path: []
# extensions: []
# hint: false
# ignore_funcs: []
# ignore_numbers: []
# ignore_strings: []
# strings: false
# triggered_by: ['php']
##
## Security Checker: https://github.com/phpro/grumphp/blob/master/doc/tasks/securitychecker.md
securitychecker:
lockfile: ./composer.lock
format: ~
end_point: ~
timeout: ~
run_always: false # only run when the composer.lock file has changed
##
## JsonLint: https://github.com/phpro/grumphp/blob/master/doc/tasks/jsonlint.md
jsonlint:
ignore_patterns: []
detect_key_conflicts: false
##
## PHPLint: https://github.com/phpro/grumphp/blob/master/doc/tasks/phplint.md
phplint:
exclude: []
jobs: ~
short_open_tag: false
ignore_patterns: []
triggered_by: ['php']
##
## XmlLint: https://github.com/phpro/grumphp/blob/master/doc/tasks/xmllint.md
xmllint:
ignore_patterns: []
load_from_net: false
x_include: false
dtd_validation: false
scheme_validation: false
triggered_by: ['xml']
##
## YamlLint: https://github.com/phpro/grumphp/blob/master/doc/tasks/yamllint.md
yamllint:
whitelist_patterns: []
ignore_patterns: []
object_support: false
exception_on_invalid_type: false
parse_constant: false
parse_custom_tags: false
<?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="bin/.phpunit/phpunit.xsd"
backupGlobals="false"
colors="true"
bootstrap="tests/bootstrap.php"
>
<php>
<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="7.5" />
<env name="BOOTSTRAP_CLEAR_CACHE_ENV" value="test"/>
</php>
<testsuites>
<testsuite name="Project Test Suite">
<directory>tests</directory>
</testsuite>
</testsuites>
<filter>
<whitelist processUncoveredFilesFromWhitelist="true">
<directory suffix=".php">src</directory>
</whitelist>
</filter>
<listeners>
<listener class="Symfony\Bridge\PhpUnit\SymfonyTestsListener" />
</listeners>
</phpunit>