https://speakerdeck.com/benjam1/adoptez-le-tdd-sur-vos-projets-symfony2-existants
http://davidbu.ch/slides/20130404-sflive_phpcr.html
https://dl.dropboxusercontent.com/u/581816/sflive_Paris_2013_DIC_-_Thomas_Rabaix.pdf
<?php | |
protected function execute(InputInterface $input, OutputInterface $output) | |
{ | |
$progress = $this->getHelperSet()->get('progress'); | |
$ctx = stream_context_create(array(), array('notification' => function ($notification_code, $severity, $message, $message_code, $bytes_transferred, $bytes_max) use ($output, $progress) { | |
switch ($notification_code) { | |
case STREAM_NOTIFY_FILE_SIZE_IS: | |
$progress->start($output, $bytes_max); | |
break; |
#!/bin/bash | |
# Put this file at: .git/hooks/post-checkout | |
# and make it executable | |
# You can install it system wide too, see http://stackoverflow.com/a/2293578/685587 | |
PREV_COMMIT=$1 | |
POST_COMMIT=$2 | |
NOCOLOR='\e[0m' |
function retry(isDone, next) { | |
var current_trial = 0, max_retry = 50, interval = 10, is_timeout = false; | |
var id = window.setInterval( | |
function() { | |
if (isDone()) { | |
window.clearInterval(id); | |
next(is_timeout); | |
} | |
if (current_trial++ > max_retry) { | |
window.clearInterval(id); |
class MoneyType extends AbstractType implements DataMapperInterface | |
{ | |
public function buildForm(FormBuilder $builder, array $options) | |
{ | |
$builder | |
->add('amount', 'integer') | |
->add('currency', 'string') | |
->setDataMapper($this) | |
; | |
} |
#!/bin/sh | |
# For each sub-package, run the Satis build command. | |
php bin/satis build repositories-mirrors.json ./web/mirrors | |
php bin/satis build repositories-pear.json ./web/pear | |
php bin/satis build repositoriesp-rojects.json ./web/projects | |
# Merge all the package files. | |
php web/packages.php > web/packages.json |
In this gist I would like to describe an idea for GraphQL subscriptions. It was inspired by conversations about subscriptions in the GraphQL slack channel and different GH issues, like #89 and #411.
At the moment GraphQL allows 2 types of queries:
query
mutation
Reference implementation also adds the third type: subscription
. It does not have any semantics yet, so here I would like to propose one possible semantics interpretation and the reasoning behind it.
<?php | |
class ResourceAutocompleteType extends AbstractType | |
{ | |
// ... | |
private $resourceName; | |
public function __construct($resourceName) | |
{ |