Problem/Motivation
You can already export content from your site, piecemeal, with the dr content:export command. We should also support exporting all content (with some guardrails).
This would be useful to Drupal CMS; we're already polyfilling it, but it would be helpful for our one-command deployments.
Proposed resolution
If no entity type ID is given to dr content:export, export all content.
Well, not all. The guardrails should be (at least):
- Never export users 0 or 1, since those are not really portable
- Add a container parameter that lists entity types which should never be exported
- Internal entity types are never exported
- Put a tag on the entity queries that find things to export, so that external code can alter the results
All this should be put behind a new Drupal\Core\DefaultContent\Exporter::exportAll($directory) method.
Remaining tasks
Agree on this, and implement it with test coverage.
User interface changes
The dr content:export one argument may become optional.
Introduced terminology
None.
API changes
TBD, but a public method will probably get added to a final, experimental class.
Data model changes
None.
Release notes snippet
TBD
Comments