Skip to content
Open
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
2 changes: 1 addition & 1 deletion .htaccess.sample
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@
</IfModule>

############################################
## workaround for Apache 2.4.6 CentOS build when working via ProxyPassMatch with HHVM (or any other)
## workaround for Apache 2.4.6 CentOS build when working via ProxyPassMatch
## Please, set it on virtual host configuration level

## SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,6 @@ class XsdTest extends TestCase

protected function setUp(): void
{
if (!function_exists('libxml_set_external_entity_loader')) {
$this->markTestSkipped('Skipped on HHVM. Will be fixed in MAGETWO-45033');
}
$urnResolver = new UrnResolver();
$this->_xsdSchema = $urnResolver->getRealPath('urn:magento:module:Magento_Backend:etc/menu.xsd');
$this->_xsdValidator = new XsdValidator();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@ class XsdTest extends TestCase

protected function setUp(): void
{
if (!function_exists('libxml_set_external_entity_loader')) {
$this->markTestSkipped('Skipped on HHVM. Will be fixed in MAGETWO-45033');
}
$urnResolver = new UrnResolver();
$this->_schemaFile = $urnResolver->getRealPath('urn:magento:module:Magento_Catalog:etc/catalog_attributes.xsd');
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,6 @@ class XsdTest extends TestCase

protected function setUp(): void
{
if (!function_exists('libxml_set_external_entity_loader')) {
$this->markTestSkipped('Skipped on HHVM. Will be fixed in MAGETWO-45033');
}
$urnResolver = new UrnResolver();
$this->_xsdSchemaPath = $urnResolver->getRealPath('urn:magento:module:Magento_Catalog:etc/');
$this->_xsdValidator = new XsdValidator();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,6 @@ class XsdMergedTest extends TestCase

protected function setUp(): void
{
if (!function_exists('libxml_set_external_entity_loader')) {
$this->markTestSkipped('Skipped on HHVM. Will be fixed in MAGETWO-45033');
}
$urnResolver = new UrnResolver();
$this->_xsdSchema = $urnResolver->getRealPath(
'urn:magento:module:Magento_Catalog:etc/product_types_merged.xsd'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,6 @@ class XsdTest extends TestCase

protected function setUp(): void
{
if (!function_exists('libxml_set_external_entity_loader')) {
$this->markTestSkipped('Skipped on HHVM. Will be fixed in MAGETWO-45033');
}
$urnResolver = new UrnResolver();
$this->_xsdSchema = $urnResolver->getRealPath('urn:magento:module:Magento_Catalog:etc/product_types.xsd');
$this->_xsdValidator = new XsdValidator();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ class Product extends AbstractEntity
/**
* @var string
*/
private $hashAlgorithm = 'crc32c';
private $hashAlgorithm = 'xxh128';

/**
* @var array
Expand Down Expand Up @@ -942,7 +942,6 @@ public function __construct(
$this->linkProcessor = $linkProcessor ?? ObjectManager::getInstance()
->get(LinkProcessor::class);
$this->linkProcessor->addNameToIds($this->_linkNameToId);
$this->hashAlgorithm = (version_compare(PHP_VERSION, '8.1.0') >= 0) ? 'xxh128' : 'crc32c';
parent::__construct(
$jsonHelper,
$importExportData,
Expand Down
3 changes: 0 additions & 3 deletions app/code/Magento/Config/Test/Unit/Model/Config/XsdTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,6 @@ class XsdTest extends TestCase

protected function setUp(): void
{
if (!function_exists('libxml_set_external_entity_loader')) {
$this->markTestSkipped('Skipped on HHVM. Will be fixed in MAGETWO-45033');
}
$urnResolver = new UrnResolver();
$this->_xsdSchema = $urnResolver->getRealPath('urn:magento:module:Magento_Config:etc/system.xsd');
$this->_xsdValidator = new XsdValidator();
Expand Down
3 changes: 0 additions & 3 deletions app/code/Magento/Cron/Test/Unit/Model/Config/XsdTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@ class XsdTest extends TestCase

protected function setUp(): void
{
if (!function_exists('libxml_set_external_entity_loader')) {
$this->markTestSkipped('Skipped on HHVM. Will be fixed in MAGETWO-45033');
}
$urnResolver = new UrnResolver();
$this->_xsdFile = $urnResolver->getRealPath('urn:magento:module:Magento_Cron:etc/crontab.xsd');
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,6 @@ class ValidateTest extends TestCase

protected function setUp(): void
{
if (!function_exists('libxml_set_external_entity_loader')) {
$this->markTestSkipped('Skipped on HHVM. Will be fixed in MAGETWO-45033');
}
$this->customer = $this->getMockForAbstractClass(
CustomerInterface::class,
[],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@ class XsdTest extends TestCase

protected function setUp(): void
{
if (!function_exists('libxml_set_external_entity_loader')) {
$this->markTestSkipped('Skipped on HHVM. Will be fixed in MAGETWO-45033');
}
$urnResolver = new UrnResolver();
$this->_schemaFile = $urnResolver->getRealPath('urn:magento:module:Magento_Customer:etc/address_formats.xsd');
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,6 @@ class XmlConverterCommandTest extends TestCase
*/
protected function setUp(): void
{
if (!function_exists('libxml_set_external_entity_loader')) {
$this->markTestSkipped('Skipped on HHVM. Will be fixed in MAGETWO-45033');
}
$this->formatter = $this->createMock(Formatter::class);
$this->domFactory = $this->createMock(DomDocumentFactory::class);
$this->xsltProcessorFactory = $this->createMock(XsltProcessorFactory::class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,6 @@ class XsdTest extends TestCase

protected function setUp(): void
{
if (!function_exists('libxml_set_external_entity_loader')) {
$this->markTestSkipped('Skipped on HHVM. Will be fixed in MAGETWO-45033');
}
$urnResolver = new UrnResolver();
$this->_xsdSchema = $urnResolver->getRealPath('urn:magento:module:Magento_Eav:etc/eav_attributes.xsd');
$this->_xsdValidator = new XsdValidator();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,6 @@ class XsdTest extends TestCase
*/
public function testMergedXml($fixtureXml, array $expectedErrors)
{
if (!function_exists('libxml_set_external_entity_loader')) {
$this->markTestSkipped('Skipped on HHVM. Will be fixed in MAGETWO-45033');
}
$urnResolver = new UrnResolver();
$schemaFile = $urnResolver->getRealPath('urn:magento:module:Magento_Email:etc/email_templates.xsd');
$this->_testXmlAgainstXsd($fixtureXml, $schemaFile, $expectedErrors);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,6 @@ class XsdTest extends TestCase

protected function setUp(): void
{
if (!function_exists('libxml_set_external_entity_loader')) {
$this->markTestSkipped('Skipped on HHVM. Will be fixed in MAGETWO-45033');
}
$urnResolver = new UrnResolver();
$this->_xsdSchemaPath = $urnResolver->getRealPath('urn:magento:module:Magento_ImportExport:etc/');
$this->_xsdValidator = new XsdValidator();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,6 @@ class XsdMergedTest extends TestCase

protected function setUp(): void
{
if (!function_exists('libxml_set_external_entity_loader')) {
$this->markTestSkipped('Skipped on HHVM. Will be fixed in MAGETWO-45033');
}
$urnResolver = new UrnResolver();
$this->_xsdSchema = $urnResolver->getRealPath('urn:magento:module:Magento_ImportExport:etc/import_merged.xsd');
$this->_xsdValidator = new XsdValidator();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,6 @@ class XsdTest extends TestCase

protected function setUp(): void
{
if (!function_exists('libxml_set_external_entity_loader')) {
$this->markTestSkipped('Skipped on HHVM. Will be fixed in MAGETWO-45033');
}
$urnResolver = new UrnResolver();
$this->_xsdSchema = $urnResolver->getRealPath('urn:magento:module:Magento_ImportExport:etc/import.xsd');
$this->_xsdValidator = new XsdValidator();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,6 @@ class XsdTest extends TestCase

protected function setUp(): void
{
if (!function_exists('libxml_set_external_entity_loader')) {
$this->markTestSkipped('Skipped on HHVM. Will be fixed in MAGETWO-45033');
}
$urnResolver = new UrnResolver();
$this->schemaFile = $urnResolver->getRealPath(
'urn:magento:module:Magento_Integration:etc/integration/integration.xsd'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,6 @@ class XsdTest extends TestCase

protected function setUp(): void
{
if (!function_exists('libxml_set_external_entity_loader')) {
$this->markTestSkipped('Skipped on HHVM. Will be fixed in MAGETWO-45033');
}
$urnResolver = new UrnResolver();
$this->schemaFile = $urnResolver->getRealPath(
'urn:magento:module:Magento_Integration:etc/integration/api.xsd'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,6 @@ class XsdTest extends TestCase

protected function setUp(): void
{
if (!function_exists('libxml_set_external_entity_loader')) {
$this->markTestSkipped('Skipped on HHVM. Will be fixed in MAGETWO-45033');
}
$urnResolver = new UrnResolver();
$this->schemaFile = $urnResolver->getRealPath(
'urn:magento:module:Magento_Integration:etc/integration/config.xsd'
Expand Down
3 changes: 0 additions & 3 deletions app/code/Magento/Sales/Test/Unit/Model/Config/XsdTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@ class XsdTest extends TestCase

protected function setUp(): void
{
if (!function_exists('libxml_set_external_entity_loader')) {
$this->markTestSkipped('Skipped on HHVM. Will be fixed in MAGETWO-45033');
}
$this->_xsdFile = "urn:magento:module:Magento_Sales:etc/sales.xsd";
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,6 @@ public static function setUpBeforeClass(): void
self::$_schemaFilePath = $urnResolver->getRealPath('urn:magento:module:Magento_Sales:etc/pdf_file.xsd');
}

protected function setUp(): void
{
if (!function_exists('libxml_set_external_entity_loader')) {
$this->markTestSkipped('Skipped on HHVM. Will be fixed in MAGETWO-45033');
}
}

/**
* @param string $fixtureXml
* @param array $expectedErrors
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
* Copyright 2014 Adobe
* All Rights Reserved.
*/
namespace Magento\Backend\Controller\Adminhtml\Cache;

Expand Down Expand Up @@ -127,18 +127,16 @@ public function testMassDisableActionProductionMode($typesToDisable = [])
/**
* Retrieve cache states (enabled/disabled) information
*
* Access configuration file directly as it is not possible to re-include modified file under HHVM
* @link https://github.com/facebook/hhvm/issues/1447
* Access configuration file directly
*
* @return array
* @SuppressWarnings(PHPMD.EvalExpression)
*/
protected function getCacheStates()
{
$configFilePool = new ConfigFilePool();
$configPath = Bootstrap::getInstance()->getAppTempDir() . '/'. DirectoryList::CONFIG .'/'
. $configFilePool->getPath($configFilePool::APP_ENV);
$configData = eval(str_replace('<?php', '', file_get_contents($configPath)));
$configData = include $configPath;
return $configData[State::CACHE_KEY];
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
* Copyright 2011 Adobe
* All Rights Reserved.
*/
declare(strict_types=1);

Expand Down Expand Up @@ -54,9 +54,6 @@ class ProductTest extends AbstractController
*/
protected function setUp(): void
{
if (defined('HHVM_VERSION')) {
$this->markTestSkipped('Randomly fails due to known HHVM bug (DOMText mixed with DOMElement)');
}
Bootstrap::getObjectManager()->configure([
'preferences' => [
\Magento\Catalog\Model\Product\Attribute\LayoutUpdateManager::class =>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
* Copyright 2021 Adobe
* All Rights Reserved.
*/

declare(strict_types=1);
Expand Down Expand Up @@ -147,7 +147,6 @@ public function testCreateRead(
}
$this->verifyAgainstHeaders($jwt->getProtectedHeaders(), $recreated->getProtectedHeaders()[0]);
}

}

public static function getTokenVariants(): array
Expand Down Expand Up @@ -997,7 +996,6 @@ private static function createRsaKeys(): array
if (!openssl_pkey_export($rsaPrivateResource, $rsaPrivate, 'pass')) {
throw new \RuntimeException('Failed to read RSA private key');
}
self::freeResource($rsaPrivateResource);

return [$rsaPrivate, $rsaPublic];
}
Expand All @@ -1024,23 +1022,10 @@ private static function createEcKeys(): array
if (!openssl_pkey_export($privateResource, $esPrivate, 'pass')) {
throw new \RuntimeException('Failed to read EC private key');
}
self::freeResource($privateResource);
$ecKeys[$bits] = [$esPrivate, $esPublic];
unset($privateResource, $esPublic, $esPrivate);
}

return $ecKeys;
}

/**
* @param mixed $resource
*
* @return void
*/
private static function freeResource($resource): void
{
if (\is_resource($resource) && (version_compare(PHP_VERSION, '8.0') < 0)) {
openssl_free_key($resource);
}
}
}
9 changes: 3 additions & 6 deletions dev/tests/integration/testsuite/Magento/MemoryUsageTest.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
* Copyright 2013 Adobe
* All Rights Reserved.
*/
namespace Magento;

Expand All @@ -10,7 +10,7 @@ class MemoryUsageTest extends \PHPUnit\Framework\TestCase
/**
* Number of application reinitialization iterations to be conducted by tests
*/
const APP_REINITIALIZATION_LOOPS = 20;
private const APP_REINITIALIZATION_LOOPS = 20;

/**
* @var \Magento\TestFramework\Helper\Memory
Expand All @@ -19,9 +19,6 @@ class MemoryUsageTest extends \PHPUnit\Framework\TestCase

protected function setUp(): void
{
if (defined('HHVM_VERSION')) {
$this->markTestSkipped("Test not relevant because no gc in HHVM.");
}
$this->_helper = new \Magento\TestFramework\Helper\Memory(
new \Magento\Framework\Shell(new \Magento\Framework\Shell\CommandRenderer())
);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
* Copyright 2020 Adobe
* All Rights Reserved.
*/
declare(strict_types = 1);

Expand Down Expand Up @@ -37,9 +37,6 @@ class ConfigTest extends TestCase
*/
protected function setUp(): void
{
if (!function_exists('libxml_set_external_entity_loader')) {
$this->markTestSkipped('Skipped on HHVM. Will be fixed in MAGETWO-45033');
}
$this->urnResolver = new UrnResolver();
$this->xsdSchema = $this->urnResolver->getRealPath(
'urn:magento:framework:Cache/etc/cache.xsd'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
* Copyright 2013 Adobe
* All Rights Reserved.
*/
declare(strict_types=1);

Expand Down Expand Up @@ -32,9 +32,6 @@ class MergedXsdTest extends TestCase

protected function setUp(): void
{
if (!function_exists('libxml_set_external_entity_loader')) {
$this->markTestSkipped('Skipped on HHVM. Will be fixed in MAGETWO-45033');
}
$this->_schemaLocator = new SchemaLocator(
new UrnResolver()
);
Expand Down
Loading