It may happen, that one of the Magento Marketplace Technical Reviews tests can fail. And you may get the similar to the above state of the extension Technical Review like I have got recently.
In this post, I would like to share my experience with the Magento Marketplace extension submission process and the process I follow to verify the issue as well as fix it.
I week ago, I’ve submitted the new version of the Realex Payments extension version 2.3.1 to the Magento Marketplace. The version fixes the critical issue with the pending payment order status after the change in the core functionality. If you are interested in the details, I wrote about it in my previous post called Pending Payment Order Status Issue and My Approach to fixing it in Magento 2 Extension.
Unfortunately for me, I received an email saying that the Manual QA has been failed. The result was attached with the logs files and a screenshot. This is a very new-ish approach by Magento Marketplace team to include an additional information about the issue. But this is definitely a better way to “reject” the review.
Here is the support_report.log file with the Fatal error: Cannot use Magento\Framework\Controller\Result\Redirect as Redirect because the name is already in use in Cancel.php class.
Interesting to notice, I checked the Cancel class and noticed that the line 12 refers to the use Magento\Framework\Controller\Result\Redirect;
There are no errors with all Magento 2 Open Source and Magento 2 Commerce versions running with PHP 7.2 and PHP 7.1. The difference is with the PHP 5.6.
I couldn’t say that the Cancel class can work differently with PHP 5.6 and PHP 7.2 versions.
Obvious step for me is to reproduce the issue on my local environment. I have PHP 7.2 which is a default version for all my developments. I use Homebrew (brew) package manager to manage my PHP versions.
In order to switch between PHP versions and Homebrew package manager you can simply run these two commands:
brew unlink PHP@7.2 brew link PHP@5.6
And update the PATH with the new PHP 5.6 location:
echo 'export PATH="/email@example.com/bin:$PATH"' >> ~/.bash_profile
I changed the PHP version only for the commands which I run via CLI. If you want to also change your Apache server configuration, you have to edit apache.conf configuration file.
Magento 2 Installation
For the installation case I use Magento Open Source version 2.1.18 and the latest Realex Payments extension version 2.3.1. First step is to create an empty database which can be used to verify the install process.
For the extension installation I use Modman package manager. Read more in the Magento 2 Module in a Separate Repository.
I created a new MySQL database for the clean Magento Open Source 2.1 installation with the extension.
CREATE DATABASE magento21_install;
Every time I have to run the setup:install command I open my very first blog post where I described the installation process for Magento 2 Open Source platform. Actually, this was my first video, but I decided to write it as a blog post and call it How to Install Magento 2 with Sample Data via Command Line.
The command for Magento 2 installation is:
bin/magento setup:install --base-url=http://magento21.pronkoconsulting.com --db-host=localhost --db-name=magento21_install --db-user=root --admin-firstname=Max --admin-lastname=Pronko --firstname.lastname@example.org --admin-user=admin --admin-password=123123q --language=en_US --currency=USD --timezone=America/Chicago --use-rewrites=1
This command should be executed from the Magento 2 Open Source root directory. In case you have just cloned (git clone) or created (composer create-project) the Magento 2 directory it is necessary to change the permissions for the bin/magento script.
Use this command to add the necessary permissions:
chmod a+x bin/magento
You may notice that the –db-password setting is missing from the command above. This is because my current local MySQL root user is configured without a password. It is not recommended to do so on any other environments except local development computer.
It is important to verify that the installation of your Magento 2 extension runs smooth and the successful result should look as below:
I would like to also ensure that the compilation issue doesn’t reproduce when I run the deploy:mode:set command.
bin/magento deploy:mode:set production
The generation should also pass successfully as above.
Where is the issue?
The question is, what am I missing in the issue reproduction? I am sure I have a different environment compare to Magento Marketplace test servers. But, sometimes it happens that even Magento Marketplace automated verification can have a glitch execution of the test case. It could also be an environment or server issue e.g. out of memory, high CPU usage, process corruption, apache2 overload or process parallel execution.
Anyway, I’ve checked everything I could possibly imagine to ensure that the Realex Payments version 2.3.1 and Magento Open Source 2.1.18 as well as Magento Commerce 2.1.18 with PHP 5.6 compiles and installs successfully.
P.S. I submitted the support ticket to the Magento Marketplace and waiting for the result of the Manual QA. I am looking forward to see the positive confirmation.
P.S.S. Starting from the July 11, 2019, Magento Marketplace has removed the Magento 2.1 support for the new Magento 2 Extensions submissions. So likely it is not going to be an issue with the old PHP 5.6 version anymore. At least for the Marketplace submissions.
Update from August 1, 2019.
Magento Marketplace team came back to me with the great news that it was a misconfiguration on their QA environment. That was the reason why automated tests were showing all Green and Manual QA server couldn’t install my extension with PHP 5.6. So I am all set now :).
Let me know in the comments below how your Magento Marketplace submission process goes.
I have an online course on how to build payment integration extensions for Magento 2, feel free to check out the page with the course details Payment Integration in Magento 2.
The new Advanced Training for Magento 2 Backend Developers is scheduled in August 29-30, 2019 in London, UK.
Max Pronko is an international Magento Expert, development consultant, motivational speaker and Magento award-winning developer. He is known for the educational development programs for organizations of all sizes and has positively affected thousands of people and organizations worldwide.
Subscribe to my Magento 2 tips and tutorials content.
Every week I send an interesting email directly to your inbox