This file contains hidden or 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
<target name="loadVersion"> | |
<loadfile property="version.full" file="VERSION.txt"/> | |
<php expression="count(explode('.','${version.full}',3))" returnProperty="version.segments"/> | |
<if> | |
<not><equals arg1="${version.segments}" arg2="3" /></not> | |
<then><fail message="Bad version number!"/></then> | |
</if> | |
<php expression="(int)explode('.','${version.full}',3)[0]" returnProperty="version.major"/> | |
<php expression="(int)explode('.','${version.full}',3)[1]" returnProperty="version.minor"/> | |
<php expression="(int)explode('.','${version.full}',3)[2]" returnProperty="version.rev"/> |
This file contains hidden or 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
➜ symfony git:(feature_zerofil_form_datetypes) ✗ phpunit DateTypeTest src/Symfony/Component/Form/Tests/Extension/Core/Type/DateTypeTest.php | |
PHPUnit 4.1.3 by Sebastian Bergmann. | |
Configuration read from /Volumes/Stuff/Code/Playground/symfony/phpunit.xml.dist | |
SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS | |
Time: 72 ms, Memory: 5.75Mb | |
OK, but incomplete, skipped, or risky tests! |
This file contains hidden or 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
Time: 4.04 minutes, Memory: 879.00Mb | |
There were 5 errors: | |
1) Symfony\Component\Locale\Tests\LocaleTest::testGetDisplayCountriesForSwitzerland | |
Symfony\Component\Intl\Exception\InvalidArgumentException: Only the locale "en" is supported. | |
/Volumes/Stuff/Code/Playground/symfony/src/Symfony/Component/Intl/ResourceBundle/Reader/PhpBundleReader.php:30 | |
/Volumes/Stuff/Code/Playground/symfony/src/Symfony/Component/Intl/ResourceBundle/Reader/BufferedBundleReader.php:49 | |
/Volumes/Stuff/Code/Playground/symfony/src/Symfony/Component/Intl/ResourceBundle/Reader/StructuredBundleReader.php:61 |
This file contains hidden or 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
#!/usr/bin/env php | |
<?php | |
// Read prefs file | |
$prefsRaw = file_get_contents('/Users/ ** USERNAME ** /Library/Application Support/Google/Chrome/Default/Preferences'); | |
$prefsJson = json_decode($prefsRaw); | |
// Rewrite (or create) "pinned_tabs" with fixed list of urls. | |
$myUrls = array( |
This file contains hidden or 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 | |
/** | |
* Sets the stdout and stderr streams if they are not already set. | |
*/ | |
private static function initializeOutputStreams() { | |
if (self::$out === null) { | |
if (!defined('STDOUT')) { | |
self::$out = new OutputStream(fopen('php://stdout', 'w')); | |
} else { |
This file contains hidden or 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
public function run() | |
{ | |
$handler = new Place_handler(); | |
$collection = $handler->getCollection(); | |
$cursor = $handler->find(); | |
$total = $cursor->count(); | |
$count = 0; | |
foreach ($cursor as $doc) { |
This file contains hidden or 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
protected static function getConstantValues($prefix = '') | |
{ | |
$refl = new ReflectionClass(get_called_class()); | |
$allConstants = $refl->getConstants(); | |
if ($prefix != '') { | |
$prefixLength = strlen($prefix); | |
$filteredList = array(); | |
foreach ($allConstants as $key => $value) { | |
if (substr($key, 0, $prefixLength) == $prefix) { |