Skip to content

Commit

Permalink
Merge branch 'release/1.2.1' into dist-master
Browse files Browse the repository at this point in the history
  • Loading branch information
24198 committed Dec 21, 2017
2 parents 9860eec + a5d5146 commit 5b648a5
Show file tree
Hide file tree
Showing 21 changed files with 49 additions and 37 deletions.
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@
],
"require": {
"php": ">=7.0",
"oro/platform": "2.2.*",
"oro/platform-serialised-fields": "2.2.*",
"oro/calendar-bundle": "2.2.*"
"oro/platform": "2.5.*",
"oro/platform-serialised-fields": "2.5.*",
"oro/calendar-bundle": "2.5.*"
},
"minimum-stability": "dev",
"prefer-stable": true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class LoadSalesChannelGroupData extends AbstractFixture implements DependentFixt
'channels' => [
'sales_channel_us_webshop'
]
],
]
];

/**
Expand Down Expand Up @@ -67,14 +67,14 @@ protected function loadSalesChannelGroups()
->setDescription(sprintf('%s for %s organization', $values['description'], $organization->getName()))
->setSystem($values['system'])
->setOrganization($organization);
$this->addSalesChannels($group, $values['channels']);

$this->setReference($values['name'], $group);
$this->manager->persist($group);

$this->addSalesChannels($group, $values['channels']);
$this->createWarehouseChannelGroupLink($group);
$this->setReference($values['name'], $group);
}

$this->manager->flush();

}

/**
Expand Down Expand Up @@ -115,6 +115,7 @@ private function addSalesChannels(SalesChannelGroup $group, $channelCodes)
/** @var SalesChannel $channel */
$group->addSalesChannel($channel);
}
$this->manager->flush();
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class LoadDashboardData extends AbstractDashboardFixture implements DependentFix
protected $manager;

protected $widgets = [
// 'my_calendar' => 'remove',
'my_calendar' => 'remove',
'top_revenue_channels_widget' => [0,0],
'latest_orders_widget' => [1,0],
'recent_emails' => [1, 2],
Expand All @@ -26,7 +26,7 @@ class LoadDashboardData extends AbstractDashboardFixture implements DependentFix
public function getDependencies()
{
return [
// 'Oro\Bundle\CalendarBundle\Migrations\Data\ORM\LoadDashboardData',
'Oro\Bundle\CalendarBundle\Migrations\Data\ORM\LoadDashboardData',
'Oro\Bundle\EmailBundle\Migrations\Data\ORM\LoadDashboardData',
'Oro\Bundle\DashboardBundle\Migrations\Data\ORM\LoadDashboardData'
];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

use Psr\Log\LoggerInterface;

use Oro\Component\MessageQueue\Client\MessageProducer;
use Oro\Component\MessageQueue\Client\MessageProducerInterface;
use Oro\Component\MessageQueue\Transport\MessageInterface;
use Oro\Component\MessageQueue\Transport\SessionInterface;
use Oro\Component\MessageQueue\Client\TopicSubscriberInterface;
Expand All @@ -21,16 +21,16 @@ class InventoryRebalanceProductsProcessor implements MessageProcessorInterface,
/** @var ProductRepository $repository */
protected $repository;

/** @var MessageProducer $producer */
/** @var MessageProducerInterface $producer */
protected $producer;

/**
* @param MessageProducer $producer
* @param MessageProducerInterface $producer
* @param LoggerInterface $logger
* @param ProductRepository $repository
*/
public function __construct(
MessageProducer $producer,
MessageProducerInterface $producer,
LoggerInterface $logger,
ProductRepository $repository
) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@
data-page-component-module="oroui/js/app/components/view-component"
data-page-component-options="{{ {
view: 'marellolayout/js/app/views/abstract-items-view'
}|json_encode }}">
}|json_encode }}"
data-layout="separate">
{{ form_widget(form.inventoryLevels) }}
{{ form_errors(form.inventoryLevels) }}
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,7 @@ public function testUpdateInventoryItemAddLevelAndIncrease()
$result = $this->client->getResponse();
$this->assertHtmlResponseStatusCodeEquals($result, 200);

