Skip to content
This repository has been archived by the owner on Oct 4, 2022. It is now read-only.

Commit

Permalink
Updated project to Symfony 2.6 (and other updated dependencies)
Browse files Browse the repository at this point in the history
  • Loading branch information
rnijveld committed Dec 9, 2014
1 parent 48ddee2 commit 55362c7
Show file tree
Hide file tree
Showing 21 changed files with 116 additions and 99 deletions.
2 changes: 1 addition & 1 deletion app/AppKernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ public function registerBundles()
new Symfony\Bundle\SwiftmailerBundle\SwiftmailerBundle(),
new Doctrine\Bundle\DoctrineBundle\DoctrineBundle(),
new Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle(),
new Bs\BootstrapifyBundle\BsBootstrapifyBundle(),
new Stof\DoctrineExtensionsBundle\StofDoctrineExtensionsBundle(),
new Knp\Bundle\GaufretteBundle\KnpGaufretteBundle(),
new Vich\UploaderBundle\VichUploaderBundle(),
Expand All @@ -29,6 +28,7 @@ public function registerBundles()
);

if (in_array($this->getEnvironment(), array('dev', 'test'))) {
$bundles[] = new Symfony\Bundle\DebugBundle\DebugBundle();
$bundles[] = new Symfony\Bundle\WebProfilerBundle\WebProfilerBundle();
$bundles[] = new Sensio\Bundle\DistributionBundle\SensioDistributionBundle();
$bundles[] = new Sensio\Bundle\GeneratorBundle\SensioGeneratorBundle();
Expand Down
26 changes: 13 additions & 13 deletions app/Resources/views/base.html.twig
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
<!DOCTYPE html>
<html>
<head>
{% block head %}
<meta charset="UTF-8" />
<title>{% block title %}{{ sitename }}{% endblock %}</title>
{% block stylesheets %}{% endblock %}
<link rel="icon" type="image/x-icon" href="{{ asset('favicon.ico') }}" />
{% block metas %}{% endblock %}
{% block javascripts %}{% endblock %}
{% endblock %}
</head>
<body>
{% block body %}{% endblock %}
</body>
<head>
{% block head %}
<meta charset="UTF-8" />
<title>{% block title %}{{ sitename }}{% endblock %}</title>
{% block stylesheets %}{% endblock %}
<link rel="icon" type="image/x-icon" href="{{ asset('favicon.ico') }}" />
{% block metas %}{% endblock %}
{% block javascripts %}{% endblock %}
{% endblock %}
</head>
<body>
{% block body %}{% endblock %}
</body>
</html>
5 changes: 5 additions & 0 deletions app/Resources/views/default/index.html.twig
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{% extends 'base.html.twig' %}

{% block body %}
Homepage.
{% endblock %}
14 changes: 12 additions & 2 deletions app/SymfonyRequirements.php
Original file line number Diff line number Diff line change
Expand Up @@ -440,8 +440,8 @@ public function __construct()
}

$this->addRequirement(
isset($timezones[date_default_timezone_get()]),
sprintf('Configured default timezone "%s" must be supported by your installation of PHP', date_default_timezone_get()),
isset($timezones[@date_default_timezone_get()]),
sprintf('Configured default timezone "%s" must be supported by your installation of PHP', @date_default_timezone_get()),
'Your default timezone is not supported by PHP. Check for typos in your <strong>php.ini</strong> file and have a look at the list of deprecated timezones at <a href="http://php.net/manual/en/timezones.others.php">http://php.net/manual/en/timezones.others.php</a>.'
);
}
Expand Down Expand Up @@ -530,6 +530,16 @@ function_exists('simplexml_import_dom'),
'Install the <strong>PCRE</strong> extension (version 8.0+).'
);

if (extension_loaded('mbstring')) {
$this->addPhpIniRequirement(
'mbstring.func_overload',
create_function('$cfgValue', 'return (int) $cfgValue === 0;'),
true,
'string functions should not be overloaded',
'Set "<strong>mbstring.func_overload</strong>" to <strong>0</strong> in php.ini<a href="#phpini">*</a> to disable function overloading by the mbstring extension.'
);
}

/* optional recommendations follow */

$this->addRecommendation(
Expand Down
2 changes: 1 addition & 1 deletion app/check.php
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ function echo_style($style, $message)
);
$supports = has_color_support();

echo ($supports ? $styles[$style] : '').$message.($supports ? $styles['reset'] : '');
echo($supports ? $styles[$style] : '').$message.($supports ? $styles['reset'] : '');
}

function echo_block($style, $title, $message)
Expand Down
9 changes: 7 additions & 2 deletions app/config/config.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
imports:
- { resource: parameters.yml }
- { resource: security.yml }
- { resource: services.yml }

# Framework configuration
framework:
Expand All @@ -17,15 +18,20 @@ framework:
engines: ['twig']
#assets_version: SomeVersionScheme
default_locale: "%locale%"
trusted_hosts: ~
trusted_proxies: ~
session:
handler_id: ~
save_path: "%kernel.root_dir%/sessions"
fragments: ~
http_method_override: true

# Twig Configuration
twig:
debug: %kernel.debug%
strict_variables: %kernel.debug%
form:
resources: ['bootstrap_3_layout.html.twig']
globals:
sitename: %sitename%

Expand Down Expand Up @@ -103,8 +109,7 @@ knp_gaufrette:
# Vich Configuration
vich_uploader:
db_driver: orm
gaufrette: true
storage: vich_uploader.storage.gaufrette
storage: gaufrette
mappings: ~

# Doctrine Extensions Configuration
Expand Down
15 changes: 15 additions & 0 deletions app/config/dev/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,21 @@ monolog:
type: stream
path: %kernel.logs_dir%/%kernel.environment%.log
level: debug
console:
type: console
bubble: false
verbosity_levels:
VERBOSITY_VERBOSE: INFO
VERBOSITY_VERY_VERBOSE: DEBUG
channels: ["!doctrine"]
console_very_verbose:
type: console
bubble: false
verbosity_levels:
VERBOSITY_VERBOSE: NOTICE
VERBOSITY_VERY_VERBOSE: NOTICE
VERBOSITY_DEBUG: DEBUG
channels: ["doctrine"]
# firephp:
# type: firephp
# level: info
Expand Down
4 changes: 4 additions & 0 deletions app/config/dev/routing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,9 @@ _configurator:
resource: "@SensioDistributionBundle/Resources/config/routing/webconfigurator.xml"
prefix: /_configurator

_errors:
resource: "@TwigBundle/Resources/config/routing/errors.xml"
prefix: /_error

_main:
resource: ../routing.yml
2 changes: 2 additions & 0 deletions app/config/prod/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,5 @@ monolog:
type: stream
path: %kernel.logs_dir%/%kernel.environment%.log
level: debug
console:
type: console
7 changes: 7 additions & 0 deletions app/config/services.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
parameters:
# parameter_name: value

services:
# service_name:
# class: AppBundle\Directory\ClassName
# arguments: ["@another_service_name", "plain_value", "%parameter_name%"]
2 changes: 1 addition & 1 deletion app/config/test/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ framework:
session:
storage_id: session.storage.filesystem
profiler:
enabled: false
collect: false
default_locale: en

