Commit 569f1aed authored by Benjamin Eberlei's avatar Benjamin Eberlei

Merge pull request #281 from Ocramius/doctrine-common-2.4

Upgrading doctrine/common 2.4 (via composer)
parents fd45c6f6 65dccc0f
...@@ -10,13 +10,13 @@ env: ...@@ -10,13 +10,13 @@ env:
- DB=mysqli - DB=mysqli
before_script: before_script:
- composer update --dev --prefer-source
- sh -c "if [ '$DB' = 'pgsql' ]; then psql -c 'DROP DATABASE IF EXISTS doctrine_tests;' -U postgres; fi" - sh -c "if [ '$DB' = 'pgsql' ]; then psql -c 'DROP DATABASE IF EXISTS doctrine_tests;' -U postgres; fi"
- sh -c "if [ '$DB' = 'pgsql' ]; then psql -c 'DROP DATABASE IF EXISTS doctrine_tests_tmp;' -U postgres; fi" - sh -c "if [ '$DB' = 'pgsql' ]; then psql -c 'DROP DATABASE IF EXISTS doctrine_tests_tmp;' -U postgres; fi"
- sh -c "if [ '$DB' = 'pgsql' ]; then psql -c 'create database doctrine_tests;' -U postgres; fi" - sh -c "if [ '$DB' = 'pgsql' ]; then psql -c 'create database doctrine_tests;' -U postgres; fi"
- sh -c "if [ '$DB' = 'pgsql' ]; then psql -c 'create database doctrine_tests_tmp;' -U postgres; fi" - sh -c "if [ '$DB' = 'pgsql' ]; then psql -c 'create database doctrine_tests_tmp;' -U postgres; fi"
- sh -c "if [ '$DB' = 'mysql' ]; then mysql -e 'create database IF NOT EXISTS doctrine_tests_tmp;create database IF NOT EXISTS doctrine_tests;'; fi" - sh -c "if [ '$DB' = 'mysql' ]; then mysql -e 'create database IF NOT EXISTS doctrine_tests_tmp;create database IF NOT EXISTS doctrine_tests;'; fi"
- sh -c "if [ '$DB' = 'mysqli' ]; then mysql -e 'create database IF NOT EXISTS doctrine_tests_tmp;create database IF NOT EXISTS doctrine_tests;'; fi" - sh -c "if [ '$DB' = 'mysqli' ]; then mysql -e 'create database IF NOT EXISTS doctrine_tests_tmp;create database IF NOT EXISTS doctrine_tests;'; fi"
- git submodule update --init
script: phpunit --configuration tests/travis/$DB.travis.xml script: phpunit --configuration tests/travis/$DB.travis.xml
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
], ],
"require": { "require": {
"php": ">=5.3.2", "php": ">=5.3.2",
"doctrine/common": "2.3.*" "doctrine/common": ">=2.3.0,<2.5-dev"
}, },
"autoload": { "autoload": {
"psr-0": { "Doctrine\\DBAL": "lib/" } "psr-0": { "Doctrine\\DBAL": "lib/" }
......
...@@ -6,17 +6,12 @@ namespace Doctrine\Tests; ...@@ -6,17 +6,12 @@ namespace Doctrine\Tests;
error_reporting(E_ALL | E_STRICT); error_reporting(E_ALL | E_STRICT);
require_once __DIR__ . '/../../../lib/vendor/doctrine-common/lib/Doctrine/Common/ClassLoader.php'; if (file_exists(__DIR__ . '/../../../vendor/autoload.php')) {
$loader = require_once __DIR__ . '/../../../vendor/autoload.php';
$classLoader = new \Doctrine\Common\ClassLoader('Doctrine\Common', __DIR__ . '/../../../lib/vendor/doctrine-common/lib'); } elseif (file_exists(__DIR__ . '/../../../../../autoload.php')) {
$classLoader->register(); $loader = require __DIR__ . '/../../../vendor/autoload.php';
} else {
$classLoader = new \Doctrine\Common\ClassLoader('Doctrine\DBAL', __DIR__ . '/../../../lib'); throw new \RuntimeException('Could not locate composer autoloader');
$classLoader->register(); }
$classLoader = new \Doctrine\Common\ClassLoader('Doctrine\Tests', __DIR__ . '/../../');
$classLoader->register();
$classLoader = new \Doctrine\Common\ClassLoader('Symfony', __DIR__ . "/../../../lib/vendor");
$classLoader->register();
$loader->add('Doctrine\Tests', __DIR__ . '/../../');
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment