diff --git a/.github/workflows/full-integration-tests.yaml b/.github/workflows/full-integration-tests.yaml
index 37acdf3b1e6..a22015a424b 100644
--- a/.github/workflows/full-integration-tests.yaml
+++ b/.github/workflows/full-integration-tests.yaml
@@ -1,7 +1,12 @@
name: Integration Tests - Full Test Suite
run-name: ${{ github.actor }} is running Full Integration Test Suite
on:
- workflow_dispatch: {}
+ workflow_dispatch:
+ inputs:
+ test_directory:
+ description: 'Test directory to run integration tests'
+ type: string
+ required: false
jobs:
call-workflow:
@@ -11,3 +16,4 @@ jobs:
with:
repository: ${{ github.repository }}
head: ${{ github.sha }}
+ test_directory: ${{ github.event.inputs.test_directory }}
diff --git a/app/code/Magento/Catalog/Model/Indexer/Category/Product/AbstractAction.php b/app/code/Magento/Catalog/Model/Indexer/Category/Product/AbstractAction.php
index 4e6956a786e..4119335d37b 100644
--- a/app/code/Magento/Catalog/Model/Indexer/Category/Product/AbstractAction.php
+++ b/app/code/Magento/Catalog/Model/Indexer/Category/Product/AbstractAction.php
@@ -187,7 +187,7 @@ abstract public function execute();
*/
protected function reindex()
{
- foreach ($this->storeManager->getStores(true) as $store) {
+ foreach ($this->storeManager->getStores() as $store) {
if ($this->getPathFromCategoryId($store->getRootCategoryId())) {
$this->setCurrentStore($store);
$this->reindexRootCategory($store);
@@ -286,7 +286,7 @@ protected function getPathFromCategoryId($categoryId)
['path']
)->where(
'entity_id = ?',
- $categoryId == 0 ? 1 : $categoryId
+ $categoryId
)
);
}
@@ -323,6 +323,10 @@ protected function getNonAnchorCategoriesSelect(Store $store)
['ccp' => $this->getTable('catalog_category_product')],
'ccp.category_id = cc.entity_id',
[]
+ )->joinInner(
+ ['cpw' => $this->getTable('catalog_product_website')],
+ 'cpw.product_id = ccp.product_id',
+ []
)->joinInner(
['cpe' => $this->getTable('catalog_product_entity')],
'ccp.product_id = cpe.entity_id',
@@ -351,6 +355,11 @@ protected function getNonAnchorCategoriesSelect(Store $store)
' AND cpvs.store_id = ' .
$store->getId(),
[]
+ )->where(
+ 'cc.path LIKE ' . $this->connection->quote($rootPath . '/%')
+ )->where(
+ 'cpw.website_id = ?',
+ $store->getWebsiteId()
)->where(
$this->connection->getIfNullSql('cpss.value', 'cpsd.value') . ' = ?',
\Magento\Catalog\Model\Product\Attribute\Source\Status::STATUS_ENABLED
@@ -374,19 +383,6 @@ protected function getNonAnchorCategoriesSelect(Store $store)
]
);
- if ($store->getId() != 0) {
- $select->joinInner(
- ['cpw' => $this->getTable('catalog_product_website')],
- 'cpw.product_id = ccp.product_id',
- []
- )->where(
- 'cpw.website_id = ?',
- $store->getWebsiteId()
- )->where(
- 'cc.path LIKE ' . $this->connection->quote($rootPath . '/%')
- );
- }
-
$this->addFilteringByChildProductsToSelect($select, $store);
$this->nonAnchorSelects[$store->getId()] = $select;
@@ -537,7 +533,6 @@ protected function createAnchorSelect(Store $store)
$visibilityAttributeId = $this->config->getAttribute(Product::ENTITY, 'visibility')->getId();
$rootCatIds = explode('/', $this->getPathFromCategoryId($store->getRootCategoryId()));
array_pop($rootCatIds);
- $rootCatIds = $rootCatIds ?: [1];
$temporaryTreeTable = $this->makeTempCategoryTreeIndex();
@@ -569,6 +564,10 @@ protected function createAnchorSelect(Store $store)
['cpe' => $this->getTable('catalog_product_entity')],
'ccp.product_id = cpe.entity_id',
[]
+ )->joinInner(
+ ['cpw' => $this->getTable('catalog_product_website')],
+ 'cpw.product_id = ccp.product_id',
+ []
)->joinInner(
['cpsd' => $this->getTable('catalog_product_entity_int')],
'cpsd.' . $productLinkField . ' = cpe.' . $productLinkField . ' AND cpsd.store_id = 0'
@@ -603,6 +602,9 @@ protected function createAnchorSelect(Store $store)
. ' AND ccas.attribute_id = ccad.attribute_id AND ccas.store_id = ' .
$store->getId(),
[]
+ )->where(
+ 'cpw.website_id = ?',
+ $store->getWebsiteId()
)->where(
$this->connection->getIfNullSql('cpss.value', 'cpsd.value') . ' = ?',
\Magento\Catalog\Model\Product\Attribute\Source\Status::STATUS_ENABLED
@@ -629,17 +631,6 @@ protected function createAnchorSelect(Store $store)
]
);
- if ($store->getId() != 0) {
- $select->joinInner(
- ['cpw' => $this->getTable('catalog_product_website')],
- 'cpw.product_id = ccp.product_id',
- []
- )->where(
- 'cpw.website_id = ?',
- $store->getWebsiteId()
- );
- }
-
$this->addFilteringByChildProductsToSelect($select, $store);
return $select;
@@ -827,6 +818,10 @@ protected function getAllProducts(Store $store)
$select = $this->connection->select()->from(
['cp' => $this->getTable('catalog_product_entity')],
[]
+ )->joinInner(
+ ['cpw' => $this->getTable('catalog_product_website')],
+ 'cpw.product_id = cp.entity_id',
+ []
)->joinInner(
['cpsd' => $this->getTable('catalog_product_entity_int')],
'cpsd.' . $linkField . ' = cp.' . $linkField . ' AND cpsd.store_id = 0' .
@@ -855,6 +850,9 @@ protected function getAllProducts(Store $store)
['ccp' => $this->getTable('catalog_category_product')],
'ccp.product_id = cp.entity_id',
[]
+ )->where(
+ 'cpw.website_id = ?',
+ $store->getWebsiteId()
)->where(
$this->connection->getIfNullSql('cpss.value', 'cpsd.value') . ' = ?',
\Magento\Catalog\Model\Product\Attribute\Source\Status::STATUS_ENABLED
@@ -884,17 +882,6 @@ protected function getAllProducts(Store $store)
]
);
- if ($store->getId() != 0) {
- $select->joinInner(
- ['cpw' => $this->getTable('catalog_product_website')],
- 'cpw.product_id = ccp.product_id',
- []
- )->where(
- 'cpw.website_id = ?',
- $store->getWebsiteId()
- );
- }
-
$this->productsSelects[$store->getId()] = $select;
}
diff --git a/app/code/Magento/Catalog/Model/Indexer/Category/Product/Action/Full.php b/app/code/Magento/Catalog/Model/Indexer/Category/Product/Action/Full.php
index c6ca0775b7e..e94c7a4ee0c 100644
--- a/app/code/Magento/Catalog/Model/Indexer/Category/Product/Action/Full.php
+++ b/app/code/Magento/Catalog/Model/Indexer/Category/Product/Action/Full.php
@@ -133,7 +133,7 @@ public function __construct(
*/
private function createTables(): void
{
- foreach ($this->storeManager->getStores(true) as $store) {
+ foreach ($this->storeManager->getStores() as $store) {
$this->tableMaintainer->createTablesForStore((int)$store->getId());
}
}
@@ -145,7 +145,7 @@ private function createTables(): void
*/
private function clearReplicaTables(): void
{
- foreach ($this->storeManager->getStores(true) as $store) {
+ foreach ($this->storeManager->getStores() as $store) {
$this->connection->truncateTable($this->tableMaintainer->getMainReplicaTable((int)$store->getId()));
}
}
@@ -158,7 +158,7 @@ private function clearReplicaTables(): void
private function switchTables(): void
{
$tablesToSwitch = [];
- foreach ($this->storeManager->getStores(true) as $store) {
+ foreach ($this->storeManager->getStores() as $store) {
$tablesToSwitch[] = $this->tableMaintainer->getMainTable((int)$store->getId());
}
$this->activeTableSwitcher->switchTable($this->connection, $tablesToSwitch);
@@ -188,7 +188,7 @@ protected function reindex(): void
{
$userFunctions = [];
- foreach ($this->storeManager->getStores(true) as $store) {
+ foreach ($this->storeManager->getStores() as $store) {
if ($this->getPathFromCategoryId($store->getRootCategoryId())) {
$userFunctions[$store->getId()] = function () use ($store) {
$this->reindexStore($store);
diff --git a/app/code/Magento/Catalog/Model/Indexer/Category/Product/Action/Rows.php b/app/code/Magento/Catalog/Model/Indexer/Category/Product/Action/Rows.php
index 70c5c14bb19..c53277a5815 100644
--- a/app/code/Magento/Catalog/Model/Indexer/Category/Product/Action/Rows.php
+++ b/app/code/Magento/Catalog/Model/Indexer/Category/Product/Action/Rows.php
@@ -117,7 +117,7 @@ public function execute(array $entityIds = [], $useTempTable = false)
|| ($indexer->isScheduled() && !$useTempTable)
|| ($indexer->isScheduled() && $useTempTable && !$workingState)) {
if ($useTempTable && !$workingState && $indexer->isScheduled()) {
- foreach ($this->storeManager->getStores(true) as $store) {
+ foreach ($this->storeManager->getStores() as $store) {
$this->connection->truncateTable($this->getIndexTable($store->getId()));
}
} else {
@@ -130,7 +130,7 @@ public function execute(array $entityIds = [], $useTempTable = false)
$workingState = $this->isWorkingState();
if ($useTempTable && !$workingState && $indexer->isScheduled()) {
- foreach ($this->storeManager->getStores(true) as $store) {
+ foreach ($this->storeManager->getStores() as $store) {
$removalCategoryIds = array_diff($this->limitationByCategories, [$this->getRootCategoryId($store)]);
$this->connection->delete(
$this->tableMaintainer->getMainTable($store->getId()),
@@ -204,7 +204,7 @@ private function getRootCategoryId($store)
*/
private function removeEntries()
{
- foreach ($this->storeManager->getStores(true) as $store) {
+ foreach ($this->storeManager->getStores() as $store) {
$removalCategoryIds = array_diff($this->limitationByCategories, [$this->getRootCategoryId($store)]);
$this->connection->delete(
$this->getIndexTable($store->getId()),
diff --git a/app/code/Magento/Catalog/Model/Indexer/Category/Product/Plugin/StoreGroup.php b/app/code/Magento/Catalog/Model/Indexer/Category/Product/Plugin/StoreGroup.php
index 05eb9dfae3c..12a9d85dc41 100644
--- a/app/code/Magento/Catalog/Model/Indexer/Category/Product/Plugin/StoreGroup.php
+++ b/app/code/Magento/Catalog/Model/Indexer/Category/Product/Plugin/StoreGroup.php
@@ -78,7 +78,7 @@ protected function validate(AbstractModel $group)
*/
public function afterDelete(AbstractDb $subject, AbstractDb $objectResource, AbstractModel $storeGroup)
{
- foreach ($storeGroup->getStores(true) as $store) {
+ foreach ($storeGroup->getStores() as $store) {
$this->tableMaintainer->dropTablesForStore((int)$store->getId());
}
return $objectResource;
diff --git a/app/code/Magento/Catalog/Model/Indexer/Product/Category/Action/Rows.php b/app/code/Magento/Catalog/Model/Indexer/Product/Category/Action/Rows.php
index 53aa1eb0871..ab04f7c56c3 100644
--- a/app/code/Magento/Catalog/Model/Indexer/Product/Category/Action/Rows.php
+++ b/app/code/Magento/Catalog/Model/Indexer/Product/Category/Action/Rows.php
@@ -115,7 +115,7 @@ public function execute(array $entityIds = [], $useTempTable = false)
$affectedCategories = $this->getCategoryIdsFromIndex($idsToBeReIndexed);
if ($useTempTable && !$workingState && $indexer->isScheduled()) {
- foreach ($this->storeManager->getStores(true) as $store) {
+ foreach ($this->storeManager->getStores() as $store) {
$this->connection->truncateTable($this->getIndexTable($store->getId()));
}
} else {
@@ -127,7 +127,7 @@ public function execute(array $entityIds = [], $useTempTable = false)
$workingState = $this->isWorkingState();
if ($useTempTable && !$workingState && $indexer->isScheduled()) {
- foreach ($this->storeManager->getStores(true) as $store) {
+ foreach ($this->storeManager->getStores() as $store) {
$this->connection->delete(
$this->tableMaintainer->getMainTable($store->getId()),
['product_id IN (?)' => $this->limitationByProducts]
@@ -236,7 +236,7 @@ private function registerCategories(array $categoryIds)
*/
protected function removeEntries()
{
- foreach ($this->storeManager->getStores(true) as $store) {
+ foreach ($this->storeManager->getStores() as $store) {
$this->connection->delete(
$this->getIndexTable($store->getId()),
['product_id IN (?)' => $this->limitationByProducts]
@@ -299,7 +299,7 @@ protected function isRangingNeeded()
private function getCategoryIdsFromIndex(array $productIds): array
{
$categoryIds = [];
- foreach ($this->storeManager->getStores(true) as $store) {
+ foreach ($this->storeManager->getStores() as $store) {
$storeCategories = $this->connection->fetchCol(
$this->connection->select()
->from($this->getIndexTable($store->getId()), ['category_id'])
diff --git a/app/code/Magento/Catalog/Model/ResourceModel/Category/Collection.php b/app/code/Magento/Catalog/Model/ResourceModel/Category/Collection.php
index a998d97eb6c..259399ece82 100644
--- a/app/code/Magento/Catalog/Model/ResourceModel/Category/Collection.php
+++ b/app/code/Magento/Catalog/Model/ResourceModel/Category/Collection.php
@@ -11,7 +11,6 @@
use Magento\Framework\App\Config\ScopeConfigInterface;
use Magento\Framework\DB\Select;
use Magento\Store\Model\ScopeInterface;
-use Magento\Catalog\Model\Indexer\Category\Product\TableMaintainer;
/**
* Category resource collection
@@ -76,11 +75,6 @@ class Collection extends \Magento\Catalog\Model\ResourceModel\Collection\Abstrac
*/
private $catalogProductVisibility;
- /**
- * @var TableMaintainer
- */
- private $tableMaintainer;
-
/**
* Constructor
* @param \Magento\Framework\Data\Collection\EntityFactory $entityFactory
@@ -130,7 +124,6 @@ public function __construct(
\Magento\Framework\App\ObjectManager::getInstance()->get(ScopeConfigInterface::class);
$this->catalogProductVisibility = $catalogProductVisibility ?:
\Magento\Framework\App\ObjectManager::getInstance()->get(Visibility::class);
- $this->tableMaintainer = \Magento\Framework\App\ObjectManager::getInstance()->get(TableMaintainer::class);
}
/**
@@ -347,7 +340,7 @@ public function loadProductCount($items, $countRegular = true, $countAnchor = tr
foreach ($anchor as $item) {
$productsCount = isset($categoryProductsCount[$item->getId()])
? (int)$categoryProductsCount[$item->getId()]
- : 0;
+ : $this->getProductsCountFromCategoryTable($item, $websiteId);
$item->setProductCount($productsCount);
}
}
@@ -526,6 +519,45 @@ public function getProductTable()
return $this->_productTable;
}
+ /**
+ * Get products count using catalog_category_entity table
+ *
+ * @param Category $item
+ * @param string $websiteId
+ * @return int
+ */
+ private function getProductsCountFromCategoryTable(Category $item, string $websiteId): int
+ {
+ $productCount = 0;
+
+ if ($item->getAllChildren()) {
+ $bind = ['entity_id' => $item->getId(), 'c_path' => $item->getPath() . '/%'];
+ $select = $this->_conn->select();
+ $select->from(
+ ['main_table' => $this->getProductTable()],
+ new \Zend_Db_Expr('COUNT(DISTINCT main_table.product_id)')
+ )->joinInner(
+ ['e' => $this->getTable('catalog_category_entity')],
+ 'main_table.category_id=e.entity_id',
+ []
+ )->where(
+ '(e.entity_id = :entity_id OR e.path LIKE :c_path)'
+ );
+ if ($websiteId) {
+ $select->join(
+ ['w' => $this->getProductWebsiteTable()],
+ 'main_table.product_id = w.product_id',
+ []
+ )->where(
+ 'w.website_id = ?',
+ $websiteId
+ );
+ }
+ $productCount = (int)$this->_conn->fetchOne($select, $bind);
+ }
+ return $productCount;
+ }
+
/**
* Get query for retrieve count of products per category
*
@@ -535,7 +567,7 @@ public function getProductTable()
*/
private function getProductsCountQuery(array $categoryIds, $addVisibilityFilter = true): Select
{
- $categoryTable = $this->tableMaintainer->getMainTable($this->getProductStoreId());
+ $categoryTable = $this->_resource->getTableName('catalog_category_product_index');
$select = $this->_conn->select()
->from(
['cat_index' => $categoryTable],
diff --git a/app/code/Magento/Catalog/Setup/Patch/Schema/EnableSegmentation.php b/app/code/Magento/Catalog/Setup/Patch/Schema/EnableSegmentation.php
index 442ae036a22..8ae84f9f8e3 100644
--- a/app/code/Magento/Catalog/Setup/Patch/Schema/EnableSegmentation.php
+++ b/app/code/Magento/Catalog/Setup/Patch/Schema/EnableSegmentation.php
@@ -40,7 +40,7 @@ public function apply()
$this->schemaSetup->startSetup();
$setup = $this->schemaSetup;
- $storeSelect = $setup->getConnection()->select()->from($setup->getTable('store'));
+ $storeSelect = $setup->getConnection()->select()->from($setup->getTable('store'))->where('store_id > 0');
foreach ($setup->getConnection()->fetchAll($storeSelect) as $store) {
$indexTable = $setup->getTable('catalog_category_product_index') .
'_' .
@@ -54,7 +54,7 @@ public function apply()
)
);
}
- if ($store['store_id'] > 0 && !$setup->getConnection()->isTableExists($indexTable . '_replica')) {
+ if (!$setup->getConnection()->isTableExists($indexTable . '_replica')) {
$setup->getConnection()->createTable(
$setup->getConnection()->createTableByDdl(
$setup->getTable('catalog_category_product_index'),
diff --git a/app/code/Magento/CatalogInventory/Model/ResourceModel/Stock.php b/app/code/Magento/CatalogInventory/Model/ResourceModel/Stock.php
index f994bb8fe26..bb2e6a23f3f 100644
--- a/app/code/Magento/CatalogInventory/Model/ResourceModel/Stock.php
+++ b/app/code/Magento/CatalogInventory/Model/ResourceModel/Stock.php
@@ -162,7 +162,9 @@ public function lockProductsStock(array $productIds, $websiteId)
$items[$si['product_id']] = $si;
}
foreach ($this->getConnection()->fetchAll($selectProducts) as $p) {
- $items[$p['product_id']]['type_id'] = $p['type_id'];
+ if (isset($items[$p['product_id']])) {
+ $items[$p['product_id']]['type_id'] = $p['type_id'];
+ }
}
return $items;
diff --git a/composer.json b/composer.json
index 6260fa5192c..a56973babf2 100644
--- a/composer.json
+++ b/composer.json
@@ -1,6 +1,6 @@
{
- "name": "magento/magento2ce",
- "description": "Magento 2 (Open Source)",
+ "name": "mage-os/magento2ce",
+ "description": "Mage-OS (Open Source)",
"type": "project",
"license": [
"OSL-3.0",
diff --git a/dev/tests/integration/testsuite/Magento/ConfigurableProduct/_files/configurable_product_with_two_child_products.php b/dev/tests/integration/testsuite/Magento/ConfigurableProduct/_files/configurable_product_with_two_child_products.php
index 0d37ce1fe51..1a7674b2699 100644
--- a/dev/tests/integration/testsuite/Magento/ConfigurableProduct/_files/configurable_product_with_two_child_products.php
+++ b/dev/tests/integration/testsuite/Magento/ConfigurableProduct/_files/configurable_product_with_two_child_products.php
@@ -7,6 +7,8 @@
use Magento\Catalog\Api\Data\ProductExtensionInterfaceFactory;
use Magento\Catalog\Api\ProductRepositoryInterface;
+use Magento\Catalog\Model\Indexer\Category\Product\Processor as CategoryProductProcessor;
+use Magento\Catalog\Model\Indexer\Product\Category\Processor as ProductCategoryProcessor;
use Magento\Catalog\Model\Product\Attribute\Source\Status;
use Magento\Catalog\Model\Product\Type;
use Magento\Catalog\Model\Product\Visibility;
@@ -35,6 +37,8 @@
/** @var WebsiteRepositoryInterface $websiteRepository */
$websiteRepository = $objectManager->get(WebsiteRepositoryInterface::class);
$baseWebsite = $websiteRepository->get('base');
+$rootCategoryId = $baseWebsite->getDefaultStore()->getRootCategoryId();
+$productIds = [];
$eavConfig = Bootstrap::getObjectManager()->get(Config::class);
$attribute = $eavConfig->getAttribute(Product::ENTITY, 'test_configurable');
/** @var AttributeOptionInterface[] $options */
@@ -54,6 +58,7 @@
$product->setTypeId(Type::TYPE_SIMPLE)
->setAttributeSetId($product->getDefaultAttributeSetId())
->setWebsiteIds([$baseWebsite->getId()])
+ ->setCategoryIds([$rootCategoryId])
->setName('Configurable ' . $option->getLabel())
->setSku($productSku)
->setPrice($productPrice)
@@ -70,11 +75,15 @@
];
$associatedProductIds[] = $product->getId();
}
+
+$productIds[] = $product->getId();
+
$product = $productFactory->create();
$product->isObjectNew(true);
$product->setTypeId(Configurable::TYPE_CODE)
->setAttributeSetId($product->getDefaultAttributeSetId())
->setWebsiteIds([$baseWebsite->getId()])
+ ->setCategoryIds([$rootCategoryId])
->setName('Configurable product with two child')
->setSku('Configurable product')
->setVisibility(Visibility::VISIBILITY_BOTH)
@@ -96,3 +105,10 @@
$extensionConfigurableAttributes->setConfigurableProductLinks($associatedProductIds);
$product->setExtensionAttributes($extensionConfigurableAttributes);
$productRepository->save($product);
+
+$productIds[] = $product->getId();
+
+Bootstrap::getObjectManager()->get(CategoryProductProcessor::class)
+ ->reindexList([$rootCategoryId]);
+Bootstrap::getObjectManager()->get(ProductCategoryProcessor::class)
+ ->reindexList($productIds);
diff --git a/dev/tests/integration/testsuite/Magento/Dhl/_files/domestic_shipment_request.xml b/dev/tests/integration/testsuite/Magento/Dhl/_files/domestic_shipment_request.xml
index 8d44ae81b83..8cff5bb5acb 100644
--- a/dev/tests/integration/testsuite/Magento/Dhl/_files/domestic_shipment_request.xml
+++ b/dev/tests/integration/testsuite/Magento/Dhl/_files/domestic_shipment_request.xml
@@ -15,7 +15,7 @@
some password
- Magento
+ Mage-OS
1.0.0+no-v
diff --git a/dev/tests/integration/testsuite/Magento/Dhl/_files/shipment_request.xml b/dev/tests/integration/testsuite/Magento/Dhl/_files/shipment_request.xml
index 9a0d6a4fd46..f88551ad7de 100644
--- a/dev/tests/integration/testsuite/Magento/Dhl/_files/shipment_request.xml
+++ b/dev/tests/integration/testsuite/Magento/Dhl/_files/shipment_request.xml
@@ -15,7 +15,7 @@
some password
- Magento
+ Mage-OS
1.0.0+no-v
diff --git a/dev/tests/integration/testsuite/Magento/Framework/Backup/DbTest.php b/dev/tests/integration/testsuite/Magento/Framework/Backup/DbTest.php
index 9d48de03c73..5cd04659c7f 100644
--- a/dev/tests/integration/testsuite/Magento/Framework/Backup/DbTest.php
+++ b/dev/tests/integration/testsuite/Magento/Framework/Backup/DbTest.php
@@ -41,6 +41,8 @@ public static function setUpBeforeClass(): void
*/
public function testBackupAndRollbackIncludesCustomTriggers()
{
+ $this->markTestIncomplete('PR: https://github.com/mage-os/mageos-magento-zend-db/pull/1 needs to be merged first.');
+
$helper = Bootstrap::getObjectManager()->get(Data::class);
$time = time();
/** BackupInterface $backupManager */
diff --git a/dev/tests/integration/testsuite/Magento/Framework/Backup/_files/trigger_rollback.php b/dev/tests/integration/testsuite/Magento/Framework/Backup/_files/trigger_rollback.php
index 324f184b10a..21173b6c18b 100644
--- a/dev/tests/integration/testsuite/Magento/Framework/Backup/_files/trigger_rollback.php
+++ b/dev/tests/integration/testsuite/Magento/Framework/Backup/_files/trigger_rollback.php
@@ -9,5 +9,7 @@
$setup = Bootstrap::getObjectManager()->get(Setup::class);
$tableName = $setup->getTable('test_table_with_custom_trigger');
+$setup->getConnection()->query('LOCK TABLES ' . $tableName . ' WRITE');
$setup->getConnection()->dropTrigger('test_custom_trigger');
+$setup->getConnection()->query('UNLOCK TABLES');
$setup->getConnection()->dropTable($tableName);
diff --git a/dev/tests/integration/testsuite/Magento/Paypal/Model/Express/CheckoutTest.php b/dev/tests/integration/testsuite/Magento/Paypal/Model/Express/CheckoutTest.php
index 21c72b7e8aa..630d712b68f 100644
--- a/dev/tests/integration/testsuite/Magento/Paypal/Model/Express/CheckoutTest.php
+++ b/dev/tests/integration/testsuite/Magento/Paypal/Model/Express/CheckoutTest.php
@@ -244,6 +244,8 @@ public function placeGuestQuoteDataProvider(): array
/**
* Place the order as guest when `Automatic Assignment to Customer Group` is enabled.
*
+ * @magentoAppIsolation enabled
+ * @magentoDbIsolation enabled
* @magentoDataFixture Magento/Paypal/_files/quote_express.php
* @magentoConfigFixture current_store customer/create_account/auto_group_assign 1
*
diff --git a/lib/internal/Magento/Framework/Image/Adapter/ImageMagick.php b/lib/internal/Magento/Framework/Image/Adapter/ImageMagick.php
index d0b88a34c09..309075d1df5 100644
--- a/lib/internal/Magento/Framework/Image/Adapter/ImageMagick.php
+++ b/lib/internal/Magento/Framework/Image/Adapter/ImageMagick.php
@@ -267,7 +267,13 @@ public function rotate($angle)
// compatibility with GD2 adapter
$angle = 360 - $angle;
$pixel = new \ImagickPixel();
- $pixel->setColor("rgb(" . $this->imageBackgroundColor . ")");
+
+ if (preg_match('/^(s?rgb)\((\d+),(\d+),(\d+)\)$/', $this->imageBackgroundColor, $matches)) {
+ $pixel->setColor(sprintf("%s(%s,%s,%s)", $matches[1], $matches[2], $matches[3], $matches[4]));
+ } else {
+ $pixel->setColor("rgb(" . $this->imageBackgroundColor . ")");
+ }
+
$this->_imageHandler->rotateImage($pixel, $angle);
$this->refreshImageDimensions();
@@ -478,7 +484,9 @@ public function createPngFromString($text, $font = '')
if (!empty($font)) {
if (method_exists($image, 'setFont')) {
$image->setFont($font);
- } elseif (method_exists($draw, 'setFont')) {
+ }
+
+ if (method_exists($draw, 'setFont')) {
$draw->setFont($font);
}
}
@@ -494,7 +502,7 @@ public function createPngFromString($text, $font = '')
$draw->annotation(0, $metrics['ascender'], $text);
$height = abs($metrics['ascender']) + abs($metrics['descender']);
- $image->newImage($metrics['textWidth'], $height, $background);
+ $image->newImage((int) $metrics['textWidth'], (int) $height, $background);
$this->_fileType = IMAGETYPE_PNG;
$image->setImageFormat('png');
$image->drawImage($draw);
diff --git a/supported-services.json b/supported-services.json
index d4678cff391..c9371d63baa 100644
--- a/supported-services.json
+++ b/supported-services.json
@@ -1,7 +1,6 @@
{
"services": {
"php": [
- 8.1,
8.2
],
"composer": [
@@ -23,4 +22,4 @@
"varnish:7.1"
]
}
-}
\ No newline at end of file
+}