Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/diplopito/Phalcon-Upgrade-Adviser
Returns a log with changes to make in order to upgrade Phalcon from 3.x to 4.x, 3.x to 5.1.x or from 4.x to 5.1.x
https://github.com/diplopito/Phalcon-Upgrade-Adviser
phalcon phalcon-framework phalcon-php
Last synced: 3 months ago
JSON representation
Returns a log with changes to make in order to upgrade Phalcon from 3.x to 4.x, 3.x to 5.1.x or from 4.x to 5.1.x
- Host: GitHub
- URL: https://github.com/diplopito/Phalcon-Upgrade-Adviser
- Owner: diplopito
- License: mit
- Created: 2019-09-03T07:28:15.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2022-12-27T09:14:31.000Z (almost 2 years ago)
- Last Synced: 2024-04-10T05:45:42.541Z (7 months ago)
- Topics: phalcon, phalcon-framework, phalcon-php
- Language: PHP
- Homepage:
- Size: 65.4 KB
- Stars: 10
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-phalcon - Upgrade Adviser - Command line tool to help upgrading Phalcon Applications from 3.4.x to 4.1.3, 3.4.x to 5.1.3, 4.1.3 to 5.1.3. (Miscellaneous)
README
# Phalcon Upgrade Adviser (Unofficial)
This console application aims to smooth the upgrade process from Phalcon 3.4.x to 4.0.x, 3.4.x to 5.1.3 or 4.0.x up to 5.1.3 by indexing all the PHP files in a project and listing all the Phalcon classes that must be changed per file.The Adviser is a companion to the [Official Phalcon upgrade guide to v4](https://github.com/phalcon/docs/blob/4.0/en/upgrade.md) and to the [Official Phalcon upgrade guide to v5](https://github.com/phalcon/docs/blob/5.0/en/upgrade.md): whenever the log points to a _renamed_ class, it is recommended to check the guide to know exactly what has to be changed. The Adviser is limited to new, renamed and removed classes. Other changes, like adding a handle to new applications, must be done following the guide.
## Requirements
- Php 7+ or 8+;## Usage
- Open a terminal window;
- Command line `php cli.php {upgradePath} {pathToObj} {logfile} ` where:
1. `upgradePath` (Required): must be `v3to4`to upgrade from Phalcon 3 to 4, `v3to5` to upgrade from Phalvon 3 to 5 or `v4to5` to upgrade from Phalcon 4 to 5;
2. `pathToObj` (Required): must be the path to the directory of the project that you want to upgrade or to a single file;
3. `logfile` (optional): file to log the upgrading steps (if not provided, "upgraderLog.txt" will be used by default).### Example:
```php
//Migrating a project from Phalcon 3.4.5 to 4.1.2
//For full app upgrade provide the path to the app:
php cli.php v3to4 /mnt/f/xampp/htdocs/xtest/vokuro vokuroLog.txt //stores result in log file `vokuroLog.txt`
```
View [Log file](https://github.com/diplopito/Phalcon-Upgrade-Adviser/blob/master/vokuroLog.txt)```php
//Migrating a project from Phalcon 4.1.3 to 5.1.3
php cli.php v4to5 F:\xampp\htdocs\xtest\vokuro-4.1 vokuro4to5.txt
```
View [Log file](https://github.com/diplopito/Phalcon-Upgrade-Adviser/blob/master/vokuro4to5.txt)```php
//To check just one file; result will be returned to terminal:
php cli.php v3to4 /mnt/f/xampp/htdocs/xtest/vokuro/app/library/Acl/Acl.php//Returns:
/mnt/f/xampp/htdocs/xtest/vokuro/app/library/Acl/Acl.php:
Phalcon\Mvc\User\Component => Renamed to Phalcon\Di\AbstractInjectionAware
Phalcon\Acl\Adapter\Memory => No changes (Might need to check types)
Phalcon\Acl\Role => No changes (Might need to check types)
Phalcon\Acl\Resource => Renamed to Phalcon\Acl\Component
Phalcon\Acl\Adapter\Memory => No changes (Might need to check types)
Phalcon\Acl\Adapter\Memory => No changes (Might need to check types)
Phalcon\Acl\Adapter\Memory => No changes (Might need to check types)
Phalcon\Acl::DENY) => Check possible changes in constant
```## Note
The Adviser will skip the _.volt_ files, _.git_ and _vendor_ directories.