Skip to content

Instantly share code, notes, and snippets.

View vguardiola's full-sized avatar
💭
I may be slow to respond.

Victor Guardiola vguardiola

💭
I may be slow to respond.
View GitHub Profile
@vguardiola
vguardiola / addNamespaces.sh
Created October 22, 2018 12:50
Add namespaces php
#!/bin/bash
for i in `grep -L 'namespace ' *.php`;
do
path=`pwd`
namespace=${path//\//\\\\};
namespace=${namespace:1};
echo "change file ${i}";
sed -i "2i\
namespace $namespace\
" ${i}
@vguardiola
vguardiola / TransaltionsTrasnformerListener.php
Last active June 13, 2017 07:11
Disable filter oneLocale (A2LiX I18n Doctrine) on FOSElastica populate data
<?php
use Doctrine\Common\Util\ClassUtils;
use Doctrine\ORM\EntityManager;
use FOS\ElasticaBundle\Event\TransformEvent;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
class TransaltionsTrasnformerListener implements EventSubscriberInterface
{