1
0
Fork 0
mirror of https://github.com/wallabag/wallabag.git synced 2025-09-15 18:57:05 +00:00

Update bundle & stock file

- update stock file (AppKernel, app.php, etc ..) from SymfonyStandard edition)
- update bundle to latest release
- remove security on profiler
This commit is contained in:
Jeremy Benoist 2015-12-22 13:00:37 +01:00
parent 619cc45359
commit 5c895a7fd1
28 changed files with 208 additions and 203 deletions

View file

@ -1,7 +1,5 @@
<?php
require_once __DIR__.'/AppKernel.php';
use Symfony\Bundle\FrameworkBundle\HttpCache\HttpCache;
class AppCache extends HttpCache

View file

@ -35,7 +35,7 @@ class AppKernel extends Kernel
new Doctrine\Bundle\MigrationsBundle\DoctrineMigrationsBundle(),
);
if (in_array($this->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');
}
}

View file

@ -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);
}

View file

@ -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:

View file

@ -8,7 +8,7 @@ wallabag_api:
prefix: /
app:
resource: @WallabagCoreBundle/Controller/
resource: "@WallabagCoreBundle/Controller/"
type: annotation
doc-api:

View file

@ -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
resource: routing.yml

View file

@ -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: ~

View file

@ -1,18 +1,20 @@
#!/usr/bin/env php
<?php
use Symfony\Bundle\FrameworkBundle\Console\Application;
use Symfony\Component\Console\Input\ArgvInput;
use Symfony\Component\Debug\Debug;
// if you don't want to setup permissions the proper way, just uncomment the following PHP line
// read http://symfony.com/doc/current/book/installation.html#configuration-and-setup for more information
//umask(0000);
set_time_limit(0);
require_once __DIR__.'/bootstrap.php.cache';
require_once __DIR__.'/AppKernel.php';
use Symfony\Bundle\FrameworkBundle\Console\Application;
use Symfony\Component\Console\Input\ArgvInput;
use Symfony\Component\Debug\Debug;
/**
* @var Composer\Autoload\ClassLoader $loader
*/
$loader = require __DIR__.'/autoload.php';
$input = new ArgvInput();
$env = $input->getParameterOption(array('--env', '-e'), getenv('SYMFONY_ENV') ?: 'dev');