New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

namespaces: still a lot deprecation warnings #1010

Closed
tvdijen opened this Issue Dec 2, 2018 · 7 comments

Comments

Projects
None yet
2 participants
@tvdijen
Member

tvdijen commented Dec 2, 2018

Describe the bug
Despite de fact that all classes have been migrated to namespaces, I still see a lot of deprecation-warnings in the logs..

To Reproduce
Steps to reproduce the behavior:

  1. Turn debug-logging on.. Actually level 4 (INFO) is enough for this
  2. For example, try an authentication flow
  3. See logfile

Expected behavior
The log-line below shouldn't occur., because everything has been migrated. It's just a few of many (equal) lines that are printed.

Screenshots or logs
Dec 2 18:16:57 webapp-1 simplesamlphp-idp[3172]: 4 [39c1af90a2] The class or interface 'SimpleSAML_Utilities' is now using namespaces, please use 'SimpleSAML\Utilities'.
Dec 2 18:16:57 webapp-1 simplesamlphp-idp[3172]: 4 [39c1af90a2] The class or interface 'sspmod_core_Stats_Output_Log' is now using namespaces, please use 'SimpleSAML\Module\core\Stats\Output\Log' instead.

@tvdijen tvdijen added this to the 1.18 milestone Dec 2, 2018

@jaimeperez

This comment has been minimized.

Member

jaimeperez commented Dec 3, 2018

I think the warnings regarding SimpleSAML_Utilities are coming from the SAML2 library. However, the ones on sspmod_core_Stats_Output_Log puzzle me. Have you tried grepping for that in your SSP installation? If there's absolutely no code using that class name, you should never get the warning...

@tvdijen

This comment has been minimized.

Member

tvdijen commented Dec 3, 2018

I did grep, also on the SAML2 library.. In fact, I have replaced all old namespaces there in the 3.3.0 release.
My best guess is that it comes from the authproc-filters where translate something like core:TargetedID to a class-name.. Needs further investigation

@jaimeperez

This comment has been minimized.

Member

jaimeperez commented Dec 3, 2018

Uhm, that translation should be done in SimpleSAML\Module, and there it should already use namespaces... 🤔

@tvdijen

This comment was marked as outdated.

Member

tvdijen commented Dec 3, 2018

if (!class_exists($className)) {

This will call the autoloaders with the old style sspmod_ classname.. The issue is definitely with this code and the autoloaders..

Wouldn't it be better to test for the newClassName first, if it exists continue normal operation, if not try the old style class name (in which case the autoloader will print a warning).. Feels like it's the other way around now

@tvdijen

This comment has been minimized.

Member

tvdijen commented Dec 3, 2018

Never mind, I've fixed it in 39d64ee

@tvdijen tvdijen closed this Dec 3, 2018

@jaimeperez

This comment has been minimized.

Member

jaimeperez commented Dec 4, 2018

No more warnings in the log then?

@tvdijen

This comment has been minimized.

Member

tvdijen commented Dec 4, 2018

Nope, all gone! 😄

@tvdijen tvdijen modified the milestones: 1.18, 1.17 Dec 7, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment