Download the PHP package decole/planka-php-sdk without Composer

On this page you can find all versions of the php package decole/planka-php-sdk. 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 planka-php-sdk

PHP PLANKA REST API SDK (v2.x)

An easy-to-use PHP SDK for accessing Planka's REST API.

⚠️ Version Notice & Compatibility:

  • Planka v1 Support: Support for Planka v1 is discontinued in the main branch. The SDK for Planka v1 is maintained as-is in the v1 branch (SDK v1.x).
  • Planka v2 Support: SDK 2.x is designed and optimized for Planka v2. Tested on Planka Community v2.2.1.
  • TOTP & OIDC / SSO Notice: Two-Factor Authentication (TOTP) and OpenID Connect (OIDC / SSO) features are implemented according to Planka v2 OpenAPI specification, but have not been fully verified in automated live integration test suites. If you encounter any bugs or unexpected behavior with TOTP or OIDC, please open an Issue on GitHub with a detailed description, error logs, and reproduction steps.

Installation

For Planka v2 (SDK v2.x — Recommended)

To install the SDK for Planka v2:

Or default (installs latest v2.x):


For Planka v1 (SDK v1.x — Legacy)

If your server runs Planka v1, install the 1.x version of the SDK from the legacy branch:


Authentication

SDK 2.x supports two authentication methods for Planka v2:

1. Username & Password (JWT)

2. User API Key (Planka v2)


Configuration & Architecture Differences (SDK v1.x vs v2.x)

Feature / Setting SDK v1.x (Legacy) SDK v2.x (Current)
Planka Version Support Planka v1.x Planka v2.x
Authentication Methods Username & Password (JWT) only JWT OR User API Key (apiKey parameter)
Config Instantiation new Config(user, password, baseUri, port) new Config(user, password, baseUri, port, apiKey, tokenStorage)
Mandatory Auth Call Always required $planka->authenticate() Required only for JWT. Skipped when using apiKey.
Transport Injection Standard Symfony HttpClient Supports custom TransportClientInterface or PSR-18/17 via PsrTransportClient for mocking/unit testing
Exception Handling Basic \Exception inheritance Unified PlankaSdkExceptionInterface for all SDK exceptions
API Endpoints & Features Standard boards/cards Adds Webhooks, Base Custom Fields, Notification Services, System Config, Card Duplication, etc.

Advanced Usage

1. Unified Exception Handling

All SDK exceptions implement Planka\Bridge\Exceptions\PlankaSdkExceptionInterface, allowing you to catch any SDK-related error with a single catch block:

2. Flexible Network Layer: Native Symfony HttpClient & PSR-18 / PSR-17 Transport

Planka SDK is transport-agnostic. It works out-of-the-box with Symfony HttpClient, but seamlessly integrates with any PSR-18 HTTP Client (such as Guzzle, Buzz, or PSR-18 adapters) via PsrTransportClient:

A. Custom Symfony HttpClient (Timeouts, Proxies, HTTP/2):

B. PSR-18 Client with Guzzle 7:

📖 Full Transport & Testing Guide: See docs/TRANSPORT_CLIENTS.md for Buzz, Nyholm, Symfony PSR-18 adapter, and PHPUnit unit testing mock examples.

3. Custom Token Storage

You can provide a custom implementation of TokenStorageInterface to persist JWT authentication tokens or API keys across HTTP requests or sessions:

4. Type-Safe Partial Updates (Patch Input DTOs)

For partial entity updates via patching(), you can use strongly-typed Input DTOs (BoardPatchInput, CardPatchInput, ProjectPatchInput) or associative arrays:

5. Type-Safe Creation Inputs & Fluent Builder API (CardBuilder, BoardBuilder, ProjectBuilder)

When creating projects, boards, or cards, you can choose between 3 flexible options: simple positional arguments, strongly-typed Creation Input DTOs, or step-by-step Fluent Builders:

6. Transport Middleware Pipeline

You can inject custom HTTP transport middlewares into PlankaClient for logging (PSR-3 Monolog), retrying transient network errors, or collecting request metrics:

7. Parsing Incoming Webhooks (WebhookParser)

You can parse incoming HTTP Webhook JSON payloads received from the Planka server into typed DTOs using WebhookParser:

8. Raw Response Diagnostics ($_rawResponse)

Every DTO in the SDK includes a public $_rawResponse property. This diagnostic property holds the complete, unparsed associative array received from the Planka API response. It is useful for debugging, logging, or verifying whether all API response fields are properly hydrated into DTO properties:


Controllers & Features

All Planka API endpoints are accessible via explicit getter methods on PlankaClient:


Documentation & Examples

💡 Comprehensive Examples: A complete end-to-end integration script demonstrating usage of all SDK controllers and API endpoints is available in tests/index.php.

You can also run integration tests against your Planka instance:


Testing & Quality

Unit Tests (Isolated, Mock-based)

Unit tests run locally without needing a connection to a live Planka server. They verify DTO hydration, controller behaviors, and API payload compilation using real JSON response fixtures recorded from Planka v2.

Integration Tests (Live Server Verification)

Integration tests perform real-world SDK verification against a live Planka v2 instance. To verify SDK health on your own Planka server, you can use two complementary testing methods:

  1. PHPUnit Integration Test Suite (composer test-integration): Runs tests/Integration/PlankaIntegrationTest.php, performing a safe end-to-end lifecycle test (creating, updating, inspecting, and deleting projects, boards, columns, cards, task lists, labels, attachments, custom fields, webhooks, and notification services) with strict safety tracking guards.

  2. Standalone Test Script (php tests/index.php): Runs tests/index.php, a standalone CLI script that executes end-to-end operations and dumps formatted DTO structures and _rawResponse payloads directly to the terminal for debugging.

Setup:

  1. Copy the example configuration file:

  2. Edit tests/config.php to specify your Planka server URI, port, login, and password:

  3. Run the integration test suite:

Code Quality & Static Analysis

Run all quality checks (CS Fixer dry-run, Psalm static analysis, and Unit tests):

Or individual checks:


Acknowledgements & Community Contributions

This SDK v2 release incorporates valuable improvements, endpoint refinements, and architectural ideas inspired by the community fork steglasaurous/planka-php-sdk (such as TOTP 2FA flow structures, OpenAPI /api/config alignment, and extended user profile properties).


Contributing & Support

Contributions are very welcome! Whether you are fixing a bug, adding a new Planka v2 feature, or improving documentation:

  1. Fork & Clone: Fork the repository on GitHub and clone it locally.
  2. Create a Branch: git checkout -b feature/my-feature or fix/bug-fix.
  3. Make Changes & Test: Ensure all quality checks pass before pushing:
    • composer test (Runs PHPUnit Unit tests)
    • ./vendor/bin/psalm --no-cache (Runs Psalm static analysis)
    • composer fix-cs (Formats code style)
  4. Submit a Pull Request: Push your branch and open a PR against master.

For more details, see CONTRIBUTING.md.

Support & License


All versions of planka-php-sdk with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
symfony/http-client Version ^6.4|^7.0
symfony/mime Version ^6.4|^7.0
fp4php/functional Version ^6.0
psr/http-client Version ^1.0
psr/http-factory Version ^1.0
psr/log Version ^1.1|^2.0|^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 decole/planka-php-sdk contains the following files

Loading the files please wait ...