From 246721237d84a548c152dcae6415f39bb8091c4e Mon Sep 17 00:00:00 2001 From: Joseph Bielawski Date: Tue, 27 Mar 2012 14:13:33 +0200 Subject: [PATCH] Introduce usage of composer! (also fixed failed tests) --- .gitignore | 1 + .travis.yml | 3 +- README.markdown | 9 +- app/autoload.php | 77 ++--- app/bootstrap.php | 4 - app/config/parameters.yml.test | 4 +- app/console | 2 +- app/phpunit.xml.dist | 2 +- bin/vendors | 133 -------- composer.json | 189 ++++++++++++ composer.lock | 283 ++++++++++++++++++ deps | 184 ------------ deps.lock | 46 --- .../Commands/KbGenerateBadgesCommandTest.php | 19 +- web/app.php | 13 +- web/app_dev.php | 8 +- 16 files changed, 535 insertions(+), 442 deletions(-) delete mode 100644 app/bootstrap.php delete mode 100755 bin/vendors create mode 100644 composer.json create mode 100644 composer.lock delete mode 100644 deps delete mode 100644 deps.lock diff --git a/.gitignore b/.gitignore index f07cf32b..8b890f5f 100755 --- a/.gitignore +++ b/.gitignore @@ -16,3 +16,4 @@ /vendor/* /app/config/parameters.yml /app/config/parameters.*.yml +composer.phar \ No newline at end of file diff --git a/.travis.yml b/.travis.yml index c0c8a6be..eae83fd0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,7 +5,8 @@ php: before_script: - cp app/config/parameters.yml.test app/config/parameters.yml - - php bin/vendors install + - curl -s http://getcomposer.org/installer | php + - php composer.phar --dev install - ./bin/prepare-test-env.sh - ./bin/prepare-test-solr.sh diff --git a/README.markdown b/README.markdown index 12974bb3..c4200eb0 100644 --- a/README.markdown +++ b/README.markdown @@ -19,7 +19,7 @@ to change the name due to [trademark issues](http://knplabs.com/blog/symfony2bun ### Configure To configure your database in your development environment, copy -`/app/config/parameters.yml.dist` to `/app/config/parameters.yml` and +`/app/config/parameters.yml.dist` to `/app/config/parameters.yml` and edit it according to your database settings. If you want to use github connect locally, you'll need to @@ -32,7 +32,8 @@ And update the parameters.yml with the Client ID and Secret. ### Install vendors - php bin/vendors install + curl -s http://getcomposer.org/installer | php + php composer.phar install #### Create database and tables @@ -49,10 +50,6 @@ And update the parameters.yml with the Client ID and Secret. php app/console doctrine:fixtures:load php app/console --env=test doctrine:fixtures:load -### Publish the assets - - php app/console assets:install --symlink web - ### Run the tests (requires PHPUnit >= 3.5) phpunit -c app diff --git a/app/autoload.php b/app/autoload.php index 1769c52b..048ed6b3 100644 --- a/app/autoload.php +++ b/app/autoload.php @@ -1,57 +1,28 @@ registerNamespaces(array( - 'Symfony' => array(__DIR__.'/../vendor/symfony/src', __DIR__.'/../vendor/bundles'), - 'Knp\Bundle\KnpBundlesBundle' => __DIR__.'/../src', - 'Knp\Bundle\SitemapBundle' => __DIR__.'/../src', - 'Knp\Bundle' => __DIR__.'/../vendor/bundles', - 'Knp\Menu' => __DIR__.'/../vendor/knp-menu/src', - 'Knp\Component' => __DIR__.'/../vendor/knp-components/src', - 'Ornicar\GravatarBundle' => __DIR__.'/../vendor/bundles', - 'Doctrine\Bundle' => __DIR__.'/../vendor/bundles', - 'Doctrine\DBAL\Migrations' => __DIR__.'/../vendor/doctrine-migrations/lib', - 'Doctrine\Common' => __DIR__.'/../vendor/doctrine-common/lib', - 'Doctrine\Common\DataFixtures' => __DIR__.'/../vendor/doctrine-data-fixtures/lib', - 'Doctrine\DBAL' => __DIR__.'/../vendor/doctrine-dbal/lib', - 'Doctrine' => __DIR__.'/../vendor/doctrine/lib', - 'JMS' => __DIR__.'/../vendor/bundles', - 'Monolog' => __DIR__.'/../vendor/monolog/src', - 'Goutte' => __DIR__.'/../vendor/goutte/src', - 'Zend' => __DIR__.'/../vendor/zf/library', - 'Etcpasswd' => __DIR__.'/../vendor/bundles', - 'Buzz' => __DIR__.'/../vendor/buzz/lib', - 'Inori' => __DIR__.'/../vendor/bundles', - 'Behat\Gherkin' => __DIR__.'/../vendor/behat/gherkin/src', - 'Behat\Behat' => __DIR__.'/../vendor/behat/behat/src', - 'Behat\BehatBundle' => __DIR__.'/../vendor/bundles', - 'Behat\Mink' => __DIR__.'/../vendor/behat/mink/src', - 'Behat\MinkBundle' => __DIR__.'/../vendor/bundles', - 'Behat\CommonContext' => __DIR__.'/../vendor/behat/CommonContexts', - 'OldSound' => __DIR__.'/../vendor/bundles', - 'PhpAmqpLib' => __DIR__.'/../vendor/videlalvaro/php-amqplib', - 'Imagine' => __DIR__.'/../vendor/imagine/lib', - 'Igorw' => __DIR__.'/../vendor/bundles', - 'Nelmio' => __DIR__.'/../vendor/bundles', - 'Github' => __DIR__.'/../vendor/php-github-api/lib', -)); +if (!$loader = include __DIR__.'/../vendor/autoload.php') { + $nl = PHP_SAPI === 'cli' ? PHP_EOL : '
'; + echo "$nl$nl"; + if (is_writable(dirname(__DIR__)) && $installer = @file_get_contents('http://getcomposer.org/installer')) { + echo 'You must set up the project dependencies.'.$nl; + $installerPath = dirname(__DIR__).'/install-composer.php'; + file_put_contents($installerPath, $installer); + echo 'The composer installer has been downloaded in '.$installerPath.$nl; + die('Run the following commands in '.dirname(__DIR__).':'.$nl.$nl. + 'php install-composer.php'.$nl. + 'php composer.phar install'.$nl); + } + die('You must set up the project dependencies.'.$nl. + 'Run the following commands in '.dirname(__DIR__).':'.$nl.$nl. + 'curl -s http://getcomposer.org/installer | php'.$nl. + 'php composer.phar install'.$nl); +} -$loader->registerPrefixes(array( - 'Twig_Extensions_' => __DIR__.'/../vendor/twig-extensions/lib', - 'Twig_' => __DIR__.'/../vendor/twig/lib', - 'PHPGit_' => __DIR__.'/../vendor/php-git-repo/lib', - 'Solarium_' => __DIR__.'/../vendor/solarium/library', -)); -$loader->register(); +use Doctrine\Common\Annotations\AnnotationRegistry; -// Registering the annotations -AnnotationRegistry::registerLoader(function($class) use ($loader) { - $loader->loadClass($class); - return class_exists($class, false); -}); -AnnotationRegistry::registerFile( - __DIR__.'/../vendor/doctrine/lib/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php' -); +// intl +if (!function_exists('intl_get_error_code')) { + require_once __DIR__.'/../vendor/symfony/symfony/src/Symfony/Component/Locale/Resources/stubs/functions.php'; + $loader->add('', __DIR__.'/../vendor/symfony/symfony/src/Symfony/Component/Locale/Resources/stubs'); +} +AnnotationRegistry::registerLoader(array($loader, 'loadClass')); diff --git a/app/bootstrap.php b/app/bootstrap.php deleted file mode 100644 index 0c79a67b..00000000 --- a/app/bootstrap.php +++ /dev/null @@ -1,4 +0,0 @@ - diff --git a/bin/vendors b/bin/vendors deleted file mode 100755 index 0c529775..00000000 --- a/bin/vendors +++ /dev/null @@ -1,133 +0,0 @@ -#!/usr/bin/env php - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -set_time_limit(0); - -$rootDir = dirname(__DIR__); -$vendorDir = $rootDir.'/vendor'; - -array_shift($argv); -if (!isset($argv[0])) { - exit(<< $dep) { - $dep = array_map('trim', $dep); - - // install dir - $installDir = isset($dep['target']) ? $vendorDir.'/'.$dep['target'] : $vendorDir.'/'.$name; - if (in_array('--reinstall', $argv)) { - if (defined('PHP_WINDOWS_VERSION_BUILD')) { - system(sprintf('rmdir /S /Q %s', escapeshellarg(realpath($installDir)))); - } else { - system(sprintf('rm -rf %s', escapeshellarg($installDir))); - } - } - - if ('install' === $command || 'update' === $command) { - echo "> Installing/Updating $name\n"; - - // url - if (!isset($dep['git'])) { - exit(sprintf('The "git" value for the "%s" dependency must be set.', $name)); - } - $url = $dep['git']; - - if (!is_dir($installDir)) { - system(sprintf('git clone %s %s', escapeshellarg($url), escapeshellarg($installDir))); - } - - // 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))); - } - - 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()); - } -} - -// update? -if ('update' === $command || 'lock' === $command) { - echo "> Updating deps.lock\n"; - - file_put_contents($rootDir.'/deps.lock', implode("\n", $newversions)); -} - -// php on windows can't use the shebang line from system() -$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))); - -// Update assets -system(sprintf('%s %s assets:install --symlink %s', $interpreter, escapeshellarg($rootDir.'/app/console'), escapeshellarg($rootDir.'/web/'))); - -// Remove the cache -system(sprintf('%s %s cache:clear --no-warmup', $interpreter, escapeshellarg($rootDir.'/app/console'))); \ No newline at end of file diff --git a/composer.json b/composer.json new file mode 100644 index 00000000..cf5c35f5 --- /dev/null +++ b/composer.json @@ -0,0 +1,189 @@ +{ + "name": "knplabs/knpbundles", + "autoload": { + "psr-0": { "": "src/" } + }, + "require": { + "php": ">=5.3.2", + "symfony/symfony": "2.1.*", + "doctrine/orm": "2.2.*", + "doctrine/doctrine-bundle": "*", + "twig/extensions": "*", + "symfony/assetic-bundle": "*", + "symfony/monolog-bundle": "*", + "sensio/distribution-bundle": "*", + "jms/i18n-routing-bundle": "*", + + "behat/behat": "2.3.*", + "behat/behat-bundle": "*", + "behat/mink-bundle": "*", + "behat/common-contexts": "1.1.*", + + "doctrine/doctrine-fixtures-bundle": "*", + "doctrine/doctrine-migrations-bundle": "*", + "stof/doctrine-extensions-bundle": "*", + "knplabs/knp-markdown-bundle": "*", + "knplabs/knp-menu-bundle": "*", + "knplabs/knp-disqus-bundle": "*", + "knplabs/knp-time-bundle": "*", + "knplabs/knp-paginator-bundle": "2.1", + "knplabs/knp-zend-cache-bundle": "*", + "knplabs/github-api": "*", + "avalanche123/imagine-bundle": "*", + "kriswallsmith/buzz": "*", + "nelmio/solarium-bundle": "*", + "igorw/file-serve-bundle": "*", + + "videlalvaro/php-amqplib": "*", + "oldsound/rabbitmq-bundle": "*", + + "fabpot/goutte": "*", + + "ornicar/gravatar-bundle": "*", + "ornicar/php-git-repo": "*", + + "twitter/app-bundle": "*", + "twitter/oauth": "*", + + "mbontemps/oauth-bundle": "*" + }, + + "repositories": [ + { + "type": "composer", + "url": "behat.org" + }, + { + "type": "package", + "package": { + "name": "mbontemps/oauth-bundle", + "version": "master-dev", + "dist": { + "url": "https://github.com/mbontemps/EtcpasswdOAuthBundle/zipball/master", + "type": "zip" + }, + "source": { + "url": "git://github.com/mbontemps/EtcpasswdOAuthBundle.git", + "type": "git", + "reference": "master" + }, + "autoload": { + "psr-0": { "Etcpasswd\\OAuthBundle": "" } + }, + "target-dir": "Etcpasswd/OAuthBundle" + } + }, + { + "type": "package", + "package": { + "name": "twitter/oauth", + "version": "master-dev", + "dist": { + "url": "https://github.com/abraham/twitteroauth/zipball/master", + "type": "zip" + }, + "source": { + "url": "git://github.com/abraham/twitteroauth.git", + "type": "git", + "reference": "master" + } + } + }, + { + "type": "package", + "package": { + "name": "twitter/app-bundle", + "version": "master-dev", + "dist": { + "url": "https://github.com/Inori/InoriTwitterAppBundle/zipball/master", + "type": "zip" + }, + "source": { + "url": "git://github.com/Inori/InoriTwitterAppBundle.git", + "type": "git", + "reference": "master" + }, + "autoload": { + "psr-0": { + "Inori\\TwitterAppBundle": "" + } + }, + "target-dir": "Inori/TwitterAppBundle" + } + }, + { + "type": "package", + "package": { + "name": "ornicar/php-git-repo", + "version": "master-dev", + "dist": { + "url": "http://github.com/ornicar/php-git-repo/zipball/master", + "type": "zip" + }, + "source": { + "url": "git://github.com/ornicar/php-git-repo.git", + "type": "git", + "reference": "master" + }, + "autoload": { + "psr-0" : { + "PHPGit_" : "lib/" + } + } + } + }, + { + "type": "package", + "package": { + "name": "zendframework/zend-cache", + "version": "2.0.0-beta1", + "dist": { + "url": "http://packages.zendframework.com/get/Zend_Cache-2.0.0beta1.tgz", + "type": "pear" + }, + "autoload": { + "psr-0": { + "Zend\\Cache": "php/" + } + } + } + }, + { + "type": "package", + "package": { + "name": "zendframework/zend-filter", + "version": "2.0.0-beta1", + "dist": { + "url": "http://packages.zendframework.com/get/Zend_Filter-2.0.0beta1.tgz", + "type": "pear" + }, + "autoload": { + "psr-0": { + "Zend\\Filter": "php/" + } + } + } + } + ], + + "scripts": { + "post-install-cmd": [ + "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap", + "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache", + "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets" + ], + "post-update-cmd": [ + "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::buildBootstrap", + "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::clearCache", + "Sensio\\Bundle\\DistributionBundle\\Composer\\ScriptHandler::installAssets" + ] + }, + "config": { + "bin-dir": "bin" + }, + "extra": { + "symfony-app-dir": "app", + "symfony-web-dir": "web", + "symfony-assets-install": "symlink" + } +} diff --git a/composer.lock b/composer.lock new file mode 100644 index 00000000..bcee9e3e --- /dev/null +++ b/composer.lock @@ -0,0 +1,283 @@ +{ + "hash": "a66ae0b792b50f13ae97cb2bec94a700", + "packages": [ + { + "package": "avalanche123/imagine-bundle", + "version": "dev-master", + "source-reference": "6c78f56ca8249e5f9d0cdb11e1b0d6723fd411d7" + }, + { + "package": "behat/behat", + "version": "v2.3.5" + }, + { + "package": "behat/behat-bundle", + "version": "dev-master", + "source-reference": "12e75b35f44e4ba911abb34db3d2b3c585d41123" + }, + { + "package": "behat/common-contexts", + "version": "v1.1.1" + }, + { + "package": "behat/gherkin", + "version": "v2.1.1" + }, + { + "package": "behat/mink", + "version": "v1.3.4" + }, + { + "package": "behat/mink-bundle", + "version": "dev-master", + "source-reference": "144c8cbc08e386e70029edae7a73611079e2dca1" + }, + { + "package": "doctrine/common", + "version": "2.2.2" + }, + { + "package": "doctrine/data-fixtures", + "version": "dev-master", + "source-reference": "d233d05437c1a10034867f22069b4bb0f7dc96b6" + }, + { + "package": "doctrine/dbal", + "version": "2.2.x-dev", + "source-reference": "8cc129aa64a8de6447056bce20f0a274fe2a340b" + }, + { + "package": "doctrine/doctrine-bundle", + "version": "dev-master", + "source-reference": "8bbb70369af57a9ba994530f713bcbc29c457830" + }, + { + "package": "doctrine/doctrine-fixtures-bundle", + "version": "dev-master", + "source-reference": "33b267d3068d6c2f8daa0b417285cf76e7f82fc4" + }, + { + "package": "doctrine/doctrine-migrations-bundle", + "version": "dev-master", + "source-reference": "fd6c13e2a918b887dd880479a2dd6dcd3293c611" + }, + { + "package": "doctrine/migrations", + "version": "dev-master", + "source-reference": "fe98141b1e460baf5ab52f9139e1ae238101b28b" + }, + { + "package": "doctrine/orm", + "version": "2.2.x-dev", + "source-reference": "5f66c65c9a8d984899903b54215d0249a45b92d6" + }, + { + "package": "fabpot/goutte", + "version": "dev-master", + "source-reference": "b1e5611edfff95a4872ae6ffc2501dd818b57223" + }, + { + "package": "gedmo/doctrine-extensions", + "version": "dev-master", + "source-reference": "6f7e281b9ddceea440039cecd7ebe8b347daf816" + }, + { + "package": "guzzle/guzzle", + "version": "v2.6.6" + }, + { + "package": "igorw/file-serve-bundle", + "version": "dev-master", + "source-reference": "bc60b0f3ef039a059d207b6be454af9255c4805e" + }, + { + "package": "imagine/Imagine", + "version": "dev-master", + "source-reference": "v0.2.8" + }, + { + "package": "jms/i18n-routing-bundle", + "version": "dev-master", + "source-reference": "cbdff505ecf7e492def127a87e1d7a85b4916557" + }, + { + "package": "jms/translation-bundle", + "version": "dev-master", + "source-reference": "3b96a2560ab26ba30c7ffcc88342c4ef20a597b6" + }, + { + "package": "knplabs/github-api", + "version": "dev-master", + "source-reference": "725bf7c990a3b2bb5e248b700ccf090f51d499f4" + }, + { + "package": "knplabs/knp-components", + "version": "v1.0" + }, + { + "package": "knplabs/knp-disqus-bundle", + "version": "dev-master", + "source-reference": "f018fdaf27ef2d5b888bd118082fcb711cfa35a4" + }, + { + "package": "knplabs/knp-markdown-bundle", + "version": "dev-master", + "source-reference": "d0fac3f6d2ac502386ee73def9cf900029e1d353" + }, + { + "package": "knplabs/knp-menu", + "version": "1.1.x-dev", + "source-reference": "v1.1.2" + }, + { + "package": "knplabs/knp-menu-bundle", + "version": "dev-master", + "source-reference": "v1.1.0" + }, + { + "package": "knplabs/knp-paginator-bundle", + "version": "v2.1" + }, + { + "package": "knplabs/knp-time-bundle", + "version": "dev-master", + "source-reference": "f05a3f4da5369c2fb87610dca27fd3cb2f27a80a" + }, + { + "package": "knplabs/knp-zend-cache-bundle", + "version": "dev-master", + "source-reference": "0.1" + }, + { + "package": "kriswallsmith/assetic", + "version": "dev-master", + "alias-pretty-version": "1.1.x-dev", + "alias-version": "1.1.9999999.9999999-dev" + }, + { + "package": "kriswallsmith/assetic", + "version": "dev-master", + "source-reference": "d6f89a3170c5280ad554347dc113eb25fdf00ad7" + }, + { + "package": "kriswallsmith/buzz", + "version": "v0.6" + }, + { + "package": "mbontemps/oauth-bundle", + "version": "master-dev", + "source-reference": "master" + }, + { + "package": "monolog/monolog", + "version": "1.1.0" + }, + { + "package": "nelmio/solarium-bundle", + "version": "dev-master", + "source-reference": "d0d80a702eae4699bb6010ec3a6bc29eec0b8e55" + }, + { + "package": "nikic/php-parser", + "version": "v0.9.1" + }, + { + "package": "oldsound/rabbitmq-bundle", + "version": "dev-master", + "source-reference": "ef478f19bd02cc938b304093161d9ecb70b7a416" + }, + { + "package": "ornicar/gravatar-bundle", + "version": "dev-master", + "source-reference": "e5aedca3bd066081e16912ca8be96ba4ca570d0a" + }, + { + "package": "ornicar/php-git-repo", + "version": "master-dev", + "source-reference": "master" + }, + { + "package": "sensio/distribution-bundle", + "version": "dev-master", + "source-reference": "7d75b222c8e4ead64ff82e5c9b2fa3ba71c70cf0" + }, + { + "package": "solarium/solarium", + "version": "dev-master", + "source-reference": "2.4.0" + }, + { + "package": "stof/doctrine-extensions-bundle", + "version": "dev-master", + "source-reference": "f141a698d65271a18d86469c1f7b29d7e24170dd" + }, + { + "package": "symfony/assetic-bundle", + "version": "dev-master", + "source-reference": "ca447e29f8ee2d38643f2f3a9faae1164aa708fb" + }, + { + "package": "symfony/monolog-bundle", + "version": "dev-master", + "source-reference": "0b5046d3d1ef93cd59ceabfa37de2665f5118c7f" + }, + { + "package": "symfony/symfony", + "version": "dev-master", + "alias-pretty-version": "2.1.x-dev", + "alias-version": "2.1.9999999.9999999-dev" + }, + { + "package": "symfony/symfony", + "version": "dev-master", + "source-reference": "faccd25c0fcf65b2362baefac6d7370a3c4e78ed" + }, + { + "package": "twig/extensions", + "version": "dev-master", + "source-reference": "feb6d3f10c411e2631997c0a905aa581c80305c1" + }, + { + "package": "twig/twig", + "version": "dev-master", + "alias-pretty-version": "1.8.x-dev", + "alias-version": "1.8.9999999.9999999-dev" + }, + { + "package": "twig/twig", + "version": "dev-master", + "source-reference": "4679ad51c5390648b7ea4c8f0ecd2c0c344145ba" + }, + { + "package": "twitter/app-bundle", + "version": "master-dev", + "source-reference": "master" + }, + { + "package": "twitter/oauth", + "version": "master-dev", + "source-reference": "master" + }, + { + "package": "videlalvaro/php-amqplib", + "version": "dev-master", + "source-reference": "e98ca899d867633cd8aa2ef04e8e9e6147d21df8" + }, + { + "package": "zendframework/zend-cache", + "version": "2.0.0-beta1" + }, + { + "package": "zendframework/zend-filter", + "version": "2.0.0-beta1" + } + ], + "packages-dev": null, + "aliases": [ + + ], + "minimum-stability": "dev", + "stability-flags": [ + + ] +} diff --git a/deps b/deps deleted file mode 100644 index 2e6a615e..00000000 --- a/deps +++ /dev/null @@ -1,184 +0,0 @@ -[symfony] - git=http://github.com/symfony/symfony.git - -[twig] - git=http://github.com/fabpot/Twig.git - version=origin/master - -[twig-extensions] - git=http://github.com/fabpot/Twig-extensions.git - -[monolog] - git=http://github.com/Seldaek/monolog.git - version=1.0.2 - -[doctrine-common] - git=http://github.com/doctrine/common.git - version=origin/master - -[doctrine-dbal] - git=http://github.com/doctrine/dbal.git - version=origin/master - -[doctrine] - git=http://github.com/doctrine/doctrine2.git - version=origin/master - -[doctrine-data-fixtures] - git=http://github.com/doctrine/data-fixtures.git - -[doctrine-migrations] - git=http://github.com/doctrine/migrations.git - -[DoctrineBundle] - git=http://github.com/doctrine/DoctrineBundle.git - target=bundles/Doctrine/Bundle/DoctrineBundle - -[DoctrineFixturesBundle] - git=http://github.com/doctrine/DoctrineFixturesBundle.git - target=bundles/Doctrine/Bundle/FixturesBundle - -[DoctrineMigrationsBundle] - git=http://github.com/doctrine/DoctrineMigrationsBundle.git - target=bundles/Doctrine/Bundle/MigrationsBundle - -[assetic] - git=http://github.com/kriswallsmith/assetic.git - version=v1.0.2 - -[JMSI18nBundle] - git=http://github.com/schmittjoh/JMSI18nRoutingBundle.git - target=bundles/JMS/I18nRoutingBundle - -[SensioDistributionBundle] - git=http://github.com/sensio/SensioDistributionBundle.git - target=bundles/Sensio/Bundle/DistributionBundle - -[SensioGeneratorBundle] - git=http://github.com/sensio/SensioGeneratorBundle.git - target=bundles/Sensio/Bundle/GeneratorBundle - -[AsseticBundle] - git=http://github.com/symfony/AsseticBundle.git - target=bundles/Symfony/Bundle/AsseticBundle - version=v1.0.1 - -[KnpTimeBundle] - git=http://github.com/KnpLabs/KnpTimeBundle.git - target=bundles/Knp/Bundle/TimeBundle - -[KnpMenu] - git=http://github.com/KnpLabs/KnpMenu.git - target=knp-menu - -[KnpMenuBundle] - git=http://github.com/KnpLabs/KnpMenuBundle.git - target=bundles/Knp/Bundle/MenuBundle - -[KnpPaginatorBundle] - git=http://github.com/KnpLabs/KnpPaginatorBundle.git - target=bundles/Knp/Bundle/PaginatorBundle - -[goutte] - git=http://github.com/fabpot/Goutte.git - -[php-git-repo] - git=http://github.com/mbontemps/php-git-repo.git - version=origin/cloneUrl - -[php-github-api] - git=http://github.com/KnpLabs/php-github-api.git - version=origin/master - -[OrnicarGravatarBundle] - git=http://github.com/ornicar/GravatarBundle.git - target=bundles/Ornicar/GravatarBundle - -[knp-components] - git=http://github.com/KnpLabs/knp-components.git - -[zf] - git=http://github.com/zendframework/zf2.git - -[EtcpasswdOAuthBundle] - git=http://github.com/mbontemps/EtcpasswdOAuthBundle.git - target=bundles/Etcpasswd/OAuthBundle - -[Buzz] - git=http://github.com/kriswallsmith/Buzz.git - target=buzz - -[TwitterAppBundle] - git=http://github.com/Inori/InoriTwitterAppBundle.git - target=bundles/Inori/TwitterAppBundle - -[twitteroauth] - git=http://github.com/abraham/twitteroauth.git - target=twitteroauth - -[gherkin] - git=https://github.com/Behat/Gherkin.git - target=/behat/gherkin - version=v2.1.0 - -[behat] - git=https://github.com/Behat/Behat.git - target=/behat/behat - version=v2.3.5 - -[BehatBundle] - git=https://github.com/Behat/BehatBundle.git - target=bundles/Behat/BehatBundle - -[mink] - git=https://github.com/Behat/Mink.git - target=behat/mink - version=v1.3.* - -[MinkBundle] - git=https://github.com/Behat/MinkBundle.git - target=bundles/Behat/MinkBundle - -[CommonContexts] - git=http://github.com/Behat/CommonContexts.git - target=behat/CommonContexts - -[KnpDisqusBundle] - git=http://github.com/KnpLabs/KnpDisqusBundle.git - target=bundles/Knp/Bundle/DisqusBundle - -[KnpZendCacheBundle] - git=http://github.com/KnpLabs/KnpZendCacheBundle.git - target=bundles/Knp/Bundle/ZendCacheBundle - -[RabbitMqBundle] - git=http://github.com/videlalvaro/RabbitMqBundle.git - target=bundles/OldSound/RabbitMqBundle - -[php-amqplib] - git=http://github.com/videlalvaro/php-amqplib.git - target=videlalvaro/php-amqplib - -[MonologBundle] - git=https://github.com/symfony/MonologBundle.git - target=bundles/Symfony/Bundle/MonologBundle - -[Imagine] - git=http://github.com/avalanche123/Imagine.git - target=imagine - -[FileServeBundle] - git=http://github.com/igorw/IgorwFileServeBundle.git - target=bundles/Igorw/FileServeBundle - -[solarium] - git=http://github.com/basdenooijer/solarium.git - version=origin/develop - -[NelmioSolariumBundle] - git=http://github.com/nelmio/NelmioSolariumBundle.git - target=bundles/Nelmio/SolariumBundle - -[KnpMarkdownBundle] - git=http://github.com/KnpLabs/KnpMarkdownBundle.git - target=bundles/Knp/Bundle/MarkdownBundle diff --git a/deps.lock b/deps.lock deleted file mode 100644 index 44c68d7d..00000000 --- a/deps.lock +++ /dev/null @@ -1,46 +0,0 @@ -symfony 632077aa819d0321e74a2f1b9d388af88bdcac0d -twig f034073feddb178e87b10380a8fc2f6aedb9e8b9 -twig-extensions 1dfff8e793f50f651c4f74f796c2c68a4aee3147 -monolog b704c49a3051536f67f2d39f13568f74615b9922 -doctrine-common ad2a3385ec88ae4f1c7456aa07a926e6376f219a -doctrine-dbal 636286f1a573b3fa4f6020b08bb4102745d64fc0 -doctrine 694d0911c97ea6332a4db94b947c374a8ad9a554 -doctrine-data-fixtures aea0b95a554188892f10d8f09ce3ae8150f28f8b -doctrine-migrations 9e81984b0f126b0830d9ac6acc2d1da81aba2b94 -DoctrineBundle 90e39fb7ff5b4c13577602dab7e08c90067160b4 -DoctrineFixturesBundle 0e4e56b1da7981bcc7729e0f301a75195d34df18 -DoctrineMigrationsBundle 9690dfba714fa82f3979fb5fa18750a37ab16e1c -assetic f829ad23d23c87480151a21faad49fefe7c09e5d -JMSI18nBundle 4ec703ec94a06cc0630a29f393cbbf2bc22f0919 -SensioDistributionBundle 12882a093af81f89ac13078904e81c308784e883 -SensioGeneratorBundle 43c5c95e42e451ac7250d6a863f0540c7f266e1d -AsseticBundle 41b5913b5086a0909af92adcb4a6005ee0051b16 -KnpMarkdownBundle 8a7637054b945c2fd5fbeece2cf98139fb79d8f3 -KnpTimeBundle 9f0e457939405e4bfeed30efd0dcf407518b433d -KnpMenu f818c58d89885c5eb1e305f5b7360588fd49fbab -KnpMenuBundle 462b7b40e5c17813a6d14929d7bca7d0511c7736 -KnpPaginatorBundle 73658a5bb2aa220417138255031061af2331db78 -goutte dd59ba9ac4e7b7476987c07befe3e90cff0bd714 -php-git-repo 4a066703de97b1649b4cf92b27a7c3e3d8987cac -php-github-api 725bf7c990a3b2bb5e248b700ccf090f51d499f4 -OrnicarGravatarBundle e5aedca3bd066081e16912ca8be96ba4ca570d0a -knp-components e4e43a3160042a4d07bf6b7c81b02eeb6a94a397 -zf ffc97f825b08225a7eb564f5097a7c1ed8e0d3e3 -EtcpasswdOAuthBundle d2ef2f8f9c66e4b5cf21a8bed58f44c982a0442b -TwitterAppBundle 9d0437f5114d83d41fbd2d06897223dffd075190 -twitteroauth 67b0a5a57783a4ef70bb79eee4e650c70b4ba970 -gherkin 8ac3383094d83b2f132960b52f6f39a2600cc9ec -behat 612f642a46b94daab40820192667f58ec3463132 -BehatBundle 55ede38ec9694d67c7bc51e910f7009978421a56 -mink edbee099723b1b94cd56651ae4667d647d31e36e -MinkBundle 4f68c897b5a0b0414d3fad9b282a2a8885136cad -CommonContexts 315427259ba985dcab9efea27bffe14829f518d6 -KnpDisqusBundle fe9bdc034ef0177facfe57b6fcbd589be7385285 -KnpZendCacheBundle fe85a7caefedcb962e3f0093a161b293872630ad -RabbitMqBundle f6445361c8abef57eed0f15febe596b35e8a266b -php-amqplib 18d5c146a8e211ffcd22007c3d099f88b91563f9 -MonologBundle 289442e385e7c0fe4aa2e8884d11e774a8f9ad99 -Imagine 45f0b8e6568b0bca99ae4d4ae6771b69ca6da0dd -FileServeBundle c11af119eb634d4c16270ebb295dd1038ceb9458 -solarium 72ffa0568167252a352028ce4b2f360c0bd07848 -NelmioSolarumBundle f1f0c436e727e28acd209c5c9e1176a8ae306ea6 \ No newline at end of file diff --git a/src/Knp/Bundle/KnpBundlesBundle/Tests/Commands/KbGenerateBadgesCommandTest.php b/src/Knp/Bundle/KnpBundlesBundle/Tests/Commands/KbGenerateBadgesCommandTest.php index ab1473b0..820b42b8 100644 --- a/src/Knp/Bundle/KnpBundlesBundle/Tests/Commands/KbGenerateBadgesCommandTest.php +++ b/src/Knp/Bundle/KnpBundlesBundle/Tests/Commands/KbGenerateBadgesCommandTest.php @@ -6,6 +6,7 @@ use Symfony\Component\Console\Tester\CommandTester; use Symfony\Bundle\FrameworkBundle\Console\Application; +use Imagine\Exception\RuntimeException; use Knp\Bundle\KnpBundlesBundle\Command\KbGenerateBadgesCommand; class KbGenerateBadgesCommandTest extends \PHPUnit_Framework_TestCase @@ -30,10 +31,18 @@ public function testBadgeGenerator() $application = new Application($kernel); $application->add(new KbGenerateBadgesCommand()); - $command = $application->find('kb:generate:badges'); - $commandTester = new CommandTester($command); - $commandTester->execute(array('command' => $command->getName())); - - $this->assertRegExp('/generated/', $commandTester->getDisplay()); + try { + $command = $application->find('kb:generate:badges'); + $commandTester = new CommandTester($command); + $commandTester->execute(array('command' => $command->getName())); + + $this->assertRegExp('/generated/', $commandTester->getDisplay()); + } catch (RuntimeException $e) { + if ('GD is not compiled with FreeType support' == $e->getMessage()) { + $this->markTestSkipped('GD is not compiled with FreeType support'); + } else { + throw $e; + } + } } } diff --git a/web/app.php b/web/app.php index 7bc27d21..b7dd9bb1 100755 --- a/web/app.php +++ b/web/app.php @@ -1,10 +1,15 @@ handle(Request::createFromGlobals())->send(); +$kernel = new AppKernel('prod', false); +$kernel->loadClassCache(); +//$kernel = new AppCache($kernel); +$request = Request::createFromGlobals(); +$response = $kernel->handle($request); +$response->send(); +$kernel->terminate($request, $response); \ No newline at end of file diff --git a/web/app_dev.php b/web/app_dev.php index 7fb61825..1c6f4949 100644 --- a/web/app_dev.php +++ b/web/app_dev.php @@ -6,10 +6,14 @@ die('You are not allowed to access this file. Check '.basename(__FILE__).' for more information.'); } -require_once __DIR__.'/../app/bootstrap.php'; +require_once __DIR__.'/../app/bootstrap.php.cache'; require_once __DIR__.'/../app/AppKernel.php'; use Symfony\Component\HttpFoundation\Request; $kernel = new AppKernel('dev', true); -$kernel->handle(Request::createFromGlobals())->send(); +$kernel->loadClassCache(); +$request = Request::createFromGlobals(); +$response = $kernel->handle($request); +$response->send(); +$kernel->terminate($request, $response); \ No newline at end of file