Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
3,130 changes: 1,810 additions & 1,320 deletions composer.lock

Large diffs are not rendered by default.

9 changes: 8 additions & 1 deletion drush/Commands/contrib/behat-drush-endpoint/.gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,8 @@
vendor
# Ignore directories generated by Composer
/drush/contrib/
/vendor/
/sut/web
# Ignore config directory generated by Drupal
/config
/.drush-lock-update
/.gitattributes
8 changes: 7 additions & 1 deletion drush/Commands/contrib/behat-drush-endpoint/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,13 @@ The Behat Drupal Driver contains three drivers: *Blackbox*, *Direct Drupal API*

## Installation Instructions

THESE INSTRUCTIONS ARE FOR DRUSH 9 of DRUSH 8.2+. If you are using an earlier version of Drush 8, please switch to the 8.x branch.
THESE INSTRUCTIONS ARE FOR:

- DRUSH 10
- DRUSH 9
- DRUSH 8.2.0+

If you are using an earlier version of Drush 8, please switch to the 8.x branch.

If you are managing your Drupal site with Composer, then add the Behat Drush Endpoint to your project as follows:
```bash
Expand Down
14 changes: 10 additions & 4 deletions drush/Commands/contrib/behat-drush-endpoint/behat.inc
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,10 @@ function drush_behat_op_create_node($node) {
// Attempt to decipher any fields that may be specified.
_drush_behat_expand_entity_fields('node', $node);

$entity = entity_create('node', (array) $node);
$entity = \Drupal::entityTypeManager()
->getStorage('node')
->create((array) $node);

$entity->save();

$node->nid = $entity->id();
Expand All @@ -57,7 +60,10 @@ function drush_behat_op_create_term($term) {
// Attempt to decipher any fields that may be specified.
_drush_behat_expand_entity_fields('taxonomy_term', $term);

$entity = entity_create('taxonomy_term', (array)$term);
$entity = \Drupal::entityTypeManager()
->getStorage('taxonomy_term')
->create((array)$term);

$entity->save();

$term->tid = $entity->id();
Expand Down Expand Up @@ -89,7 +95,7 @@ function drush_behat_op_is_field($is_field_info) {
*/
function _drush_behat_get_entity_field_types($entity_type) {
$return = array();
$fields = \Drupal::entityManager()->getFieldStorageDefinitions($entity_type);
$fields = \Drupal::service('entity_field.manager')->getFieldStorageDefinitions($entity_type);
foreach ($fields as $field_name => $field) {
if (_drush_behat_is_field($entity_type, $field_name)) {
$return[$field_name] = $field->getType();
Expand All @@ -99,7 +105,7 @@ function _drush_behat_get_entity_field_types($entity_type) {
}

function _drush_behat_is_field($entity_type, $field_name) {
$fields = \Drupal::entityManager()->getFieldStorageDefinitions($entity_type);
$fields = \Drupal::service('entity_field.manager')->getFieldStorageDefinitions($entity_type);
return (isset($fields[$field_name]) && $fields[$field_name] instanceof FieldStorageConfig);
}

Expand Down
94 changes: 81 additions & 13 deletions drush/Commands/contrib/behat-drush-endpoint/composer.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,83 @@
{
"name": "drush-ops/behat-drush-endpoint",
"description": "Drush commandfile for use with drupal/drupal-driver.",
"type": "drupal-drush",
"keywords": ["drush","behat","testing"],
"homepage": "https://github.com/drush-ops/behat-drush-endpoint",
"license": "GPL-2.0-or-later",
"require": {
"php": ">=5.3.0",
"drupal/drupal-driver": "*"
},
"conflict": {
"drush/drush": "<8.2 || >=9.0 <9.6.0 || >=10.0"
}
"name": "drush-ops/behat-drush-endpoint",
"description": "Drush commandfile for use with drupal/drupal-driver.",
"type": "drupal-drush",
"keywords": ["drush","behat","testing"],
"homepage": "https://github.com/drush-ops/behat-drush-endpoint",
"license": "GPL-2.0-or-later",
"repositories": [
{
"type": "composer",
"url": "https://packages.drupal.org/8"
}
],
"require": {
"php": ">=5.3.0",
"drupal/drupal-driver": "*"
},
"require-dev": {
"composer/installers": "^1.2",
"drupal/core-composer-scaffold": "^8.8.1",
"drupal/core": "^8.8",
"pantheon-systems/drupal-integrations": "^8",
"drush/drush": "^8.3.3 || ^10.2.2",
"phpunit/phpunit": "^6.5",
"symfony/filesystem": "^3.4.28",
"webflo/drupal-finder": "^1.1.0",
"webmozart/path-util": "^2.3",
"zaporylie/composer-drupal-optimizations": "^1.0.2"
},
"conflict": {
"drush/drush": "<8.2 || >=9.0 <9.6.0 || >=11.0"
},
"minimum-stability": "dev",
"prefer-stable": true,
"config": {
"platform": {
"php": "7.2"
},
"sort-packages": true
},
"autoload-dev": {
"psr-4": {
"TestUtils\\": "tests/src/"
}
},
"scripts": {
"test": "phpunit --color=always",
"drush": "drush"
},
"extra": {
"installer-paths": {
"sut/web/core": ["type:drupal-core"],
"sut/web/libraries/{$name}": ["type:drupal-library"],
"sut/web/modules/contrib/{$name}": ["type:drupal-module"],
"sut/web/profiles/contrib/{$name}": ["type:drupal-profile"],
"sut/web/themes/contrib/{$name}": ["type:drupal-theme"],
"drush/Commands/{$name}": ["type:drupal-drush"]
},
"drupal-scaffold": {
"allowed-packages": [
"pantheon-systems/drupal-integrations"
],
"locations": {
"web-root": "./sut/web"
},
"file-mapping": {
"[project-root]/.editorconfig": false
}
},
"scenarios": {
"drush8": {
"require-dev": {
"drush/drush": "^8.3.3"
},
"config": {
"platform": {
"php": "7.0.8"
}
}
}
}
}
}
Loading