Alexia / php7mar

PHP 7 Migration Assistant Report (MAR)
GNU General Public License v3.0
797 stars 133 forks source link

@TODO #1

Open Alexia opened 9 years ago

Alexia commented 9 years ago
kherge commented 9 years ago

I'd like to recommend that support for Composer be added, and that the package be made available through Packagist.

Alexia commented 9 years ago

I really want to say no since I am not fond of Composer, but I know people will keep asking. :P I made an account earlier and will look into it.

Alexia commented 9 years ago

@kherge https://packagist.org/packages/alexia/php7mar Does that look correct to you? I setup the automatic updater hook on GitHub as well.

Swader commented 9 years ago

It works, thanks:

vagrant@homestead:~/Code/diffbot_test$ composer global require alexia/php7mar:dev-master
Changed current directory to /home/vagrant/.composer
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
  - Installing alexia/php7mar (dev-master 38d2d9d)
    Cloning 38d2d9dd357351c21c821408c71a4bfc869a1265

Writing lock file
Generating autoload files
vagrant@homestead:~/Code/diffbot_test$ php ~/.composer/vendor/alexia/php7mar/
classes/       composer.json  .git/          .gitignore     LICENSE        mar.php        README.md      reports/       testcases.php  
vagrant@homestead:~/Code/diffbot_test$ php ~/.composer/vendor/alexia/php7mar/mar.php -f=.
Report located at: /home/vagrant/.composer/vendor/alexia/php7mar/reports/2015-05-25 06:37:33 diffbot_test.md

You might want to tag a release soon, though (even if unstable), so it can be installed without dev-master. Maybe even package it up into a phar so it can be run directly from the command line after global installation, like so:

$ php7mar -f=.
peterbowey commented 9 years ago

There are two others PHP 7 migration tools that I looked at, and tested - both requiring composer.

1) https://github.com/gisostallenberg/php-to-7-aid 2) https://github.com/Firehed/php7ize

Neither of the above were as helpful or as effective as https://github.com/Alexia/php7mar in my server environment which does not normally need to deal with "Composer", or use *.phar packages or other library boxes for a basic PHP CLI.

Thanks @Alexia for a good minimalism approach.

Alexia commented 9 years ago

Thanks. That is why the Composer package type is set to project. It allows people to install it through Composer, but it will run fine independently. :D