Skip to content

Fix Random utility import to use SimpleSAML\Utils\Random#72

Merged
tvdijen merged 3 commits intosimplesamlphp:masterfrom
ioigoume:fix/random-utils-namespace
May 7, 2026
Merged

Fix Random utility import to use SimpleSAML\Utils\Random#72
tvdijen merged 3 commits intosimplesamlphp:masterfrom
ioigoume:fix/random-utils-namespace

Conversation

@ioigoume
Copy link
Copy Markdown
Contributor

@ioigoume ioigoume commented May 6, 2026

This PR updates Random imports from SimpleSAML\XML\Utils\Random to SimpleSAML\Utils\Random. The XML-namespaced Random helper was removed from simplesamlphp/xml-common in 2.8.x, so the old import now breaks (or triggers warnings) when projects upgrade. This is a compatibility fix only—ID generation behavior remains unchanged, but the code now works with newer xml-common/SimpleSAMLphp dependency sets.

@ioigoume ioigoume requested a review from tvdijen May 6, 2026 13:29
@codecov
Copy link
Copy Markdown

codecov Bot commented May 6, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 67.79%. Comparing base (40911d3) to head (cb2b3da).

Additional details and impacted files
@@             Coverage Diff              @@
##             master      #72      +/-   ##
============================================
- Coverage     68.03%   67.79%   -0.24%     
  Complexity      364      364              
============================================
  Files            25       25              
  Lines          1220     1211       -9     
============================================
- Hits            830      821       -9     
  Misses          390      390              
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@tvdijen
Copy link
Copy Markdown
Member

tvdijen commented May 6, 2026

The code for generating IDs was not removed, but moved to the IDValue-class:
https://github.com/simplesamlphp/xml-common/blob/master/src/XMLSchema/Type/IDValue.php#L29

We should probably use that one now.. I think I'm gonna remove the one from SimpleSAMLphp in the future.

@ioigoume
Copy link
Copy Markdown
Contributor Author

ioigoume commented May 6, 2026

The code for generating IDs was not removed, but moved to the IDValue-class: https://github.com/simplesamlphp/xml-common/blob/master/src/XMLSchema/Type/IDValue.php#L29

We should probably use that one now.. I think I'm gonna remove the one from SimpleSAMLphp in the future.

@tvdijen can you please check again

Comment thread src/Cas/Factories/TicketFactory.php Outdated
Comment thread src/Cas/Factories/TicketFactory.php Outdated
@ioigoume ioigoume requested a review from tvdijen May 7, 2026 07:03
@tvdijen tvdijen merged commit 55f686b into simplesamlphp:master May 7, 2026
19 checks passed
@tvdijen
Copy link
Copy Markdown
Member

tvdijen commented May 7, 2026

Excellent, thanks @ioigoume !

@tvdijen
Copy link
Copy Markdown
Member

tvdijen commented May 7, 2026

Tagged v7.0.2

@ioigoume ioigoume deleted the fix/random-utils-namespace branch May 7, 2026 07:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants