Skip to content

Commit

Permalink
Pimcore 11 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
Walter Canal committed Jan 19, 2024
1 parent 219b78c commit c14fbd2
Show file tree
Hide file tree
Showing 133 changed files with 552 additions and 911 deletions.
Empty file modified .eslintrc.json
100644 → 100755
Empty file.
Empty file modified .github/dependabot.yml
100644 → 100755
Empty file.
Empty file modified .github/workflows/dependabot-auto-merge.yml
100644 → 100755
Empty file.
Empty file modified .github/workflows/js.yml
100644 → 100755
Empty file.
4 changes: 0 additions & 4 deletions .github/workflows/php.yml
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,6 @@ jobs:
- name: Install composer dependencies
uses: ramsey/composer-install@v2

- if: matrix.php-versions == '8.2'
name: Set phpstan configuration for PHP 8.2
run: cat phpstan-php8.2.neon > phpstan.neon

- name: Static analysis using phpstan
run: composer run phpstan -- --error-format=github

Expand Down
Empty file modified .gitignore
100644 → 100755
Empty file.
Empty file modified .php-cs-fixer.dist.php
100644 → 100755
Empty file.
Empty file modified .release-it.json
100644 → 100755
Empty file.
Empty file modified LICENSE
100644 → 100755
Empty file.
16 changes: 11 additions & 5 deletions README.md
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,21 @@

## Installation

```json
"require" : {
"valantic/pimcore-data-quality-bundle" : "^2.0"
}
```
composer require valantic/pimcore-data-quality-bundle

touch config/pimcore/data_quality.yaml
console pimcore:bundle:enable ValanticDataQualityBundle
console pimcore:bundle:install ValanticDataQualityBundle
Add Bundle to `bundles.php`:
```php
return [
Valantic\DataQualityBundle\ValanticDataQualityBundle::class => ['all' => true],
];
```

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

## Documentation

- [User](./docs/User.md)
Expand Down
5 changes: 5 additions & 0 deletions UPGRADE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Upgrade Notes

