Download the PHP package simonsimcity/couchbase-bundle without Composer

On this page you can find all versions of the php package simonsimcity/couchbase-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 couchbase-bundle

CouchbaseBundle

This bundle creates a Symfony2 integration for Couchbase. It currently adds commands to make it easier to automate import and export of design documents, stored in Couchbase and adds all Couchbase actions to the timeline in the Symfony2 profiler.

This bundle requires a specific version of the php-couchbase extension:

PECL version CouchbaseBundle version
2.2.x 2.3.x
2.1.0 2.2.0
2.0.7 <= 2.1.1

Installation

Require simonsimcity/couchbase-bundle into your composer.json file:

Register the bundle in your Kernel:

To configure the couchbase-cluster, you want to use in your application, please adjust the settings for the extension as needed. Here's a sample-configuration for two buckets (foo and bar) on a local cluster (the cluster available as a service called couchbase.cluster.main) by the service names couchbase.bucket.main_foo and couchbase.bucket.bar, where the second bucket is secured by the password 123:

Using commands

You should see a couple of new methods in your symfony console:

When importing documents from the filesystem to the database, it additionally checks if the folder, you defined, also contains a folder having the same name as your environment. If found, the documents in there are imported as well. If the name of the folder for design-documents contains the characters {connection}, they are replaced by the name of the selected couchbase-connection.

More to come ...

Setup

In order to use the command couchbase:import-docs, you first have to create a view called get_all_docs in a document called sf2_couchbase_bundle whose map-function looks just like this:

Example usage

app/console couchbase:export-ddoc foo

Will save all design-documents, found in the couchbase-definition foo, to the folder app/Resouces/foo/ in files having the file-extension .ddoc

app/console couchbase:import-ddoc -e test foo

Will import all files found in app/Resouces/foo/\*.ddoc and app/Resouces/foo/test/\*.ddoc. My recommendation is to create a file called sf2_couchbase_bundle.ddoc in the test folder so you'll always have that view available in your test environment.

app/console couchbase:export-docs foo data/

Will export all documents of your foo bucket to app/data/

app/console couchbase:import-docs foo data/

Will import all files, having the extension .json into your defined foo couchbase-bucket

Using the profiler for Couchbase

You can activate the stopwatch for every Couchbase-call by adding the following lines to your configuration:

My personal recommendation is to add these lines to your config_dev.yml file.


All versions of couchbase-bundle with dependencies

PHP Build Version
Package Version
Requires ext-couchbase Version ~2.2.0
symfony/framework-bundle Version ~2.6|~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 simonsimcity/couchbase-bundle contains the following files

Loading the files please wait ....