Skip to content

Commit 9e03b5c

Browse files
author
Eddie Lau
committed
MAGETWO-49633: [GITHUB] Forked PHP threads in Magento must use strictly same PHP executable used for running original entry point #3482
- implemented wrapper for Symfony class
1 parent fec7668 commit 9e03b5c

File tree

5 files changed

+16
-6
lines changed

5 files changed

+16
-6
lines changed

app/code/Magento/Cron/Observer/ProcessCronQueueObserver.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ class ProcessCronQueueObserver implements ObserverInterface
114114
* @param \Magento\Framework\App\Console\Request $request
115115
* @param \Magento\Framework\ShellInterface $shell
116116
* @param \Magento\Framework\Stdlib\DateTime\TimezoneInterface $timezone
117-
* @param \Symfony\Component\Process\PhpExecutableFinder $phpExecutableFinder
117+
* @param \Magento\Framework\Process\PhpExecutableFinder $phpExecutableFinder
118118
*/
119119
public function __construct(
120120
\Magento\Framework\ObjectManagerInterface $objectManager,
@@ -125,7 +125,7 @@ public function __construct(
125125
\Magento\Framework\App\Console\Request $request,
126126
\Magento\Framework\ShellInterface $shell,
127127
\Magento\Framework\Stdlib\DateTime\TimezoneInterface $timezone,
128-
\Symfony\Component\Process\PhpExecutableFinder $phpExecutableFinder
128+
\Magento\Framework\Process\PhpExecutableFinder $phpExecutableFinder
129129
) {
130130
$this->_objectManager = $objectManager;
131131
$this->_scheduleFactory = $scheduleFactory;

app/code/Magento/Cron/Test/Unit/Observer/ProcessCronQueueObserverTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ public function setUp()
110110

111111
$this->timezone = $this->getMock('Magento\Framework\Stdlib\DateTime\TimezoneInterface');
112112
$this->timezone->expects($this->any())->method('scopeTimeStamp')->will($this->returnValue(time()));
113-
$phpExecutableFinder = $this->getMock('Symfony\Component\Process\PhpExecutableFinder', [], [], '', false);
113+
$phpExecutableFinder = $this->getMock('Magento\Framework\Process\PhpExecutableFinder', [], [], '', false);
114114
$phpExecutableFinder->expects($this->any())->method('find')->willReturn('php');
115115
$this->_observer = new ProcessCronQueueObserver(
116116
$this->_objectManager,

app/code/Magento/Cron/composer.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@
44
"require": {
55
"php": "~5.5.0|~5.6.0|~7.0.0",
66
"magento/module-store": "100.0.*",
7-
"magento/framework": "100.0.*",
8-
"symfony/process": "~2.1"
7+
"magento/framework": "100.0.*"
98
},
109
"suggest": {
1110
"magento/module-config": "100.0.*"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?php
2+
/**
3+
* Copyright © 2015 Magento. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
namespace Magento\Framework\Process;
7+
8+
class PhpExecutableFinder extends \Symfony\Component\Process\PhpExecutableFinder
9+
{
10+
}

lib/internal/Magento/Framework/composer.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@
1919
"ext-gd": "*",
2020
"ext-openssl": "*",
2121
"lib-libxml": "*",
22-
"ext-xsl": "*"
22+
"ext-xsl": "*",
23+
"symfony/process": "~2.1"
2324
},
2425
"suggest": {
2526
"ext-imagick": "Use Image Magick >=3.0.0 as an optional alternative image processing library"

0 commit comments

Comments
 (0)