PHPackages                             netvlies/basecamp-bundle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. netvlies/basecamp-bundle

ActiveSymfony-bundle

netvlies/basecamp-bundle
========================

Bundle around the Basecamp API client

141PHP

Since Jun 14Pushed 12y ago13 watchersCompare

[ Source](https://github.com/netvlies/NetvliesBasecampBundle)[ Packagist](https://packagist.org/packages/netvlies/basecamp-bundle)[ RSS](/packages/netvlies-basecamp-bundle/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

NetvliesBasecampBundle
----------------------

[](#netvliesbasecampbundle)

[![knpbundles.com](https://camo.githubusercontent.com/ba0a2f9f125bddc7f5298a4393d0a2b5dde23a66e1064a6629b420b1a94aca93/687474703a2f2f6b6e7062756e646c65732e636f6d2f6e6574766c6965732f4e6574766c6965734261736563616d7042756e646c652f62616467652d73686f7274)](http://knpbundles.com/netvlies/NetvliesBasecampBundle)

Symfony2 bundle around the basecamp-php client. It provides an easy way to integrate the new Basecamp API in your project.

Installation
------------

[](#installation)

Use Composer to install the bundle:

```
$ composer.phar require netvlies/basecamp-bundle

```

Enable the bunble in your kernel:

```
// app/AppKernel.php
public function registerBundles()
{
    $bundles = array(
        // ...
        new Netvlies\Bundle\BasecampBundle\NetvliesBasecampBundle(),
    );
}
```

Configuration
-------------

[](#configuration)

This bundle supports authentication via HTTP authentication (easy and quick) or OAuth (a little bit more difficult).

#### HTTP authentication

[](#http-authentication)

Below is an example of the minimal configuration using HTTP authentication. Only thing you need to do is supply your own credentials.

```
# app/config/config.yml
netvlies_basecamp:
    authentication: http
    app_name: My Funky Application
    app_contact: http://www.myfunkyapplication.com
    identification:
        user_id: 1234
        username: your@username.com
        password: secret
```

### OAuth authentication

[](#oauth-authentication)

If you have a more advanced use case you probably want to use OAuth. To implement OAuth in your Symfony2 project we recommend the [HWIOAuthBundle](https://github.com/hwi/HWIOAuthBundle).

#### Create an OAuth credentials provider

[](#create-an-oauth-credentials-provider)

First start by implementing the `Netvlies\Bundle\BasecampBundle\OAuth\CredentialsProviderInterface`. Below is an simple example assuming you store the OAuth data in your `User` entity:

```
namespace Acme\Bundle\MainBundle\OAuth;

use Netvlies\Bundle\BasecampBundle\OAuth\CredentialsProviderInterface;
use Symfony\Component\Security\Core\SecurityContext;

class BasecampCredentialsProvider implements CredentialsProviderInterface
{
    protected $context;

    public function __construct(SecurityContext $context)
    {
        $this->context = $context;
    }

    public function getBasecampId()
    {
        if (! $this->context->isGranted('IS_AUTHENTICATED_FULLY')) {
            throw new \RuntimeException('Please login before using Basecamp');
        }

        return $this->context->getToken()->getUser()->getBasecampId();
    }

    public function getToken()
    {
        if (! $this->context->isGranted('IS_AUTHENTICATED_FULLY')) {
            throw new \RuntimeException('Please login before using Basecamp');
        }

        return $this->context->getToken()->getUser()->getToken();
    }
}
```

Now register this as a service:

```
services:
    acme.basecamp.oauth_credentials_provider:
        class: Acme\Bundle\MainBundle\OAuth\BasecampCredentialsProvider
        arguments: ["@security.context"]
```

#### Configure the bundle to use your provider

[](#configure-the-bundle-to-use-your-provider)

Finally supply the service id into the bundle configuration like this:

```
netvlies_basecamp:
    authentication: oauth
    app_name: My Funky Application
    app_contact: http://www.myfunkyapplication.com
    oauth:
        credentials_provider: acme.basecamp.oauth_credentials_provider
```

### Usage

[](#usage)

You can now get the client from the container and use it:

```
$client = $this->get('basecamp');
$project = $client->getProject(array(
    'projectId' => 1
));
```

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community5

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

### Embed Badge

![Health badge](/badges/netvlies-basecamp-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/netvlies-basecamp-bundle/health.svg)](https://phpackages.com/packages/netvlies-basecamp-bundle)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
