-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #193 from meilisearch/add-analytics
Feature/Add analytics
- Loading branch information
Showing
6 changed files
with
112 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,69 +1,70 @@ | ||
{ | ||
"name": "meilisearch/search-bundle", | ||
"description": "Seamless integration of Meilisearch into your Symfony project.", | ||
"keywords": [ | ||
"meilisearch", | ||
"instant", | ||
"search", | ||
"api", | ||
"symfony", | ||
"bundle" | ||
], | ||
"type": "symfony-bundle", | ||
"license": "MIT", | ||
"authors": [ | ||
{ | ||
"name": "David Sanchez", | ||
"email": "david38sanchez@gmail.com" | ||
} | ||
], | ||
"require": { | ||
"php": "^7.4|^8.0", | ||
"ext-json": "*", | ||
"doctrine/doctrine-bundle": "^2.4", | ||
"illuminate/collections": "^8.47", | ||
"meilisearch/meilisearch-php": "^0.24.0", | ||
"symfony/filesystem": "^4.4 || ^5.0 || ^6.0", | ||
"symfony/property-access": "^4.4 || ^5.0 || ^6.0", | ||
"symfony/serializer": "^4.4 || ^5.0 || ^6.0" | ||
}, | ||
"require-dev": { | ||
"doctrine/orm": "^2.9", | ||
"friendsofphp/php-cs-fixer": "^3.0", | ||
"nyholm/psr7": "^1.3", | ||
"phpstan/extension-installer": "^1.1", | ||
"phpstan/phpstan": "^0.12.90", | ||
"phpstan/phpstan-doctrine": "^0.12.39", | ||
"phpstan/phpstan-phpunit": "^0.12.20", | ||
"phpstan/phpstan-symfony": "^0.12.37", | ||
"phpunit/php-code-coverage": "^9.2", | ||
"phpunit/phpunit": "^9.5", | ||
"symfony/doctrine-bridge": "^4.4 || ^5.0 || ^6.0", | ||
"symfony/http-client": "^4.4 || ^5.0 || ^6.0", | ||
"symfony/phpunit-bridge": "^4.4 || ^5.0 || ^6.0", | ||
"symfony/yaml": "^4.4 || ^5.0 || ^6.0" | ||
}, | ||
"autoload": { | ||
"psr-4": { | ||
"MeiliSearch\\Bundle\\": "src/" | ||
} | ||
}, | ||
"autoload-dev": { | ||
"psr-4": { | ||
"MeiliSearch\\Bundle\\Test\\": "tests/" | ||
} | ||
}, | ||
"config": { | ||
"sort-packages": true, | ||
"allow-plugins": { | ||
"phpstan/extension-installer": true | ||
} | ||
}, | ||
"scripts": { | ||
"phpstan": "./vendor/bin/phpstan --memory-limit=1G --ansi", | ||
"test:unit": "./vendor/bin/phpunit --colors=always --verbose", | ||
"test:unit:coverage": "XDEBUG_MODE=coverage ./vendor/bin/phpunit --colors=always --coverage-html=tests/coverage", | ||
"lint:check": "./vendor/bin/php-cs-fixer fix -v --using-cache=no --dry-run", | ||
"lint:fix": "./vendor/bin/php-cs-fixer fix -v --using-cache=no" | ||
"name": "meilisearch/search-bundle", | ||
"description": "Seamless integration of Meilisearch into your Symfony project.", | ||
"keywords": [ | ||
"meilisearch", | ||
"instant", | ||
"search", | ||
"api", | ||
"symfony", | ||
"bundle" | ||
], | ||
"type": "symfony-bundle", | ||
"license": "MIT", | ||
"authors": [ | ||
{ | ||
"name": "David Sanchez", | ||
"email": "david38sanchez@gmail.com" | ||
} | ||
], | ||
"require": { | ||
"php": "^7.4|^8.0", | ||
"ext-json": "*", | ||
"doctrine/doctrine-bundle": "^2.4", | ||
"illuminate/collections": "^8.47", | ||
"meilisearch/meilisearch-php": "^0.24.2", | ||
"symfony/filesystem": "^4.4 || ^5.0 || ^6.0", | ||
"symfony/property-access": "^4.4 || ^5.0 || ^6.0", | ||
"symfony/serializer": "^4.4 || ^5.0 || ^6.0" | ||
}, | ||
"require-dev": { | ||
"doctrine/orm": "^2.9", | ||
"friendsofphp/php-cs-fixer": "^3.0", | ||
"nyholm/psr7": "^1.3", | ||
"phpstan/extension-installer": "^1.1", | ||
"phpstan/phpstan": "^0.12.90", | ||
"phpstan/phpstan-doctrine": "^0.12.39", | ||
"phpstan/phpstan-phpunit": "^0.12.20", | ||
"phpstan/phpstan-symfony": "^0.12.37", | ||
"phpunit/php-code-coverage": "^9.2", | ||
"phpunit/phpunit": "^9.5", | ||
"symfony/doctrine-bridge": "^4.4 || ^5.0 || ^6.0", | ||
"symfony/http-client": "^4.4 || ^5.0 || ^6.0", | ||
"symfony/phpunit-bridge": "^4.4 || ^5.0 || ^6.0", | ||
"symfony/yaml": "^4.4 || ^5.0 || ^6.0", | ||
"matthiasnoback/symfony-dependency-injection-test": "^4.3" | ||
}, | ||
"autoload": { | ||
"psr-4": { | ||
"MeiliSearch\\Bundle\\": "src/" | ||
} | ||
}, | ||
"autoload-dev": { | ||
"psr-4": { | ||
"MeiliSearch\\Bundle\\Test\\": "tests/" | ||
} | ||
}, | ||
"config": { | ||
"sort-packages": true, | ||
"allow-plugins": { | ||
"phpstan/extension-installer": true | ||
} | ||
}, | ||
"scripts": { | ||
"phpstan": "./vendor/bin/phpstan --memory-limit=1G --ansi", | ||
"test:unit": "./vendor/bin/phpunit --colors=always --verbose", | ||
"test:unit:coverage": "XDEBUG_MODE=coverage ./vendor/bin/phpunit --colors=always --coverage-html=tests/coverage", | ||
"lint:check": "./vendor/bin/php-cs-fixer fix -v --using-cache=no --dry-run", | ||
"lint:fix": "./vendor/bin/php-cs-fixer fix -v --using-cache=no" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
use Matthias\SymfonyDependencyInjectionTest\PhpUnit\AbstractExtensionTestCase; | ||
use MeiliSearch\Bundle\DependencyInjection\MeiliSearchExtension; | ||
use MeiliSearch\Bundle\MeiliSearchBundle; | ||
|
||
class MeiliSearchExtensionTest extends AbstractExtensionTestCase | ||
{ | ||
protected function getContainerExtensions(): array | ||
{ | ||
return [ | ||
new MeiliSearchExtension(), | ||
]; | ||
} | ||
|
||
public function testHasMeilisearchVersionDefinitionAfterLoad(): void | ||
{ | ||
$this->load(); | ||
|
||
$this->assertContainerBuilderHasServiceDefinitionWithArgument('search.client', '$clientAgents', ['%meili_symfony_version%']); | ||
} | ||
|
||
public function testHasMeilisearchVersionFromConstantAfterLoad(): void | ||
{ | ||
$this->load(); | ||
|
||
$this->assertContainerBuilderHasParameter('meili_symfony_version', MeiliSearchBundle::qualifiedVersion()); | ||
} | ||
} |