Skip to content

V3 to v4 updates#4

Merged
terrafrost merged 5 commits intophpseclib:mainfrom
neighbourhoodie:v3-to-v4-updates
Mar 12, 2026
Merged

V3 to v4 updates#4
terrafrost merged 5 commits intophpseclib:mainfrom
neighbourhoodie:v3-to-v4-updates

Conversation

@hulkoba
Copy link
Copy Markdown
Contributor

@hulkoba hulkoba commented Mar 11, 2026

This work is conducted in accordance with "Milestone 1: Write RectorPHP rules to upgrade phpseclib 3.0 to 4.0" as outlined in the Scope of Work for the Sovereign Tech Agency Resilience Program.

This PR:

  • adds a Node Visitor to collect stuff needed for the actual refactor
  • adds custom Rector rules for the X509 refactor
  • adds documentation for Rector rules

{
public function foo()
{
$spkac = CRL::loadCRL($privKey->getPublicKey());
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Heya 👋 The given differences table shows the line $spkac = new CRL::loadCRL($privKey->getPublicKey()); which is invalid php. So we added $spkac = CRL::loadCRL($privKey->getPublicKey()); instead. Let us know if and how we should change it.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh! That should be $pkac = new SPKAC($privKey->getPublicKey()) - sorry about that!

I'll try to look over this this evening (it's the morning in the timezone I'm in) and merge it in.

Thanks!

@terrafrost terrafrost merged commit 9da7b02 into phpseclib:main Mar 12, 2026
@terrafrost
Copy link
Copy Markdown
Member

Aside from what I've previously mentioned this PR looks good! Nice job!!

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