Download the PHP package schmunk42/php-bcx-client without Composer
On this page you can find all versions of the php package schmunk42/php-bcx-client. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package php-bcx-client
Basecamp 2 (BCX) API Client for PHP
A modern, type-safe PHP 8.4 client for the Basecamp 2 API with OAuth 2.0 and HTTP Basic authentication support.
Features
- ✅ PHP 8.4+ with strict typing
- ✅ Multiple authentication methods (OAuth 2.0 & HTTP Basic)
- ✅ All 12 Basecamp 2 resources implemented
- ✅ 100% test coverage (119 tests, 371 assertions)
- ✅ Symfony HttpClient integration
- ✅ PSR-3 logging support
- ✅ PHPStan level 8 compliant
- ✅ PSR-12 code style
- ✅ Docker development environment
Installation
Quick Start
Option 1: HTTP Basic Authentication (Simplest)
Perfect for development, debugging, and personal scripts:
Option 2: OAuth 2.0 (Recommended for Production)
For applications with multiple users:
See docs/OAUTH.md for complete OAuth 2.0 setup guide.
Requirements
- PHP 8.4 or higher
- Symfony HttpClient 7.0+
Available Resources
All 12 Basecamp 2 resources are fully implemented:
| Resource | Description | Example |
|---|---|---|
| Projects | Manage projects | $client->projects()->all() |
| Todolists | Todo lists in projects | $client->todolists()->all($projectId) |
| Todos | Individual tasks | $client->todos()->complete($projectId, $todoId) |
| People | Users and access | $client->people()->me() |
| Messages | Message board posts | $client->messages()->create($projectId, $data) |
| Comments | Comments on resources | $client->comments()->create($projectId, 'Todo', $todoId, $data) |
| Documents | Project documents | $client->documents()->all($projectId) |
| Uploads | File attachments | $client->uploads()->create($fileContent, $mimeType) |
| Events | Activity feed | $client->events()->all() |
| Calendar Events | Scheduled events | $client->calendarEvents()->all() |
| Topics | Content navigation | $client->topics()->allInProject($projectId) |
| Groups | User groups/companies | $client->groups()->all() |
Usage Examples
Projects
Todos & Todolists
People & User Management
Messages & Comments
File Uploads
Authentication
Finding Your Account ID
With Basic Auth:
With OAuth 2.0:
The id field in the response is your Account ID.
OAuth 2.0 Setup
For production applications with multiple users, use OAuth 2.0:
- Register your app: https://launchpad.37signals.com/integrations
- Get access token: Follow the OAuth 2.0 flow
- Use with client: See docs/OAUTH.md for complete guide
Development
With Docker (Recommended)
Without Docker
Testing
Error Handling
Logging
Inject a PSR-3 logger for debugging:
Documentation
- OAuth 2.0 Setup: docs/OAUTH.md - Complete guide with examples
- Code Examples: examples/ - Working examples for all features
- API Reference: https://github.com/basecamp/bcx-api - Official Basecamp 2 API docs
Contributing
Contributions are welcome! Please ensure:
- PHPUnit tests pass (
make test) - PHPStan level 8 passes (
make phpstan) - Code follows PSR-12 (
make cs-fix) - 100% test coverage for new code
License
MIT License. See LICENSE file.
Support
- Issues: https://github.com/schmunk42/php-bcx-client/issues
- API Docs: https://github.com/basecamp/bcx-api
Credits
- Built with Symfony HttpClient
- Inspired by the legacy netvlies/basecamp-php client
All versions of php-bcx-client with dependencies
symfony/http-client Version ^7.0
symfony/http-client-contracts Version ^3.0
psr/http-client Version ^1.0
psr/log Version ^3.0