Skip to content

Commit

Permalink
px support
Browse files Browse the repository at this point in the history
  • Loading branch information
solverat committed Dec 6, 2021
1 parent 2e3ace1 commit 131abe5
Show file tree
Hide file tree
Showing 225 changed files with 1,438 additions and 4,918 deletions.
37 changes: 22 additions & 15 deletions .github/workflows/codeception.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,16 @@ jobs:
env:
TEST_BUNDLE_NAME: "DynamicSearchBundle"
TEST_BUNDLE_INSTALLER_CLASS: "DynamicSearchBundle\\Tool\\Install"
TEST_BUNDLE_TEST_DIR: "${{ github.workspace }}/tests"
TEST_BUNDLE_TEST_DIR: "${{ github.workspace }}/lib/test-bundle/tests"
TEST_PROJECT_ROOT_DIR: "${{ github.workspace }}"

PIMCORE_CODECEPTION_FRAMEWORK: "${{ github.workspace }}/pimcore-codeception-framework"
PIMCORE_CODECEPTION_VERSION: "1.0"
PIMCORE_CODECEPTION_VERSION: "2.0"

PIMCORE_ENVIRONMENT: test
APP_ENV: test
PIMCORE_TEST_DB_DSN: "mysql://root:root@localhost/dachcom_bundle_test"
PIMCORE_TEST_URL: "http://localhost"
PIMCORE_CLASS_DIRECTORY: "${{ github.workspace }}/tests/_output/var/classes/DataObject"
PIMCORE_CLASS_DIRECTORY: "${{ github.workspace }}/lib/test-bundle/tests/_output/var/classes/DataObject"

SYMFONY_DEPRECATIONS_HELPER: "weak"
PIMCORE_PHP_ERROR_REPORTING: 32767
Expand All @@ -42,22 +42,29 @@ jobs:
strategy:
matrix:
php: [8.0]
symfony: [^5.2]
pimcore: [~10.0.x-dev]
symfony: [ ^5.3 ]
pimcore: [ ~10.1.0, ~10.2.0 ]
include:
- pimcore: ~10.0.x-dev
template_tag: master
- pimcore: ~10.1.0
template_tag: v10.1.0
- pimcore: ~10.2.0
template_tag: v10.1.4
steps:
- uses: actions/checkout@v2
with:
path: lib/test-bundle

- name: Generate Application Structure
run: |
git clone -b ${{ matrix.template_tag }} --single-branch --depth 1 https://github.com/pimcore/skeleton.git
mv skeleton/app .
mv skeleton/composer.json .
mv skeleton/bin .
mv skeleton/config .
mv skeleton/public .
mv skeleton/src .
mv skeleton/templates .
mv skeleton/var .
mv skeleton/web .
mv skeleton/src/AppBundle src
rm -r skeleton
- name: Setup Pimcore Codeception Framework
env:
Expand Down Expand Up @@ -100,7 +107,7 @@ jobs:
- name: Start Webserver and Chrome
run: |
wget https://get.symfony.com/cli/installer -O - | bash
~/.symfony/bin/symfony server:start --port=8080 --dir=web --force-php-discovery --allow-http --no-tls --daemon
~/.symfony/bin/symfony server:start --port=8080 --dir=public --force-php-discovery --allow-http --no-tls --daemon
- name: Get Composer Cache Directory
id: composer-cache
Expand All @@ -125,17 +132,17 @@ jobs:
- name: Assets Install
run: |
bin/console assets:install web --relative --symlink
bin/console assets:install public --relative --symlink
- name: Tests
run: |
bin/console cache:warmup --env=test
vendor/bin/codecept run --env github -c ${{ env.GITHUB_WORKSPACE }}
vendor/bin/codecept run --env github -c ${{ github.workspace }}/lib/test-bundle
- name: Log Output
uses: actions/upload-artifact@v2
if: failure()
with:
name: "Logs (PHP ${{ matrix.php }}, Pimcore ${{ matrix.pimcore }}, Symfony ${{ matrix.symfony }})"
path: tests/_output/
path: ${{ github.workspace }}/lib/test-bundle/tests/_output/
if-no-files-found: ignore
32 changes: 18 additions & 14 deletions .github/workflows/ecs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ jobs:
env:
TEST_BUNDLE_NAME: "DynamicSearchBundle"
TEST_BUNDLE_INSTALLER_CLASS: "DynamicSearchBundle\\Tool\\Install"
TEST_BUNDLE_TEST_DIR: "${{ github.workspace }}/tests"
TEST_BUNDLE_TEST_DIR: "${{ github.workspace }}/lib/test-bundle/tests"
TEST_PROJECT_ROOT_DIR: "${{ github.workspace }}"

