Skip to content

Commit

Permalink
Merge pull request #53 from dachcom-digital/p11
Browse files Browse the repository at this point in the history
Pimcore 11 Support
  • Loading branch information
solverat committed Aug 10, 2023
2 parents 93de4ad + 6c763be commit 14825bf
Show file tree
Hide file tree
Showing 178 changed files with 1,133 additions and 692 deletions.
30 changes: 20 additions & 10 deletions .github/workflows/codeception.yml
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
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:root@127.0.0.1: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
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:root@127.0.0.1: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
2 changes: 1 addition & 1 deletion LICENSE.md
@@ -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
13 changes: 10 additions & 3 deletions README.md
Expand Up @@ -26,19 +26,26 @@ The last SEO Bundle for pimcore you'll ever need!

| Release | Supported Pimcore Versions | Supported Symfony Versions | Release Date | Maintained | Branch |
|---------|----------------------------|----------------------------|--------------|----------------|--------|
| **2.x** | `10.1` - `10.6` | `5.4` | 14.10.2020 | Feature Branch | master |
| **3x** | `11.0` | `6.2` | -- | Feature Branch | master |
| **2.x** | `10.1` - `10.6` | `5.4` | 14.10.2020 | Bugfixes | 2.x |
| **1.x** | `6.0` - `6.9` | `3.4`, `^4.4` | 27.04.2020 | Unsupported | 1.x |


## Installation

```json
"require" : {
"dachcom-digital/seo" : "~2.2.0",
"dachcom-digital/seo" : "~3.0.0",
}
```

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

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

## Upgrading
Expand Down
26 changes: 11 additions & 15 deletions UPGRADE.md
@@ -1,22 +1,18 @@
# Upgrade Notes