### Global Changes 2.0.0
- [IMPROVEMENT] Recommended folder structure by symfony adopted
- [BC BREAK] Moved configuration menu from marketing settings to Pimcore settings
178 changes: 89 additions & 89 deletions composer.json
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,95 +1,95 @@
{
"name": "valantic/pimcore-data-quality-bundle",
"version": "1.2.0",
"description": "Data quality score for Pimcore",
"type": "pimcore-bundle",
"require": {
"php": "^8.0",
"ext-json": "*",
"pimcore/pimcore": "^10.5",
"spatie/enum": "^3.13",
"symfony/validator": "^5.0"
},
"require-dev": {
"bamarni/composer-bin-plugin": "^1.8.2",
"infection/infection": "^0.26.19",
"phpstan/extension-installer": "^1.2",
"phpstan/phpstan": "^1.10.8",
"phpstan/phpstan-deprecation-rules": "^1.1.3",
"phpstan/phpstan-strict-rules": "^1.5.1",
"phpunit/phpunit": "^9.6.6",
"rector/rector": "^0.15.23",
"symfony/config": "^5.4.21",
"symfony/dependency-injection": "^5.4.21",
"symfony/framework-bundle": "^5.4.21",
"symfony/http-foundation": "^5.4.21",
"symfony/http-kernel": "^5.4.21",
"symfony/routing": "^5.4.21"
},
"license": "proprietary",
"authors": [
{
"name": "Linus Metzler",
"email": "linus.metzler@cec.valantic.com"
"name": "valantic/pimcore-data-quality-bundle",
"version": "2.0.0",
"description": "Data quality score for Pimcore",
"type": "pimcore-bundle",
"require": {
"ext-json": "*",
"pimcore/pimcore": "^11.0",
"pimcore/admin-ui-classic-bundle": "^1.2",
"symfony/http-client": "^6.4",
"symfony/validator": "^6.0"
},
{
"name": "Patrick Ryser",
"email": "patrick.ryser@cec.valantic.com"
}
],
"autoload": {
"psr-4": {
"Valantic\\DataQualityBundle\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"Valantic\\DataQualityBundle\\Tests\\": "tests/"
}
},
"extra": {
"pimcore": {
"bundles": [
"Valantic\\DataQualityBundle\\ValanticDataQualityBundle"
]
"require-dev": {
"bamarni/composer-bin-plugin": "^1.8.2",
"infection/infection": "^0.26.19",
"phpstan/extension-installer": "^1.2",
"phpstan/phpstan": "^1.10.8",
"phpstan/phpstan-deprecation-rules": "^1.1.3",
"phpstan/phpstan-strict-rules": "^1.5.1",
"phpunit/phpunit": "^9.6.6",
"rector/rector": "^0.15.23",
"symfony/config": "^6.2",
"symfony/dependency-injection": "^6.2",
"symfony/framework-bundle": "^6.2",
"symfony/http-foundation": "^6.2",
"symfony/http-kernel": "^6.2",
"symfony/routing": "^6.2"
},
"bamarni-bin": {
"bin-links": false,
"forward-command": true
}
},
"scripts": {
"post-install-cmd": [
"@composer bin all install --ansi"
],
"post-update-cmd": [
"@composer bin all update --ansi"
],
"phpstan": [
"vendor/bin/phpstan analyse --memory-limit=1G"
],
"php-cs-fixer": [
"vendor-bin/phpcs/vendor/bin/php-cs-fixer fix --diff"
"license": "proprietary",
"authors": [
{
"name": "Linus Metzler",
"email": "linus.metzler@cec.valantic.com"
},
{
"name": "Patrick Ryser",
"email": "patrick.ryser@cec.valantic.com"
}
],
"php-cs-fixer-check": [
"vendor-bin/phpcs/vendor/bin/php-cs-fixer fix --diff --dry-run"
],
"rector": [
"vendor/bin/rector process"
],
"test": "./vendor/bin/phpunit",
"infection": [
"Composer\\Config::disableProcessTimeout",
"./vendor/bin/infection --only-covered"
]
},
"config": {
"sort-packages": true,
"allow-plugins": {
"bamarni/composer-bin-plugin": true,
"ocramius/package-versions": true,
"infection/extension-installer": true,
"phpstan/extension-installer": true
"autoload": {
"psr-4": {
"Valantic\\DataQualityBundle\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"Valantic\\DataQualityBundle\\Tests\\": "tests/"
}
},
"extra": {
"pimcore": {
"bundles": [
"Valantic\\DataQualityBundle\\ValanticDataQualityBundle"
]
},
"bamarni-bin": {
"bin-links": false,
"forward-command": true
}
},
"scripts": {
"post-install-cmd": [
"@composer bin all install --ansi"
],
"post-update-cmd": [
"@composer bin all update --ansi"
],
"phpstan": [
"vendor/bin/phpstan analyse --memory-limit=1G"
],
"php-cs-fixer": [
"vendor-bin/phpcs/vendor/bin/php-cs-fixer fix --diff"
],
"php-cs-fixer-check": [
"vendor-bin/phpcs/vendor/bin/php-cs-fixer fix --diff --dry-run"
],
"rector": [
"vendor/bin/rector process"
],
"test": "./vendor/bin/phpunit",
"infection": [
"Composer\\Config::disableProcessTimeout",
"./vendor/bin/infection --only-covered"
]
},
"config": {
"sort-packages": true,
"allow-plugins": {
"bamarni/composer-bin-plugin": true,
"ocramius/package-versions": true,
"infection/extension-installer": true,
"phpstan/extension-installer": true
}
}
}
}
File renamed without changes.
5 changes: 5 additions & 0 deletions config/pimcore/routing.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
_valantic_dataquality_bundle:
resource: "../../src/Controller/"
type: annotation
prefix: /admin/valantic/data-quality

3 changes: 2 additions & 1 deletion src/Resources/config/serializer.yaml → config/serializer.yaml
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
services:
_defaults:
autowire: true
autoconfigure: true
public: false

#
Expand All @@ -25,6 +26,6 @@ services:
- { name: valantic.dataquality.serializer.normalizer, priority: -910 }

Valantic\DataQualityBundle\Normalizer\:
resource: "../../Normalizer"
resource: "../src/Normalizer"
tags:
- { name: valantic.dataquality.serializer.normalizer }
19 changes: 7 additions & 12 deletions src/Resources/config/services.yml → config/services.yaml
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,37 +1,32 @@
services:
# default configuration for services in *this* file
_defaults:
# automatically injects dependencies in your services
autowire: true
# automatically registers your services as commands, event subscribers, etc.
autoconfigure: true
# this means you cannot fetch services directly from the container via $container->get()
# if you need to do this, you can override this setting on individual services
public: false

# controllers are imported separately to make sure they're public
# and have a tag that allows actions to type-hint services
Valantic\DataQualityBundle\Controller\:
resource: '../../Controller'
resource: '../src/Controller'
public: true
tags: [ 'controller.service_arguments' ]

Valantic\DataQualityBundle\Validation\DataObject\Validate: '@valantic_dataquality_validate_dataobject'

Valantic\DataQualityBundle\Installer\Installer:
public: true
arguments:
$bundle: "@=service('kernel').getBundle('ValanticDataQualityBundle')"

Valantic\DataQualityBundle\Service\:
resource: '../../Service'
resource: '../src/Service'

Valantic\DataQualityBundle\Config\:
resource: '../../Config'
resource: '../src/Config'

Valantic\DataQualityBundle\Validation\DataObject\Attributes\:
resource: '../../Validation/DataObject/Attributes'
resource: '../src/Validation/DataObject/Attributes'

Valantic\DataQualityBundle\Repository\:
resource: '../../Repository'
resource: '../src/Repository'

Valantic\DataQualityBundle\Repository\ConstraintDefinitions:
arguments:
Expand Down
Empty file modified docs/Developer.md
100644 → 100755
Empty file.
Empty file modified docs/User.md
100644 → 100755
Empty file.
Empty file modified infection.json.dist
100644 → 100755
Empty file.
Empty file modified package-lock.json
100644 → 100755
Empty file.
Empty file modified package.json
100644 → 100755
Empty file.
36 changes: 0 additions & 36 deletions phpstan-baseline.neon
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
parameters:
ignoreErrors:
-
message: "#^Access to an undefined property Symfony\\\\Component\\\\Validator\\\\Constraint\\:\\:\\$container\\.$#"
count: 1
path: src/Constraint/RelationScore/AbstractValidator.php

-
message: "#^Access to an undefined property Symfony\\\\Component\\\\Validator\\\\Constraint\\:\\:\\$message\\.$#"
count: 1
Expand All @@ -25,11 +20,6 @@ parameters:
count: 1
path: src/Controller/ConstraintConfigController.php

-
message: "#^Parameter \\#2 \\$default of method Symfony\\\\Component\\\\HttpFoundation\\\\InputBag\\:\\:get\\(\\) expects bool\\|float\\|int\\|string\\|null, array given\\.$#"
count: 1
path: src/Controller/MetaConfigController.php

-
message: "#^Call to an undefined method Symfony\\\\Component\\\\Config\\\\Definition\\\\Builder\\\\NodeDefinition\\:\\:addDefaultsIfNotSet\\(\\)\\.$#"
count: 1
Expand Down Expand Up @@ -70,11 +60,6 @@ parameters:
count: 1
path: src/Repository/ConstraintDefinitions.php

-
message: "#^Variable method call on Pimcore\\\\Model\\\\DataObject\\.$#"
count: 2
path: src/Repository/DataObjectRepository.php

-
message: "#^Method Valantic\\\\DataQualityBundle\\\\Service\\\\Formatters\\\\ValueFormatter\\:\\:shorten\\(\\) should return array\\<string\\>\\|string but returns array\\<array\\<string\\>\\|string\\>\\.$#"
count: 1
Expand All @@ -89,24 +74,3 @@ parameters:
message: "#^Method Valantic\\\\DataQualityBundle\\\\Service\\\\Formatters\\\\ValueFormatter\\:\\:trim\\(\\) should return array\\<string\\>\\|string but returns array\\<array\\<string\\>\\|string\\>\\|string\\.$#"
count: 1
path: src/Service/Formatters/ValueFormatter.php

-
message: "#^Call to an undefined method Pimcore\\\\Model\\\\DataObject\\\\ClassDefinition\\|Pimcore\\\\Model\\\\DataObject\\\\Fieldcollection\\\\Definition\\:\\:getTitle\\(\\)\\.$#"
count: 2
path: src/Service/Information/AbstractDefinitionInformation.php

-
message: "#^Method Valantic\\\\DataQualityBundle\\\\ValanticDataQualityBundle\\:\\:getInstaller\\(\\) should return Valantic\\\\DataQualityBundle\\\\Installer\\\\Installer but returns object\\|null\\.$#"
count: 1
path: src/ValanticDataQualityBundle.php

-
message: "#^Instanceof between Valantic\\\\DataQualityBundle\\\\Validation\\\\DataObject\\\\Attributes\\\\AbstractAttribute and Valantic\\\\DataQualityBundle\\\\Validation\\\\ColorableInterface will always evaluate to true\\.$#"
count: 1
path: src/Validation/AbstractValidateObject.php

-
message: "#^Instanceof between Valantic\\\\DataQualityBundle\\\\Validation\\\\DataObject\\\\Attributes\\\\AbstractAttribute and Valantic\\\\DataQualityBundle\\\\Validation\\\\ScorableInterface will always evaluate to true\\.$#"
count: 1
path: src/Validation/AbstractValidateObject.php

20 changes: 0 additions & 20 deletions phpstan-php8.2.neon

This file was deleted.

3 changes: 0 additions & 3 deletions phpstan.neon
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,3 @@ parameters:
ignoreErrors:
- '#^Method Valantic\\DataQualityBundle\\Normalizer\\ObjectbrickNormalizer\:\:normalize\(\) return type with generic class ArrayObject does not specify its types: TKey, TValue$#'
- '#^Method Valantic\\DataQualityBundle\\Normalizer\\FieldcollectionNormalizer\:\:normalize\(\) return type with generic class ArrayObject does not specify its types: TKey, TValue$#'
- '#^Class Valantic\\DataQualityBundle\\Controller\\BaseController extends deprecated class Pimcore\\Bundle\\AdminBundle\\Controller\\AdminController#'
- '#^Call to method checkPermission\(\) of deprecated class Pimcore\\Controller\\UserAwareController#'
- '#^Parameter \$userResolver of method Valantic\\DataQualityBundle\\Service\\Formatters\\ValuePreviewFormatter\:\:__construct\(\) has typehint with deprecated class Pimcore\\Bundle\\AdminBundle\\Security\\User\\TokenStorageUserResolver\:#'
Empty file modified phpunit.xml.dist
100644 → 100755
Empty file.
Loading

0 comments on commit c14fbd2

Please sign in to comment.