Download the PHP package qafoolabs/php-refactoring-browser without Composer

On this page you can find all versions of the php package qafoolabs/php-refactoring-browser. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package php-refactoring-browser

PHP Refactoring Browser

Note: This software is under development and in alpha state. Refactorings
do not contain all necessary pre-conditions and might mess up your code.
Check the diffs carefully before applying the patches.

Build Status

Automatic Refactorings for PHP Code by generating diffs that describe the refactorings steps. To prevent simple mistakes during refactorings, an automated tool is a great.

See a screenshot of extract-method in action.

The library is standing on the shoulder of giants, using multiple existing libraries:

Based on data from these sources the Refactoring Browser consists of two distinct components:

Install & Basic Usage

Download PHAR

The refactoring browser is used with:

php refactor.phar <refactoring> <arg1>...<argN>

It outputs a diff to the screen and you can apply it to your code by piping it to patch -p1:

php refactor.phar <refactoring> <arg1>...<argN> | patch -p1

Editor Plugins

There are third-party plugins available for using PHP refactorings within different text editors. These separately maintained projects can be found at the links below:

Why?

Users of PHPStorm (or Netbeans) might wonder why this project exists, all the refactorings are available in this IDE. We feel there are several reasons to have such a tool in PHP natively:

Refactorings

Extract Method

Extract a range of lines into a new method and call this method from the original location:

php refactor.phar extract-method <file> <line-range> <new-method>

This refactoring automatically detects all necessary inputs and outputs from the function and generates the argument list and return statement accordingly.

Rename Local Variable

Rename a local variable from one to another name:

php refactor.phar rename-local-variable <file> <line> <old-name> <new-name>

Convert Local to Instance Variable

Converts a local variable into an instance variable, creates the property and renames all the occurrences in the selected method to use the instance variable:

php refactor.phar convert-local-to-instance-variable <file> <line> <variable>

Rename Class and Namespaces

Batch Operation to rename classes and namespaces by syncing class-names (IS-state) to filesystem names (SHOULD-state) based on the assumption of PSR-0.

Fix class and namespace names to correspond to the current filesystem layout, given that the project uses PSR-0. This means you can use this tool to rename classes and namespaces by renaming folders and files and then applying the command to fix class and namespaces.

php refactor.phar fix-class-names <dir>

Optimize use statements

Optimizes the use of Fully qualified names in a file so that FQN is imported with "use" at the top of the file and the FQN is replaced with its classname.

All other use statements will be untouched, only new ones will be added.

php refactor.phar optimize-use <file>

Roadmap

Not prioritized.

Integration:

List of Refactorings to implement:

Internals

Design Goals


All versions of php-refactoring-browser with dependencies

PHP Build Version
Package Version
Requires nikic/php-parser Version @stable
beberlei/assert Version @stable
andrewsville/php-token-reflection Version @stable
symfony/finder Version ~2.4@stable
symfony/console Version ~2.4@stable
tomphp/patch-builder Version ~0.1
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package qafoolabs/php-refactoring-browser contains the following files

Loading the files please wait ....