Skip to content

Instantly share code, notes, and snippets.

View weaverryan's full-sized avatar

Ryan Weaver weaverryan

View GitHub Profile
@weaverryan
weaverryan / composer.json
Created July 12, 2013 19:28
composer.json for Behat and Moodle
{
"require": {
"behat/mink": "1.4@stable",
"behat/mink-goutte-driver": "*",
"behat/mink-selenium2-driver": "*",
"behat/behat": "2.4@stable",
"behat/mink-extension": "*",
"guzzle/guzzle": "3.5",
"moodlehq/behat-extension": "1.*"
},
@weaverryan
weaverryan / gender-neutral.txt
Created December 3, 2013 17:56
Gender-Neutral Tech doc changes
Symfony: https://github.com/symfony/symfony-docs/commit/0bcc16bf9b8f67c349b12a17d88d5fa8251f51d0
Django: https://github.com/django/django/commit/c0a2daad78c66def2ce6592977b78dab6475dd53
Rails: https://github.com/rails/rails/commit/6f0fb7ba25b288ed8930b117a5db51123e6df582
libuv: https://github.com/joyent/libuv/pull/1015/files
@weaverryan
weaverryan / README.md
Last active May 20, 2016 17:16
SymfonyCon 2013 Documentation Hackday Details!

It's a Doc Hack Day!

Whether you're in Warsaw or remote and no matter what you're level of Symfony or how you feel about your English (I'm sure it's just fine), we have plenty of things we need help with! This document will guide you through everything:

Where are we meeting?

In Warsaw of course! But also on Freenode in the #symfony-docs channel. Come hang out!

What can I work on?

<?php
$builder->add(
$builder->create('issue', 'text')
->addModelTransformer(new CallbackTransformer(
function($val) { return 'foo'; },
function($val) { return 'bar'; },
))
);
@weaverryan
weaverryan / FeatureContext.php
Created January 22, 2014 23:27
The Symfony2Extension
<?php
// ...
use Behat\MinkExtension\Context\MinkContext;
use Behat\Symfony2Extension\Context\KernelAwareInterface;
use Symfony\Component\HttpKernel\KernelInterface;
class FeatureContext extends MinkContext implements KernelAwareInterface
{
private $kernel;
@weaverryan
weaverryan / README.md
Last active August 29, 2015 14:03
Welcome to the Symfony Community Hack Day May 23rd, 2015

It's a Community Hack Day!

Welcome! No matter what you're level of Symfony, we have plenty of things we need help with! This document will guide you through everything:

Where are we meeting?

We're meeting on Freenode in the #symfony-docs channel. Come hang out!

What can I work on?

@weaverryan
weaverryan / output.md
Created July 5, 2014 12:28
Example Table for Dcotrine command
Name Type Length nullable unique
firstName string 255 false false
email string 128 false true
@weaverryan
weaverryan / do-it.md
Last active August 29, 2015 14:10
OS Binge Sunday
@weaverryan
weaverryan / UniversityExtension.php
Last active July 9, 2018 16:16
Twig Extension with ContainerInterface injected
<?php
class UniversityExtension extends \Twig_Extension
{
private $container;
/**
* An internal cache used to prevent creating this chain loader multiple times
*/
private $twigChainLoader;
@weaverryan
weaverryan / ApiTestCase.php
Last active September 23, 2019 15:22
Example Symfony ApiTestCase (from WIP KnpUniversity Symfony REST tutorial)
<?php
namespace AppBundle\Tests\Controller\Api;
use Doctrine\Common\DataFixtures\Purger\ORMPurger;
use Doctrine\ORM\EntityManager;
use Exception;
use GuzzleHttp\Client;
use GuzzleHttp\Message\ResponseInterface;
use GuzzleHttp\Subscriber\History;