Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CLEANUP] Follow the Symfony configuration conventions more closely #149

Merged
merged 1 commit into from
Jul 31, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions Configuration/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
imports:
- { resource: parameters.yml }
- { resource: services.yml }

# 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:
locale: en

framework:
#esi: ~
#translator: { fallbacks: ['%locale%'] }
secret: '%secret%'
router:
resource: '%kernel.project_dir%/Configuration/routing.yml'
strict_requirements: ~
form: ~
csrf_protection: ~
validation: { enable_annotations: true }
#serializer: { enable_annotations: true }
#templating:
#engines: ['twig']
default_locale: '%locale%'
trusted_hosts: ~
session:
# https://symfony.com/doc/current/reference/configuration/framework.html#handler-id
handler_id: session.handler.native_file
save_path: '%kernel.project_dir%/var/sessions/%kernel.environment%'
fragments: ~
http_method_override: true
assets: ~
php_errors:
log: true
11 changes: 5 additions & 6 deletions Configuration/config_dev.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
imports:
- { resource: "services.yml" }
- { resource: config.yml }

framework:
profiler: { only_exceptions: false }
secret: d9c7e737bdb920e1d10df3588a3941782b905361
router:
resource: '%kernel.project_dir%/Configuration/routing_dev.yml'
strict_requirements: true
router:
resource: '%kernel.project_dir%/Configuration/routing_dev.yml'
strict_requirements: true
profiler: { only_exceptions: false }
8 changes: 1 addition & 7 deletions Configuration/config_prod.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,2 @@
imports:
- { resource: "services.yml" }

framework:
secret: d9c7e737bdb920e1d10df3588a3941782b905361
router:
resource: '%kernel.project_dir%/Configuration/routing_prod.yml'
strict_requirements: true
- { resource: config.yml }
16 changes: 6 additions & 10 deletions Configuration/config_test.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
imports:
- { resource: "services.yml" }
- { resource: config_dev.yml }

framework:
test: ~
session:
storage_id: session.storage.mock_file
profiler:
collect: false
secret: a95c530a7af5f492a74499e70578d150d9c7e737
router:
resource: '%kernel.project_dir%/Configuration/routing_test.yml'
strict_requirements: true
test: ~
session:
storage_id: session.storage.mock_file
profiler:
collect: false
3 changes: 3 additions & 0 deletions Configuration/parameters.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# This file will later be moved out of the vendor package into the application folder.
parameters:
secret: d9c7e737bdb920e1d10df3588a3941782b905361
2 changes: 1 addition & 1 deletion Configuration/routing_dev.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
_main:
resource: "routing.yml"
resource: routing.yml
2 changes: 0 additions & 2 deletions Configuration/routing_prod.yml

This file was deleted.

2 changes: 0 additions & 2 deletions Configuration/routing_test.yml

This file was deleted.

32 changes: 21 additions & 11 deletions Configuration/services.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,23 @@
# Learn more about services, parameters and containers at
# https://symfony.com/doc/current/service_container.html
parameters:
#parameter_name: value

services:
# default configuration for services in *this* file
_defaults:
# automatically injects dependencies in your services
autowire: true
# automatically registers your services as commands, event subscribers, etc.
autoconfigure: true
# this means you cannot fetch services directly from the container via $container->get()
# if you need to do this, you can override this setting on individual services
public: false
# default configuration for services in *this* file
_defaults:
# automatically injects dependencies in your services
autowire: true
# automatically registers your services as commands, event subscribers, etc.
autoconfigure: true
# this means you cannot fetch services directly from the container via $container->get()
# if you need to do this, you can override this setting on individual services
public: false

# add more services, or override services that need manual wiring
# AppBundle\Service\ExampleService:
# arguments:
# $someArgument: 'some_value'

PhpList\PhpList4\Routing\ExtraLoader:
tags: [routing.loader]
PhpList\PhpList4\Routing\ExtraLoader:
tags: [routing.loader]