Skip to content

Commit

Permalink
Merge remote-tracking branch 'remotes/dev/1.10' into 1.10
Browse files Browse the repository at this point in the history
  • Loading branch information
rgrebenchuk committed Sep 7, 2016
2 parents eb5cb87 + 29a666a commit a517a77
Show file tree
Hide file tree
Showing 39 changed files with 660 additions and 58 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
CHANGELOG for 1.10.0
===================
This changelog references the relevant changes (new features, changes and bugs) done in 1.10.0 versions.
* The application has been upgraded to Symfony 2.8
* The application has been upgraded to Symfony 2.8 (Symfony 2.8.10 doesn't supported because of [Symfony issue](https://github.com/symfony/symfony/issues/19840))
* Added support php 7
* Changed minimum required php version to 5.5.9

Expand Down
2 changes: 1 addition & 1 deletion src/OroCRM/Bundle/AccountBundle/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"license": "MIT",
"require": {
"php": ">=5.5.9",
"symfony/symfony": "2.8.*",
"symfony/symfony": "2.8.*, !=2.8.10",
"friendsofsymfony/rest-bundle": "1.5.0-RC2",
"nelmio/api-doc-bundle": "dev-master",

Expand Down
2 changes: 1 addition & 1 deletion src/OroCRM/Bundle/ActivityContactBundle/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"license": "MIT",
"require": {
"php": ">=5.5.9",
"symfony/symfony": "2.8.*",
"symfony/symfony": "2.8.*, !=2.8.10",
"oro/entity-extend-bundle": "dev-master",
"oro/activity-bundle": "dev-master",
"oro/activity-list-bundle": "dev-master"
Expand Down
2 changes: 1 addition & 1 deletion src/OroCRM/Bundle/AnalyticsBundle/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"license": "MIT",
"require": {
"php": ">=5.5.9",
"symfony/symfony": "2.8.*",
"symfony/symfony": "2.8.*, !=2.8.10",
"doctrine/orm": ">=2.3,<2.4-dev",

"oro/entity-config-bundle": "dev-master",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

class CampaignStatisticDatagridListener
{
/** @deprecated since 1.10. Use config->getName() instead */
const PATH_NAME = '[name]';
const PATH_DATAGRID_WHERE = '[source][query][where]';

Expand Down Expand Up @@ -44,9 +45,8 @@ public function onPreBuild(PreBuild $event)
{
$config = $event->getConfig();
$parameters = $event->getParameters();
$gridName = $config->offsetGetByPath(self::PATH_NAME);

if (!$this->isApplicable($gridName, $parameters)) {
if (!$this->isApplicable($config->getName(), $parameters)) {
return;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
class CampaignStatisticGroupingListener
{
const PATH_GROUPBY = '[source][query][groupBy]';
/** @deprecated since 1.10. Use config->getName() instead */
const PATH_NAME = '[name]';
const PATH_SELECT = '[source][query][select]';

Expand Down Expand Up @@ -45,9 +46,8 @@ public function onPreBuild(PreBuild $event)
{
$config = $event->getConfig();
$parameters = $event->getParameters();
$gridName = $config->offsetGetByPath(self::PATH_NAME);

if (!$this->isApplicable($gridName, $parameters)) {
if (!$this->isApplicable($config->getName(), $parameters)) {
return;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ protected function assertEntityFind($id, $entity)
public function testOnPreBuildNotApplicable()
{
$gridName = ConfigurationProvider::GRID_PREFIX;
$config = DatagridConfiguration::create([]);
$config = DatagridConfiguration::createNamed('test_grid', []);

$event = new PreBuild($config, new ParameterBag([]));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ public function testOnPreBuild(array $select, $groupBy, $expected)
public function testOnPreBuildNotApplicable()
{
$gridName = ConfigurationProvider::GRID_PREFIX;
$config = DatagridConfiguration::create([]);
$config = DatagridConfiguration::createNamed('test_grid', []);

$event = new PreBuild($config, new ParameterBag([]));

Expand Down
2 changes: 1 addition & 1 deletion src/OroCRM/Bundle/CampaignBundle/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"license": "MIT",
"require": {
"php": ">=5.5.9",
"symfony/symfony": "2.8.*",
"symfony/symfony": "2.8.*, !=2.8.10",
"oro/user-bundle": "dev-master",
"oro/ui-bundle": "dev-master",
"oro/dashboard-bundle": "dev-master",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,14 @@
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;

use Oro\Bundle\EntityConfigBundle\Metadata\Annotation\Config;
use Oro\Bundle\EmailBundle\Entity\MailboxProcessSettings;
use Oro\Bundle\UserBundle\Entity\User;
use Oro\Bundle\TagBundle\Entity\Taggable;
use OroCRM\Bundle\CaseBundle\Model\ExtendCaseMailboxProcessSettings;

/**
* @ORM\Entity
* @Config
*/
class CaseMailboxProcessSettings extends ExtendCaseMailboxProcessSettings implements Taggable
class CaseMailboxProcessSettings extends MailboxProcessSettings implements Taggable
{
/**
* @var User
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class OroCRMCaseBundleInstaller implements
*/
public function getMigrationVersion()
{
return 'v1_8';
return 'v1_9';
}

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?php

namespace OroCRM\Bundle\CaseBundle\Migrations\Schema\v1_9;

use Doctrine\DBAL\Schema\Schema;

use Oro\Bundle\MigrationBundle\Migration\Migration;
use Oro\Bundle\MigrationBundle\Migration\ParametrizedSqlMigrationQuery;
use Oro\Bundle\MigrationBundle\Migration\QueryBag;

class OroCRMCaseBundle implements Migration
{
/**
* {@inheritdoc}
*/
public function up(Schema $schema, QueryBag $queries)
{
$queries->addPreQuery(
new ParametrizedSqlMigrationQuery(
'DELETE FROM oro_entity_config WHERE class_name = :class_name',
[
'class_name' => 'OroCRM\Bundle\CaseBundle\Entity\CaseMailboxProcessSettings',
]
)
);
}
}

This file was deleted.

2 changes: 1 addition & 1 deletion src/OroCRM/Bundle/CaseBundle/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"license": "MIT",
"require": {
"php": ">=5.5.9",
"symfony/symfony": "2.8.*"
"symfony/symfony": "2.8.*, !=2.8.10"
},
"autoload": {
"psr-0": { "OroCRM\\Bundle\\CaseBundle": "" }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ class ChannelLimitationExtension extends AbstractExtension
*/
public function isApplicable(DatagridConfiguration $config)
{
return $config->getDatasourceType() == OrmDatasource::TYPE
return
$config->getDatasourceType() === OrmDatasource::TYPE
&& $this->getParameters()->get('channelIds', false);
}

Expand Down
19 changes: 19 additions & 0 deletions src/OroCRM/Bundle/ChannelBundle/Resources/config/oro/api.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
oro_api:
entities:
OroCRM\Bundle\ChannelBundle\Entity\Channel:
actions:
create: false
update: false
delete: false
delete_list: false
fields:
id: ~
name: ~
active:
property_path: status
owner:
exclude: true
customerIdentity:
exclude: true
data:
exclude: true
2 changes: 1 addition & 1 deletion src/OroCRM/Bundle/ChannelBundle/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"license": "MIT",
"require": {
"php": ">=5.5.9",
"symfony/symfony": "2.8.*",
"symfony/symfony": "2.8.*, !=2.8.10",
"doctrine/orm": ">=2.3,<2.4-dev",
"oro/ui-bundle": "dev-master"
},
Expand Down
2 changes: 1 addition & 1 deletion src/OroCRM/Bundle/ContactBundle/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"license": "MIT",
"require": {
"php": ">=5.5.9",
"symfony/symfony": "2.8.*",
"symfony/symfony": "2.8.*, !=2.8.10",
"friendsofsymfony/rest-bundle": "1.5.0-RC2",
"nelmio/api-doc-bundle": "dev-master",

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,12 @@ public function actualizeAction(Order $order)
ProcessorRegistry::TYPE_IMPORT => [
'filters' => [
'increment_id' => $order->getIncrementId()
]
],
'complex_filters' => [
'updated_at-gt' => null,
'updated_at-lte' => null
]
]
]
);
} catch (\LogicException $e) {
Expand Down
19 changes: 19 additions & 0 deletions src/OroCRM/Bundle/MagentoBundle/Provider/BatchFilterBag.php
Original file line number Diff line number Diff line change
Expand Up @@ -232,4 +232,23 @@ public function merge(BatchFilterBag $bag)
}
}
}

/**
* Clear filters which have empty values
*/
public function resetFilterWithEmptyValue()
{
$filterTypes = [
self::FILTER_TYPE_SIMPLE,
self::FILTER_TYPE_COMPLEX
];

foreach ($filterTypes as $filterType) {
foreach ($this->filters[$filterType] as $filterName => $filterData) {
if (empty($filterData['value'])) {
$this->reset($filterType, $filterName);
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ protected function applyFilter()
$this->filter->merge($this->predefinedFilters);
}

$this->filter->resetFilterWithEmptyValue();

$this->logAppliedFilters($this->filter);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,23 @@ public function call($action, $params = [])
return $result;
}

/**
* {@inheritdoc}
*/
protected function makeNewAttempt($action, $params)
{
$this->logAttempt();
sleep($this->getSleepBetweenAttempt());
++$this->attempted;

// in case if we have WsiMode enabled we should convert object parameters to array to avoid
// not correct parameters during the next attempt call
return $this->call(
$action,
$this->isWsiMode ? (array)array_shift($params) : $params
);
}

/**
* {@inheritdoc}
*/
Expand Down

0 comments on commit a517a77

Please sign in to comment.