Skip to content

Instantly share code, notes, and snippets.

Ryan Weaver weaverryan

Block or report user

Report or block weaverryan

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
weaverryan / Makefile
Created May 5, 2011
Example sphinx configuration for rendering the symfony docs
View Makefile
# You can set these variables from the command line.
SPHINXBUILD = sphinx-build -c .
BUILDDIR = build
SOURCE = source
weaverryan / todos.markdown
Created May 12, 2011
Pending Service Container Documentation Todos
View todos.markdown

The service container chapter itself is probably (at least) nearly content-complete. There are many other things (and service options) still to cover on the topic, however, and I think these should become a part of an advanced service container cookbook article:

  • property injection
  • file
  • calls
  • factory_class, factory_method
  • configurator
  • abstract
  • synthetic
  • scopes
weaverryan / Renders-with-no-spaces.html
Created Jun 12, 2011
Why I love Twig - space control, loop index
View Renders-with-no-spaces.html
<a href="{{ upload_path('post_photo', photo.photoPath) }}" class="last not_first_row">
weaverryan / 8a38a6f_style_4.css
Created Jul 30, 2011
Assetic relative path setup
View 8a38a6f_style_4.css
/* /app_dev.php/css/8a38a6f_style_4.css */
/* The cssrewrite filter physically adds an extra ../ so that the this resolves correctly in dev */
background: url(../../images/bodyBg.png) repeat-x;
font-family: Georgia, "Times New Roman", Times, serif;
weaverryan / .gitignore
Created Aug 3, 2011
sample Symfony2 .gitignore
View .gitignore
weaverryan / actions.class.php
Created Aug 5, 2011
Example "Container" in symfony 1.4
View actions.class.php
class mySoapActions extends sfActions
public function executeSomething(sfWebRequest $request)
$soapApi = $this->getSoapAPI();
// do something with it
weaverryan / play.php
Created Aug 5, 2011
Example of a "play" script in Symfony 1.4
View play.php
// web/play.php
// guarantee that we're load and proud
ini_set('display_errors', true);
$configuration = ProjectConfiguration::getApplicationConfiguration('frontend', 'dev', true);
weaverryan / behat
Created Sep 4, 2011
Small script to easily execute behat inside Symfony2
View behat
# A little shortcut script for executing Behat inside a Symfony2 project
# Configure behat in Symfony2 per the following instructions and then place this in the root of your project
# Example Usage:
# ./behat @BlogBundle
weaverryan / DefaultController.php
Created Sep 26, 2011
Example of validating a scalar value in Symfony2
View DefaultController.php
// .. other things
use Symfony\Component\Validator\Constraints\Email;
class DefaultController
public function someAction()
weaverryan / form.html.twig
Created Dec 2, 2011
Form theming for error class on row
View form.html.twig
{% block field_row %}
{% spaceless %}
<div {{ errors|length > 0 ? 'class="error"' : '' }}>
{{ form_label(form, label|default(null)) }}
{{ form_errors(form) }}
{{ form_widget(form) }}
{% endspaceless %}
{% endblock field_row %}
You can’t perform that action at this time.