forked from api-platform/core
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
40 changed files
with
1,280 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# 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=ab0da85135bd245202dd6c8de5b90aa9 | ||
###< symfony/framework-bundle ### | ||
|
||
###> nelmio/cors-bundle ### | ||
CORS_ALLOW_ORIGIN='^https?://(localhost|127\.0\.0\.1)(:[0-9]+)?$' | ||
###< nelmio/cors-bundle ### |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# define your env variables for the test env here | ||
KERNEL_CLASS='App\Kernel' | ||
APP_SECRET='$ecretf0rt3st' | ||
SYMFONY_DEPRECATIONS_HELPER=999999 | ||
PANTHER_APP_ENV=panther | ||
PANTHER_ERROR_SCREENSHOT_DIR=./var/error-screenshots |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?php | ||
|
||
return [ | ||
Symfony\Bundle\FrameworkBundle\FrameworkBundle::class => ['all' => true], | ||
ApiPlatform\Symfony\Bundle\ApiPlatformBundle::class => ['all' => true], | ||
Nelmio\CorsBundle\NelmioCorsBundle::class => ['all' => true], | ||
Symfony\Bundle\SecurityBundle\SecurityBundle::class => ['all' => true], | ||
Symfony\Bundle\TwigBundle\TwigBundle::class => ['all' => true], | ||
Doctrine\Bundle\DoctrineBundle\DoctrineBundle::class => ['all' => true], | ||
Doctrine\Bundle\MigrationsBundle\DoctrineMigrationsBundle::class => ['all' => true], | ||
Doctrine\Bundle\FixturesBundle\DoctrineFixturesBundle::class => ['dev' => true, 'test' => true], | ||
DAMA\DoctrineTestBundle\DAMADoctrineTestBundle::class => ['test' => true], | ||
]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
api_platform: | ||
formats: | ||
json: [ 'application/json' ] | ||
jsonld: [ 'application/ld+json' ] | ||
|
||
# mapping: | ||
# paths: | ||
# - '%kernel.project_dir%/src' | ||
# doctrine: | ||
# enabled: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
framework: | ||
cache: | ||
# Unique name of your app: used to compute stable namespaces for cache keys. | ||
#prefix_seed: your_vendor_name/app_name | ||
|
||
# The "app" cache stores to the filesystem by default. | ||
# The data in this cache should persist between deploys. | ||
# Other options include: | ||
|
||
# Redis | ||
#app: cache.adapter.redis | ||
#default_redis_provider: redis://localhost | ||
|
||
# APCu (not recommended with heavy random-write workloads as memory fragmentation can cause perf issues) | ||
#app: cache.adapter.apcu | ||
|
||
# Namespaced pools use the above "app" backend by default | ||
#pools: | ||
#my.dedicated.cache: null |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
doctrine: | ||
dbal: | ||
url: '%database_url%' | ||
|
||
# IMPORTANT: You MUST configure your server version, | ||
# either here or in the DATABASE_URL env var (see .env file) | ||
#server_version: '14' | ||
orm: | ||
auto_generate_proxy_classes: true | ||
naming_strategy: doctrine.orm.naming_strategy.underscore_number_aware | ||
auto_mapping: true | ||
mappings: | ||
App: | ||
is_bundle: false | ||
dir: '%kernel.project_dir%/src' | ||
prefix: 'App\Entity' | ||
alias: App | ||
|
||
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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' | ||
enable_profiler: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
nelmio_cors: | ||
defaults: | ||
origin_regex: true | ||
allow_origin: ['^https?://(localhost|127\.0\.0\.1)(:[0-9]+)?$'] | ||
allow_methods: ['GET', 'OPTIONS', 'POST', 'PUT', 'PATCH', 'DELETE'] | ||
allow_headers: ['Content-Type', 'Authorization'] | ||
expose_headers: ['Link'] | ||
max_age: 3600 | ||
paths: | ||
'^/': null |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
framework: | ||
router: | ||
utf8: true | ||
|
||
# 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 | ||
#default_uri: http://localhost | ||
|
||
when@prod: | ||
framework: | ||
router: | ||
strict_requirements: null |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
security: | ||
# 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: | ||
users_in_memory: { memory: null } | ||
firewalls: | ||
dev: | ||
pattern: ^/(_(profiler|wdt)|css|images|js)/ | ||
security: false | ||
main: | ||
lazy: true | ||
provider: users_in_memory | ||
|
||
# activate different ways to authenticate | ||
# https://symfony.com/doc/current/security.html#the-firewall | ||
|
||
# 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 } | ||
|
||
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
twig: | ||
default_path: '%kernel.project_dir%/templates' | ||
|
||
when@test: | ||
twig: | ||
strict_variables: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
Oops, something went wrong.