Download the PHP package nazonohito51/require-path-fixer without Composer

On this page you can find all versions of the php package nazonohito51/require-path-fixer. 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 require-path-fixer

RequirePathFixer

Legacy php project have a large number of require statements(require/require_once/include/include_once). And since they are not homogeneous, it is difficult to collect them all. This library searches all require statements and modifies them to be homogeneous code.

Latest Stable Version

Installation

Usage

Advanced usage

Define constants and variables

The following statement will be not replaced, because it is unknown what path COMMON_DIR is.

require_once COMMON_DIR . '/path/to/file.php';

If there is a constant or variable to be replaced, it is passed to the following method.

Restrict modification target

If you have files or directories you don't want to modify, use addBlackList().

Or if you want to modify only some files in the repository, use addWhiteList(). addBlackList() and addWhiteList() can be used at the same time.

Define current directory

In PHP, the following statement (starting with '.' or '..') determines the path from the current directory.

require_once './path/to/file.php';

Details are written in the PHP Manual. If you want to define the current directory, use setWorkingDir(). When the current directory is defined, this library resolves the above statement from the current directory. However, originally the current directory changes depending on the entry point, and it also dynamically changes using chdir(). Please be careful when using it.

Define include_path

In PHP, the following statement (relative path) determines the path from the include_path.

require_once 'path/to/file.php';

If you want to define the include_path, use setIncludePath(). When include_path is defined, this library resolves the above statement from include_path. However, originally include_path changes dynamically with set_include_path(). Please also be careful when using it.

About analysis logic

This library classifies all statements into seven types and converts them. Their types are absolute, variable, relative, unique, working_dir, include_path and unexpected.

absolute

If the path is an absolute path, fix it to the path from the new base path.

variable

If the path can not be resolved, such as unknown variable or constant, do not convert.

relative

In the path is an relative path, basically it is determined only at runtime, so it can not be replaced. But this library somehow tries to guess the path. That's unique, working_dir, include_path. However, if neither can be guessed, it will not be converted. That's relative.

unique

In relative paths, if there is only one file in the repository that matches the path in statement, this library converts it to the path to that file.

working_dir

In relative paths starting with '.' or '..', if define current directory by setWorkingDir(), this library resolves the path from the current directory. And this library will not guess by unique.

include_path

In relative paths not starting with '.' or '..', if define include_path by setIncludePath(), this library resolves the path from the include_path. And this library will not guess by unique.

unexpected

The statement will be of this type if it does not fall under either type.


All versions of require-path-fixer with dependencies

PHP Build Version
Package Version
Requires php Version >=5.3.3
webmozart/path-util Version ^2.3
symfony/finder Version ^2.6
phplucidframe/console-table Version ^1.2
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 nazonohito51/require-path-fixer contains the following files

Loading the files please wait ....