From 5c895a7fd15822856fb407910264c5d95e1e223c Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Tue, 22 Dec 2015 13:00:37 +0100 Subject: Update bundle & stock file - update stock file (AppKernel, app.php, etc ..) from SymfonyStandard edition) - update bundle to latest release - remove security on profiler --- app/AppCache.php | 2 -- app/AppKernel.php | 4 ++-- app/check.php | 6 +++--- app/config/config.yml | 5 ++--- app/config/routing.yml | 2 +- app/config/routing_dev.yml | 6 +----- app/config/security.yml | 9 +++++++-- app/console | 14 ++++++++------ 8 files changed, 24 insertions(+), 24 deletions(-) (limited to 'app') diff --git a/app/AppCache.php b/app/AppCache.php index ddb51db0..639ec2cd 100644 --- a/app/AppCache.php +++ b/app/AppCache.php @@ -1,7 +1,5 @@ getEnvironment(), array('dev', 'test'))) { + if (in_array($this->getEnvironment(), array('dev', 'test'), true)) { $bundles[] = new Symfony\Bundle\DebugBundle\DebugBundle(); $bundles[] = new Symfony\Bundle\WebProfilerBundle\WebProfilerBundle(); $bundles[] = new Sensio\Bundle\DistributionBundle\SensioDistributionBundle(); @@ -48,6 +48,6 @@ class AppKernel extends Kernel public function registerContainerConfiguration(LoaderInterface $loader) { - $loader->load(__DIR__.'/config/config_'.$this->getEnvironment().'.yml'); + $loader->load($this->getRootDir().'/config/config_'.$this->getEnvironment().'.yml'); } } diff --git a/app/check.php b/app/check.php index 60ae0a8b..282507f7 100644 --- a/app/check.php +++ b/app/check.php @@ -80,7 +80,7 @@ function get_error_message(Requirement $requirement, $lineSize) return; } - $errorMessage = wordwrap($requirement->getTestMessage(), $lineSize - 3, PHP_EOL.' ').PHP_EOL; + $errorMessage = wordwrap($requirement->getTestMessage(), $lineSize - 3, PHP_EOL.' ').PHP_EOL; $errorMessage .= ' > '.wordwrap($requirement->getHelpText(), $lineSize - 5, PHP_EOL.' > ').PHP_EOL; return $errorMessage; @@ -121,8 +121,8 @@ function echo_block($style, $title, $message) echo PHP_EOL.PHP_EOL; echo_style($style, str_repeat(' ', $width).PHP_EOL); - echo_style($style, str_pad(' ['.$title.']', $width, ' ', STR_PAD_RIGHT).PHP_EOL); - echo_style($style, str_pad($message, $width, ' ', STR_PAD_RIGHT).PHP_EOL); + echo_style($style, str_pad(' ['.$title.']', $width, ' ', STR_PAD_RIGHT).PHP_EOL); + echo_style($style, str_pad($message, $width, ' ', STR_PAD_RIGHT).PHP_EOL); echo_style($style, str_repeat(' ', $width).PHP_EOL); } diff --git a/app/config/config.yml b/app/config/config.yml index 8e9369c2..5bc16dd9 100644 --- a/app/config/config.yml +++ b/app/config/config.yml @@ -59,9 +59,8 @@ twig: warning_message: %warning_message% paypal_url: "https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=9UBA65LG3FX9Y&lc=gb" flattr_url: "https://flattr.com/thing/1265480" - form: - resources: - - LexikFormFilterBundle:Form:form_div_layout.html.twig + form_themes: + - "LexikFormFilterBundle:Form:form_div_layout.html.twig" # Assetic Configuration assetic: diff --git a/app/config/routing.yml b/app/config/routing.yml index 1ca2f677..84b98d23 100644 --- a/app/config/routing.yml +++ b/app/config/routing.yml @@ -8,7 +8,7 @@ wallabag_api: prefix: / app: - resource: @WallabagCoreBundle/Controller/ + resource: "@WallabagCoreBundle/Controller/" type: annotation doc-api: diff --git a/app/config/routing_dev.yml b/app/config/routing_dev.yml index 1a236e28..404f6a3b 100644 --- a/app/config/routing_dev.yml +++ b/app/config/routing_dev.yml @@ -6,13 +6,9 @@ _profiler: resource: "@WebProfilerBundle/Resources/config/routing/profiler.xml" prefix: /_profiler -_configurator: - resource: "@SensioDistributionBundle/Resources/config/routing/webconfigurator.xml" - prefix: /_configurator - _errors: resource: "@TwigBundle/Resources/config/routing/errors.xml" prefix: /_error _main: - resource: routing.yml \ No newline at end of file + resource: routing.yml diff --git a/app/config/security.yml b/app/config/security.yml index 576cfd25..a99a7d80 100644 --- a/app/config/security.yml +++ b/app/config/security.yml @@ -15,6 +15,11 @@ security: # the main part of the security, where you can set up firewalls # for specific sections of your app firewalls: + # disables authentication for assets and the profiler, adapt it according to your needs + dev: + pattern: ^/(_(profiler|wdt)|css|images|js)/ + security: false + oauth_token: pattern: ^/oauth/v2/token security: false @@ -33,11 +38,11 @@ security: pattern: ^/ form_login: provider: fos_userbundle - csrf_provider: security.csrf.token_manager + csrf_token_generator: security.csrf.token_manager anonymous: true remember_me: - key: "%secret%" + secret: "%secret%" lifetime: 31536000 path: / domain: ~ diff --git a/app/console b/app/console index fa6a36e2..3b4c367c 100755 --- a/app/console +++ b/app/console @@ -1,18 +1,20 @@ #!/usr/bin/env php getParameterOption(array('--env', '-e'), getenv('SYMFONY_ENV') ?: 'dev'); -- cgit v1.2.3