Problem/Motivation

In #3461614: Automated Drupal 11 compatibility fixes for file_encrypt updated to support Drupal 11 but the config form alterations will need to be made to support D11 structure. Best to follow field_encrypt approach https://git.drupalcode.org/project/field_encrypt/-/tree/4.x?ref_type=heads.

Also need to update the tests once the updates are made.

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

dmundra created an issue. See original summary.

dmundra’s picture

The question is does 11.2 need support or can we skip straight to 11.3?

nickolaj made their first commit to this issue’s fork.

nickolaj’s picture

Status: Active » Needs review

Converted procedural hooks to OOP using Drupal 11 Hook attributes. Moved hooks to `src/Hook/FileEncryptHooks.php` following the field_encrypt pattern, updated services.yml with autowiring and skip_procedural_hook_scan, and updated core_version_requirement to `^10.3 || ^11`.

https://git.drupalcode.org/issue/file_encrypt-3569417/-/merge_requests/1

dmundra’s picture

Thank you @nickolaj. I see you closed the merge request, can you re-open it and target 2.0.x branch or create a new one?

I also got into a rabbit hole working on this and I looked at this update https://www.drupal.org/node/3386675 that will help make the encryption profile configuration work in Drupal 11. With that we might not need to go to hooks just yet and instead have the basics working first (with tests passing) and then do the hooks after that.

dmundra’s picture

Status: Needs review » Needs work
dmundra’s picture

Need to also figure out field storage vs field config. Seems like replacing it is causing issues.

dmundra’s picture

Reset field storage configuration and the tests are now passing except for the image one which is this issue #3496795: Image styles not working with encrypted Image file fields. I can confirm that image styles don't seem to work in Drupal 11 but sometimes I get to work (see #3516802: VULN: Information Disclosure (Failure to encrypt) and silent Data Corruption)

dmundra’s picture

dmundra’s picture

Status: Needs work » Fixed

@nickolaj I am going to create a new issue to work on the hook changes. For now this as achieved the need to get the config working in Drupal 11 and tests are mostly passing now.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

dmundra’s picture

Status: Fixed » Closed (fixed)
dmundra’s picture