Skip to content

Commit 8f45626

Browse files
vasikebojanz
authored andcommitted
Issue #2841365 by vasike, bojanz: Require Drupal 8.3.x
1 parent 20e44ea commit 8f45626

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+79
-301
lines changed

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ env:
4040

4141
# The environment to use, supported are: drupal-7, drupal-8
4242
- DRUPAL_TI_ENVIRONMENT="drupal-8"
43-
- DRUPAL_TI_CORE_BRANCH="8.2.x"
43+
- DRUPAL_TI_CORE_BRANCH="8.3.x"
4444

4545
# Drupal specific variables.
4646
- DRUPAL_TI_DB="drupal_travis_db"
@@ -104,7 +104,7 @@ before_install:
104104
# Add the oauth token to prevent GitHub timeouts.
105105
- git config --global github.accesstoken $GITHUB_OAUTH_TOKEN
106106
- composer global require "hirak/prestissimo:^0.3"
107-
- composer global require "lionsad/drupal_ti:dev-master"
107+
- composer global require "lionsad/drupal_ti:dev-master#396d11d200005eb68491d24170da0a98ae7f51b3"
108108
- composer global require "squizlabs/php_codesniffer:2.*"
109109
- composer global require "drupal/coder:8.2.*"
110110
- phpcs --config-set installed_paths $HOME/.composer/vendor/drupal/coder/coder_sniffer

commerce.info.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ dependencies:
1010
- datetime
1111
- inline_entity_form
1212
- views
13-
- system (>=8.2.0)
13+
- system (>=8.3.0)

commerce.services.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,6 @@ services:
5050
class: Drupal\commerce\Config\ConfigUpdater
5151
arguments: ['@entity_type.manager', '@config.storage', '@config.factory']
5252

