Commit 65aabd22 authored by Sascha Grossenbacher's avatar Sascha Grossenbacher
Browse files

Issue #3268215 by Berdir, marciaibanez, andrea.cividini, benjifisher: Support Drupal 10

parent e83a286d
Loading
Loading
Loading
Loading
+2 −6
Original line number Diff line number Diff line
@@ -14,7 +14,7 @@
## Introduction
_A default content solution for Drupal 8_

[Default Content][1] allows you to export content along with site configuration information. It does so by leveraging core's serialization and hal modules. It supports entity-references between content as well as files if you have File entity. Content export works with a set of drush commands (more on those below). Content import happens automatically as part of site installation. The import process scans all modules and imports any content found that is located in the expected file path and using the expected .json file structure. (See detailed information below)
[Default Content][1] allows you to export content along with site configuration information. It supports entity-references between content as well as files if you have File entity. Content export works with a set of drush commands (more on those below). Content import happens automatically as part of site installation. The import process scans all modules and imports any content found that is located in the expected file path and using the expected .json file structure. (See detailed information below)

###  Features

@@ -34,9 +34,6 @@ _A default content solution for Drupal 8_

## Requirements
* Drupal 8
* core only
  * [HAL (Hypertext Application Language) module][2] must be enabled
  * [Serialization module][3] must be enabled

## Installation
Install as you would normally install a contributed Drupal module. Visit:
@@ -44,7 +41,7 @@ https://www.drupal.org/docs/8/extending-drupal-8/installing-drupal-8-modules
for further information.

## Configuration
The module has no menu or modifiable settings. There is no configuration. When the default_content module is enabled, the core HAL and Serialization modules must also be enabled. If they are currently disabled, activating default_content will give you the option to enable them.
The module has no menu or modifiable settings. There is no configuration. If they are currently disabled, activating default_content will give you the option to enable them.


## Usage
@@ -161,5 +158,4 @@ default_content:
UI for easily exporting?

[1]: https://www.drupal.org/project/default_content "Default Content"
[2]: https://www.drupal.org/docs/8/core/modules/hal "HAL (Hypertext Application Language) module"
[3]: https://www.drupal.org/docs/8/core/modules/serialization "Serialization module"
+1 −1
Original line number Diff line number Diff line
@@ -5,7 +5,7 @@
  "license": "GPL-2.0+",
  "minimum-stability": "dev",
  "require": {
    "drupal/core": "^8.7.7 || ^9"
    "drupal/core": "^9.1 || ^10"
  },
  "require-dev": {
    "drupal/paragraphs": "^1",
+1 −1
Original line number Diff line number Diff line
@@ -2,4 +2,4 @@ name: 'Default content'
type: module
description: 'Imports default content when a module is enabled'
package: Web services
core_version_requirement: ^8.7.7 || ^9
core_version_requirement: ^9.1 || ^10
+1 −1
Original line number Diff line number Diff line
@@ -46,7 +46,7 @@ class ContentFileStorage implements ContentFileStorageInterface {
    foreach ($iterator as $fileinfo) {
      /* @var \SplFileInfo $fileinfo */

      // Skip directories and non-json files.
      // Skip directories and non-json/yaml files.
      if ($fileinfo->isDir() || ($fileinfo->getExtension() != 'json' && $fileinfo->getExtension() != 'yml')) {
        continue;
      }
+1 −1
Original line number Diff line number Diff line
@@ -2,8 +2,8 @@

namespace Drupal\default_content\Event;

use Drupal\Component\EventDispatcher\Event;
use Drupal\Core\Entity\ContentEntityInterface;
use Symfony\Component\EventDispatcher\Event;

/**
 * Defines event fired when content is exported.
Loading