Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
73 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -1 +1,5 @@ | |||
/phpunit.xml | /phpunit.xml | ||
/tests/autoload.php | |||
/vendor/twig | |||
/vendor/pimple | |||
/vendor/Symfony |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,5 @@ | |||
language: php | |||
php: | |||
- 5.3 | |||
- 5.4 | |||
before_script: php vendor/vendors.php |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,25 @@ | |||
<?php | |||
|
|||
$twig = __DIR__.'/../vendor/twig/lib/Twig/Autoloader.php'; | |||
if (file_exists($twig)) { | |||
require_once $twig; | |||
Twig_Autoloader::register(); | |||
} | |||
|
|||
$pimple = __DIR__.'/../vendor/pimple/lib/Pimple.php'; | |||
if (file_exists($pimple)) { | |||
require_once $pimple; | |||
} | |||
|
|||
spl_autoload_register(function($class) { | |||
$namespaces = array('Knp\Menu\Tests' => __DIR__, 'Knp\Menu' => __DIR__.'/../src', 'Symfony' => __DIR__.'/../vendor/'); | |||
$class = ltrim($class, '\\'); | |||
foreach ($namespaces as $namespace => $dir) { | |||
if (0 === strpos($class, $namespace)) { | |||
$file = $dir.'/'.str_replace('\\', '/', $class).'.php'; | |||
if (file_exists($file)) { | |||
require $file; | |||
} | |||
} | |||
} | |||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -1,26 +1,7 @@ | |||
<?php | <?php | ||
|
|
||
if (defined('TWIG_LIB_DIR') && 'NOT_SET' !== TWIG_LIB_DIR) { | if (file_exists($file = __DIR__.'/autoload.php')) { | ||
require_once TWIG_LIB_DIR.'/Twig/Autoloader.php'; | require_once $file; | ||
Twig_Autoloader::register(); | } elseif (file_exists($file = __DIR__.'/autoload.php.dist')) { | ||
require_once $file; | |||
} | } | ||
|
|||
if (defined('PIMPLE_LIB_DIR') && 'NOT_SET' !== PIMPLE_LIB_DIR) { | |||
require_once PIMPLE_LIB_DIR.'/Pimple.php'; | |||
} | |||
|
|||
spl_autoload_register(function($class) { | |||
$namespaces = array('Knp\Menu\Tests' => __DIR__, 'Knp\Menu' => __DIR__.'/../src'); | |||
if (defined('SYMFONY_SRC_DIR') && 'NOT_SET' !== SYMFONY_SRC_DIR) { | |||
$namespaces['Symfony'] = SYMFONY_SRC_DIR; | |||
} | |||
$class = ltrim($class, '\\'); | |||
foreach ($namespaces as $namespace => $dir) { | |||
if (0 === strpos($class, $namespace)) { | |||
$file = $dir.'/'.str_replace('\\', '/', $class).'.php'; | |||
if (file_exists($file)) { | |||
require $file; | |||
} | |||
} | |||
} | |||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Original file line | Diff line number | Diff line change |
---|---|---|---|
@@ -0,0 +1,33 @@ | |||
#!/usr/bin/env php | |||
<?php | |||
|
|||
/* | |||
* This file is part of the FOSUserBundle package. | |||
* | |||
* (c) FriendsOfSymfony <http://friendsofsymfony.github.com/> | |||
* | |||
* For the full copyright and license information, please view the LICENSE | |||
* file that was distributed with this source code. | |||
*/ | |||
|
|||
set_time_limit(0); | |||
|
|||
$vendorDir = __DIR__; | |||
$deps = array( | |||
array('Symfony/Component/Routing', 'http://github.com/symfony/Routing.git', 'origin/master'), | |||
array('twig', 'http://github.com/fabpot/Twig.git', 'origin/master'), | |||
array('pimple', 'http://github.com/fabpot/Pimple.git', 'origin/master'), | |||
); | |||
|
|||
foreach ($deps as $dep) { | |||
list($name, $url, $rev) = $dep; | |||
|
|||
echo "> Installing/Updating $name\n"; | |||
|
|||
$installDir = $vendorDir.'/'.$name; | |||
if (!is_dir($installDir)) { | |||
system(sprintf('git clone -q %s %s', escapeshellarg($url), escapeshellarg($installDir))); | |||
} | |||
|
|||
system(sprintf('cd %s && git fetch -q origin && git reset --hard %s', escapeshellarg($installDir), escapeshellarg($rev))); | |||
} |
d55791b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mbontemps Could you register the library in Travis ?
d55791b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It should be effective at next commit…
d55791b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you could even force the run from the admin panel of the repo (in the hook section) so that it runs
d55791b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mbontemps why adding it twice, as knpEdgar and knplabs ? This duplicates the notifications.
d55791b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
knpEdgar is a temporary account I needed because AFAIK you can't create an account for an organization…
But it seems that you can "cheat" by providing manually a travis hook… associated to a user.
d55791b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, travis does not support configuring the hook for our organizations in their UI. This may be done in the future as the github API allow them to access the needed data but I guess it is not the higher priority as there is already a way to do this.