Skip to content

V2 to v3 updates#2

Merged
terrafrost merged 5 commits intophpseclib:mainfrom
neighbourhoodie:v2-to-v3-updates
Feb 15, 2026
Merged

V2 to v3 updates#2
terrafrost merged 5 commits intophpseclib:mainfrom
neighbourhoodie:v2-to-v3-updates

Conversation

@hulkoba
Copy link
Contributor

@hulkoba hulkoba commented Feb 13, 2026

This work is conducted in accordance with "M2: Add additional RectorPHP rules to upgrade phpseclib 2.0 to 3.0 " as outlined in the Scope of Work for the Sovereign Tech Agency Resilience Program.

This PR

  • updates PublicKeyLoader
    • to tweak fluent function to add assign variable to setEncryptionMode and setSignatureMode.
    • keep withSaltLength immutable
    • Add more tests to getLength
  • Adds new rule: SymmetricKeyConstructor
    • incl. documentation and tests

It also changes the folder structure to prepare the project for the ruleset for the v3 to v4 update.

The new structure is

rector_rules/ 
- config/
    - v2-to-v3.php
- src/ 
    - Set/ 
        -  V2toV3Set.php 
        -  V3toV4Set.php (coming soon)
    - Rector/
        - V2toV3/ 
            - Rule.php
        - V3toV4/ (coming soon) 
            - Rule.php
- tests/ 
    - V2toV3/
    - V3toV4/ (coming soon)
- composer.json

@terrafrost terrafrost merged commit c8ed87f into phpseclib:main Feb 15, 2026
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