PIMCORE_CODECEPTION_FRAMEWORK: "${{ github.workspace }}/pimcore-codeception-framework"
PIMCORE_CODECEPTION_VERSION: "1.0"
PIMCORE_CODECEPTION_VERSION: "2.0"

PIMCORE_ENVIRONMENT: test
APP_ENV: test
PIMCORE_TEST_DB_DSN: "mysql://root:root@localhost/dachcom_bundle_test"
PIMCORE_TEST_URL: "http://localhost"

Expand All @@ -40,24 +40,28 @@ jobs:
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
strategy:
matrix:
php: [7.4]
symfony: [^4.4]
pimcore: [^6.8]
php: [ 8.0 ]
symfony: [ ^5.3 ]
pimcore: [ ~10.1.0 ]
include:
- pimcore: ^6.8
template_tag: v2.8.0

- pimcore: ~10.1.0
template_tag: v10.1.0
steps:
- uses: actions/checkout@v2
with:
path: lib/test-bundle

- name: Generate Application Structure
run: |
git clone -b ${{ matrix.template_tag }} --single-branch --depth 1 https://github.com/pimcore/skeleton.git
mv skeleton/app .
mv skeleton/composer.json .
mv skeleton/bin .
mv skeleton/config .
mv skeleton/public .
mv skeleton/src .
mv skeleton/templates .
mv skeleton/var .
mv skeleton/web .
mv skeleton/src/AppBundle src
rm -r skeleton
- name: Setup Pimcore Codeception Framework
env:
Expand Down Expand Up @@ -116,10 +120,10 @@ jobs:
- name: Assets Install
run: |
bin/console assets:install web --relative --symlink
bin/console assets:install public --relative --symlink
- name: Easy Coding Standard Check
continue-on-error: true
run: |
bin/console cache:warmup --env=test
vendor/bin/ecs check src/DynamicSearchBundle --config easy-coding-standard.yml
vendor/bin/ecs check ${{ github.workspace }}/lib/test-bundle/src/DynamicSearchBundle --config ${{ github.workspace }}/lib/test-bundle/ecs.php
31 changes: 18 additions & 13 deletions .github/workflows/php-stan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ jobs:
env:
TEST_BUNDLE_NAME: "DynamicSearchBundle"
TEST_BUNDLE_INSTALLER_CLASS: "DynamicSearchBundle\\Tool\\Install"
TEST_BUNDLE_TEST_DIR: "${{ github.workspace }}/tests"
TEST_BUNDLE_TEST_DIR: "${{ github.workspace }}/lib/test-bundle/tests"
TEST_PROJECT_ROOT_DIR: "${{ github.workspace }}"

PIMCORE_CODECEPTION_FRAMEWORK: "${{ github.workspace }}/pimcore-codeception-framework"
PIMCORE_CODECEPTION_VERSION: "1.0"
PIMCORE_CODECEPTION_VERSION: "2.0"

PIMCORE_ENVIRONMENT: test
APP_ENV: test
PIMCORE_TEST_DB_DSN: "mysql://root:root@localhost/dachcom_bundle_test"
PIMCORE_TEST_URL: "http://localhost"

Expand All @@ -40,23 +40,28 @@ jobs:
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
strategy:
matrix:
php: [7.4]
symfony: [^4.4]
pimcore: [^6.8]
php: [ 8.0 ]
symfony: [ ^5.3 ]
pimcore: [ ~10.1.0 ]
include:
- pimcore: ^6.8
template_tag: v2.8.0
- pimcore: ~10.1.0
template_tag: v10.1.0
steps:
- uses: actions/checkout@v2
with:
path: lib/test-bundle

- name: Generate Application Structure
run: |
git clone -b ${{ matrix.template_tag }} --single-branch --depth 1 https://github.com/pimcore/skeleton.git
mv skeleton/app .
mv skeleton/composer.json .
mv skeleton/bin .
mv skeleton/config .
mv skeleton/public .
mv skeleton/src .
mv skeleton/templates .
mv skeleton/var .
mv skeleton/web .
mv skeleton/src/AppBundle src
rm -r skeleton
- name: Setup Pimcore Codeception Framework
env:
Expand Down Expand Up @@ -115,9 +120,9 @@ jobs:
- name: Assets Install
run: |
bin/console assets:install web --relative --symlink
bin/console assets:install public --relative --symlink
- name: Php Stan
run: |
bin/console cache:warmup --env=test
vendor/bin/phpstan analyse -c phpstan.neon -a tests/_phpstan-bootstrap.php src -l 2
vendor/bin/phpstan analyse -c${{ github.workspace }}/lib/test-bundle/phpstan.neon -a ${{ github.workspace }}/lib/test-bundle/tests/_phpstan-bootstrap.php ${{ github.workspace }}/lib/test-bundle/src -l 4
1 change: 1 addition & 0 deletions ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
| Q | A
| ---------------- | -----
| Branch | master, 1.x
| Bug report? | yes/no
| Feature request? | yes/no
| BC Break report? | yes/no
Expand Down
42 changes: 10 additions & 32 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,15 @@

[![Software License](https://img.shields.io/badge/license-GPLv3-brightgreen.svg?style=flat-square)](LICENSE.md)
[![Latest Release](https://img.shields.io/packagist/v/dachcom-digital/dynamic-search.svg?style=flat-square)](https://packagist.org/packages/dachcom-digital/dynamic-search)
[![Tests](https://img.shields.io/github/workflow/status/dachcom-digital/pimcore-dynamic-search/Codeception?style=flat-square&logo=github&label=codeception)](https://github.com/dachcom-digital/pimcore-dynamic-search/actions?query=workflow%3A%22Codeception%22)
[![PhpStan](https://img.shields.io/github/workflow/status/dachcom-digital/pimcore-dynamic-search/PHP%20Stan?style=flat-square&logo=github&label=phpstan%20level%202)](https://github.com/dachcom-digital/pimcore-dynamic-search/actions?query=workflow%3A%22PHP%20Stan%22)

## Requirements
* Pimcore >= 10.0
* Symfony >= 5.2
***

## Pimcore 6
Fetch the latest [Pimcore 6 Version here](https://github.com/dachcom-digital/pimcore-dynamic-search/tree/1.x).
[![Tests](https://img.shields.io/github/workflow/status/dachcom-digital/pimcore-dynamic-search/Codeception/master?style=flat-square&logo=github&label=codeception)](https://github.com/dachcom-digital/pimcore-dynamic-search/actions?query=workflow%3ACodeception+branch%3Amaster)
[![PhpStan](https://img.shields.io/github/workflow/status/dachcom-digital/pimcore-dynamic-search/PHP%20Stan/master?style=flat-square&logo=github&label=phpstan%20level%204)](https://github.com/dachcom-digital/pimcore-dynamic-search/actions?query=workflow%3A"PHP+Stan"+branch%3Amaster)

### Release Plan

| Release | Supported Pimcore Versions | Supported Symfony Versions | Release Date | Maintained | Branch |
|---------|-----------------------------------|----------------------------|--------------|----------------------------------|------------|
| **2.x** | `10.0` | `^5.2` | no release | Yes (Bugs, Features) | master |
| **1.x** | `6.6` - `6.9` | `^4.4` | 18.04.2021 | Yes (Bugs, Features if required) | 1.x |
| **1.x** | `6.6` - `6.9` | `^4.4` | 18.04.2021 | Yes (Bugs, Features if required) | [1.x](https://github.com/dachcom-digital/pimcore-dynamic-search/tree/1.x) |

## Introduction
The Dynamic Search Bundle allows you to redefine your search strategy. It's based on several data- and index providers.
Expand All @@ -38,10 +30,16 @@ The Dynamic Search Bundle allows you to redefine your search strategy. It's base

```json
"require" : {
"dachcom-digital/dynamic-search" : "dev-master"
"dachcom-digital/dynamic-search" : "~2.0.0"
}
```

- Execute: `$ bin/console pimcore:bundle:enable DynamicSearchBundle`
- Execute: `$ bin/console pimcore:bundle:install DynamicSearchBundle`

## Upgrading
- Execute: `$ bin/console doctrine:migrations:migrate --prefix 'DynamicSearchBundle\Migrations'`

## Further Information
- [Example Setup](docs/0_ExampleSetup.md)
- [Configuration](#)
Expand All @@ -59,26 +57,6 @@ The Dynamic Search Bundle allows you to redefine your search strategy. It's base
- [Create Filter Definition](#)
- [API](#)

### Installation via Extension Manager
After you have installed the Dynamic Search Bundle via composer, open pimcore backend and go to `Tools` => `Extension`:
- Click the green `+` Button in `Enable / Disable` row
- Click the green `+` Button in `Install/Uninstall` row

## Upgrading

### Upgrading via Extension Manager
After you have updated the Dynamic Search Bundle via composer, open pimcore backend and go to `Tools` => `Extension`:
- Click the green `+` Button in `Update` row

### Upgrading via CommandLine
After you have updated the Dynamic Search Bundle via composer:
- Execute: `$ bin/console pimcore:bundle:update DynamicSearchBundle`

### Migrate via CommandLine
Does actually the same as the update command and preferred in CI-Workflow:
- Execute: `$ bin/console pimcore:migrations:migrate -b DynamicSearchBundle`


## Copyright and License
Copyright: [DACHCOM.DIGITAL](http://dachcom-digital.com)
For licensing details please visit [LICENSE.md](LICENSE.md)
Expand Down
33 changes: 13 additions & 20 deletions UPGRADE.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,18 @@
# Upgrade Notes
![upgrade](https://user-images.githubusercontent.com/700119/31535145-3c01a264-affa-11e7-8d86-f04c33571f65.png)

***
## Migrating from Version 1.x to Version 2.0.0

### Global Changes
- PHP8 return type declarations added: you may have to adjust your extensions accordingly
- All Folders in `views` are lowercase/dashed now (`views/common`, `views/output-channel`, ...)
- `FieldTransformerInterface::configureOptions` return type changed to `void`

After every update you should check the pimcore extension manager.
Just click the "update" button or execute the migration command to finish the bundle update.
### Fixes
--

#### Update from Version 1.0.0 to Version 1.0.1
- **[IMPROVEMENT]**: Introduce ResourceCandidate [#24](https://github.com/dachcom-digital/pimcore-dynamic-search/issues/24)
### New Features
--

***

#### Update from Version 0.x to Version 1.0.0
- **[IMPROVEMENT]**: Better exception fetching and messaging
- **[IMPROVEMENT|BC BREAK]**: Move all Configuration to Compiler [#18](https://github.com/dachcom-digital/pimcore-dynamic-search/issues/18)
- **[IMPROVEMENT|BC BREAK]**: Implement Output Workflow Condition [#19](https://github.com/dachcom-digital/pimcore-dynamic-search/issues/19)
- **[BC BREAK]**: translation `dynamic_search.ui.we-found` and `dynamic_search.ui.items-for` has been removed
- **[BC BREAK]**: new translation keys added: `dynamic_search.ui.result_subline` (args: `%badge%` and `%query%`), `dynamic_search.ui.no_items` (args: `%count%`), `dynamic_search.ui.items` (args: `%count%`), `dynamic_search.ui.no_item` (args: `%count%`)
- **[BC BREAK]**: `SearchContainerInterface`, `MultiSearchContainerInterface` and `RawResultInterface` added. If you're using custom output channel filter, adjust these classes accordingly:
- Method `getHitCount` removed from `OutputChannelInterface`. This needs to be defined in `RawResponse` class (available in `OutputChannelInterface::getResult(SearchContainerInterface $searchContainer)`).
- Method `addSubQuery` removed from `MultiOutputChannelInterface`. The sub queries will be passed within `MultiOutputChannelInterface::getMultiSearchResult(MultiSearchContainerInterface $multiSearchContainer)`
- Signature `OutputChannelInterface::getResult()` changed to `OutputChannelInterface::getResult(SearchContainerInterface $searchContainer): SearchContainerInterface`
- Signature `MultiOutputChannelInterface::getMultiSearchResult()` changed to `MultiOutputChannelInterface::getMultiSearchResult(MultiSearchContainerInterface $multiSearchContainer): MultiSearchContainerInterface`
- Signature `FilterInterface::findFilterValueInResult()` changed to `FilterInterface::findFilterValueInResult(RawResultInterface $rawResult)`
- Signature `FilterInterface::buildViewVars()` changed to `FilterInterface::buildViewVars(RawResultInterface $rawResult, $filterValues, $query)`
- Signature `DocumentNormalizerInterface::normalize()` changed to `DocumentNormalizerInterface::normalize(RawResultInterface $rawResult, ContextDefinitionInterface $contextDefinition, string $outputChannelName)`
DynamicSearch 1.x Upgrade Notes: https://github.com/dachcom-digital/pimcore-dynamic-search/blob/1.x/UPGRADE.md
17 changes: 6 additions & 11 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,29 +21,24 @@
"autoload-dev": {
"psr-4": {
"": "src/"
},
"classmap": [
"app/TestKernel.php"
]
}
},
"extra": {
"pimcore": {
"bundles": [
"DynamicSearchBundle\\DynamicSearchBundle"
]
},
"branch-alias": {
"dev-master": "2.0-dev"
}
},
"require": {
"pimcore/pimcore": "^10.0",
"symfony/symfony": "^5.0"
"pimcore/pimcore": "^10.1"
},
"require-dev": {
"codeception/codeception": "~2.4.0",
"codeception/codeception": "^4.1",
"codeception/module-webdriver": "^1.4",
"codeception/module-symfony": "^1.6",
"phpstan/phpstan": "^0.12",
"phpstan/phpstan-symfony": "^0.12",
"symplify/easy-coding-standard": "^8.0"
"symplify/easy-coding-standard": "^9.0"
}
}
Loading

0 comments on commit 131abe5

Please sign in to comment.