Closed klevu closed 1 year ago
Maybe an elasticsearch version mismatch?
PHPUnit\Framework\Exception: User Deprecated: Specifying types in urls has been deprecated in /var/www/html/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Endpoints/Bulk.php:44.
This is actually a core issue. PHPUnit changes the error handler, that is why the issue becomes visible in the tests. I don't remember how I worked around that - I think by adding some custom error handler wrapper...
Thank you both for the feedback. We'll look at creating a custom error handler wrapper for this.
On further investigation, there is a small difference in the setCustomErrorHandler between ReachDigital bootstrap.php
compared to the Magento Integration bootstrap.php
ReachDigital
function setCustomErrorHandler()
{
set_error_handler(function ($errNo, $errStr, $errFile, $errLine) {
if (error_reporting()) {
$errorNames = [
Magento
function setCustomErrorHandler()
{
set_error_handler(
function ($errNo, $errStr, $errFile, $errLine) {
$errLevel = error_reporting();
if (($errLevel & $errNo) !== 0) {
$errorNames = [
That difference is letting the tests pass in the core Magento integration tests, but failing in the Reach Digital framework. If I change those lines in Reach Digital bootstrap to match Magento the tests are passing as expected.
Seems to have been introduced in 2.4.4-p1 https://github.com/magento/magento2/commit/2b9b6d81caaedf21f747c28187fe8244b08fa8ef Including some extra changes to support php 8. These changes have to be added to this repository then.
New version fixes this issue. Thank you for the PR!
Hi, I've been checking out this framework and the results so far are extremely impressive. It is so much faster than the default Magento. I have hit an issue though.
When using fixtures to create products, either our own or TTDWizard Magento2-fixtures, we see Elasticsearch errors when the reindex is triggered, causing the tests to fail.
If I run the test from the default Magento integration dir then all tests pass (though with xdebug I can see that these errors are still thrown by ES).
Running Magento 2.4.5-p1, PHP 8.1.6, ElasticSearch 7.17 (Mark Shust Magento 2 Docker)
Is this a known issue? Do you have any suggestions as to why this may be happening?