Skip to content

Commit

Permalink
Updated to symfony 2.0.15
Browse files Browse the repository at this point in the history
  • Loading branch information
Pierre Vanliefland committed Jul 3, 2012
1 parent eb5ccfa commit 5ce34ec
Show file tree
Hide file tree
Showing 8 changed files with 117 additions and 81 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2004-2011 Fabien Potencier
Copyright (c) 2004-2012 Fabien Potencier

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,11 +115,10 @@ playing with it, you can remove it by following these steps:
* remove the routing entries referencing AcmeBundle in ``app/config/routing_dev.yml``;
* remove the AcmeBundle from the registered bundles in ``app/AppKernel.php``;


What's inside?
---------------
The Symfony Standard Edition comes pre-configured with the following bundles:

* **FrameworkBundle** - The core Symfony framework bundle
* **SensioFrameworkExtraBundle** - Adds several enhancements, including template
and routing annotation capability ([documentation](http://symfony.com/doc/current/bundles/SensioFrameworkExtraBundle/index.html))
Expand Down
2 changes: 1 addition & 1 deletion app/AppCache.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

require_once __DIR__ . '/AppKernel.php';
require_once __DIR__.'/AppKernel.php';

use Symfony\Bundle\FrameworkBundle\HttpCache\HttpCache;

Expand Down
2 changes: 1 addition & 1 deletion app/Resources/views/base.html.twig
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta charset="UTF-8" />
<title>{% block title %}Welcome!{% endblock %}</title>
{% block stylesheets %}{% endblock %}
<link rel="shortcut icon" href="{{ asset('favicon.ico') }}" />
Expand Down
12 changes: 8 additions & 4 deletions app/bootstrap.php.cache
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,6 @@ use Symfony\Component\HttpKernel\Bundle\BundleInterface;
use Symfony\Component\HttpKernel\Config\FileLocator;
use Symfony\Component\HttpKernel\DependencyInjection\MergeExtensionConfigurationPass;
use Symfony\Component\HttpKernel\DependencyInjection\AddClassesToCachePass;
use Symfony\Component\HttpKernel\DependencyInjection\Extension as DIExtension;
use Symfony\Component\HttpKernel\Debug\ErrorHandler;
use Symfony\Component\HttpKernel\Debug\ExceptionHandler;
use Symfony\Component\Config\Loader\LoaderResolver;
Expand All @@ -456,7 +455,12 @@ abstract class Kernel implements KernelInterface
protected $startTime;
protected $classes;

const VERSION = '2.0.8';
const VERSION = '2.0.15';
const VERSION_ID = '20015';
const MAJOR_VERSION = '2';
const MINOR_VERSION = '0';
const RELEASE_VERSION = '15';
const EXTRA_VERSION = '';


public function __construct($environment, $debug)
Expand Down Expand Up @@ -663,7 +667,7 @@ abstract class Kernel implements KernelInterface
{
if (null === $this->rootDir) {
$r = new \ReflectionObject($this);
$this->rootDir = dirname($r->getFileName());
$this->rootDir = str_replace('\\', '/', dirname($r->getFileName()));
}

return $this->rootDir;
Expand Down Expand Up @@ -821,7 +825,7 @@ abstract class Kernel implements KernelInterface
{
$parameters = array();
foreach ($_SERVER as $key => $value) {
if ('SYMFONY__' === substr($key, 0, 9)) {
if (0 === strpos($key, 'SYMFONY__')) {
$parameters[strtolower(str_replace('__', '.', substr($key, 9)))] = $value;
}
}
Expand Down
119 changes: 79 additions & 40 deletions bin/vendors
Original file line number Diff line number Diff line change
Expand Up @@ -17,36 +17,40 @@ $vendorDir = $rootDir.'/vendor';

array_shift($argv);
if (!isset($argv[0])) {
exit(<<<EOF
echo(<<<EOF
Symfony2 vendors script management.
Specify a command to run:
install: install vendors as specified in deps or deps.lock (recommended)
update: update vendors to their latest versions (as specified in deps)
install: install vendors as specified in deps or deps.lock (recommended)
update: update vendors to their latest versions (as specified in deps)
lock: lock vendors to their current versions
EOF
);
exit(1);
}

if (!in_array($command = array_shift($argv), array('install', 'update'))) {
exit(sprintf("Command \"%s\" does not exist.\n", $command));
if (!in_array($command = array_shift($argv), array('install', 'update', 'lock'))) {
echo(sprintf('Command "%s" does not exist.', $command).PHP_EOL);
exit(1);
}

/*
* Check wether this project is based on the Standard Edition that was
* shipped with vendors or not.
*/
if (is_dir($vendorDir.'/symfony') && !is_dir($vendorDir.'/symfony/.git') && !in_array('--reinstall', $argv)) {
exit(<<<EOF
echo(<<<EOF
Your project seems to be based on a Standard Edition that includes vendors.
Try to run ./bin/vendors install --reinstall
EOF
);
exit(1);
}

if (!is_dir($vendorDir)) {
Expand All @@ -59,7 +63,8 @@ if ('install' === $command && file_exists($rootDir.'/deps.lock')) {
foreach (file($rootDir.'/deps.lock', FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES) as $line) {
$parts = array_values(array_filter(explode(' ', $line)));
if (2 !== count($parts)) {
exit(sprintf('The deps version file is not valid (near "%s")', $line));
echo(sprintf('The deps version file is not valid (near "%s")', $line).PHP_EOL);
exit(1);
}
$versions[$parts[0]] = $parts[1];
}
Expand All @@ -68,65 +73,99 @@ if ('install' === $command && file_exists($rootDir.'/deps.lock')) {
$newversions = array();
$deps = parse_ini_file($rootDir.'/deps', true, INI_SCANNER_RAW);
if (false === $deps) {
exit("The deps file is not valid ini syntax. Perhaps missing a trailing newline?\n");
echo('The deps file is not valid ini syntax. Perhaps missing a trailing newline?'.PHP_EOL);
exit(1);
}
foreach ($deps as $name => $dep) {
$dep = array_map('trim', $dep);

// revision
if (isset($versions[$name])) {
$rev = $versions[$name];
} else {
$rev = isset($dep['version']) ? $dep['version'] : 'origin/HEAD';
}

// install dir
$installDir = isset($dep['target']) ? $vendorDir.'/'.$dep['target'] : $vendorDir.'/'.$name;
if (in_array('--reinstall', $argv)) {
if (PHP_OS == 'WINNT') {
if (in_array('--reinstall', $argv) && realpath($installDir)) {
if (defined('PHP_WINDOWS_VERSION_BUILD')) {
system(sprintf('rmdir /S /Q %s', escapeshellarg(realpath($installDir))));
} else {
system(sprintf('rm -rf %s', escapeshellarg($installDir)));
}
clearstatcache();
}

echo "> Installing/Updating $name\n";
if ('install' === $command || 'update' === $command) {
echo PHP_EOL.'> Installing/Updating '.$name.PHP_EOL;

// url
if (!isset($dep['git'])) {
exit(sprintf('The "git" value for the "%s" dependency must be set.', $name));
}
$url = $dep['git'];
// url
if (!isset($dep['git'])) {
echo(sprintf('The "git" value for the "%s" dependency must be set.', $name).PHP_EOL);
exit(1);
}
$url = $dep['git'];

if ('update' === $command && is_dir($installDir)) {
ob_start();
system(sprintf('cd %s && git config --get remote.origin.url', escapeshellarg($installDir)));
$current_url = trim(ob_get_clean());
if ($current_url !== $url) {
if (PHP_OS == 'WINNT') {
system(sprintf('rmdir /S /Q %s', escapeshellarg(realpath($installDir))));
} else {
system(sprintf('rm -rf %s', escapeshellarg($installDir)));
}
clearstatcache();
}
}

if (!is_dir($installDir)) {
system(sprintf('git clone %s %s', escapeshellarg($url), escapeshellarg($installDir)));
}
if (!is_dir($installDir)) {
system(sprintf('git clone %s %s', escapeshellarg($url), escapeshellarg($installDir)));
}

$status = system(sprintf('cd %s && git status --porcelain -uno', escapeshellarg($installDir)));
if (!empty($status)) {
exit(sprintf('"%s" has local modifications. Please revert or commit/push them before running this command again.', $name));
}
$current_rev = system(sprintf('cd %s && git rev-list --max-count=1 HEAD', escapeshellarg($installDir)));
if ($current_rev === $rev) {
continue;
}
// revision
if (isset($versions[$name])) {
$rev = $versions[$name];
} else {
$rev = isset($dep['version']) ? $dep['version'] : 'origin/HEAD';
}

system(sprintf('cd %s && git fetch origin && git reset --hard %s', escapeshellarg($installDir), escapeshellarg($rev)));
$status = system(sprintf('cd %s && git status --porcelain', escapeshellarg($installDir)));
if (!empty($status)) {
echo(sprintf('"%s" has local modifications. Please revert or commit/push them before running this command again.', $name).PHP_EOL);
exit(1);
}
$current_rev = system(sprintf('cd %s && git rev-list --max-count=1 HEAD', escapeshellarg($installDir)));
if ($current_rev === $rev) {
continue;
}

if ('update' === $command) {
system(sprintf('cd %s && git fetch origin && git reset --hard %s', escapeshellarg($installDir), escapeshellarg($rev)));
}

if ('update' === $command || 'lock' === $command) {
ob_start();
system(sprintf('cd %s && git log -n 1 --format=%%H', escapeshellarg($installDir)));
$newversions[] = trim($name.' '.ob_get_clean());
$newversion = trim(ob_get_clean());

ob_start();
system(sprintf('cd %s && git name-rev --tags --name-only %s', escapeshellarg($installDir), $newversion));
// remove trailing ^0 from tags, those are the tags themselves
$niceversion = preg_replace('/\^0$/', '', trim(ob_get_clean()));

// undefined is returned in case no name-rev could be found
if ('undefined' !== $niceversion) {
$newversions[] = $name.' '.$niceversion;
} else {
$newversions[] = $name.' '.$newversion;
}
}
}

// update?
if ('update' === $command) {
file_put_contents($rootDir.'/deps.lock', implode("\n", $newversions));
if ('update' === $command || 'lock' === $command) {
echo PHP_EOL.'> Updating deps.lock'.PHP_EOL;

file_put_contents($rootDir.'/deps.lock', implode("\n", $newversions)."\n");
}

// php on windows can't use the shebang line from system()
$interpreter = PHP_OS == 'WINNT' ? 'php.exe' : '';
$interpreter = defined('PHP_WINDOWS_VERSION_BUILD') ? 'php.exe' : '';

// Update the bootstrap files
system(sprintf('%s %s %s', $interpreter, escapeshellarg($rootDir.'/vendor/bundles/Sensio/Bundle/DistributionBundle/Resources/bin/build_bootstrap.php'), escapeshellarg($rootDir)));
Expand Down
20 changes: 11 additions & 9 deletions deps
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[symfony]
git=http://github.com/symfony/symfony.git
version=v2.0.8
version=v2.0.15

[twig]
git=http://github.com/fabpot/Twig.git
version=v1.4.0
version=v1.8.2

[monolog]
git=http://github.com/Seldaek/monolog.git
Expand All @@ -16,19 +16,19 @@

[doctrine-dbal]
git=http://github.com/doctrine/dbal.git
version=2.1.5
version=2.1.7

[doctrine]
git=http://github.com/doctrine/doctrine2.git
version=2.1.5
version=2.1.7

[swiftmailer]
git=http://github.com/swiftmailer/swiftmailer.git
version=v4.1.4
version=v4.1.7

[assetic]
git=http://github.com/kriswallsmith/assetic.git
version=v1.0.2
version=v1.0.3

[twig-extensions]
git=http://github.com/fabpot/Twig-extensions.git
Expand All @@ -55,6 +55,7 @@
[SensioGeneratorBundle]
git=http://github.com/sensio/SensioGeneratorBundle.git
target=/bundles/Sensio/Bundle/GeneratorBundle
version=origin/2.0

[AsseticBundle]
git=http://github.com/symfony/AsseticBundle.git
Expand All @@ -66,11 +67,12 @@
target=/bundles/Knp/Bundle/MarkdownBundle

[doctrine-fixtures]
git=http://github.com/doctrine/data-fixtures.git
git=git://github.com/doctrine/data-fixtures.git

[DoctrineFixturesBundle]
git=http://github.com/symfony/DoctrineFixturesBundle.git
git=git://github.com/doctrine/DoctrineFixturesBundle.git
target=/bundles/Symfony/Bundle/DoctrineFixturesBundle
version=origin/2.0

[Imagine]
git=http://github.com/avalanche123/Imagine.git
Expand All @@ -88,4 +90,4 @@
target=bundles/Ornicar/AkismetBundle

[Buzz]
git=http://github.com/kriswallsmith/Buzz.git
git=http://github.com/kriswallsmith/Buzz.git
38 changes: 15 additions & 23 deletions deps.lock
Original file line number Diff line number Diff line change
@@ -1,23 +1,15 @@
symfony 5b4e6190c4420524e4dcaf51213c4ad78f646528
twig 0b7d6dfa0cf0dfb6a3c5745b6434ebd6ea32e90e
monolog b704c49a3051536f67f2d39f13568f74615b9922
doctrine-common b886898821288d305862ee9c567cc5b5cbb4c0dc
doctrine-dbal ae358bd94ec09d7d3ad92ca7820e67825ad9e5f4
doctrine da0e3439aba4c8bf5e8a6ee4ccee5ce2624be8d1
swiftmailer eb0ecaa4243efc46e0f54d87c6454e49aa4b62dd
assetic f829ad23d23c87480151a21faad49fefe7c09e5d
twig-extensions d75a453b4e1ad48216cc4803ba9095855f130774
metadata 8717ad2a5689480765d9ffafe925cd8a2457e582
SensioFrameworkExtraBundle 1c7e92f466d11f83130b0c1271f44d067a2c3b31
JMSSecurityExtraBundle b8b7eb294ed83d83ca7260ac018e701f08003538
SensioDistributionBundle 20b66a408084ad8752f98e50f10533f5245310bf
SensioGeneratorBundle 87fe88c4c8dc09cb197ba4b2d6d5b834e2c64980
AsseticBundle 41b5913b5086a0909af92adcb4a6005ee0051b16
KnpMarkdownBundle 239972dd8e93e30e7c9d95df82636d37d0350f88
doctrine-fixtures f09c0840df9cb7968c89acb91a9fa262f158b1c5
DoctrineFixturesBundle a66be2f077f3a4e5c3801b356b42b8782f1abbd6
Imagine 9544ec40b628ca3a1ddbe57f79ed02f6bd2b2b8b
LiipImagineBundle bacd22f8ec0bebc468bc4c7c7139046c43a90962
twitteroauth 75bb13811284e2ca540334a9876c46f8dc4e7f62
OrnicarAkismetBundle 9c525963d48289174c10367d9f14f5deec58b0ab
Buzz 424187ec75eccf015296349be43980a95630ac9a
symfony v2.0.15
twig v1.8.2
monolog 1.0.2
doctrine-common 2.1.4
doctrine-dbal 2.1.7
doctrine 2.1.7
swiftmailer v4.1.7
assetic v1.0.3
twig-extensions feb6d3f10c411e2631997c0a905aa581c80305c1
metadata 1.0.0
SensioFrameworkExtraBundle 1eda94d838aa885e154f92f426df35f2252cdb92
JMSSecurityExtraBundle e752f888c51425f71382c056961f10f2be642102
SensioDistributionBundle 41a6c5caed65f02bb09c95a90579f047616471fd
SensioGeneratorBundle 83b768a487a6878f2bc2ad6859bd61a3651a7885
AsseticBundle v1.0.1

0 comments on commit 5ce34ec

Please sign in to comment.