Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 1 addition & 6 deletions .allowed-licenses.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,6 @@
'OSL-3.0',
'Artistic-1.0',
'ISC',

)
->addAllowedPackage('pimcore/admin-ui-classic-bundle')
->addAllowedPackage('pimcore/google-marketing-bundle')
->addAllowedPackage('pimcore/newsletter-bundle')
->addAllowedPackage('pimcore/opensearch-client')
->addAllowedPackage('pimcore/pimcore')
->addAllowedVendor('pimcore')
->build();
4 changes: 2 additions & 2 deletions .github/workflows/behat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,11 @@ jobs:
matrix:
include:
- php: 8.3
pimcore: ^12.0
pimcore: ^12.2
dependencies: highest
allow-failure: false
- php: 8.4
pimcore: ^12.0
pimcore: ^12.2
dependencies: highest
allow-failure: true

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/behat_ui.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,11 @@ jobs:
matrix:
include:
- php: 8.3
pimcore: ^12.0
pimcore: ^12.2
dependencies: highest
allow-failure: false
- php: 8.4
pimcore: ^12.0
pimcore: ^12.2
dependencies: highest
allow-failure: true

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/license-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
strategy:
matrix:
php: [ 8.3, 8.4 ]
pimcore: [ ^12.0 ]
pimcore: [ ^12.2 ]
dependencies: [ highest ]
services:
database:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/packages_bundles.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ jobs:
fail-fast: false
matrix:
php: [ 8.3, 8.4 ]
pimcore: [ ^12.0 ]
pimcore: [ ^12.2 ]
dependencies: [ highest ]
package: "${{ fromJson(needs.list.outputs.packages) }}"

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/packages_components.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:
fail-fast: false
matrix:
php: [ 8.3, 8.4 ]
pimcore: [ ^12.0 ]
pimcore: [ ^12.2 ]
dependencies: [ highest ]
package: "${{ fromJson(needs.list.outputs.packages) }}"

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/static.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
strategy:
matrix:
php: [ 8.3, 8.4 ]
pimcore: [ ^12.0 ]
pimcore: [ ^12.2 ]
dependencies: [ highest ]
services:
database:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ transcends ordinary transactions.

# Requirements

- Pimcore `^12.0`
- Pimcore `^12.2`

