-
jproctor →
committed 5b34fc21 on 4.x
Issue #3330630 by jproctor: Massive code cleanup
-
jproctor →
committed 5b34fc21 on 4.x
Automatically closed - issue fixed for 2 weeks with no activity.
In trying to run some of the automated checks for Drupal 10, I found we had a lot of places where code style (and sometimes structure) could be tweaked a little.
The attached MR includes these:
saml_sp_menu()
from saml_sp.module
because that functionality is handled by the routing system.saml_sp.pages.inc
because the routing system gets that functionality from SamlSPController
(see API changes below).saml_sp.api.inc
(see API changes below).assert()
lines to entity forms to guarantee we are working with the kind of entity we expect.SamlSPController.php
with their modern equivalents.SamlSPConfig.php
form definition to reduce the complexity of the conditionals around the metadata field.saml_sp_drupal_login.module
(we have $this
instead of $user
) which is in at least a couple patches on other issues that we haven’t merged yet.None (for now): the module code currently passes both drupal-check
and phpcs
with no errors!
After merging we should check for merge conflicts in all the other open MRs.
Function saml_sp__is_valid_authentication_response()
was in saml_sp.pages.inc
; it was previously used by the consumer endpoint page. That page (and a copy of this function) is now in SamlSPController.php
, and we do not need it outside of that context. Since I removed saml_sp.pages.inc
, I moved the function to saml_sp.module
and marked it deprecated for version 4.2.0 (whenever that gets released), to be removed in 5.0.0. When this MR is accepted I’ll start a 5.x branch to enact that.
In saml_sp.api.inc
, hook_saml_sp_settings_alter()
specified a \OneLogin\Saml2\Settings
object as its parameter, but the place where it’s invoked (in saml_sp__get_settings()
) is working with an array. Actually calling the hook with an object would have had no effect, so I changed the parameter type to array
.
Fixed
4.0
Code
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
Issue #3330630 by jproctor: Massive code cleanup
Automatically closed - issue fixed for 2 weeks with no activity.