Download the PHP package cloudfoundry-community/php-cf-service-broker without Composer

On this page you can find all versions of the php package cloudfoundry-community/php-cf-service-broker. 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-cf-service-broker

Cloud Foundry PHP Service Broker

Php project for creating service brokers compatible with Open Service Broker API.

This project for example can be used to quickly implement new service brokers for Kubernetes or Cloud Foundry.

Compatibility

Quick start

  1. Clone this repo or use composer create-project cloudfoundry-community/php-cf-service-broker
  2. Add your service inside /config/services.json (remove example first)
  3. Create a user by doing this in command line: php bin/addUser.php [user_name] [password]
  4. (optional) Change configuration inside /config/config.yml
  5. Create the logic inside /src/Sphring/MicroWebFramework/ServiceBroker/DefaultServiceBroker.php (I suggest to see the doc, no need to follow rest url project handle it)
  6. Register your new service broker

  7. Service broker is ready and follow rest url given by the doc

Configuration

Common

See /config/config.yml.

Database

By default this project use an sqlite database, change to another database by modifying this file: /config/doctrine-driver.yml

Adjust logging

See app/app.php.

By default this application logs only warnings to stdout.

To enable logging to file you can uncomment $logger->pushHandler line.

To adjust log level you can change \Monolog\Logger::* value. For example, to set logging level to debug you can set the value to \Monolog\Logger::DEBUG. See Monolog logger source code for details.

Add more service broker

You can add an infinity of service broker to do this follow these steps:

Run as a Cloud Foundry app

  1. Create a database service which his name follow this regex: /.*(postgres|pgsql|db|database|my|maria|oracle|oci).*/i (note: add in composer.json other pdo driver than pdo_mysql)
  2. Push the app (run cf push)
  3. Bind your database service on your app
  4. Restage your app
  5. Service broker app is ready try go to http://your_url/v2/catalog you should see your catalog

Development environment

Router for PHP embedded web server

Tests

Tests use PHPUnit. Run with your command line: vendor/bin/phpunit --bootstrap tests\bootstrap.php --no-configuration tests

Add a service to test

  1. Update services.json inside tests configuration directory.
  2. Update service-broker.yml inside tests configuration directory.
  3. Run vendor/bin/phpunit --bootstrap tests\bootstrap.php --no-configuration tests

See also

Open Service Broker API:

K8s Service Catalog:


All versions of php-cf-service-broker with dependencies

PHP Build Version
Package Version
Requires php Version >=5.5
ext-pdo Version *
ext-pdo_mysql Version *
ext-pdo_sqlite Version *
sphring/sphring Version 0.12.*
league/route Version ~1.1
league/plates Version ~3.1
monolog/monolog Version ~1.13
filp/whoops Version ~1.1
doctrine/orm Version 2.4.*
jms/serializer Version 0.16.0
sphring/sphring-cache Version dev-master
cloudfoundry-community/cf-helper-php Version 1.5.*
ramsey/uuid Version ^2.8
vierbergenlars/php-semver Version ^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 cloudfoundry-community/php-cf-service-broker contains the following files

Loading the files please wait ....