Skip to content

Instantly share code, notes, and snippets.

View weaverryan's full-sized avatar

Ryan Weaver weaverryan

View GitHub Profile
@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 / ApiProblem.php
Created April 21, 2015 10:06
ApiProblem wrapper class example
<?php
namespace AppBundle\Api;
use Symfony\Component\HttpFoundation\Response;
/**
* A wrapper for holding data to be used for a application/problem+json response
*/
class ApiProblem
{
@weaverryan
weaverryan / PostController1.php
Created May 8, 2015 15:31
Possible Doctrine Param Converter
<?php
class PostController
{
/**
* @Route("/posts/{slug}")
* @DoctrineParam("post", expr="repository.findOneBySlug(slug)")
*/
public function showAction(Post $post)
{
@weaverryan
weaverryan / notes.md
Last active August 29, 2015 14:21
Symfony Core Meeting Topics

05/21

  • core team organization (Fabien)
  • issue tagging / organization / issue/PR triaging (Jakub and Nicolas)
  • PSR-7 implementation plan (everyone)

Future

  • splitting some components into own repos/cycle (Jordi)
  • introducing multiple framework distributions (Ryan)
@weaverryan
weaverryan / DefaultController.php
Created May 28, 2015 16:38
Creating a Symfony form with a country drop-down
<?php
class DefaultController
{
public function someAction(Request $request)
{
$form = $this->createFormBuilder()
->add('the_countries', 'country')
->getForm();
@weaverryan
weaverryan / page_creation.rst
Created June 11, 2015 14:52
Removed from "page creation" on update

Autoloading

When Symfony is loading, a special file - vendor/autoload.php - is included. This file is created by Composer and will autoload all application files living in the src/ folder as well as all third-party libraries mentioned in the composer.json file.

Because of the autoloader, you never need to worry about using include

@weaverryan
weaverryan / Application.php
Created June 15, 2015 17:59
Updated Application.php for ApiProblem on HTTP Basic
<?php
namespace KnpU\CodeBattle;
// ...
class Application extends SilexApplication
{
// ...
@weaverryan
weaverryan / README.md
Last active August 29, 2015 14:23
webmozart workflow
  1. A team (I'll call it the "Label Team" here) is responsible for marking new issues/PRs with:
  • the label for the component, like "Serializer"
  • the labels "Bug" for bug reports
  • the label "Feature" for feature requests
  • the label "Enhancement" for smaller enhancements of existing features (idea: less work than "Feature" tickets)

At the beginning, the Label Team is the core team, but is slowly replaced by other community members (see below).

  1. A bot automatically marks new PRs and new tickets with the "Bug" label with the label "Needs Review"