Skip to content

Commit c5ed7e5

Browse files
committedSep 24, 2024
Add basic SEAL User Interface
1 parent f4f85f8 commit c5ed7e5

19 files changed

+3055
-359
lines changed
 

‎.examples/symfony/composer.lock

+450-358
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎.examples/symfony/config/routes.yaml

+4
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,7 @@ controllers:
33
path: ../src/Controller/
44
namespace: App\Controller
55
type: attribute
6+
7+
seal_ui:
8+
controller: schranz_search.seal_ui_controller
9+
path: /seal-ui

‎integrations/symfony/composer.json

+1
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@
4747
"require": {
4848
"php": "^8.1",
4949
"schranz-search/seal": "^0.5",
50+
"schranz-search/seal-ui": "^0.5",
5051
"symfony/config": "^6.1 || ^7.0",
5152
"symfony/console": "^6.1 || ^7.0",
5253
"symfony/dependency-injection": "^6.1 || ^7.0",

‎integrations/symfony/composer.lock

+86-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎integrations/symfony/config/services.php

+11
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,22 @@
2929
use Schranz\Search\SEAL\Adapter\Solr\SolrAdapterFactory;
3030
use Schranz\Search\SEAL\Adapter\Typesense\TypesenseAdapterFactory;
3131
use Schranz\Search\SEAL\EngineRegistry;
32+
use Schranz\Search\SEAL\UI\Controller\SealUiController;
3233

3334
/*
3435
* @internal
3536
*/
3637
return static function (ContainerConfigurator $container) {
38+
// -------------------------------------------------------------------//
39+
// Controllers //
40+
// -------------------------------------------------------------------//
41+
$container->services()
42+
->set('schranz_search.seal_ui_controller', SealUiController::class)
43+
->args([
44+
service('schranz_search.engine_registry'),
45+
])
46+
->public();
47+
3748
// -------------------------------------------------------------------//
3849
// Commands //
3950
// -------------------------------------------------------------------//

‎packages/seal-ui/.gitattributes

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
.gitattributes export-ignore
2+
.gitignore export-ignore
3+
composer.lock export-ignore
4+
/tests export-ignore
5+
phpunit.xml.dist export-ignore
6+
.php-cs-fixer.dist.php export-ignore
7+
phpstan.neon export-ignore
8+
rector.php export-ignore

‎packages/seal-ui/.github/FUNDING.yml

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
github: [alexander-schranz]
2+
custom: ["https://paypal.me/L91"]

‎packages/seal-ui/.gitignore

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
/vendor/
2+
/composer.phar
3+
/phpunit.xml
4+
/.phpunit.cache
5+
/tests/var
6+
/docker-compose.override.yml
7+
/.php-cs-fixer.php
8+
/.php-cs-fixer.cache
9+
/phpstan.neon
+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
$phpCsConfig = require(dirname(__DIR__, 2) . '/.php-cs-fixer.dist.php');
6+
7+
$finder = (new PhpCsFixer\Finder())
8+
->in(__DIR__)
9+
->ignoreVCSIgnored(true);
10+
11+
$phpCsConfig->setFinder($finder);
12+
13+
return $phpCsConfig->setFinder($finder);

‎packages/seal-ui/LICENSE

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2024 Alexander Schranz
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

‎packages/seal-ui/README.md

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
<div align="center">
2+
<img alt="Schranz Search Logo with a Seal on it with a magnifying glass" src="https://avatars.githubusercontent.com/u/120221538?s=400&v=5" width="200" height="200">
3+
</div>
4+
5+
<h1 align="center">Schranz Search SEAL UI</h1>
6+
7+
<div align="center">
8+
9+
**S**earch **E**ngine **A**bstraction **L**ayer with support to different search engines.
10+
11+
</div>
12+
13+
<br />
14+
<br />
15+
16+
This package was highly inspired by [Doctrine DBAL](https://github.com/doctrine/dbal)
17+
and [Flysystem](https://github.com/thephpleague/flysystem).
18+
19+
> **Note**:
20+
> This is part of the `schranz-search/schranz-search` project create issues in the [main repository](https://github.com/schranz-search/schranz-search).
21+
22+
> **Note**:
23+
> This project is heavily under development and any feedback is greatly appreciated.
24+
25+
## Installation
26+
27+
Use [composer](https://getcomposer.org/) for install the package:
28+
29+
```bash
30+
composer require schranz-search/seal schranz-search/seal-ui
31+
```
32+
33+
## Authors
34+
35+
- [Alexander Schranz](https://github.com/alexander-schranz/)
36+
- [The Community Contributors](https://github.com/schranz-search/schranz-search/graphs/contributors)

‎packages/seal-ui/composer.json

+76
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
{
2+
"name": "schranz-search/seal-ui",
3+
"description": "A UI for analyse seal indexes.",
4+
"type": "library",
5+
"license": "MIT",
6+
"keywords": [
7+
"schranz-search",
8+
"search-client",
9+
"ui"
10+
],
11+
"autoload": {
12+
"psr-4": {
13+
"Schranz\\Search\\SEAL\\UI\\": "src"
14+
}
15+
},
16+
"autoload-dev": {
17+
"psr-4": {
18+
"Schranz\\Search\\SEAL\\UI\\Tests\\": "tests"
19+
}
20+
},
21+
"authors": [
22+
{
23+
"name": "Alexander Schranz",
24+
"email": "alexander@sulu.io"
25+
}
26+
],
27+
"require": {
28+
"php": "^8.1",
29+
"schranz-search/seal": "^0.5"
30+
},
31+
"require-dev": {
32+
"php-cs-fixer/shim": "^3.51",
33+
"phpstan/extension-installer": "^1.2",
34+
"phpstan/phpstan": "^1.10",
35+
"phpstan/phpstan-phpunit": "^1.3",
36+
"phpunit/phpunit": "^10.3",
37+
"rector/rector": "^1.0"
38+
},
39+
"scripts": {
40+
"test": [
41+
"Composer\\Config::disableProcessTimeout",
42+
"vendor/bin/phpunit"
43+
],
44+
"phpstan": "@php vendor/bin/phpstan analyze",
45+
"lint-rector": "@php vendor/bin/rector process --dry-run",
46+
"lint-php-cs": "@php vendor/bin/php-cs-fixer fix --verbose --diff --dry-run",
47+
"lint": [
48+
"@phpstan",
49+
"@lint-php-cs",
50+
"@lint-rector",
51+
"@lint-composer"
52+
],
53+
"lint-composer": "@composer validate --strict",
54+
"rector": "@php vendor/bin/rector process",
55+
"php-cs-fix": "@php vendor/bin/php-cs-fixer fix",
56+
"fix": [
57+
"@rector",
58+
"@php-cs-fix"
59+
]
60+
},
61+
"repositories": [
62+
{
63+
"type": "path",
64+
"url": "./../*",
65+
"options": {
66+
"symlink": true
67+
}
68+
}
69+
],
70+
"minimum-stability": "dev",
71+
"config": {
72+
"allow-plugins": {
73+
"phpstan/extension-installer": true
74+
}
75+
}
76+
}

0 commit comments

Comments
 (0)