Skip to content

Instantly share code, notes, and snippets.

View markitosgv's full-sized avatar
💭
coding

Marcos Gómez Vilches markitosgv

💭
coding
View GitHub Profile
@tuongaz
tuongaz / BaseModelManager.php
Created April 1, 2012 03:51
Symfony2 Model Manager
<?php
abstract class BaseModelManager {
protected $em;
protected $class;
protected $repository;
protected $container;
/**
* Constructor.
@cakper
cakper / pre-commit
Created January 29, 2014 16:47
PHPSpec & PHPCsFixer pre commit hook
#!/bin/sh
if [ -f ./bin/phpspec ]
then
./bin/phpspec run --quiet
if [ $? -ne 0 ]
then
echo "PHPSpec has failed - commit aborted"
return 1
fi
@csarrazi
csarrazi / config.yml
Last active May 10, 2016 18:35
Log guzzle requests in a different channel (and a different file)
# http://symfony.com/doc/current/cookbook/logging/channels_handlers.html#switching-a-channel-to-a-different-handler
monolog:
channels: ["guzzle"]
handlers:
main:
type: stream
path: /var/log/symfony.log
channels: ["!guzzle"]
guzzle:
type: stream