Skip to content

Commit

Permalink
Merge pull request #36 from shopwareLabs/feat-integrate-meilisearch
Browse files Browse the repository at this point in the history
Feat integrate meilisearch
  • Loading branch information
OliverSkroblin authored Jan 15, 2024
2 parents e6cc458 + 986b0a4 commit 91f8e00
Show file tree
Hide file tree
Showing 77 changed files with 3,616 additions and 994 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/03-phpunit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -166,3 +166,29 @@ jobs:
- name: Run PHPUnit Tests
run: ./vendor/bin/phpunit --testsuite=mysql

meilisearch-storage:
runs-on: ubuntu-latest
services:
meilisearch:
image: getmeili/meilisearch:latest
options: >-
--health-cmd "curl -s http://localhost:7700/ -o /dev/null"
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- "7700:7700"
steps:
- name: Checkout Code
uses: actions/checkout@v4

- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'

- name: Install Composer Dependencies
run: composer install

- name: Run PHPUnit Tests
run: ./vendor/bin/phpunit --testsuite=meilisearch
2 changes: 1 addition & 1 deletion .php-cs-fixer.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
$config->setRiskyAllowed(true);

return $config->setRules([
'@PSR12' => true,
'@PER-CS' => true,
'strict_param' => true,
'array_syntax' => ['syntax' => 'short'],
])->setFinder($finder);
13 changes: 11 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,21 @@
"opensearch-project/opensearch-php": "^2.0",
"shyim/opensearch-php-dsl": "^1.0.1",
"async-aws/dynamo-db": "^2.0",
"mongodb/mongodb": "^1.16"
"mongodb/mongodb": "^1.16",
"meilisearch/meilisearch-php": "^1.5",
"symfony/http-client": "^6.4",
"nyholm/psr7": "^1.0"
},
"require-dev": {
"phpunit/phpunit": "^10.5",
"symfony/var-dumper": "^6.3",
"phpstan/phpstan": "^1.10",
"friendsofphp/php-cs-fixer": "^3.35"
"friendsofphp/php-cs-fixer": "^3.35",
"kubawerlos/php-cs-fixer-custom-fixers": "~v3.14.0"
},
"config": {
"allow-plugins": {
"php-http/discovery": true
}
}
}
18 changes: 9 additions & 9 deletions devenv.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
"devenv": {
"locked": {
"dir": "src/modules",
"lastModified": 1696344641,
"narHash": "sha256-cfGsdtDvzYaFA7oGWSgcd1yST6LFwvjMcHvtVj56VcU=",
"lastModified": 1704835383,
"narHash": "sha256-SoC0rYR9iHW0dVOEmxNEfa8vk9dTK86P5iXTgHafmwM=",
"owner": "cachix",
"repo": "devenv",
"rev": "05e26941f34486bff6ebeb4b9c169b6f637f1758",
"rev": "18ef9849d1ecac7a9a7920eb4f2e4adcf67a8c3a",
"type": "github"
},
"original": {
Expand Down Expand Up @@ -74,11 +74,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1696419054,
"narHash": "sha256-EdR+dIKCfqL3voZUDYwcvgRDOektQB9KbhBVcE0/3Mo=",
"lastModified": 1704842529,
"narHash": "sha256-OTeQA+F8d/Evad33JMfuXC89VMetQbsU4qcaePchGr4=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "7131f3c223a2d799568e4b278380cd9dac2b8579",
"rev": "eabe8d3eface69f5bb16c18f8662a702f50c20d5",
"type": "github"
},
"original": {
Expand Down Expand Up @@ -115,11 +115,11 @@
"nixpkgs-stable": "nixpkgs-stable"
},
"locked": {
"lastModified": 1696158581,
"narHash": "sha256-h0vY4E7Lx95lpYQbG2w4QH4yG5wCYOvPJzK93wVQbT0=",
"lastModified": 1705056064,
"narHash": "sha256-pi9UtBFD5/U48Jrc6uvA8ZCmW4xnceUDp2QysBEkZCw=",
"owner": "cachix",
"repo": "pre-commit-hooks.nix",
"rev": "033453f85064ccac434dfd957f95d8457901ecd6",
"rev": "54d60d191aa8ba0629f662d8873a892cbe3d65ad",
"type": "github"
},
"original": {
Expand Down
1 change: 1 addition & 0 deletions devenv.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
services.redis.enable = lib.mkDefault true;
services.adminer.enable = lib.mkDefault true;
services.adminer.listen = lib.mkDefault "127.0.0.1:9080";
services.meilisearch.enable = lib.mkDefault true;

languages.php = {
enable = lib.mkDefault true;
Expand Down
163 changes: 0 additions & 163 deletions ecs.php

This file was deleted.

5 changes: 5 additions & 0 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
<testsuite name="common">
<directory>tests/Common</directory>
</testsuite>

<testsuite name="array">
<directory>tests/Array</directory>
</testsuite>
Expand All @@ -31,6 +32,10 @@
<directory>tests/Opensearch</directory>
</testsuite>

<testsuite name="meilisearch">
<directory>tests/Meilisearch</directory>
</testsuite>

<testsuite name="redis">
<directory>tests/Redis</directory>
</testsuite>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@

use Shopware\Storage\Common\Document\Document;
use Shopware\Storage\Common\Document\Documents;
use Shopware\Storage\Common\KeyValue\KeyValueStorage;
use Shopware\Storage\Common\KeyValue\KeyAware;
use Shopware\Storage\Common\Storage;

class ArrayKeyValueStorage implements KeyValueStorage
class ArrayKeyStorage implements KeyAware, Storage
{
/**
* @var array<string, Document>
Expand Down
Loading

0 comments on commit 91f8e00

Please sign in to comment.