PHPackages                             ecohmrc/mtd - 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. ecohmrc/mtd

ActiveLibrary

ecohmrc/mtd
===========

1.2.1(5y ago)7881[2 PRs](https://github.com/ecoofficekbo/hmrcmtd/pulls)PHP

Since Sep 14Pushed 3y ago2 watchersCompare

[ Source](https://github.com/ecoofficekbo/hmrcmtd)[ Packagist](https://packagist.org/packages/ecohmrc/mtd)[ RSS](/packages/ecohmrc-mtd/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependencies (3)Versions (13)Used By (0)

HmrcMtd
=======

[](#hmrcmtd)

PHP component for accessing the new HMRC MTD API. Focused initially on VAT which is currently in beta, but will be mandatory to use from April 2019 for businesses over the VAT threshold

Running The Tests
-----------------

[](#running-the-tests)

Copy the `.env.example` file into `.env` and paste your `CLIENT_ID`, `CLIENT_SECRET` AND `SERVER_TOKEN` as provided by HMRC

To begin, first ensure you have created a test user:

```
$vat = new HmrcVat();
$vat->createTestUser();

```

Enter the returned vrn value into the `VAT_REGISTRATION_NUMBER` in the .env file. Save the userId and password for the next steps

```
VAT_REGISTRATION_NUMBER="paste-vrn-here"

```

Execute tests/AuthTestCase.php

```
vendor\bin\phpunit tests/AuthTestCase.php

```

The output will give you a URI to copy and paste into your browser. Then you will need to log into the HMRC test platform with the userId and password from the previous step. At the end of the process, it will give you an authorisation code to copy and paste into your .env file

```
AUTHORISATION_CODE="paste-authorisation-code-here"

```

Finally you can run all the tests. This process will create a file called tests/auth to save the `access_token` and `refresh_token` for future use

```
vendor\bin\phpunit

```

License
-------

[](#license)

This project is licensed under the GNU GPLv3 License - see the [License](License) file for more details

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity69

Established project with proven stability

 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 ~97 days

Recently: every ~177 days

Total

10

Last Release

1926d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/42953791?v=4)[EcoJames](/maintainers/EcoJames)[@EcoJames](https://github.com/EcoJames)

---

Top Contributors

[![EcoJames](https://avatars.githubusercontent.com/u/42953791?v=4)](https://github.com/EcoJames "EcoJames (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[neuron-core/neuron-ai

The PHP Agentic Framework.

1.8k245.3k21](/packages/neuron-core-neuron-ai)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3731.2M42](/packages/tencentcloud-tencentcloud-sdk-php)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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