## 2.2.0
- [BUGFIX] fix encoding in schema json validation process [#45](https://github.com/dachcom-digital/pimcore-seo/issues/45)
- [IMPROVEMENT] Respect Pimcore fallback languages [#44](https://github.com/dachcom-digital/pimcore-seo/issues/44)

## 2.1.0
- [BUGFIX] Fix Array Merge Process [#32](https://github.com/dachcom-digital/pimcore-seo/issues/32)
- [BUGFIX] Avoid triggering deprecation message on isMasterRequest() [#36](https://github.com/dachcom-digital/pimcore-seo/pull/36)
- [BUGFIX] Support CoreShop 3 Thumbnails [@dkarlovi](https://github.com/dachcom-digital/pimcore-seo/pull/30)
- [IMPROVEMENT] Avoid duplicate integrator registration [#28](https://github.com/dachcom-digital/pimcore-seo/issues/28)
- [IMPROVEMENT] Allow preview images with spaces [#35](https://github.com/dachcom-digital/pimcore-seo/issues/35)
- [NEW FEATURE] Add presets to html tag integrator [#37](https://github.com/dachcom-digital/pimcore-seo/issues/37)

## Migrating from Version 1.x to Version 2.0.0
## Migrating from Version 2.x to Version 3.0.0
- Execute: `bin/console doctrine:migrations:migrate --prefix 'SeoBundle\Migrations'`

### Global Changes
- PHP8 return type declarations added: you may have to adjust your extensions accordingly
- Recommended folder structure by symfony adopted
- SEO changes are not getting persisted at auto-save events anymore

### New Features
- Xliff Import/Export Support, see [#31](https://github.com/dachcom-digital/pimcore-seo/issues/31)
- Introduced `XliffAwareIntegratorInterface` to specify xliff translation states for given integrator
- Properties for `OpenGraph` and `TwitterCard` integrator can be extended by an 3. argument to include/exclude them for xliff translations (Default `false`)
- Seo Document Editor Support, see [#54](https://github.com/dachcom-digital/pimcore-seo/issues/54)

***

SeoBundle 1.x Upgrade Notes: https://github.com/dachcom-digital/pimcore-seo/blob/1.x/UPGRADE.md
SeoBundle 2.x Upgrade Notes: https://github.com/dachcom-digital/pimcore-seo/blob/2.x/UPGRADE.md
9 changes: 5 additions & 4 deletions codeception.dist.yml
@@ -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
14 changes: 7 additions & 7 deletions composer.json
Expand Up @@ -15,7 +15,7 @@
],
"autoload": {
"psr-4": {
"SeoBundle\\": "src/SeoBundle"
"SeoBundle\\": "src/"
}
},
"autoload-dev": {
Expand All @@ -31,16 +31,16 @@
}
},
"require": {
"pimcore/pimcore": "^10.1",
"pimcore/pimcore": "^11.0",
"google/apiclient": "^2.0",
"doctrine/orm": "^2.7"
},
"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"
},
"suggest": {
Expand Down
@@ -1,13 +1,16 @@
SeoBundle\Model\QueueEntry:
type: entity
table: seo_queue_entry
fields:
id:
uuid:
unique: true
column: uuid
id: true
type: string
type: uuid
generator:
strategy: UUID
strategy: CUSTOM
customIdGenerator:
class: Symfony\Bridge\Doctrine\IdGenerator\UuidGenerator
fields:
type:
column: '`type`'
nullable: false
Expand Down
Expand Up @@ -9,7 +9,7 @@ CREATE TABLE IF NOT EXISTS `seo_element_meta_data` (
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC;

CREATE TABLE IF NOT EXISTS `seo_queue_entry` (
`uuid` varchar(255) NOT NULL,
`uuid` binary(16) NOT NULL COMMENT '(DC2Type:uuid)',
`type` varchar(255) NOT NULL,
`data_type` varchar(255) NOT NULL,
`data_id` int(11) NOT NULL,
Expand Down
File renamed without changes.
Expand Up @@ -7,4 +7,4 @@ doctrine:

doctrine_migrations:
migrations_paths:
'SeoBundle\Migrations': '@SeoBundle/Migrations'
'SeoBundle\Migrations': '@SeoBundle/src/Migrations'
File renamed without changes.
2 changes: 2 additions & 0 deletions config/services.yaml
@@ -0,0 +1,2 @@
imports:
- { resource: services/*.yaml }
File renamed without changes.
@@ -1,7 +1,7 @@
services:

SeoBundle\Controller\:
resource: '../../Controller'
resource: '../../src/Controller'
public: true
autowire: true
autoconfigure: true
Expand Down
Expand Up @@ -5,6 +5,10 @@ services:
autoconfigure: true
public: false

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

SeoBundle\EventListener\PimcoreElementListener:
arguments:
$enabled: '%seo.index.pimcore_element_watcher.enabled%'
Expand Down
File renamed without changes.
18 changes: 18 additions & 0 deletions config/services/logger.yaml
@@ -0,0 +1,18 @@
services:

_defaults:
autowire: true
autoconfigure: true
public: false

seo.application_logger.seo_logger:
public: true
class: Pimcore\Bundle\ApplicationLoggerBundle\ApplicationLogger
calls:
- [addWriter, ['@Pimcore\Bundle\ApplicationLoggerBundle\Handler\ApplicationLoggerDb']]
- [setComponent, ['seo-bundle']]

SeoBundle\Logger\LoggerInterface: '@SeoBundle\Logger\Logger'
SeoBundle\Logger\Logger:
arguments:
- '@seo.application_logger.seo_logger'
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.
Expand Up @@ -7,8 +7,8 @@ services:

SeoBundle\MetaData\Extractor\ThirdParty\CoreShop\TitleDescriptionExtractor:
tags:
- {name: seo.meta_data.extractor, identifier: coreshop_title_description, priority: 10 }
- { name: seo.meta_data.extractor, identifier: coreshop_title_description, priority: 10 }

SeoBundle\MetaData\Extractor\ThirdParty\CoreShop\OGExtractor:
tags:
- {name: seo.meta_data.extractor, identifier: coreshop_og_tags, priority: 10 }
- { name: seo.meta_data.extractor, identifier: coreshop_og_tags, priority: 10 }
Expand Up @@ -7,4 +7,4 @@ services:

SeoBundle\MetaData\Extractor\ThirdParty\News\EntryMetaExtractor:
tags:
- {name: seo.meta_data.extractor, identifier: news_entry_meta, priority: 10 }
- { name: seo.meta_data.extractor, identifier: news_entry_meta, priority: 10 }
10 changes: 10 additions & 0 deletions config/services/third_party/pimcore_seo.yaml
@@ -0,0 +1,10 @@
services:

_defaults:
autowire: true
autoconfigure: true
public: false

SeoBundle\EventListener\Admin\SeoDocumentEditorListener:
tags:
- { name: kernel.event_subscriber }
10 changes: 10 additions & 0 deletions config/services/third_party/pimcore_xliff.yaml
@@ -0,0 +1,10 @@
services:

_defaults:
autowire: true
autoconfigure: true
public: false

SeoBundle\EventListener\Admin\XliffListener:
tags:
- { name: kernel.event_subscriber }
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion docs/MetaData/Integrator/11_OpenGraphIntegrator.md
Expand Up @@ -35,7 +35,7 @@ seo:
types:
- ['my_type', 'my_type']
properties:
- ['og:test', 'og:test']
- ['og:test', 'og:test', true] # 3. argument: allow export to xliff translation
presets:
- label: 'My Preset'
icon_class: 'pimcore_icon_user'
Expand Down
2 changes: 1 addition & 1 deletion docs/MetaData/Integrator/12_TwitterCardIntegrator.md
Expand Up @@ -30,5 +30,5 @@ seo:
types:
- ['my_type', 'my_type']
properties:
- ['twitter:definition', 'twitter:definition']
- ['twitter:definition', 'twitter:definition', true] # 3. argument: allow export to xliff translation
```
8 changes: 4 additions & 4 deletions phpstan.neon
Expand Up @@ -7,8 +7,8 @@ parameters:
symfony:
container_xml_path: %currentWorkingDirectory%/var/cache/test/TestKernelTestDebugContainer.xml
constant_hassers: false
excludes_analyse:
excludePaths:
# as long we don't install the dependencies :(
- '*SeoBundle/MetaData/Extractor/ThirdParty/News/EntryMetaExtractor.php'
- '*SeoBundle/MetaData/Extractor/ThirdParty/CoreShop/OGExtractor.php'
- '*SeoBundle/MetaData/Extractor/ThirdParty/CoreShop/TitleDescriptionExtractor.php'
- src/MetaData/Extractor/ThirdParty/News/EntryMetaExtractor.php
- src/MetaData/Extractor/ThirdParty/CoreShop/OGExtractor.php
- src/MetaData/Extractor/ThirdParty/CoreShop/TitleDescriptionExtractor.php
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.
Expand Up @@ -64,7 +64,7 @@ Seo.MetaData.Integrator.PropertyIntegratorItem = Class.create({
user = pimcore.globalmanager.get('user');

propertyTypeStore = new Ext.data.ArrayStore({
fields: ['label', 'key'],
fields: ['label', 'key', 'xliffExportAware'],
data: configuration.hasOwnProperty('properties') ? configuration.properties : []
});

Expand Down
File renamed without changes.

0 comments on commit 14825bf

Please sign in to comment.