53-
commerce.time:
54-
class: Drupal\commerce\Time
55-
arguments: ['@request_stack']
56-
5753
cache_context.country:
5854
class: Drupal\commerce\Cache\Context\CountryCacheContext
5955
arguments: ['@commerce.current_country']

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"homepage": "http://drupal.org/project/commerce",
66
"license": "GPL-2.0+",
77
"require": {
8-
"drupal/core": "~8.2",
8+
"drupal/core": "~8.3",
99
"drupal/address": "~1.0",
1010
"drupal/entity": "~1.0",
1111
"drupal/entity_reference_revisions": "~1.0",

modules/cart/src/Form/AddToCartForm.php

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,10 @@
99
use Drupal\commerce_order\Resolver\OrderTypeResolverInterface;
1010
use Drupal\commerce_price\Resolver\ChainPriceResolverInterface;
1111
use Drupal\commerce_store\StoreContextInterface;
12-
use Drupal\Core\Entity\EntityManagerInterface;
12+
use Drupal\Component\Datetime\TimeInterface;
1313
use Drupal\Core\Entity\ContentEntityForm;
14+
use Drupal\Core\Entity\EntityManagerInterface;
15+
use Drupal\Core\Entity\EntityTypeBundleInfoInterface;
1416
use Drupal\Core\Form\FormStateInterface;
1517
use Drupal\Core\Link;
1618
use Drupal\Core\Session\AccountInterface;
@@ -77,6 +79,10 @@ class AddToCartForm extends ContentEntityForm {
7779
*
7880
* @param \Drupal\Core\Entity\EntityManagerInterface $entity_manager
7981
* The entity manager.
82+
* @param \Drupal\Core\Entity\EntityTypeBundleInfoInterface $entity_type_bundle_info
83+
* The entity type bundle info.
84+
* @param \Drupal\Component\Datetime\TimeInterface $time
85+
* The time.
8086
* @param \Drupal\commerce_cart\CartManagerInterface $cart_manager
8187
* The cart manager.
8288
* @param \Drupal\commerce_cart\CartProviderInterface $cart_provider
@@ -90,8 +96,8 @@ class AddToCartForm extends ContentEntityForm {
9096
* @param \Drupal\Core\Session\AccountInterface $current_user
9197
* The current user.
9298
*/
93-
public function __construct(EntityManagerInterface $entity_manager, CartManagerInterface $cart_manager, CartProviderInterface $cart_provider, OrderTypeResolverInterface $order_type_resolver, StoreContextInterface $store_context, ChainPriceResolverInterface $chain_price_resolver, AccountInterface $current_user) {
94-
parent::__construct($entity_manager);
99+
public function __construct(EntityManagerInterface $entity_manager, EntityTypeBundleInfoInterface $entity_type_bundle_info, TimeInterface $time, CartManagerInterface $cart_manager, CartProviderInterface $cart_provider, OrderTypeResolverInterface $order_type_resolver, StoreContextInterface $store_context, ChainPriceResolverInterface $chain_price_resolver, AccountInterface $current_user) {
100+
parent::__construct($entity_manager, $entity_type_bundle_info, $time);
95101

96102
$this->cartManager = $cart_manager;
97103
$this->cartProvider = $cart_provider;
@@ -109,6 +115,8 @@ public function __construct(EntityManagerInterface $entity_manager, CartManagerI
109115
public static function create(ContainerInterface $container) {
110116
return new static(
111117
$container->get('entity.manager'),
118+
$container->get('entity_type.bundle.info'),
119+
$container->get('datetime.time'),
112120
$container->get('commerce_cart.cart_manager'),
113121
$container->get('commerce_cart.cart_provider'),
114122
$container->get('commerce_order.chain_order_type_resolver'),

modules/checkout/commerce_checkout.routing.yml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,3 @@
1-
entity.commerce_checkout_flow.collection:
2-
path: '/admin/commerce/config/checkout-flows'
3-
defaults:
4-
_entity_list: 'commerce_checkout_flow'
5-
_title: 'Checkout flows'
6-
requirements:
7-
_permission: 'administer commerce_checkout_flow'
8-
91
commerce_checkout.form:
102
path: '/checkout/{commerce_order}/{step}'
113
defaults:

modules/checkout/src/Entity/CheckoutFlow.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
* @ConfigEntityType(
1212
* id = "commerce_checkout_flow",
1313
* label = @Translation("Checkout flow"),
14+
* label_collection = @Translation("Checkout flows"),
1415
* label_singular = @Translation("checkout flow"),
1516
* label_plural = @Translation("checkout flows"),
1617
* label_count = @PluralTranslation(

modules/order/commerce_order.routing.yml

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -18,22 +18,6 @@ entity.commerce_order.reassign_form:
1818
requirements:
1919
_permission: 'administer commerce_order'
2020

21-
entity.commerce_order_type.collection:
22-
path: '/admin/commerce/config/order-types'
23-
defaults:
24-
_entity_list: 'commerce_order_type'
25-
_title: 'Order types'
26-
requirements:
27-
_permission: 'administer commerce_order_type'
28-
29-
entity.commerce_order.collection:
30-
path: '/admin/commerce/orders'
31-
defaults:
32-
_entity_list: 'commerce_order'
33-
_title: 'Orders'
34-
requirements:
35-
_permission: 'administer commerce_order'
36-
3721
entity.commerce_order.user_view:
3822
path: '/user/{user}/orders/{commerce_order}'
3923
defaults:
@@ -46,11 +30,3 @@ entity.commerce_order.user_view:
4630
entity:
4731
user: 'entity:user'
4832
commerce_order: 'entity:order'
49-
50-
entity.commerce_order_item_type.collection:
51-
path: '/admin/commerce/config/order-item-types'
52-
defaults:
53-
_entity_list: 'commerce_order_item_type'
54-
_title: 'Order item types'
55-
requirements:
56-
_permission: 'administer commerce_order_type'

modules/order/commerce_order.services.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ services:
1616

1717
commerce_order.order_refresh:
1818
class: Drupal\commerce_order\OrderRefresh
19-
arguments: ['@entity_type.manager', '@commerce_price.chain_price_resolver', '@current_user', '@commerce.time']
19+
arguments: ['@entity_type.manager', '@commerce_price.chain_price_resolver', '@current_user', '@datetime.time']
2020
tags:
2121
- { name: service_collector, call: addProcessor, tag: commerce_order.order_processor }
2222

modules/order/src/Entity/Order.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
* @ContentEntityType(
1919
* id = "commerce_order",
2020
* label = @Translation("Order"),
21+
* label_collection = @Translation("Orders"),
2122
* label_singular = @Translation("order"),
2223
* label_plural = @Translation("orders"),
2324
* label_count = @PluralTranslation(
@@ -469,7 +470,7 @@ public function preSave(EntityStorageInterface $storage) {
469470
$original_state = isset($this->original) ? $this->original->getState()->value : '';
470471
if ($state == 'completed' && $original_state != 'completed') {
471472
if (empty($this->getCompletedTime())) {
472-
$this->setCompletedTime(REQUEST_TIME);
473+
$this->setCompletedTime(\Drupal::time()->getRequestTime());
473474
}
474475
}
475476

0 commit comments

Comments
 (0)