https://github.com/phpseclib/phpseclib3_rector
Rector rules to upgrade a phpseclib v2.0 install to phpseclib v3.0
https://github.com/phpseclib/phpseclib3_rector
Last synced: 6 days ago
JSON representation
Rector rules to upgrade a phpseclib v2.0 install to phpseclib v3.0
- Host: GitHub
- URL: https://github.com/phpseclib/phpseclib3_rector
- Owner: phpseclib
- License: mit
- Created: 2025-05-04T19:45:52.000Z (about 2 months ago)
- Default Branch: main
- Last Pushed: 2025-05-05T00:03:34.000Z (about 2 months ago)
- Last Synced: 2025-06-13T14:16:11.262Z (15 days ago)
- Language: PHP
- Size: 4.88 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# phpseclib3_rector
Rector rules to upgrade a phpseclib v2.0 install to phpseclib v3.0
## Overview
You can use [phpseclib2_compat](https://github.com/phpseclib/phpseclib2_compat) to make all your phpseclib v2.0 calls use phpseclib v3.0, internally, under the hood, or you can use this [Rector](https://getrector.com/) rule to upgrade your phpseclib v2.0 calls to phpseclib v3.0 calls.
## Installation
With [Composer](https://getcomposer.org/):
```
composer require phpseclib/phpseclib3_rector:~1.0
```## Usage
Create a rector.php file with the following contents:
```php
withSets([Set::PATH]);
```
In the same directory where you created that file you can then run Rector by doing either of these commands:```
vendor/bin/rector process src --dry-run
vendor/bin/rector process src
```
The files in the `src/` directory will either be full on modified or (in the case of `--dry-run`) the changes that would be made will be previewed.