# Installation

Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
"php": "^8.3",
"ext-json": "*",
"doctrine/data-fixtures": "^1.5",
"doctrine/dbal": "^4.3",
"doctrine/dbal": "^4.2",
"doctrine/doctrine-bundle": "^2.4",
"doctrine/doctrine-fixtures-bundle": "^3.4",
"doctrine/orm": "^3.0",
Expand All @@ -103,7 +103,7 @@
"pimcore/admin-ui-classic-bundle": "^2.0",
"pimcore/google-marketing-bundle": "^2.0",
"pimcore/newsletter-bundle": "^2.0",
"pimcore/pimcore": "^12.0",
"pimcore/pimcore": "^12.2",
"rinvex/countries": "^9.0",
"sebastian/diff": "^4.0 | ^5.0 | ^6.0",
"stof/doctrine-extensions-bundle": "^1.6",
Expand Down
2 changes: 1 addition & 1 deletion src/CoreShop/Bundle/AddressBundle/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"require": {
"coreshop/address": "^5.0",
"coreshop/resource-bundle": "^5.0",
"pimcore/pimcore": "^12.0"
"pimcore/pimcore": "^12.2"
},
"require-dev": {
"phpstan/phpstan": "^1.10",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
],
"require": {
"coreshop/pimcore": "^5.0",
"pimcore/pimcore": "^12.0",
"pimcore/pimcore": "^12.2",
"sebastian/diff": "^4.0 | ^5.0 | ^6.0"
},
"require-dev": {
Expand Down
2 changes: 1 addition & 1 deletion src/CoreShop/Bundle/ConfigurationBundle/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"require": {
"coreshop/configuration": "^5.0",
"coreshop/resource-bundle": "^5.0",
"pimcore/pimcore": "^12.0"
"pimcore/pimcore": "^12.2"
},
"require-dev": {
"phpstan/phpstan": "^1.10",
Expand Down
2 changes: 1 addition & 1 deletion src/CoreShop/Bundle/CoreBundle/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
"doctrine/doctrine-fixtures-bundle": "^3.4",
"fakerphp/faker": "^1.16",
"rinvex/countries": "^9.0",
"pimcore/pimcore": "^12.0",
"pimcore/pimcore": "^12.2",
"pimcore/newsletter-bundle": "^2.0"
},
"require-dev": {
Expand Down
2 changes: 1 addition & 1 deletion src/CoreShop/Bundle/CurrencyBundle/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"require": {
"coreshop/currency": "^5.0",
"coreshop/resource-bundle": "^5.0",
"pimcore/pimcore": "^12.0",
"pimcore/pimcore": "^12.2",
"symfony/intl": "^6.3 || ^7.0"
},
"require-dev": {
Expand Down
2 changes: 1 addition & 1 deletion src/CoreShop/Bundle/CustomerBundle/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
"require": {
"coreshop/customer": "^5.0",
"coreshop/resource-bundle": "^5.0",
"pimcore/pimcore": "^12.0",
"pimcore/pimcore": "^12.2",
"pimcore/newsletter-bundle": "^2.0"
},
"require-dev": {
Expand Down
2 changes: 1 addition & 1 deletion src/CoreShop/Bundle/FrontendBundle/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
],
"require": {
"coreshop/core-bundle": "^5.0",
"pimcore/pimcore": "^12.0"
"pimcore/pimcore": "^12.2"
},
"require-dev": {
"phpstan/phpstan": "^1.10",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public function __construct(

protected function quoteIdentifier(string $identifier): string
{
return $this->connection->quoteSingleIdentifier($identifier);
return $this->connection->quoteIdentifier($identifier);
}

protected function quote(string $identifier): string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public function __construct(

protected function quoteIdentifier(string $identifier): string
{
return $this->connection->quoteSingleIdentifier($identifier);
return $this->connection->quoteIdentifier($identifier);
}

protected function renderPrefix(?string $prefix): string
Expand Down
63 changes: 15 additions & 48 deletions src/CoreShop/Bundle/IndexBundle/Worker/MysqlWorker.php
Original file line number Diff line number Diff line change
Expand Up @@ -173,12 +173,7 @@ protected function createTableSchema(IndexInterface $index, Schema $tableSchema)
$table->addColumn('o_className', 'string')->setLength(255);
$table->addColumn('o_type', 'string')->setLength(255);
$table->addColumn('active', 'boolean');
/**
* @psalm-suppress InternalMethod
*/
$table->addPrimaryKeyConstraint(
new PrimaryKeyConstraint(null, [new UnqualifiedName(\Doctrine\DBAL\Schema\Name\Identifier::unquoted('o_id'))], true),
);
$table->setPrimaryKey(['o_id']);

foreach ($index->getColumns() as $column) {
if ($column instanceof IndexColumnInterface) {
Expand Down Expand Up @@ -219,9 +214,9 @@ protected function createTableSchema(IndexInterface $index, Schema $tableSchema)
*/
foreach ($index->getConfiguration()['indexes'] as $tableIndex) {
if ($tableIndex->getType() === TableIndex::TABLE_INDEX_TYPE_UNIQUE) {
$table->addUniqueIndex(array_values($tableIndex->getColumns()));
$table->addUniqueIndex($tableIndex->getColumns());
} else {
$table->addIndex(array_values($tableIndex->getColumns()));
$table->addIndex($tableIndex->getColumns());
}
}
}
Expand All @@ -237,23 +232,10 @@ protected function createLocalizedTableSchema(IndexInterface $index, Schema $tab
$table->addColumn('oo_id', 'integer');
$table->addColumn('language', 'string')->setLength(255);
$table->addColumn('name', 'string', ['notnull' => false])->setLength(255);
$table->setPrimaryKey(['oo_id', 'language']);
$table->addIndex(['oo_id']);
$table->addIndex(['language']);

/**
* @psalm-suppress InternalMethod
*/
$table->addPrimaryKeyConstraint(
new PrimaryKeyConstraint(
null,
[
new UnqualifiedName(\Doctrine\DBAL\Schema\Name\Identifier::unquoted('oo_id')),
new UnqualifiedName(\Doctrine\DBAL\Schema\Name\Identifier::unquoted('language')),
],
true,
),
);

foreach ($index->getColumns() as $column) {
$type = $column->getObjectType();
$interpreterClass = $column->hasInterpreter() ? $this->getInterpreterObject($column) : null;
Expand Down Expand Up @@ -294,9 +276,9 @@ protected function createLocalizedTableSchema(IndexInterface $index, Schema $tab
*/
foreach ($index->getConfiguration()['localizedIndexes'] as $tableIndex) {
if ($tableIndex->getType() === TableIndex::TABLE_INDEX_TYPE_UNIQUE) {
$table->addUniqueIndex(array_values($tableIndex->getColumns()));
$table->addUniqueIndex($tableIndex->getColumns());
} else {
$table->addIndex(array_values($tableIndex->getColumns()));
$table->addIndex($tableIndex->getColumns());
}
}
}
Expand All @@ -314,22 +296,7 @@ protected function createRelationalTableSchema(IndexInterface $index, Schema $ta
$table->addColumn('dest', 'integer');
$table->addColumn('fieldname', 'string')->setLength(255);
$table->addColumn('type', 'string')->setLength(255);

/**
* @psalm-suppress InternalMethod
*/
$table->addPrimaryKeyConstraint(
new PrimaryKeyConstraint(
null,
[
new UnqualifiedName(\Doctrine\DBAL\Schema\Name\Identifier::unquoted('src')),
new UnqualifiedName(\Doctrine\DBAL\Schema\Name\Identifier::unquoted('dest')),
new UnqualifiedName(\Doctrine\DBAL\Schema\Name\Identifier::unquoted('fieldname')),
new UnqualifiedName(\Doctrine\DBAL\Schema\Name\Identifier::unquoted('type')),
],
true,
),
);
$table->setPrimaryKey(['src', 'dest', 'fieldname', 'type']);

foreach ($this->getExtensions($index) as $extension) {
if ($extension instanceof IndexRelationalColumnsExtensionInterface) {
Expand Down Expand Up @@ -525,9 +492,9 @@ protected function doInsertData(IndexInterface $index, array $data): void
continue;
}

$dataKeys[$this->database->quoteSingleIdentifier($key)] = '?';
$dataKeys[$this->database->quoteIdentifier($key)] = '?';
$updateData[] = $value;
$insertStatement[] = $this->database->quoteSingleIdentifier($key) . ' = ?';
$insertStatement[] = $this->database->quoteIdentifier($key) . ' = ?';
$insertData[] = $value;
}

Expand All @@ -538,11 +505,11 @@ protected function doInsertData(IndexInterface $index, array $data): void

$value = $data[$column->getName()];

$dataKeys[$this->database->quoteSingleIdentifier($column->getName())] = $this->typeCastValueSQLDecleration(
$dataKeys[$this->database->quoteIdentifier($column->getName())] = $this->typeCastValueSQLDecleration(
$column,
);
$updateData[] = $value;
$insertStatement[] = $this->database->quoteSingleIdentifier(
$insertStatement[] = $this->database->quoteIdentifier(
$column->getName(),
) . ' = ' . $this->typeCastValueSQLDecleration($column);
$insertData[] = $value;
Expand Down Expand Up @@ -594,9 +561,9 @@ protected function doInsertLocalizedData(IndexInterface $index, array $data): vo
continue;
}

$dataKeys[$this->database->quoteSingleIdentifier($key)] = '?';
$dataKeys[$this->database->quoteIdentifier($key)] = '?';
$updateData[] = $value;
$insertStatement[] = $this->database->quoteSingleIdentifier($key) . ' = ?';
$insertStatement[] = $this->database->quoteIdentifier($key) . ' = ?';
$insertData[] = $value;
}

Expand All @@ -607,12 +574,12 @@ protected function doInsertLocalizedData(IndexInterface $index, array $data): vo

$value = $values[$column->getName()];

$dataKeys[$this->database->quoteSingleIdentifier(
$dataKeys[$this->database->quoteIdentifier(
$column->getName(),
)] = $this->typeCastValueSQLDecleration($column);
$updateData[] = $value;

$insertStatement[] = $this->database->quoteSingleIdentifier(
$insertStatement[] = $this->database->quoteIdentifier(
$column->getName(),
) . ' = ' . $this->typeCastValueSQLDecleration($column);
$insertData[] = $value;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ public function quote($value)
*/
public function quoteIdentifier($value)
{
return $this->database->quoteSingleIdentifier($value);
return $this->database->quoteIdentifier($value);
}

/**
Expand All @@ -248,8 +248,8 @@ public function buildSimilarityOrderBy(array $fields, int $objectId): string
}


$fieldString .= $this->db->quoteSingleIdentifier($field->getField());
$maxFieldString .= 'MAX('.$this->db->quoteSingleIdentifier($field->getField()).') as '.$this->db->quoteSingleIdentifier($field->getField());
$fieldString .= $this->db->quoteIdentifier($field->getField());
$maxFieldString .= 'MAX('.$this->db->quoteIdentifier($field->getField()).') as '.$this->db->quoteIdentifier($field->getField());
}
}

Expand Down
7 changes: 6 additions & 1 deletion src/CoreShop/Bundle/IndexBundle/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"coreshop/registry": "^5.0",
"coreshop/resource-bundle": "^5.0",
"coreshop/menu-bundle": "^5.0",
"pimcore/pimcore": "^12.0",
"pimcore/pimcore": "^12.2",
"doctrine/migrations": "^3.9"
},
"suggest": {
Expand Down Expand Up @@ -63,5 +63,10 @@
"CoreShop\\Bundle\\IndexBundle\\CoreShopIndexBundle"
]
}
},
"config": {
"allow-plugins": {
"php-http/discovery": false
}
}
}
Loading
Loading