Hi, are there any plans to port the module to D8?


Members fund testing for the Drupal project. Drupal Association Learn more


bdone’s picture

Assigned: Unassigned » bdone

with approval of @deekayen, i'm going to take a pass at an upgrade of r4032login to 8.x.

bdone’s picture

really learned a lot about symfony and d8 from this upgrade!

i'm attaching what i've got so far. this is basically altering the AccessSubscriber service, so r4032login can handle its own 403 exceptions. missing still is...

* exception handling from AccessDeniedHttpException, namely watchdog logs
* rendering of UserLoginForm for match_noredirect_pages config

bdone’s picture

Status: Active » Needs work
bdone’s picture

per suggestions by @damiankloip in IRC, replacing the AccessSubscriber seems overkill. i'll try only listening to the EXCEPTION event in the subscriber instead.

bdone’s picture

eliminating the altering of AccessSubscriber, this is much simpler.

bdone’s picture

22.28 KB

a few more updates including...

* configuration factory argument in subscriber service
* form validation for r4032login paths
* missing AccessDeniedHttpException dependecy
* Reordered default_redirect_code mappings
* replaced collapsible fieldset with HTML5 details element
* dropped unused page.403 config
* removed uneeded DestructableInterface and destroy method

bdone’s picture

@deekayen has added me as a maintainer, so i've pushed my work so far up to the 8.x-1.x branch. i'll update the version and make some follow up issues once 8.x gets listed here.

deekayen’s picture

Status: Needs work » Reviewed & tested by the community

I tested #6 tonight and all the basic functionality from 6.x-1.x worked.

bdone’s picture

Version: 7.x-1.x-dev » 8.x-1.x-dev
damiankloip’s picture

+++ b/lib/Drupal/r4032login/EventSubscriber/R4032LoginSubscriber.php
@@ -0,0 +1,97 @@
+        $response = new RedirectResponse(url($redirect, array('absolute' => TRUE)));

You can inject the urlGenerator here too. Other than that - looking pretty good!

bdone’s picture

thanks @damiankloip. i've added a task for this in #2210717: Inject the urlGenerator in R4032LoginSubscriber.

bdone’s picture

Assigned: bdone » Unassigned
Status: Reviewed & tested by the community » Fixed

I've committed and pushed the new 8.x branch.

Status: Fixed » Closed (fixed)

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