Download the PHP package enzyme/parrot without Composer

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

Build Status

Mockable native static functions for PHP.

What is it?

Do you have a class method that calls a PHP native/built-in function like file_get_contents, which you then test by having to create a dummy file for it to ingest? Well, say hello to Parrot. Now you can inject the built-in File functions, along with many others as a dependency which you can mock out during tests.

Installation

Example

Let's take a look at what used to happen:

Using the built in method.

Testing...

The problem with the above is, actual_file.txt needs to reside in your test folder, get shipped with your tests, have the correct permission etc... it's a hassle.

Now using Parrot.

Testing...

Now we just fake the file and it's contents, sweet!!!

Sugar

You may have noticed in the above example that the Parrot version of file_get_contents was simply getContents().

With all the Parrot'd wrappers around PHP's functions, we leave off the prefix. Who wants to repeat themselves?

The function name rules.

  1. If the original function name starts with a prefix like file_, f, curl_, imap_, mysql_ etc, you simply leave them off when using the equivalent class wrapper.

  2. If the original name has an underscore in it, replace it with camelCase. So for example file_get_contents becomes getContents and mysql_affected_rows becomes affectedRows.

  3. If the original name has a string of words, they are converted to camelCase too. For example imap_createmailbox becomes createMailbox.

  4. If the original function, following the rules above now starts with a number, replace then number with it's spelt equivalent. For example imap_8bit becomes eightBit.

Wrappers

The follow wrappers are currently available:

Name Prefixes removed
Curl curl_
File file, file_, f
Ftp ftp_
Gz gz
Image image
Imap imap_
MySql mysql_
PostgreSql pg_
Sqlite sqlite_
Glob glob (Simply becomes execute)

Missing something?

If there's a particular wrapper you're looking for and it isn't listed above, open a new issue, or simply extend Parrot following the rules in the existing wrappers and send a PR. Please check out CONTRIBUTING.md as well.


All versions of parrot with dependencies

PHP Build Version
Package Version
Requires php Version >=5.5.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 enzyme/parrot contains the following files

Loading the files please wait ....