web_profiler:
Expand Down
4 changes: 2 additions & 2 deletions bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
"private": true,
"dependencies": {
"jquery": "1.11.1",
"bootstrap-sass-twbs": "3.2.0+2",
"bootstrap-sass-twbs": "3.3.1",
"fontawesome": "4.2.0",
"selectize": "0.11.2",
"selectize-scss": "0.8.8"
"selectize-scss": "0.8.9"
}
}
14 changes: 7 additions & 7 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,29 +10,28 @@
},
"require": {
"php": ">=5.4.0",
"symfony/symfony": "~2.5",
"symfony/symfony": "~2.6.0",
"doctrine/orm": "~2.4",
"doctrine/doctrine-bundle": "~1.2.0",
"twig/extensions": "~1.1",
"doctrine/doctrine-bundle": "~1.3",
"twig/extensions": "~1.2",
"symfony/swiftmailer-bundle": "~2.3",
"symfony/monolog-bundle": "~2.6",
"sensio/distribution-bundle": "~3.0",
"sensio/framework-extra-bundle": "~3.0",
"incenteev/composer-parameter-handler": "~2.1",
"stof/doctrine-extensions-bundle": "~1.1",
"vich/uploader-bundle": "~0.11",
"vich/uploader-bundle": "~0.12",
"knplabs/knp-gaufrette-bundle": "~0.1.7",
"doctrine/doctrine-migrations-bundle": "~1.0.0",
"doctrine/migrations": "~1.0@dev",
"bravesheep/bootstrapify-bundle": "~3.0.0",
"friendsofsymfony/user-bundle": "~2.0@dev",
"doctrine/doctrine-fixtures-bundle": "~2.2.0",
"bravesheep/database-url-bundle": "~0.1",
"bravesheep/mailer-url-bundle": "~0.1"
},
"require-dev": {
"fzaninotto/faker": "~1.4",
"sensio/generator-bundle": "~2.4",
"sensio/generator-bundle": "~2.5",
"behat/behat": "~3.0",
"behat/mink": "~1.6",
"behat/mink-extension": "~2.0",
Expand Down Expand Up @@ -70,11 +69,12 @@
"extra": {
"symfony-app-dir": "app",
"symfony-web-dir": "web",
"symfony-assets-install": "relative",
"incenteev-parameters": {
"file": "app/config/parameters.yml"
},
"branch-alias": {
"dev-master": "2.5-dev"
"dev-master": "2.6-dev"
}
},
"config": {
Expand Down
24 changes: 12 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,34 +2,34 @@
"name": "symfony-okoa",
"private": true,
"devDependencies": {
"browserify": "6.1.0",
"browserify": "7.0.0",
"deamdify": "0.1.1",
"debowerify": "0.9.0",
"del": "0.1.3",
"debowerify": "1.2.0",
"del": "1.1.0",
"event-stream": "3.1.7",
"extend": "2.0.0",
"gulp": "3.8.8",
"gulp-autoprefixer": "1.0.1",
"gulp": "3.8.10",
"gulp-autoprefixer": "2.0.0",
"gulp-buster": "1.0.0",
"gulp-changed": "1.0.0",
"gulp-cssimport": "1.2.3",
"gulp-changed": "1.1.0",
"gulp-cssimport": "1.3.1",
"gulp-flatten": "0.0.4",
"gulp-if": "1.2.5",
"gulp-jshint": "1.8.5",
"gulp-jshint": "1.9.0",
"gulp-livereload": "2.1.1",
"gulp-minify-css": "0.3.11",
"gulp-plumber": "0.6.6",
"gulp-rename": "1.2.0",
"gulp-sass": "1.2.0",
"gulp-sass": "1.2.4",
"gulp-size": "1.1.0",
"gulp-streamify": "0.0.5",
"gulp-uglify": "1.0.1",
"gulp-uglify": "1.0.2",
"gulp-util": "3.0.1",
"jshint-stylish": "1.0.0",
"stream-combiner": "0.2.1",
"vinyl-source-stream": "1.0.0",
"watchify": "2.0.0",
"yargs": "1.3.2"
"watchify": "2.1.1",
"yargs": "1.3.3"
},
"engines": {
"node": "0.10.x"
Expand Down
17 changes: 17 additions & 0 deletions src/AppBundle/Controller/DefaultController.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?php

namespace AppBundle\Controller;

use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;

class DefaultController extends Controller
{
/**
* @Route("/", name="homepage")
*/
public function indexAction()
{
return $this->render('default/index.html.twig');
}
}
26 changes: 0 additions & 26 deletions src/AppBundle/DependencyInjection/AppExtension.php

This file was deleted.

20 changes: 0 additions & 20 deletions src/AppBundle/DependencyInjection/Configuration.php

This file was deleted.

4 changes: 0 additions & 4 deletions src/AppBundle/Resources/config/services.yml

This file was deleted.

16 changes: 10 additions & 6 deletions web/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,14 @@

$loader = require_once __DIR__.'/../app/bootstrap.php.cache';

// Use APC for autoloading to improve performance.
// Change 'sf2' to a unique prefix in order to prevent cache key conflicts
// with other applications also using APC.
// Enable APC for autoloading to improve performance.
// You should change the ApcClassLoader first argument to a unique prefix
// in order to prevent cache key conflicts with other applications
// also using APC.
/*
$loader = new ApcClassLoader('sf2', $loader);
$loader->register(true);
$apcLoader = new ApcClassLoader(sha1(__FILE__), $loader);
$loader->unregister();
$apcLoader->register(true);
*/

require_once __DIR__.'/../app/AppKernel.php';
Expand All @@ -19,7 +21,9 @@
$kernel = new AppKernel('prod', false);
$kernel->loadClassCache();
//$kernel = new AppCache($kernel);
Request::enableHttpMethodParameterOverride();

// When using the HttpCache, you need to call the method in your front controller instead of relying on the configuration parameter
//Request::enableHttpMethodParameterOverride();
$request = Request::createFromGlobals();
$response = $kernel->handle($request);
$response->send();
Expand Down
Loading

0 comments on commit 55362c7

Please sign in to comment.