------ ----------------------------------------------------------------------
Line src/Authentication/Provider/Cosign.php
------ ----------------------------------------------------------------------
101 Call to deprecated function drupal_set_message():
in Drupal 8.5.0 and will be removed before Drupal 9.0.0.
Use \Drupal\Core\Messenger\MessengerInterface::addMessage() instead.
------ ----------------------------------------------------------------------
------ ----------------------------------------------------------------------
Line src/Controller/CosignController.php
------ ----------------------------------------------------------------------
35 Call to deprecated function drupal_set_message():
in Drupal 8.5.0 and will be removed before Drupal 9.0.0.
Use \Drupal\Core\Messenger\MessengerInterface::addMessage() instead.
66 Call to deprecated function drupal_set_message():
in Drupal 8.5.0 and will be removed before Drupal 9.0.0.
Use \Drupal\Core\Messenger\MessengerInterface::addMessage() instead.
------ ----------------------------------------------------------------------
------ ------------------------------------------------------------------------
Line src/CosignFunctions/CosignSharedFunctions.php
------ ------------------------------------------------------------------------
26 Call to deprecated function user_load():
iin Drupal 8.0.0 and will be removed before Drupal 9.0.0. Use
Drupal\user\Entity\User::load().
46 Call to deprecated function user_load():
iin Drupal 8.0.0 and will be removed before Drupal 9.0.0. Use
Drupal\user\Entity\User::load().
61 Call to deprecated function user_load():
iin Drupal 8.0.0 and will be removed before Drupal 9.0.0. Use
Drupal\user\Entity\User::load().
65 Call to deprecated function user_load():
iin Drupal 8.0.0 and will be removed before Drupal 9.0.0. Use
Drupal\user\Entity\User::load().
75 Call to deprecated function user_load():
iin Drupal 8.0.0 and will be removed before Drupal 9.0.0. Use
Drupal\user\Entity\User::load().
98 Call to deprecated function user_load():
iin Drupal 8.0.0 and will be removed before Drupal 9.0.0. Use
Drupal\user\Entity\User::load().
109 Call to deprecated function drupal_set_message():
in Drupal 8.5.0 and will be removed before Drupal 9.0.0.
Use \Drupal\Core\Messenger\MessengerInterface::addMessage() instead.
112 Call to deprecated function drupal_set_message():
in Drupal 8.5.0 and will be removed before Drupal 9.0.0.
Use \Drupal\Core\Messenger\MessengerInterface::addMessage() instead.
205 Call to deprecated function entity_create():
in Drupal 8.0.x, will be removed before Drupal 9.0.0. Use
The method overriding Entity::create() for the entity type, e.g.
\Drupal\node\Entity\Node::create() if the entity type is known. If the
entity type is variable, use the entity storage's create() method to
construct a new entity:
------ ------------------------------------------------------------------------
------ ---------------------------------------------------------------------------
Line src/Tests/CosignSimpleTest.php
------ ---------------------------------------------------------------------------
173 Call to deprecated method getUsername() of class Drupal\user\Entity\User:
in Drupal 8.0.0, will be removed before Drupal 9.0.0.
Use \Drupal\Core\Session\AccountInterface::getAccountName() or
\Drupal\user\UserInterface::getDisplayName() instead.
183 Call to deprecated method getUsername() of class Drupal\user\Entity\User:
in Drupal 8.0.0, will be removed before Drupal 9.0.0.
Use \Drupal\Core\Session\AccountInterface::getAccountName() or
\Drupal\user\UserInterface::getDisplayName() instead.
205 Call to deprecated method getUsername() of class Drupal\user\Entity\User:
in Drupal 8.0.0, will be removed before Drupal 9.0.0.
Use \Drupal\Core\Session\AccountInterface::getAccountName() or
\Drupal\user\UserInterface::getDisplayName() instead.
208 Call to deprecated method getUsername() of class Drupal\user\Entity\User:
in Drupal 8.0.0, will be removed before Drupal 9.0.0.
Use \Drupal\Core\Session\AccountInterface::getAccountName() or
\Drupal\user\UserInterface::getDisplayName() instead.
213 Call to deprecated method getUsername() of class Drupal\user\Entity\User:
in Drupal 8.0.0, will be removed before Drupal 9.0.0.
Use \Drupal\Core\Session\AccountInterface::getAccountName() or
\Drupal\user\UserInterface::getDisplayName() instead.
217 Call to deprecated method getUsername() of class Drupal\user\Entity\User:
in Drupal 8.0.0, will be removed before Drupal 9.0.0.
Use \Drupal\Core\Session\AccountInterface::getAccountName() or
\Drupal\user\UserInterface::getDisplayName() instead.
222 Call to deprecated method getUsername() of class Drupal\user\Entity\User:
in Drupal 8.0.0, will be removed before Drupal 9.0.0.
Use \Drupal\Core\Session\AccountInterface::getAccountName() or
\Drupal\user\UserInterface::getDisplayName() instead.
236 Call to deprecated method getUsername() of class Drupal\user\Entity\User:
in Drupal 8.0.0, will be removed before Drupal 9.0.0.
Use \Drupal\Core\Session\AccountInterface::getAccountName() or
\Drupal\user\UserInterface::getDisplayName() instead.
237 Call to deprecated method getUsername() of class Drupal\user\Entity\User:
in Drupal 8.0.0, will be removed before Drupal 9.0.0.
Use \Drupal\Core\Session\AccountInterface::getAccountName() or
\Drupal\user\UserInterface::getDisplayName() instead.
261 Call to deprecated method getUsername() of class Drupal\user\Entity\User:
in Drupal 8.0.0, will be removed before Drupal 9.0.0.
Use \Drupal\Core\Session\AccountInterface::getAccountName() or
\Drupal\user\UserInterface::getDisplayName() instead.
------ ---------------------------------------------------------------------------
[ERROR] Found 22 errors
Comments
Comment #2
sergiu stici commentedHere is the patch, please review.
Comment #3
rpc5102 commentedThanks for the patch @sergiu-stici! The messaging side of things seems to be fine but I'm getting an SQLSTATE exception with the auto-create users function turned on. The method in https://www.drupal.org/forum/support/module-development-and-code-questions/2015-03-04/how-to-programmatically-create-a-user#comment-11051637 works for me.
Error:
Comment #4
superfluousapostrophe commentedHi rpc5102,
Here's a patch I put together which addresses the deprecated function and updates the module to use the recommended dependency injections. It also includes a new function which allows the cosign module to play nicely with the Masquerade module.
Edit: This does not make any changes to the unit tests.
Comment #5
superfluousapostrophe commentedI have rolled my patch into a new branch, 8.x-1.1. rpc5102 and I have been collaborating on it and we think that it is working. An extra set or two of eyes on it would be useful.
Comment #6
superfluousapostrophe commentedThe codebase has been updated in 8.x-1.1-alpha1. Thanks for your input.