@Tessa could you create an 8.x branch?

I'm porting this module to Drupal 8 here at Drupalcon Dublin.

Release blockers:

CommentFileSizeAuthor
#2 guardian-d8-2809687-2.patch22.31 KBaskibinski
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

askibinski created an issue. See original summary.

askibinski’s picture

Status: Active » Needs review
FileSize
22.31 KB

Here's the patch! I'm marking this 'needs review' although I know it needs some work and testing. But also because I would like have answers/comments on below remarks. Keep in mind this is an initial patch.

* I obviously already did some refactoring, but I think some parts can still be optimized
* hook_init is replaced by an event_subscriber Service
* most logic is now in the Guardian class, still some hooks present in .module and .install
* configuration API: I'm not sure about the naming convention: I moved th to variables hours and mail to guardian.global.hours and guardian.global.mail
* Is it possible to do $this->account = \Drupal::currentUser(); without using the global?
* there is no D8 equivalent for element_get_visible_children() see line 101 guardian.module so don't know how to do this.
* made a scaffold phpunit test, needs work

TODOS:
* Needs testing! I did some basic testing but running out of time here so there are probably bugs...
* needs phpunit/kernel tests

Tess Bakker’s picture

Tess Bakker’s picture

Issue summary: View changes

Added some sub-issues.

Tess Bakker’s picture

  • Tessa Bakker committed 9b18446 on 8.x-1.x
    Issue #2809687 by Tessa Bakker: D8 port, Change Config to Settings
    
Tess Bakker’s picture

Version: 7.x-1.x-dev » 8.x-1.x-dev
Assigned: askibinski » Tess Bakker
Status: Needs review » Active

  • Tessa Bakker committed c166bd8 on 8.x-1.x
    Issue #2809687 by Tessa Bakker: Port to Drupal 8, hook_install...

  • Tessa Bakker committed 4b3bf32 on 8.x-1.x
    Issue #2809687 by askibinski, Tessa Bakker: Port to Drupal 8 - Readme....

  • Tessa Bakker committed 66ce9ce on 8.x-1.x
    Issue #2809687 by Tessa Bakker: Port to Drupal 8, disable user form only...
Tess Bakker’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

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