Skip to content

Commit

Permalink
Going to Symfony 2.8
Browse files Browse the repository at this point in the history
  • Loading branch information
philipsorst committed Feb 21, 2016
1 parent 968eeaf commit 35417b5
Show file tree
Hide file tree
Showing 14 changed files with 1,334 additions and 545 deletions.
6 changes: 4 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,10 @@
/var/bootstrap.php.cache
/var/cache/*
/var/logs/*
!var/cache/.gitkeep
!var/logs/.gitkeep
/var/data/*
!/var/cache/.gitkeep
!/var/logs/.gitkeep
!/var/data/.gitkeep
/build/
/vendor/
/bin/*
Expand Down
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ before_script:
- git config --global user.name "GitKi"

script:
- bin/phpunit -c app/
- bin/phpunit -c app/
29 changes: 26 additions & 3 deletions app/AppKernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,34 +5,57 @@

class AppKernel extends Kernel
{
/**
* {@inheritdoc}
*/
public function registerBundles()
{
$bundles = array(
new Symfony\Bundle\FrameworkBundle\FrameworkBundle(),
new Symfony\Bundle\SecurityBundle\SecurityBundle(),
new Symfony\Bundle\TwigBundle\TwigBundle(),
new Symfony\Bundle\MonologBundle\MonologBundle(),
new Symfony\Bundle\AsseticBundle\AsseticBundle(),
new Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle(),
new Doctrine\Bundle\DoctrineBundle\DoctrineBundle(),
new Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle(),
new Symfony\Bundle\AsseticBundle\AsseticBundle(),
new Braincrafted\Bundle\BootstrapBundle\BraincraftedBootstrapBundle(),
new FOS\UserBundle\FOSUserBundle(),
new HWI\Bundle\OAuthBundle\HWIOAuthBundle(),
new Dontdrinkandroot\GitkiBundle\DdrGitkiBundle(),
new Dontdrinkandroot\Gitki\WebBundle\DdrGitkiWebBundle(),
new Sensio\Bundle\GeneratorBundle\SensioGeneratorBundle(),
);

if (in_array($this->getEnvironment(), ['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();
}

return $bundles;
}

/**
* {@inheritdoc}
*/
public function registerContainerConfiguration(LoaderInterface $loader)
{
$loader->load(__DIR__ . '/config/config_' . $this->getEnvironment() . '.yml');
}

/**
* {@inheritdoc}
*/
public function getLogDir()
{
return dirname(__DIR__) . '/var/logs';
}

/**
* {@inheritdoc}
*/
public function getCacheDir()
{
return dirname(__DIR__) . '/var/cache/' . $this->getEnvironment();
}
}
2 changes: 1 addition & 1 deletion app/config/config_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ framework:

web_profiler:
toolbar: false
intercept_redirects: false
intercept_redirects: false
6 changes: 3 additions & 3 deletions app/config/routing_dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +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
14 changes: 8 additions & 6 deletions bin/console
Original file line number Diff line number Diff line change
@@ -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__.'/../var/bootstrap.php.cache';
require_once __DIR__.'/../app/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__ . '/../app/autoload.php';

$input = new ArgvInput();
$env = $input->getParameterOption(array('--env', '-e'), getenv('SYMFONY_ENV') ?: 'dev');
Expand Down
6 changes: 3 additions & 3 deletions bin/symfony_requirements
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ $lineSize = 70;
$symfonyRequirements = new SymfonyRequirements();
$iniPath = $symfonyRequirements->getPhpIniConfigPath();

echo_title('Symfony2 Requirements Checker');
echo_title('Symfony Requirements Checker');

echo '> PHP is using the following php.ini file:' . PHP_EOL;
if ($iniPath) {
Expand Down Expand Up @@ -43,9 +43,9 @@ foreach ($symfonyRequirements->getRecommendations() as $req) {
}

if ($checkPassed) {
echo_block('success', 'OK', 'Your system is ready to run Symfony2 projects', true);
echo_block('success', 'OK', 'Your system is ready to run Symfony projects');
} else {
echo_block('error', 'ERROR', 'Your system is not ready to run Symfony2 projects', true);
echo_block('error', 'ERROR', 'Your system is not ready to run Symfony projects');

echo_title('Fix the following mandatory requirements', 'red');

Expand Down
2 changes: 1 addition & 1 deletion bin/update-dev
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
#!/bin/bash
git pull && composer update && bin/console assetic:dump
git pull && composer install && bin/console assetic:dump && bin/console doctrine:cache:clear-metadata && bin/console doctrine:schema:update --dump-sql
39 changes: 25 additions & 14 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,36 +1,47 @@
{
"name": "dontdrinkandroot/gitki",
"license": "Apache2",
"type": "project",
"description": "Git backed MarkDown wiki",
"keywords": ["wiki", "git", "markdown"],
"minimum-stability": "dev",
"prefer-stable": true,
"license": "Apache-2.0",
"authors": [
{
"name": "Philip Washington Sorst",
"email": "philip@sorst.net",
"homepage": "https://sorst.net"
}
],
"autoload": {
"psr-0": {
"": "src/",
"SymfonyStandard": "app/"
}
"": "src/"
},
"classmap": [
"app/AppKernel.php",
"app/AppCache.php"
]
},
"require": {
"php": ">=5.5",
"symfony/symfony": "2.6.*",
"doctrine/orm": "~2.2,>=2.2.3",
"doctrine/doctrine-bundle": "~1.2",
"twig/extensions": "~1.0",
"symfony/assetic-bundle": "~2.3",
"symfony/symfony": "2.8.*",
"doctrine/orm": "^2.4.8",
"doctrine/doctrine-bundle": "~1.4",
"symfony/monolog-bundle": "~2.4",
"sensio/distribution-bundle": "~3.0",
"sensio/framework-extra-bundle": "~3.0",
"sensio/distribution-bundle": "~5.0",
"sensio/framework-extra-bundle": "^3.0.2",
"incenteev/composer-parameter-handler": "~2.0",
"twig/extensions": "~1.0",
"symfony/assetic-bundle": "~2.3",
"braincrafted/bootstrap-bundle": "~2.0",
"friendsofsymfony/user-bundle": "~1.3",
"hwi/oauth-bundle": "0.3.*",
"sensio/generator-bundle": "~2.3",
"dontdrinkandroot/gitki-bundle": "0.1.x-dev",
"elasticsearch/elasticsearch": "~1.3"
},
"require-dev": {
"sensio/generator-bundle": "~3.0",
"symfony/phpunit-bridge": "~2.7",
"phpunit/phpunit": "~4.1",
"twbs/bootstrap": "~3.3",
"squizlabs/php_codesniffer": "~2.2"
Expand All @@ -45,15 +56,15 @@
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::removeSymfonyStandardFiles"
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::prepareDeploymentTarget"
],
"post-update-cmd": [
"Incenteev\\ParameterHandler\\ScriptHandler::buildParameters",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installRequirementsFile",
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::removeSymfonyStandardFiles"
"Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::prepareDeploymentTarget"
]
},
"config": {
Expand Down

0 comments on commit 35417b5

Please sign in to comment.