Skip to content

Instantly share code, notes, and snippets.

Ryan Weaver weaverryan

View GitHub Profile
@weaverryan
weaverryan / README.md
Last active Aug 29, 2015
Welcome to the Symfony Community Hack Day May 23rd, 2015
View README.md

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 Jul 5, 2014
Example Table for Dcotrine command
View output.md
Name Type Length nullable unique
firstName string 255 false false
email string 128 false true
@weaverryan
weaverryan / do-it.md
Last active Aug 29, 2015
OS Binge Sunday
View do-it.md
@weaverryan
weaverryan / ApiProblem.php
Created Apr 21, 2015
ApiProblem wrapper class example
View ApiProblem.php
<?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
Possible Doctrine Param Converter
View PostController1.php
<?php
class PostController
{
/**
* @Route("/posts/{slug}")
* @DoctrineParam("post", expr="repository.findOneBySlug(slug)")
*/
public function showAction(Post $post)
{
@weaverryan
weaverryan / notes.md
Last active Aug 29, 2015
Symfony Core Meeting Topics
View notes.md

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
Creating a Symfony form with a country drop-down
View DefaultController.php
<?php
class DefaultController
{
public function someAction(Request $request)
{
$form = $this->createFormBuilder()
->add('the_countries', 'country')
->getForm();
@weaverryan
weaverryan / page_creation.rst
Created Jun 11, 2015
Removed from "page creation" on update
View page_creation.rst

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 Jun 15, 2015
Updated Application.php for ApiProblem on HTTP Basic
View Application.php
<?php
namespace KnpU\CodeBattle;
// ...
class Application extends SilexApplication
{
// ...
@weaverryan
weaverryan / README.md
Last active Aug 29, 2015
webmozart workflow
View README.md
  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"
You can’t perform that action at this time.