Skip to content
Open
Show file tree
Hide file tree
Changes from 2 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 @@ -277,7 +277,7 @@ class Product extends AbstractEntity
/**
* @var string
*/
private $hashAlgorithm = 'crc32c';
private $hashAlgorithm = 'xxh128';

/**
* @var array
Expand Down Expand Up @@ -938,7 +938,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
Expand Up @@ -127,8 +127,7 @@ 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)
Expand Down
Original file line number Diff line number Diff line change
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
Expand Up @@ -997,7 +997,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 +1023,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);
}
}
}
3 changes: 0 additions & 3 deletions dev/tests/integration/testsuite/Magento/MemoryUsageTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
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
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
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,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->_schemaLocator = new SchemaLocator(
new UrnResolver()
);
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:framework:Api/etc/extension_attributes.xsd');
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,6 @@ class ReaderTest 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->objectManager = new ObjectManager($this);
$this->filePath = __DIR__ . '/_files/';
$this->fileResolverMock = $this->getMockForAbstractClass(FileResolverInterface::class);
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_Store:etc/config.xsd');
$this->xsdValidator = new XsdValidator();
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:framework:App/etc/routes.xsd');
$this->_xsdValidator = new XsdValidator();
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:framework:App/etc/resources.xsd');
$this->_xsdValidator = new XsdValidator();
Expand Down
Loading