Skip to content

Instantly share code, notes, and snippets.

View alexislefebvre's full-sized avatar
🐼
🐼 🐼 🐼

Alexis Lefebvre alexislefebvre

🐼
🐼 🐼 🐼
View GitHub Profile
@alexislefebvre
alexislefebvre / FullTextSearchFilter.php
Last active July 29, 2023 09:52 — forked from masseelch/FullTextSearchFilter.php
(Kind of a) api-platform full-text search filter.
<?php
namespace App\Filter;
use ApiPlatform\Core\Bridge\Doctrine\Orm\Filter\SearchFilter;
use ApiPlatform\Core\Bridge\Doctrine\Orm\Util\QueryNameGeneratorInterface;
use ApiPlatform\Core\Exception\InvalidArgumentException;
use Doctrine\ORM\QueryBuilder;
@alexislefebvre
alexislefebvre / extract.py
Created December 11, 2018 16:30
Extract translations from Symfony XLF file to tab-separated plain text
# -*- coding: utf-8 -*-
import xml.etree.ElementTree as ElementTree
filePath = 'translations/messages.fr.xlf'
f = open(filePath, 'r')
prefix = '{urn:oasis:names:tc:xliff:document:2.0}'
diff --git a/Test/ValidationErrorsConstraint.php b/Test/ValidationErrorsConstraint.php
index 7b494f9..ad7656e 100644
--- a/Test/ValidationErrorsConstraint.php
+++ b/Test/ValidationErrorsConstraint.php
@@ -12,9 +12,10 @@
namespace Liip\FunctionalTestBundle\Test;
// BC
-class_alias('\PHPUnit_Framework_Constraint', '\PHPUnit\Framework\Constraint\Constraint');
+//class_alias('\PHPUnit_Framework_Constraint', '\PHPUnit\Framework\Constraint\Constraint');
@alexislefebvre
alexislefebvre / .travis.yml
Last active February 2, 2021 05:10
Skip builds on Travis CI with "[skip travis]"
sudo: false
language: php
git:
depth: 5
php:
- 7.0
#!/bin/bash
# See http://stackoverflow.com/questions/59895/can-a-bash-script-tell-what-directory-its-stored-in/23905052#23905052
ROOT=$(readlink -f $(dirname "$0"))
cd $ROOT
# Get database parameters
dbname=$(grep "database_name" ./app/config/parameters.yml | cut -d " " -f 6)
dbuser=$(grep "database_user" ./app/config/parameters.yml | cut -d " " -f 6)