Problem/Motivation

The database stored Site Verifications are not exportable.

Proposed resolution

Use ConfigEntityType for storage of SiteVerification, allowing for the Drupal Config system to export, migrate and import the new entity.

New ConfigEntityType SiteVerification is a fully validated config schema.

Conversion has resulted in a complete re-write of the module.

A post-update function migrates the old-style database table stored site verification to the new config entity type.

Remaining tasks

  • ✅ File an issue
  • ✅ Addition/Change/Update/Fix
  • ✅ Testing to ensure no regression
  • ✅ Automated unit testing coverage
  • ✅ Automated functional testing coverage
  • ✅ UX/UI designer responsibilities
  • ✅ Readability
  • ✅ Performance
  • ✅ Security
  • ✅ Documentation
  • ✅ Code review by maintainers
  • ✅ Full testing and approval
    • ✅ Add test to import SiteVerifications through config.
  • #3495004: Update project page
  • ✅ Credit contributors
  • ✅ Release notes snippet
  • ✅ Release target 3.0.0-beta1

User interface changes

  • Listing of verifications is now an entity list

API changes & Data model changes

  • Database support and table removed
  • Database storage replaced with ConfigEntity:SiteVerification
  • Creation via API now done with entity storage site_verification
  • A SiteVerification must call validate() prior to attempted save

Release notes snippet

  • Migration of site verification storage from database table to Config Entity.

Original summary

Configuration for the 8.x version of this module is not exportable
If this module had configuration management in place it would be easier to synchronize data from development to production.
I could not find any way to export configuration for this module in Configuration -> Development -> Configuration Synchronization -> Export

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

thepayalshetty created an issue. See original summary.

Webbeh’s picture

Title: Configuration for the 8.x version of this module is not exportable » Provide exportable configuration
Component: Miscellaneous » Code

Makes sense to me - re-scoping issue title for this.

elc’s picture

Version: 8.x-1.x-dev » 2.0.0-alpha2

Use ConfigEntity to store the two types - meta and file. Two different lists or possibly one list if possible.

elc’s picture

Title: Provide exportable configuration » Use ConfigEntityType for exportable SiteVerification storage
Version: 2.0.0-alpha2 » 3.0.x-dev
Assigned: Unassigned » elc
Issue summary: View changes

Updating version to 3.0.x as this has become a full re-write of the module.

elc’s picture

Assigned: elc » Unassigned
Status: Active » Needs review

The "phpstan (next minor)" error is unavoidable until #3482464: Backport Hook and LegacyHook Attribute lands. At that point both of the errors in the phpstan.neon file can be removed.

Very much open on feedback and patches on this! Will be making a 3.0.0-beta1 release in about a week if I don't get feedback, and that'll be out in the world for testing from then on.

One item of note is the simplification of the admin form for creating and editing the entities - it now only includes the name and the content fields, and does not have a full metatag entry, or a file upload field. There was already confusion about the file uploading part, fixed in 2.1.0-rc1, but it was added complexity that I didn't feel was needed in what was already a full re-write of the module.

elc’s picture

Status: Needs review » Needs work

Still @todo

- Update README with current usage instructions (file/meta entry has changed to just name/content entry with parsing html meta line and file upload field processing no longer included)
- Finish adding help hooks (code completed, not pushed)
- Confirm if the forced validation currently coded breaks sync import of config, which was the entire point of this change

elc’s picture

Issue summary: View changes

Confirmed that importing did not work with validation being a requirement but it not being automatic. Made validation automatic and required.

@todo

  • ➖ Add test to import SiteVerification entities through config.
  • ➖ Update project home page

Still waiting on release of 11.1 and 10.4 to get rid of the phpstan error about Hook/LegacyHook not existing yet.

elc’s picture

Issue summary: View changes
Status: Needs work » Needs review

Drupal 11.1.0 and 10.4.0 have been released, fixing the Legacy/Hook false positive.

This will be merged into 3.0.x when I get the chance to update/write the release notes for dev/beta. Reviews always welcome, but not blocking.

I feel the review will effectively be on the release which will be a new branch and a beta, and will not remove support from any of the existing branches, so this makes it safe enough for it to be released as is.

  • elc committed 3c6c9a48 on 3.0.x
    [#3008860] Convert from database storage to exportable ConfigEntityType.
    
elc’s picture

Issue summary: View changes
Status: Needs review » Fixed

Released as 3.0.0-beta1 or 3.0.0-beta2

Follow up task #3495004: Update project page

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.