Download the PHP package jelix/fakeserverconf without Composer

On this page you can find all versions of the php package jelix/fakeserverconf. 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 fakeserverconf

This PHP Library will allow you to simulate different PHP server configuration.

In a CLI environment (where you run PHPUnit for instance), you could have some difficulties to test a class that uses some $_SERVER values. This global variable does not contain the same thing as if the script is called in an Apache environment for example. Moreover the content of $_SERVER is not the same between a server configured with mod_php, and a server running PHP as a CGI, as FPM etc..

FakeServerConf allow you to fill automatically $_SERVER with good values (and $_GET, $_POST...), only by given an URL to "virtual" PHP server.

You don't need anymore to setup several real PHP HTTP server to test your libraries in different environment. Just call FakeServerConf in your unit tests.

For example, in your test, you want to have a $_SERVER filled as if the URL "http://testapp.local/info.php/foo/bar?baz=2" was requested. In your PHPUnit/Atoum/Simpletest/whatever class, call this:

$_SERVER is now filled correctly, and you can test your classes (routers, url parser etc...)

You can also set the document root and other things...

Supported servers

Adding servers

You don't find your server configuration in FakeServerConf? Help us to provide additionnal support.

installing

You can use Composer. Into your composer.json file, add

running test

Install phpunit (run composer install) and launch it into the tests/ directory


All versions of fakeserverconf with dependencies

PHP Build Version
Package Version
Requires php Version >=5.3.0
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 jelix/fakeserverconf contains the following files

Loading the files please wait ....