Skip to content

Commit

Permalink
Merge branch 'master' into patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
NiklasBr committed Oct 27, 2023
2 parents 075d69b + e289c2b commit 03dc1ff
Show file tree
Hide file tree
Showing 180 changed files with 1,147 additions and 706 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
14 changes: 7 additions & 7 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 Expand Up @@ -114,4 +114,4 @@ jobs:
continue-on-error: true
run: |
bin/console cache:warmup --env=test
vendor/bin/ecs check ${{ github.workspace }}/lib/test-bundle/src/SeoBundle --config ${{ github.workspace }}/lib/test-bundle/ecs.php
vendor/bin/ecs check ${{ github.workspace }}/lib/test-bundle/src --config ${{ github.workspace }}/lib/test-bundle/ecs.php
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 .gitignore
Expand Up @@ -52,4 +52,4 @@ php-cgi.core
/tests/_output/*
/tests/_data/*
!/tests/_data/.gitkeep
/tests/_support/_generated/*
/tests/Support/_generated/*
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 |
| **3.x** | `11.0` | `6.2` | 30.08.2023 | Feature Branch | master |
| **2.x** | `10.1` - `10.6` | `5.4` | 14.10.2021 | Unsupported | 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
16 changes: 8 additions & 8 deletions composer.json
Expand Up @@ -15,7 +15,7 @@
],
"autoload": {
"psr-4": {
"SeoBundle\\": "src/SeoBundle"
"SeoBundle\\": "src/"
}
},
"autoload-dev": {
Expand All @@ -32,19 +32,19 @@
},
"require": {
"ext-dom": "*",
"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": {
"dachcom-digital/schema": "^2.0"
"dachcom-digital/schema": "^3.0"
}
}
@@ -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.
18 changes: 9 additions & 9 deletions docs/MetaData/20_Extractors.md
Expand Up @@ -13,15 +13,15 @@ This method allows you to update the `SeoMetaData` object

## SeoMetaData Class

| Name | Description
|------|------------|
| `setMetaDescription` | Set meta description. |
| `setTitle` | Set title. |``
| `setTitle` | Set title. |
| `addExtraProperty`, `setExtraProperties` | Add a extra property. |
| `addSchema` | Add a schema block ( `application/ld+json`). **Note!** No script tags are allowed here, only encoded json data! |
| `addExtraName`, `setExtraNames` | Add a extra name meta field. |
| `addExtraHttp`, `setExtraHttp` | Add a extra http meta field. |
| Name | Description |
|------------------------------------------|-----------------------------------------------------------------------------------------------------------------|
| `setMetaDescription` | Set meta description. |
| `setTitle` | Set title. |``
| `setTitle` | Set title. |
| `addExtraProperty`, `setExtraProperties` | Add a extra property. |
| `addSchema` | Add a schema block ( `application/ld+json`). **Note!** No script tags are allowed here, only encoded json data! |
| `addExtraName`, `setExtraNames` | Add a extra name meta field. |
| `addExtraHttp`, `setExtraHttp` | Add a extra http meta field. |

> **Note:** Extractors are prioritized services.
> If another extractor supports your element too it could override your current definition.
Expand Down

0 comments on commit 03dc1ff

Please sign in to comment.