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
<?php | |
$app->register(new Silex\Provider\TwigServiceProvider(), array( | |
'twig.path' => __DIR__.'/views', | |
'twig.options' => array( | |
'cache' => __DIR__.'/../data/cache/twig', | |
'auto_reload' => true, | |
'strict_variables' => false, | |
), | |
)); |
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
language: php | |
env: | |
- SYMFONY_DEPS_VERSION=2.1 | |
- SYMFONY_DEPS_VERSION=2.2 | |
before_script: | |
# symfony/* | |
- sh -c "if [ '$SYMFONY_DEPS_VERSION' = '2.2' ]; then sed -i 's/>=2.1,<2.3-dev/2.2.*@dev/g' composer.json; composer require --no-update 'symfony/property-access:2.2.*@dev'; composer update --dev --prefer-source; fi" | |
- sh -c "if [ '$SYMFONY_DEPS_VERSION' = '2.1' ]; then sed -i 's/>=2.1,<2.3-dev/2.1.*@dev/g' composer.json; composer update --dev --prefer-source; fi" |
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
<?php | |
function lazyProxyFactoryMethodFunctionPartialApplicationOfPimple($app, $id, $method) | |
{ | |
return function() { | |
return call_user_func_array(array($app[$id], $method), func_get_args()); | |
} | |
} | |
// test for diff |
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
<?php | |
class FooConverter | |
{ | |
public function convert($value) {} | |
} | |
$app = new Silex\Application; | |
$app['converters.foo'] = function($value) { |
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
#!/bin/zsh | |
autoload colors | |
colors | |
function test_version() { | |
echo "Attempting to test against Symfony $1" | |
git reset HEAD --hard |
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
diff --git a/silex/app.php b/silex/app.php | |
index c72525c..172d4a1 100644 | |
--- a/silex/app.php | |
+++ b/silex/app.php | |
@@ -16,8 +16,6 @@ $app = new Application(); | |
*/ | |
$app['locale'] = 'en'; | |
$app['session.default_locale'] = $app['locale']; | |
-$app['translator.messages'] = require __DIR__ . '/resources/locales/translations.php'; | |
-$app['languages'] = array_keys($app['translator.messages']); |
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
<?php | |
namespace Dave { | |
class IsAce {} | |
} | |
namespace { | |
var_dump(class_exists('IsAce', false)); // bool(false) | |
} |
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
<?php | |
public function __call($name, array $args) | |
{ | |
$this->setOption('_' . $name, $args); | |
return $this; | |
} |
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
<?php | |
$app = include __DIR__.'/../app/bootstrap.php'; | |
$app->run(); |
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
. | |
├── app | |
├── bin | |
├── chef | |
├── data | |
├── docs | |
├── features | |
├── migrations | |
├── public | |
├── src |