Merge branch 'release/0.0.18'
This commit is contained in:
6
Makefile
6
Makefile
@@ -1,5 +1,7 @@
|
|||||||
PHP = docker compose run php
|
PHP = docker compose run php
|
||||||
|
|
||||||
|
.PHONY: composer_install composer_update static_analysis tests
|
||||||
|
|
||||||
composer_install:
|
composer_install:
|
||||||
@$(PHP) composer install
|
@$(PHP) composer install
|
||||||
|
|
||||||
@@ -8,3 +10,7 @@ composer_update:
|
|||||||
|
|
||||||
static_analysis:
|
static_analysis:
|
||||||
@$(PHP) vendor/bin/psalm
|
@$(PHP) vendor/bin/psalm
|
||||||
|
|
||||||
|
tests:
|
||||||
|
@$(PHP) rm -rf var/cache
|
||||||
|
@$(PHP) vendor/bin/phpunit
|
||||||
|
|||||||
@@ -1,5 +0,0 @@
|
|||||||
doctrine:
|
|
||||||
orm:
|
|
||||||
dql:
|
|
||||||
string_functions:
|
|
||||||
match: DoctrineExtensions\Query\Mysql\MatchAgainst
|
|
||||||
13
phpunit.xml
13
phpunit.xml
@@ -1,13 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<phpunit colors="true" bootstrap="vendor/autoload.php">
|
|
||||||
<testsuites>
|
|
||||||
<testsuite name="Test Suite">
|
|
||||||
<directory suffix="Test.php">./tests/</directory>
|
|
||||||
</testsuite>
|
|
||||||
</testsuites>
|
|
||||||
<filter>
|
|
||||||
<whitelist>
|
|
||||||
<directory>./src</directory>
|
|
||||||
</whitelist>
|
|
||||||
</filter>
|
|
||||||
</phpunit>
|
|
||||||
19
phpunit.xml.dist
Normal file
19
phpunit.xml.dist
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd" backupGlobals="false" colors="true" bootstrap="./vendor/autoload.php">
|
||||||
|
<coverage>
|
||||||
|
<include>
|
||||||
|
<directory>./src</directory>
|
||||||
|
</include>
|
||||||
|
</coverage>
|
||||||
|
<php>
|
||||||
|
<ini name="error_reporting" value="-1"/>
|
||||||
|
<ini name="intl.default_locale" value="en"/>
|
||||||
|
<ini name="intl.error_level" value="0"/>
|
||||||
|
<ini name="memory_limit" value="-1"/>
|
||||||
|
</php>
|
||||||
|
<testsuites>
|
||||||
|
<testsuite name="Test suite">
|
||||||
|
<directory suffix="Test.php">./tests</directory>
|
||||||
|
</testsuite>
|
||||||
|
</testsuites>
|
||||||
|
</phpunit>
|
||||||
@@ -6,11 +6,28 @@ namespace Pcm\SearchBundle\DependencyInjection;
|
|||||||
|
|
||||||
use Symfony\Component\Config\FileLocator;
|
use Symfony\Component\Config\FileLocator;
|
||||||
use Symfony\Component\DependencyInjection\ContainerBuilder;
|
use Symfony\Component\DependencyInjection\ContainerBuilder;
|
||||||
|
use Symfony\Component\DependencyInjection\Extension\PrependExtensionInterface;
|
||||||
use Symfony\Component\HttpKernel\DependencyInjection\Extension;
|
use Symfony\Component\HttpKernel\DependencyInjection\Extension;
|
||||||
use Symfony\Component\DependencyInjection\Loader\YamlFileLoader;
|
use Symfony\Component\DependencyInjection\Loader\YamlFileLoader;
|
||||||
|
|
||||||
class PcmSearchExtension extends Extension
|
class PcmSearchExtension extends Extension implements PrependExtensionInterface
|
||||||
{
|
{
|
||||||
|
public function prepend(ContainerBuilder $container)
|
||||||
|
{
|
||||||
|
$container->loadFromExtension(
|
||||||
|
'doctrine',
|
||||||
|
[
|
||||||
|
'orm' => [
|
||||||
|
'dql' => [
|
||||||
|
'string_functions' => [
|
||||||
|
'match' => 'DoctrineExtensions\Query\Mysql\MatchAgainst'
|
||||||
|
]
|
||||||
|
]
|
||||||
|
]
|
||||||
|
]
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
public function load(array $configs, ContainerBuilder $container)
|
public function load(array $configs, ContainerBuilder $container)
|
||||||
{
|
{
|
||||||
$loader = new YamlFileLoader(
|
$loader = new YamlFileLoader(
|
||||||
@@ -18,6 +35,5 @@ class PcmSearchExtension extends Extension
|
|||||||
new FileLocator(__DIR__.'/../../config')
|
new FileLocator(__DIR__.'/../../config')
|
||||||
);
|
);
|
||||||
$loader->load('services.yaml');
|
$loader->load('services.yaml');
|
||||||
$loader->load('packages/doctrine.yaml');
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user