Skip to content

Commit 37af976

Browse files
1.0.2
1 parent 5582174 commit 37af976

File tree

2 files changed

+6
-14
lines changed

2 files changed

+6
-14
lines changed

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "mage2pro/oro"
3-
,"version": "1.0.1"
3+
,"version": "1.0.2"
44
,"description": "A custom integration between Magento 2 and Oro Platform."
55
,"type": "magento2-module"
66
,"homepage": "https://ocrm.pro"
@@ -11,6 +11,6 @@
1111
"homepage": "https://mage2.pro/users/dmitry_fedyuk",
1212
"role": "Developer"
1313
}]
14-
,"require": {"mage2pro/core": ">=2.7.40"}
14+
,"require": {"mage2pro/core": ">=2.8.17"}
1515
,"autoload": {"files": ["registration.php"], "psr-4": {"Df\\Oro\\": ""}}
1616
}

lib/main.php

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,10 @@ function df_oro_get_list(
2929
$raw = null;
3030
$c = null; /** @var C $c */
3131
while (!$raw && $attempt++ <= $maxAttempts) {
32-
$c = (new C)
33-
->setConfig(['timeout' => 120])
32+
$c = df_zf_http('https://'
33+
. ($local ? 'localhost.com:848/app_dev.php' : 'erp.mage2.pro')
34+
. "/api/extenddf$entity"
35+
)
3436
// 2017-06-28
3537
// Due to a Oro Platform bug, the «content-type» headers is required for the «vnd» case,
3638
// even it does not have any sense here.
@@ -39,18 +41,8 @@ function df_oro_get_list(
3941
->setHeaders(df_oro_headers() + (!$vnd ? ['accept' => 'application/json'] : array_fill_keys(
4042
['accept', 'content-type'], 'application/vnd.api+json'
4143
)))
42-
->setUri(
43-
'https://'
44-
. ($local ? 'localhost.com:848/app_dev.php' : 'erp.mage2.pro')
45-
. "/api/extenddf$entity"
46-
)
4744
->setParameterGet(df_clean(['filter' => $filter, 'include' => df_csv($include)]))
4845
;
49-
if ($local) {
50-
$c->setAdapter((new \Zend_Http_Client_Adapter_Socket)->setStreamContext([
51-
'ssl' => ['allow_self_signed' => true, 'verify_peer' => false]
52-
]));
53-
}
5446
$raw = $c->request()->getBody();
5547
}
5648
if (!$raw) {

0 commit comments

Comments
 (0)