Download the PHP package chaplean/rest-client-bundle without Composer

On this page you can find all versions of the php package chaplean/rest-client-bundle. 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 rest-client-bundle

Chaplean Rest-Client-Bundle

Codeship Status for chaplean/rest-client-bundle Coverage Status

Prerequisites

This version of the bundle requires Symfony 2.8+.

Installation

1. Composer

2. AppKernel.php

Add

3. config.yml and parameters.yml

First you will need to configure guzzlehttp that we use under the hood to perform the actual http requests. See the bundle documentation or the library documentation for full range of options. Example:

config.yml

You will probably also want to create some custom parameters.

parameters.yml

As you inject guzzle in your Api class you can have different configuration per Api. See next section.

Next this bunde expose some configuration if you want to enable extra features. You can enable database and / or email logging of requests. To use the database or email loggers you will have to setup respectively doctrine or swiftmailer in your project. The default configuraton is:

config.yml

You can override the default email content by overriding the translation keys or even the email body twig template. The translation keys are under chaplean_rest_client.email.request_executed_notification and the template is Resources/views/Email/request_executed_notification.txt.twig.

Usage

Creating Api class

To use rest-client-bundle you have to create a class extending AbstractApi. You can create any number of classes extending AbstractApi and have all of them using different configurations via dependency injection.

And we're done! We could repeat this process to create another Api with completely different configurations.

Defining Api

Let's focus on the function you have to fill in and what we can do in it. The role of this function is to define your Api using rest-client-bundle api:


All versions of rest-client-bundle with dependencies

PHP Build Version
Package Version
Requires php Version >=7.0.8
eightpoints/guzzle-bundle Version ^5.3 || ^6.0 || ^7.0
symfony/config Version ^3.0 || ^4.0
symfony/console Version ^3.0 || ^4.0
symfony/dependency-injection Version ^3.0 || ^4.0
symfony/yaml Version ^3.0 || ^4.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 chaplean/rest-client-bundle contains the following files

Loading the files please wait ....