muxx/redmine-api-client-php

PHP API client for Redmine

Installs: 3 215

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 2

Open Issues: 0

pkg:composer/muxx/redmine-api-client-php

v0.2.2 2025-09-08 15:00 UTC

This package is auto-updated.

Last update: 2025-10-08 15:06:25 UTC


README

PHP API client for Redmine.

Installation

Be sure to provide implementations for psr/http-client-implementation and psr/http-factory-implementation. For example:

composer require nyholm/psr7 guzzlehttp/guzzle

Use composer to install the library:

composer require muxx/redmine-api-client-php

Symfony

Enable PSR-18 in HttpClient

services:
    Redmine\ApiClient:
        arguments:
            $url: 'https://redmine.somehost.com'
            $apiKey: 'some-api-key'

Usage

require 'vendor/autoload.php';

$c = new Redmine\ApiClient(
    new HttpClient(),
    new Psr17Factory(),
    new Psr17Factory(),
    'https://redmine.somehost.com',
    'some-api-key'
);

$response = $c->requestGet('projects/some-project/memberships');

foreach ($response['memberships'] as $membership) {
    if (isset($membership['user']['name'])) {
        echo sprintf("User: %s\n", $membership['user']['name']);
    }
    if (isset($membership['group']['name'])) {
        echo sprintf("Group: %s\n", $membership['group']['name']);
    }
}