simplesamlphp / simplesamlphp/saml2-module-spid
PHP 8.5: replace all instances of array_pop() in ::fromXML() with array_last()
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 1
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
As soon as PHP 8.5 becomes the minimum required version for this library:
https://www.php.net/releases/8.5/en.php#array-first-and-last-functions
Using array_pop() is changing the original array by removing the last item from it, which may cause unexpected behaviour. array_last() doesn't do this, so it should in theory also be faster
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the ::fromXML() entry point and find every use of array_pop() there. Once PHP 8.5 is the minimum supported version, replace those uses with array_last() and verify that the original arrays are no longer modified; the payload does not mention a specific test file.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- backend
- Issue type
- Refactor
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100