Skip to content

Commit

Permalink
Pimcore 11 Support (#76)
Browse files Browse the repository at this point in the history
  • Loading branch information
solverat authored Sep 21, 2023
1 parent abeb400 commit 3bfddc1
Show file tree
Hide file tree
Showing 279 changed files with 507 additions and 863 deletions.
1 change: 0 additions & 1 deletion .actrc

This file was deleted.

30 changes: 20 additions & 10 deletions .github/workflows/codeception.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ jobs:
TEST_PROJECT_ROOT_DIR: "${{ github.workspace }}"

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

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

Expand All @@ -38,12 +38,12 @@ jobs:
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
strategy:
matrix:
php: [ 8.1 ]
symfony: [ ^5.4 ]
pimcore: [ ~10.6.0 ]
php: [ 8.2 ]
symfony: [ ^6.2 ]
pimcore: [ ~11.0.0 ]
include:
- pimcore: ~10.6.0
template_tag: v10.2.5
- pimcore: ~11.0.0
template_tag: v11.0.0
steps:
- uses: actions/checkout@v2
with:
Expand Down Expand Up @@ -82,9 +82,19 @@ jobs:
run: php -v

- name: Setup MySql
run: |
sudo systemctl start mysql
mysql -uroot -proot -h127.0.0.1 -e "CREATE DATABASE dachcom_bundle_test CHARSET=utf8mb4;"
uses: shogo82148/actions-setup-mysql@v1
with:
mysql-version: '8.0'
user: test
password: test
root-password: root
auto-start: true
my-cnf: |
max_allowed_packet=32505856
max_connections=1000
- name: Initial Database
run: mysql -utest -ptest -h127.0.0.1 -e 'CREATE DATABASE dachcom_bundle_test CHARSET=utf8mb4;'

- name: Setup Chromium
run: |
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/ecs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
TEST_PROJECT_ROOT_DIR: "${{ github.workspace }}"

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

APP_ENV: test
PIMCORE_TEST_DB_DSN: "mysql://root:[email protected]:3306/dachcom_bundle_test"
Expand All @@ -37,12 +37,12 @@ jobs:
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
strategy:
matrix:
php: [ 8.1 ]
symfony: [ ^5.4 ]
pimcore: [ ~10.6.0 ]
php: [ 8.2 ]
symfony: [ ^6.2 ]
pimcore: [ ~11.0.0 ]
include:
- pimcore: ~10.6.0
template_tag: v10.2.5
- pimcore: ~11.0.0
template_tag: v11.0.0
steps:
- uses: actions/checkout@v2
with:
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/php-stan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
TEST_PROJECT_ROOT_DIR: "${{ github.workspace }}"

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

APP_ENV: test
PIMCORE_TEST_DB_DSN: "mysql://root:[email protected]:3306/dachcom_bundle_test"
Expand All @@ -37,12 +37,12 @@ jobs:
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
strategy:
matrix:
php: [ 8.1 ]
symfony: [ ^5.4 ]
pimcore: [ ~10.6.0 ]
php: [ 8.2 ]
symfony: [ ^6.2 ]
pimcore: [ ~11.0.0 ]
include:
- pimcore: ~10.6.0
template_tag: v10.2.5
- pimcore: ~11.0.0
template_tag: v11.0.0
steps:
- uses: actions/checkout@v2
with:
Expand Down
10 changes: 5 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,11 @@ Vagrantfile
php-cgi.core
.sass-cache

# codeception (only stage *.dist.yml config files)
/codeception.yml
/tests/codeception.yml
/tests/*.suite.yml
# codeception (only stage *.dist.yaml config files)
/codeception.yaml
/tests/codeception.yaml
/tests/*.suite.yaml
/tests/_output/*
/tests/_data/*
!/tests/_data/.gitkeep
/tests/_support/_generated/*
/tests/Support/_generated/*
2 changes: 1 addition & 1 deletion ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
| Q | A
| ---------------- | -----
| Branch | master, 1.x
| Branch | master, 2.x
| Bug report? | yes/no
| Feature request? | yes/no
| BC Break report? | yes/no
Expand Down
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# License
Copyright (C) 2021 DACHCOM.DIGITAL
Copyright (C) 2023 DACHCOM.DIGITAL

This software is available under the GNU General Public License version 3 (GPLv3).

Expand Down
25 changes: 13 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
### Release Plan
| Release | Supported Pimcore Versions | Supported Symfony Versions | Release Date | Maintained | Branch |
|---------|----------------------------|----------------------------|--------------|----------------------|---------------------------------------------------------------------------|
| **2.x** | `10.0` - `10.6` | `^5.4` | 19.12.2021 | Yes (Bugs, Features) | master |
| **3.x** | `11.0` | `^6.2` | -- | Yes (Bugs, Features) | master |
| **2.x** | `10.0` - `10.6` | `^5.4` | 19.12.2021 | No | [2.x](https://github.com/dachcom-digital/pimcore-dynamic-search/tree/2.x) |
| **1.x** | `6.6` - `6.9` | `^4.4` | 18.04.2021 | No | [1.x](https://github.com/dachcom-digital/pimcore-dynamic-search/tree/1.x) |

## Introduction
Expand All @@ -25,24 +26,24 @@ There are several data- and index providers available:
- [Trinity Data](https://github.com/dachcom-digital/pimcore-dynamic-search-data-provider-trinity) | Fetch pimcore entities: object, asset, document

### Index Provider
- [Lucene Search](https://github.com/dachcom-digital/pimcore-dynamic-search-index-provider-lucene) | Use the php lucene index. Not super-fast but comes without any dependencies but php
- [Elastic Search](https://github.com/dachcom-digital/pimcore-dynamic-search-index-provider-elasticsearch) | Index data with an elasticsearch instance.
- [Open Search](https://github.com/dachcom-digital/pimcore-dynamic-search-index-provider-opensearch) | Index data with an opensearch instance.
- [Lucene Search](https://github.com/dachcom-digital/pimcore-dynamic-search-index-provider-lucene) | Use the php lucene index. Not superfast but comes without any dependencies but php
- [Elasticsearch](https://github.com/dachcom-digital/pimcore-dynamic-search-index-provider-elasticsearch) | Index data with an elasticsearch instance.
- [Open Search](https://github.com/dachcom-digital/pimcore-dynamic-search-index-provider-opensearch) | Index data with an open search instance.

## Installation

```json
"require" : {
"dachcom-digital/dynamic-search" : "~2.0.0"
"dachcom-digital/dynamic-search" : "~3.0.0"
}
```
### 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

### Installation via CLI
- Execute: `$ bin/console pimcore:bundle:enable DynamicSearchBundle`
Add Bundle to `bundles.php`:
```php
return [
DynamicSearchBundle\DynamicSearchBundle::class => ['all' => true],
];

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

## Upgrading
Expand All @@ -56,7 +57,7 @@ Please check out install instruction of each provider (see list above).
```yaml
# config/routes.yaml
dynamic_search_frontend:
resource: '@DynamicSearchBundle/Resources/config/pimcore/routing/frontend_routing.yml'
resource: '@DynamicSearchBundle/config/pimcore/routing/frontend_routing.yaml'
```

## Dispatch Dynamic Search
Expand Down
44 changes: 6 additions & 38 deletions UPGRADE.md
Original file line number Diff line number Diff line change
@@ -1,49 +1,17 @@
# Upgrade Notes

### 2.1.1
- [IMPROVEMENT] Added getter for `DynamicSearchBundle\Resource\ResourceCandidate::$contextName` [#55](https://github.com/dachcom-digital/pimcore-dynamic-search/pull/55)
- [IMPROVEMENT] Ignore `isAutoSave`, `saveVersionOnly` in element listener [#62](https://github.com/dachcom-digital/pimcore-dynamic-search/issues/62)
- [BUGFIX] Remove provider cache to avoid configuration sharing [#72](https://github.com/dachcom-digital/pimcore-dynamic-search/pull/72)
- [BUGFIX] Fix parameter assignment for multi channels [#71](https://github.com/dachcom-digital/pimcore-dynamic-search/pull/71)

### 2.1.0
- [IMPROVEMENT] return raw result data if no normalizer is defined [#63](https://github.com/dachcom-digital/pimcore-dynamic-search/issues/63)
### 2.0.2
- [BUGFIX] Fix `view_name` in default configuration `Configuration::buildContextOutputChannelsNode`
### 2.0.1
- [BUGFIX] Fix method argument definition in `DefinitionBuilderRegistry::registerFilterDefinition` [@ThisIsJustARandomGuy ](https://github.com/dachcom-digital/pimcore-dynamic-search/issues/45)

## Migrating from Version 1.x to Version 2.0.0
## Migrating from Version 2.x to Version 3.0.

### Global Changes
- Directory `var/bundles/DynamicSearchBundle` can be removed safely since it is not required anymore
- 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`
- Provider bundles registration process has changed: There not automatically registered. You need to this by yourself. [Example](https://github.com/dachcom-digital/pimcore-dynamic-search-data-provider-trinity#installation).
- Paginator changed:
- Removed Zend Paginator
- Use Paginator from `KnpPaginatorBundle` which is included in PX by default
- `AdapterInterface` changes (This affects you only if you're using a custom paginator `adapter_class`):
- `count()` renamed to `getCount()`
- `setItemCountPerPage()` added
- `setCurrentPageNumber()` added
- `dynamic_search_default_paginator_class` container parameter removed. If you want to modify the paginator items, just us
the `knp_pager.items` event
- `views/common/list/paginated/_wrapper.html.twig`, `views/common/pagination/_default.html.twig` mark-up changed, check your views accordingly
- Resource (Untrusted/Proxy) validation has been removed, you need to use the [resource validator](docs/40_ResourceValidator.md) now:
- Methods `checkUntrustedResourceProxy` and `validateUntrustedResource` from `DataProviderInterface` has been removed. Use `DataProviderValidationAwareInterface::validateResource` instead.
- Methods `checkUntrustedResourceProxy` and `validateUntrustedResource` from `ResourceValidatorInterface` has been removed.
- Class `ProxyResource` has been removed.
- Logfile has been moved to symphony's default log base
- Recommended folder structure by symfony adopted
- [ROUTE] Route include changed from `DynamicSearchBundle/Resources/config/pimcore/routing/frontend_routing.yml` to `DynamicSearchBundle/config/pimcore/routing/frontend_routing.yaml`

### Fixes
- Improve Logger [#40](https://github.com/dachcom-digital/pimcore-dynamic-search/issues/40)
--

### New Features
- Introducing backend panel and HealthState [#34](https://github.com/dachcom-digital/pimcore-dynamic-search/issues/34)
- Provide inherited element dispatcher [#42](https://github.com/dachcom-digital/pimcore-dynamic-search/issues/42)
--

***

DynamicSearch 1.x Upgrade Notes: https://github.com/dachcom-digital/pimcore-dynamic-search/blob/1.x/UPGRADE.md
DynamicSearch 2.x Upgrade Notes: https://github.com/dachcom-digital/pimcore-dynamic-search/blob/2.x/UPGRADE.md
9 changes: 5 additions & 4 deletions codeception.dist.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
namespace: DachcomBundle\Test
support_namespace: Support
actor: Tester
paths:
tests: tests
output: tests/_output
data: tests/_data
support: tests/_support
envs: tests/_envs
output: tests/_output
log: tests/_output/var/logs
data: tests/_data
support: tests/Support
bootstrap: _bootstrap.php
settings:
bootstrap: _bootstrap.php
memory_limit: -1
colors: true
params:
Expand Down
19 changes: 10 additions & 9 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "dachcom-digital/dynamic-search",
"type": "pimcore-bundle",
"license": "GPL-3.0-or-later",
"description": "Pimcore X Dynamic Search Bundle",
"description": "Pimcore Dynamic Search Bundle",
"keywords": ["pimcore", "search"],
"homepage": "https://github.com/dachcom-digital/pimcore-dynamic-search",
"authors": [
Expand All @@ -15,7 +15,7 @@
],
"autoload": {
"psr-4": {
"DynamicSearchBundle\\": "src/DynamicSearchBundle"
"DynamicSearchBundle\\": "src/"
}
},
"autoload-dev": {
Expand All @@ -25,7 +25,7 @@
},
"extra": {
"branch-alias": {
"dev-master": "2.x-dev"
"dev-master": "3.x-dev"
},
"pimcore": {
"bundles": [
Expand All @@ -34,14 +34,15 @@
}
},
"require": {
"pimcore/pimcore": "^10.1"
"symfony/form": "^6.2",
"pimcore/pimcore": "^11.0"
},
"require-dev": {
"codeception/codeception": "^4.1",
"codeception/module-webdriver": "^1.4",
"codeception/module-symfony": "^1.6",
"phpstan/phpstan": "^0.12",
"phpstan/phpstan-symfony": "^0.12",
"codeception/codeception": "^5.0",
"codeception/module-symfony": "^3.1",
"codeception/module-webdriver": "^4.0",
"phpstan/phpstan": "^1.0",
"phpstan/phpstan-symfony": "^1.0",
"symplify/easy-coding-standard": "^9.0"
}
}
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
doctrine_migrations:
migrations_paths:
'DynamicSearchBundle\Migrations': '@DynamicSearchBundle/Migrations'
'DynamicSearchBundle\Migrations': '@DynamicSearchBundle/src/Migrations'

monolog:
channels: ['dynamic_search']
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
imports:
- { resource: services/*.yml }
- { resource: services/*.yaml }

services:

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ services:
autoconfigure: true
public: false

DynamicSearchBundle\EventListener\Admin\AssetListener:
tags:
- { name: kernel.event_subscriber }

DynamicSearchBundle\EventSubscriber\PaginateRawResultSubscriber:
tags:
- { name: kernel.event_subscriber }
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
8 changes: 4 additions & 4 deletions docs/0_ExampleSetup.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ return [
Create a YAML file in your configuration directory

``` yaml
# config/config/dynamic-search.yml
# config/config/dynamic-search.yaml
services:

App\DynamicSearch\IndexDefinition\Trinity\Definition:
Expand Down Expand Up @@ -116,9 +116,9 @@ dynamic_search:
And link it into your main config. To do so update the imports block at the top. Alternatively, you can just add another `imports` at the bottom.

```yaml
# config/config/config.yml
# config/config/config.yaml
imports:
- { resource: dynamic-search.yml }
- { resource: dynamic-search.yaml }
```

Expand Down Expand Up @@ -193,7 +193,7 @@ class Definition implements DocumentDefinitionBuilderInterface

## Indexing

To index your data, execute folowing in the command line
To index your data, just execute:

``` bash
bin/console dynamic-search:run
Expand Down
File renamed without changes.
File renamed without changes
File renamed without changes.
Loading

0 comments on commit 3bfddc1

Please sign in to comment.