PHPackages                             blackmine/blackmine - 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. [API Development](/categories/api)
4. /
5. blackmine/blackmine

ActiveLibrary[API Development](/categories/api)

blackmine/blackmine
===================

Redmine API Client with a lot of magic in its code

v1.0.2-beta(4y ago)032MITPHPPHP ^8.0

Since Nov 10Pushed 2y ago2 watchersCompare

[ Source](https://github.com/diego-ninja/blackmine)[ Packagist](https://packagist.org/packages/blackmine/blackmine)[ RSS](/packages/blackmine-blackmine/feed)WikiDiscussions main Synced 6d ago

READMEChangelog (3)Dependencies (12)Versions (5)Used By (0)

[![Blackmine Logo](docs/assets/blackmine-logo-0001.png)](docs/assets/blackmine-logo-0001.png)

[![Latest Version on Packagist](https://camo.githubusercontent.com/8ea9055a2d0586d71b88a5ecb71fd567d673458438dedf9ff65482ddd5e9aecd/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f626c61636b6d696e652f626c61636b6d696e652e7376673f7374796c653d666c6174)](https://packagist.org/packages/diego-ninja/docker)[![Total Downloads](https://camo.githubusercontent.com/dd7f42966b0a864d4a256ab4d7286a89e1bde69f789135b76e5795261489cbd8/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f626c61636b6d696e652f626c61636b6d696e652e7376673f7374796c653d666c6174)](https://packagist.org/packages/diego-ninja/docker)[![Packagist PHP Version Support](https://camo.githubusercontent.com/077275423cc0b3064f2987966d4785b7d94fb0d614d0dee136d0ffbf2dd3f229/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f626c61636b6d696e652f626c61636b6d696e65)](https://camo.githubusercontent.com/077275423cc0b3064f2987966d4785b7d94fb0d614d0dee136d0ffbf2dd3f229/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f626c61636b6d696e652f626c61636b6d696e65)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/53f2918ad28547a483ba23ff007bad8024e00505819c4a0f051dee80db2fb179/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f646965676f2d6e696e6a612f626c61636b6d696e652f6261646765732f7175616c6974792d73636f72652e706e673f623d6d61696e)](https://scrutinizer-ci.com/g/diego-ninja/blackmine/?branch=main)[![Scrutinizer build (GitHub/Bitbucket)](https://camo.githubusercontent.com/a7d5629e32da46644c3a656a5d572892a1ac1797104d23c5952ea099dec9e4f6/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f6275696c642f672f646965676f2d6e696e6a612f626c61636b6d696e652f6d61696e)](https://camo.githubusercontent.com/a7d5629e32da46644c3a656a5d572892a1ac1797104d23c5952ea099dec9e4f6/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f6275696c642f672f646965676f2d6e696e6a612f626c61636b6d696e652f6d61696e)[![GitHub](https://camo.githubusercontent.com/b2a3a2dce5888f6e786455614680c8a48d52fb46e406f3633628c422e4d3a072/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f646965676f2d6e696e6a612f626c61636b6d696e65)](https://camo.githubusercontent.com/b2a3a2dce5888f6e786455614680c8a48d52fb46e406f3633628c422e4d3a072/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f646965676f2d6e696e6a612f626c61636b6d696e65)[![GitHub release (latest by date including pre-releases)](https://camo.githubusercontent.com/43abaed0e3555a5d990f8d55afce596afb03b918b11f626963047fcea018aa0c/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f72656c656173652f646965676f2d6e696e6a612f626c61636b6d696e653f696e636c7564655f70726572656c6561736573)](https://camo.githubusercontent.com/43abaed0e3555a5d990f8d55afce596afb03b918b11f626963047fcea018aa0c/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f72656c656173652f646965676f2d6e696e6a612f626c61636b6d696e653f696e636c7564655f70726572656c6561736573)

Blackmine
=========

[](#blackmine)

Blackmine is a full-featured Redmine API client written in [PHP8](https://www.php.net/releases/8.0/en.php). It implements a simple interface and converts responses into models and collections.

Installation
============

[](#installation)

```
composer require blackmine/blackmine
```

Quick example
=============

[](#quick-example)

```
$options = new \Blackmine\Client\ClientOptions([
    ClientOptions::CLIENT_OPTION_BASE_URL => "https://your.redmine.url",
    ClientOptions::CLIENT_OPTION_API_KEY => "your.api.key"
]);

$client = new \Blackmine\Client\Client($options);
$issues = $client->getRepository("issues");

$data = $issues
    ->addFilter(Issues::ISSUE_FILTER_ISSUE_ID, [41432, 41436])
    ->with([Issues::ISSUE_RELATION_WATCHERS])
    ->search();

$issue = new \Blackmine\Model\Issue\Issue();
$issue->setSubject("Test Issue");
$issue->setDescription("An issue description, yeah, a real one...");
$issue->setStartDate(\Carbon\CarbonImmutable::create(2021, 10, 31));
$issue->setDueDate(\Carbon\CarbonImmutable::create(2022, 10, 31));
$issues->create($issue);
```

Status
------

[](#status)

Actually only JSON format is supported, yeah, JSON is cool and XML isn't. If you think XML is cool enough you can fork the project, start the feature/xml\_is\_cool branch and pull request your coolness.

Almost all exposed Redmine APIs are supported by Blackmine. There a few bugs that we are trying to fis as soon as possible.

Blackmine uses [Requests](https://requests.ryanmccue.info/) as transport layer, in a near or not so near future, I will try to pivot to a [PSR18](https://www.php-fig.org/psr/psr-18/) implementation. If you can't wait, you can fork the project, start the feature/psr18\_or\_death and pull request your hurry ups.

Blackmine uses [Carbon](https://carbon.nesbot.com/) to manage dates.

Things that are almost complete:
--------------------------------

[](#things-that-are-almost-complete)

- [Issues API](https://www.redmine.org/projects/redmine/wiki/Rest_Issues)
- [Projects API](https://www.redmine.org/projects/redmine/wiki/Rest_Projects)
- [Users API](https://www.redmine.org/projects/redmine/wiki/Rest_Users)
- [Time Entries API](https://www.redmine.org/projects/redmine/wiki/Rest_TimeEntries)
- [Issue Categories API](https://www.redmine.org/projects/redmine/wiki/Rest_IssueCategories)
- [Issue Statuses API](https://www.redmine.org/projects/redmine/wiki/Rest_IssueStatuses)
- [Issue Relations API](https://www.redmine.org/projects/redmine/wiki/Rest_IssueRelations)
- [Trackers API](https://www.redmine.org/projects/redmine/wiki/Rest_Trackers)
- [Groups API](https://www.redmine.org/projects/redmine/wiki/Rest_Groups)
- [Versions API](https://www.redmine.org/projects/redmine/wiki/Rest_Versions)
- [Roles API](https://www.redmine.org/projects/redmine/wiki/Rest_Roles)
- [Custom Fields API](https://www.redmine.org/projects/redmine/wiki/Rest_CustomFields)
- [Memberships API](https://www.redmine.org/projects/redmine/wiki/Rest_Memberships)
- [Files API](https://www.redmine.org/projects/redmine/wiki/Rest_Files)
- [Enumerations API](https://www.redmine.org/projects/redmine/wiki/Rest_Enumerations)
- [Attachments API](https://www.redmine.org/projects/redmine/wiki/Rest_Attachments)
- [Wiki Pages API](https://www.redmine.org/projects/redmine/wiki/Rest_WikiPages) (bugged)
- [News API](https://www.redmine.org/projects/redmine/wiki/Rest_News)
- Caching responses (with Tag/TTL invalidation mechanism)
- Impersonating users (for admin users)

Things that are incomplete:
---------------------------

[](#things-that-are-incomplete)

- Documentation
- Search fluent API (80%)
- Error handling and exceptions (0%)
- Model functionality (50%)
- Unit tests (0%)
- Magic methods signatures on models and repositories (50%)
- Date conversion from and to CarbonImmutable objects

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity44

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

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.

###  Release Activity

Cadence

Every ~6 days

Total

3

Last Release

1636d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/dff5b0a76de3d555cb236c400384058ba23982bce2e859cc1b2f0c1f0161a3e6?d=identicon)[diego.ninja](/maintainers/diego.ninja)

---

Top Contributors

[![diego-ninja](https://avatars.githubusercontent.com/u/78662279?v=4)](https://github.com/diego-ninja "diego-ninja (6 commits)")

---

Tags

apiblackminephpredminerest-apisatis-enabledapiclientredmine

###  Code Quality

TestsPHPUnit

Static AnalysisPsalm

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/blackmine-blackmine/health.svg)

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

###  Alternatives

[razorpay/razorpay

Razorpay PHP Client Library

2024.8M44](/packages/razorpay-razorpay)[culqi/culqi-php

Cliente Culqi API para PHP

41356.8k1](/packages/culqi-culqi-php)[optiosteam/payconiq-client-php

Payconiq API client library for PHP developed by Optios.

1273.4k](/packages/optiosteam-payconiq-client-php)

PHPackages © 2026

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