Skip to content

Commit a33cb76

Browse files
committed
Merge pull request #234 from jhedstrom/prep/2.1.1
Prep/2.1.1 Signed-off-by: Jonathan Hedstrom <jhedstrom@gmail.com>
1 parent 1af83d9 commit a33cb76

File tree

8 files changed

+33
-25
lines changed

8 files changed

+33
-25
lines changed

.travis.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
language: php
22

33
php:
4-
- 7.0
5-
- 7.1
6-
- 7.2
74
- 7.3
85
- 7.4
96

CHANGELOG.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/)
66
and this project adheres to [Semantic Versioning](http://semver.org/).
77

88
## [Unreleased]
9+
## [2.1.1]
10+
### Fixed
11+
* [#233](https://github.com/jhedstrom/DrupalDriver/pull/233) Prevent PHP warning in Drupal 7.79 and above.
12+
* [#232](https://github.com/jhedstrom/DrupalDriver/pull/232) Fix type in ImageHandler.
913
## [2.1.0]
1014
### Added
1115
* [#186](https://github.com/jhedstrom/DrupalDriver/issues/168) Provide a method to directly authenticate on Drupal 8.
@@ -98,7 +102,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
98102
docblock for `CoreInterface::roleCreate`.
99103

100104

101-
[Unreleased]: https://github.com/jhedstrom/DrupalDriver/compare/v2.1.0...HEAD
105+
[Unreleased]: https://github.com/jhedstrom/DrupalDriver/compare/v2.1.1...HEAD
106+
[2.1.1]: https://github.com/jhedstrom/DrupalDriver/compare/v2.1.0...v2.1.1
102107
[2.1.0]: https://github.com/jhedstrom/DrupalDriver/compare/v2.0.0...v2.1.0
103108
[2.0.0]: https://github.com/jhedstrom/DrupalDriver/compare/v2.0.0-rc1...v2.0.0
104109
[2.0.0 rc1]: https://github.com/jhedstrom/DrupalDriver/compare/v2.0.0-alpha6...v2.0.0-rc1

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
"test": [
3030
"composer validate --no-interaction",
3131
"parallel-lint src spec tests",
32-
"phpunit --coverage-html=reports/coverage",
32+
"phpunit",
3333
"phpspec run -f pretty --no-interaction",
3434
"phpcs --standard=./phpcs-ruleset.xml ."
3535

src/Drupal/Driver/Cores/Drupal6.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -531,39 +531,39 @@ public function entityDelete($entity_type, $entity) {
531531
* {@inheritdoc}
532532
*/
533533
public function startCollectingMail() {
534-
// @todo: create a D6 version of this function
534+
// @todo create a D6 version of this function
535535
throw new \Exception('Mail testing is not yet implemented for Drupal 6.');
536536
}
537537

538538
/**
539539
* {@inheritdoc}
540540
*/
541541
public function stopCollectingMail() {
542-
// @todo: create a D6 version of this function
542+
// @todo create a D6 version of this function
543543
throw new \Exception('Mail testing is not yet implemented for Drupal 6.');
544544
}
545545

546546
/**
547547
* {@inheritdoc}
548548
*/
549549
public function getMail() {
550-
// @todo: create a D6 version of this function
550+
// @todo create a D6 version of this function
551551
throw new \Exception('Mail testing is not yet implemented for Drupal 6.');
552552
}
553553

554554
/**
555555
* {@inheritdoc}
556556
*/
557557
public function clearMail() {
558-
// @todo: create a D6 version of this function
558+
// @todo create a D6 version of this function
559559
throw new \Exception('Mail testing is not yet implemented for Drupal 6.');
560560
}
561561

562562
/**
563563
* {@inheritdoc}
564564
*/
565565
public function sendMail($body, $subject = '', $to = '', $langcode = '') {
566-
// @todo: create a D6 version of this function
566+
// @todo create a D6 version of this function
567567
throw new \Exception('Mail testing is not yet implemented for Drupal 6.');
568568
}
569569

src/Drupal/Driver/Cores/Drupal7.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -533,39 +533,39 @@ public function entityDelete($entity_type, $entity) {
533533
* {@inheritdoc}
534534
*/
535535
public function startCollectingMail() {
536-
// @todo: create a D7 version of this function
536+
// @todo create a D7 version of this function
537537
throw new \Exception('Mail testing is not yet implemented for Drupal 7.');
538538
}
539539

540540
/**
541541
* {@inheritdoc}
542542
*/
543543
public function stopCollectingMail() {
544-
// @todo: create a D7 version of this function
544+
// @todo create a D7 version of this function
545545
throw new \Exception('Mail testing is not yet implemented for Drupal 7.');
546546
}
547547

548548
/**
549549
* {@inheritdoc}
550550
*/
551551
public function getMail() {
552-
// @todo: create a D7 version of this function
552+
// @todo create a D7 version of this function
553553
throw new \Exception('Mail testing is not yet implemented for Drupal 7.');
554554
}
555555

556556
/**
557557
* {@inheritdoc}
558558
*/
559559
public function clearMail() {
560-
// @todo: create a D7 version of this function
560+
// @todo create a D7 version of this function
561561
throw new \Exception('Mail testing is not yet implemented for Drupal 7.');
562562
}
563563

564564
/**
565565
* {@inheritdoc}
566566
*/
567567
public function sendMail($body, $subject = '', $to = '', $langcode = '') {
568-
// @todo: create a D7 version of this function
568+
// @todo create a D7 version of this function
569569
throw new \Exception('Mail testing is not yet implemented for Drupal 7.');
570570
}
571571

src/Drupal/Driver/DrushDriver.php

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,8 @@ public function createEntity($entity_type, \StdClass $entity) {
275275
'entity_type' => $entity_type,
276276
'entity' => $entity,
277277
];
278-
$result = $this->drush('behat', ['create-entity', escapeshellarg(json_encode($options))], []);
278+
$result = $this->drush('behat',
279+
['create-entity', escapeshellarg(json_encode($options))], []);
279280
return $this->decodeJsonObject($result);
280281
}
281282

@@ -287,7 +288,8 @@ public function entityDelete($entity_type, \StdClass $entity) {
287288
'entity_type' => $entity_type,
288289
'entity' => $entity,
289290
];
290-
$this->drush('behat', ['delete-entity', escapeshellarg(json_encode($options))], []);
291+
$this->drush('behat',
292+
['delete-entity', escapeshellarg(json_encode($options))], []);
291293
}
292294

293295
/**
@@ -301,7 +303,9 @@ public function createNode($node) {
301303
$node->uid = $uid;
302304
}
303305
}
304-
$result = $this->drush('behat', ['create-node', escapeshellarg(json_encode($node))], []);
306+
$result = $this->drush('behat',
307+
['create-node', escapeshellarg(json_encode($node))],
308+
[]);
305309
return $this->decodeJsonObject($result);
306310
}
307311

@@ -316,7 +320,11 @@ public function nodeDelete($node) {
316320
* {@inheritdoc}
317321
*/
318322
public function createTerm(\stdClass $term) {
319-
$result = $this->drush('behat', ['create-term', escapeshellarg(json_encode($term))], []);
323+
$result = $this->drush('behat',
324+
[
325+
'create-term',
326+
escapeshellarg(json_encode($term)),
327+
], []);
320328
return $this->decodeJsonObject($result);
321329
}
322330

src/Drupal/Driver/Fields/Drupal8/DatetimeHandler.php

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22

33
namespace Drupal\Driver\Fields\Drupal8;
44

5-
use DateTime;
6-
use DateTimeZone;
75
use Drupal\datetime\Plugin\Field\FieldType\DateTimeItemInterface;
86

97
/**
@@ -15,8 +13,8 @@ class DatetimeHandler extends AbstractHandler {
1513
* {@inheritdoc}
1614
*/
1715
public function expand($values) {
18-
$siteTimezone = new DateTimeZone(\Drupal::config('system.date')->get('timezone.default'));
19-
$storageTimezone = new DateTimeZone(DateTimeItemInterface::STORAGE_TIMEZONE);
16+
$siteTimezone = new \DateTimeZone(\Drupal::config('system.date')->get('timezone.default'));
17+
$storageTimezone = new \DateTimeZone(DateTimeItemInterface::STORAGE_TIMEZONE);
2018
foreach ($values as $key => $value) {
2119
if (strpos($value, "relative:") !== FALSE) {
2220
$relative = trim(str_replace('relative:', '', $value));
@@ -28,7 +26,7 @@ public function expand($values) {
2826
// uses UTC for internal storage. If no timezone is specified in a date
2927
// field value by the step author, assume the default timezone of
3028
// the Drupal install, and therefore transform it into UTC for storage.
31-
$date = new DateTime($value, $siteTimezone);
29+
$date = new \DateTime($value, $siteTimezone);
3230
$date->setTimezone($storageTimezone);
3331
$values[$key] = $date->format('Y-m-d\TH:i:s');
3432
}

src/Drupal/Driver/Fields/Drupal8/ImageHandler.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ public function expand($values) {
1616
throw new \Exception("Error reading file");
1717
}
1818

19-
/* @var \Drupal\file\FileInterface $file */
19+
/** @var \Drupal\file\FileInterface $file */
2020
$file = file_save_data(
2121
$data,
2222
'public://' . uniqid() . '.jpg');

0 commit comments

Comments
 (0)