// TODO:: uncomment when MAR10001-312 will be merged
$this->assertContains('Warehouse 1', $crawler->html());
$this->assertContains('Warehouse DE 1', $crawler->html());
$this->assertContains('never_out_of_stock', $crawler->html());
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ define(function(require) {
trigger: 'form-changes:trigger',
init: 'form-changes:init',
listenersOff: 'form-changes:listeners:off',
listenersOn: 'form-changes:listeners:on',
listenersOn: 'form-changes:listeners:on'
},
triggerTimeout: 1500
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ define(function(require) {
var CustomerSelectionComponent;
var BaseComponent = require('oroui/js/app/components/base/component');
var _ = require('underscore');
var routing = require('routing');
var mediator = require('oroui/js/mediator');

CustomerSelectionComponent = BaseComponent.extend({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
{% endblock pageHeader %}

{% block content_data %}
{% set id = 'customer-edit' %}
{% set id = 'marello-customer-edit' %}

{% set dataBlocks = [{
'title': 'General'|trans,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@
<tr data-content="{{ name }}" data-validation-optional-group {{ block('widget_container_attributes') }}
class="marello-line-item"
data-page-component-module="oroui/js/app/components/view-component"
data-page-component-options="{{ {view: 'marelloorder/js/app/views/order-item-view'}|json_encode }}">
data-page-component-options="{{ {view: 'marelloorder/js/app/views/order-item-view'}|json_encode }}"
data-layout="separate">
{{ form_widget(form) }}

<td class="order-line-item-notifications">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,8 @@
selectors: {
address: idAddressBlock
}
}|json_encode }}">
}|json_encode }}"
data-layout="separate">
{{ form_widget(form.billingAddress) }}
</div>
{% endset %}
Expand All @@ -120,7 +121,8 @@
'#' ~ form.shippingAddress.postalCode.vars.id
]
}
}|json_encode }}">
}|json_encode }}"
data-layout="separate">
{{ form_widget(form.shippingAddress) }}
</div>
{% endset %}
Expand All @@ -130,7 +132,8 @@
data-page-component-options="{{ {
view: 'marelloorder/js/app/views/order-items-view',
data: data|default({})
}|json_encode }}">
}|json_encode }}"
data-layout="separate">
{{ form_widget(form.items) }}
{{ form_errors(form.items) }}
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ protected function update(Product $product)
/**
* @Config\Route("/view/{id}", requirements={"id"="\d+"}, name="marello_product_view")
* @Security\AclAncestor("marello_product_view")
* @Config\Template
* @Config\Template("MarelloProductBundle:Product:view.html.twig")
*
* @param Product $product
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@
data-page-component-options="{{ {
view: 'marellopricing/js/app/views/channel-pricing-items-view',
options: priceEnableElement|default({})
}|json_encode }}">
}|json_encode }}"
data-layout="separate">
{{ form_widget(form.channelPrices) }}
{{ form_errors(form.channelPrices) }}
</div>
Expand All @@ -82,7 +83,8 @@
data-page-component-options="{{ {
view: 'marellolayout/js/app/views/abstract-items-view',
options: {}
}|json_encode }}">
}|json_encode }}"
data-layout="separate">
{{ form_widget(form.prices) }}
{{ form_errors(form.prices) }}
</div>
Expand All @@ -102,7 +104,8 @@
data-page-component-module="oroui/js/app/components/view-component"
data-page-component-options="{{ {
view: 'marelloproduct/js/app/views/product-channel-taxcodes-view'
}|json_encode }}">
}|json_encode }}"
data-layout="separate">
{{ form_widget(form.salesChannelTaxCodes) }}
{{ form_errors(form.salesChannelTaxCodes) }}
</div>
Expand All @@ -114,7 +117,8 @@
data-page-component-options="{{ {
view: 'marellosupplier/js/app/views/product-suppliers-view',
suppliers: suppliers|default({})
}|json_encode }}">
}|json_encode }}"
data-layout="separate">
{{ form_widget(form.suppliers) }}
{{ form_errors(form.suppliers) }}
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
{% endblock %}

{% block content_data %}
{% set id = 'product-view' %}
{% set id = 'marello-product-view' %}
{% set generalSubblocks = [] %}
{% set productInformationWidget %}
{{ oro_widget_render({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@
data-page-component-options="{{ {
view: 'marellopurchaseorder/js/app/views/purchaseorder-items-view',
items: items|default({})
}|json_encode }}">
}|json_encode }}"
data-layout="separate">
{{ form_widget(form.items) }}
{{ form_errors(form.items) }}
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@
data-page-component-options="{{ {
view: 'marellopurchaseorder/js/app/views/purchaseorder-items-view',
items: itemsAdditional|default({})
}|json_encode }}">
}|json_encode }}"
data-layout="separate">
{{ form_widget(form.itemsAdditional) }}
{{ form_errors(form.itemsAdditional) }}
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@
data-page-component-options="{{ {
view: 'marellopurchaseorder/js/app/views/purchaseorder-items-view',
items: items|default({})
}|json_encode }}">
}|json_encode }}"
data-layout="separate">
{{ form_widget(form.items) }}
{{ form_errors(form.items) }}
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@
data-page-component-options="{{ {
view: 'marellolayout/js/app/views/abstract-items-view',
prices: prices|default({})
}|json_encode }}">
}|json_encode }}"
data-layout="separate">
{{ form_widget(form.additionalItems) }}
{{ form_errors(form.additionalItems) }}
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public function testGetBlockPrefix()
*/
public function testSubmitValid(RuleInterface $rule)
{
$form = $this->factory->create($this->formType, $rule);
$form = $this->factory->create(RuleType::class, $rule);

$this->assertSame($rule, $form->getData());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ public function testExecute($registryHasService, $inputService, $expectedService
->willReturn($metaData);

$this->doctrine->expects(static::once())
->method('getEntityManager')
->method('getManager')
->willReturn($em);

$context = new ActionData(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ protected function executeAction($context)
$service = strtolower($this->contextAccessor->getValue($context, $this->service));
/** @var ShippingAwareInterface $entity */
$entity = $this->contextAccessor->getValue($context, $this->entity);
$entityClass = $this->doctrine->getEntityManager()->getClassMetadata(get_class($entity))->getName();
$entityClass = $this->doctrine->getManager()->getClassMetadata(get_class($entity))->getName();

if (!$service || !$this->registry->hasIntegration($service) || !$this->registry->hasDataFactory($service)) {
$service = self::DEFAULT_SHIPPING_SERVICE;
Expand Down

0 comments on commit 5b648a5

Please sign in to comment.