PHPackages                             traewelling/hafas-client-php - 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. traewelling/hafas-client-php

Abandoned → [mrkriskrisu/hafas-client-php](/?search=mrkriskrisu%2Fhafas-client-php)ArchivedLibrary[API Development](/categories/api)

traewelling/hafas-client-php
============================

PHP library for HAFAS public transport APIs (currently only Deutsche Bahn).

v0.5(4y ago)1102[1 issues](https://github.com/MrKrisKrisu/hafas-client-php/issues)MITPHPPHP ^8.0

Since Jul 24Pushed 1y ago2 watchersCompare

[ Source](https://github.com/MrKrisKrisu/hafas-client-php)[ Packagist](https://packagist.org/packages/traewelling/hafas-client-php)[ RSS](/packages/traewelling-hafas-client-php/feed)WikiDiscussions main Synced 4w ago

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

Hafas Client for PHP
====================

[](#hafas-client-for-php)

[![PHPUnit](https://github.com/MrKrisKrisu/hafas-client-php/actions/workflows/phpunit.yml/badge.svg)](https://github.com/MrKrisKrisu/hafas-client-php/actions/workflows/phpunit.yml)[![Codacy Badge](https://camo.githubusercontent.com/13ec1c00e823f6fbcaf6e812e707116d31147dd0e485e1f9d412dc47e404bfb3/68747470733a2f2f6170702e636f646163792e636f6d2f70726f6a6563742f62616467652f47726164652f3538316566646239333065373438376439396564623663663436346261393664)](https://www.codacy.com/gh/MrKrisKrisu/hafas-client-php/dashboard?utm_source=github.com&utm_medium=referral&utm_content=MrKrisKrisu/hafas-client-php&utm_campaign=Badge_Grade)[![Gitmoji](https://camo.githubusercontent.com/c93f2672fae073162950404b6f9d6e92615f1701010e6fb43a871bde024db7ea/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6769746d6f6a692d2532302546302539462539382539432532302546302539462539382538442d4646444436372e737667)](https://gitmoji.dev)[![License](https://camo.githubusercontent.com/3834fb435b77ee7c2f0bc316fbb3cbb989e61477a9d9c216d8f4ad4495e8d973/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f4d724b7269734b726973752f68616661732d636c69656e742d706870)](https://camo.githubusercontent.com/3834fb435b77ee7c2f0bc316fbb3cbb989e61477a9d9c216d8f4ad4495e8d973/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f4d724b7269734b726973752f68616661732d636c69656e742d706870)

Installation\*\*
----------------

[](#installation)

```
composer require mrkriskrisu/hafas-client-php
```

> ⚠️ This library is just being developed and structured. With each version the structure will change. So use this library with care and specify an exact version in your composer.json (don't use **^**0.x!) until it reaches version 1.

Features
--------

[](#features)

- Fetch [next departures](https://github.com/MrKrisKrisu/hafas-client-php/blob/main/examples/FetchDepartures.php) of a station
- Fetch [next arrivals](https://github.com/MrKrisKrisu/hafas-client-php/blob/main/examples/FetchArrivals.php) of a station
- Fetch [locations](https://github.com/MrKrisKrisu/hafas-client-php/blob/main/examples/FetchLocation.php)
- Fetch [journeys](https://github.com/MrKrisKrisu/hafas-client-php/blob/main/examples/FetchJourney.php)
- Fetch [nearby stops](https://github.com/MrKrisKrisu/hafas-client-php/blob/main/examples/FetchNearby.php)

Related
-------

[](#related)

- [`hafas-client`](https://github.com/public-transport/hafas-client) – JavaScript client for HAFAS public transport APIs.
- [`db-hafas`](https://github.com/public-transport/db-hafas) – JavaScript client for the Deutsche Bahn HAFAS API.

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance18

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity50

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

Recently: every ~57 days

Total

6

Last Release

1520d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/ac58b3aec3dadbf487c45d852e5df107a3d350812f47dc7e658f8abefd68c4a1?d=identicon)[HerrLevin\_](/maintainers/HerrLevin_)

![](https://www.gravatar.com/avatar/40904a796d8c180ff3dfc614592912fd8cc066d1d9fb1369b8989aad10158cca?d=identicon)[traewelling](/maintainers/traewelling)

![](https://www.gravatar.com/avatar/743b006b0da12b0b2f6dbd7db63d8eaa43c7c0921163aee7dc5487822f461c4d?d=identicon)[MrKrisKrisu](/maintainers/MrKrisKrisu)

---

Top Contributors

[![MrKrisKrisu](https://avatars.githubusercontent.com/u/4103693?v=4)](https://github.com/MrKrisKrisu "MrKrisKrisu (35 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/traewelling-hafas-client-php/health.svg)

```
[![Health](https://phpackages.com/badges/traewelling-hafas-client-php/health.svg)](https://phpackages.com/packages/traewelling-hafas-client-php)
```

###  Alternatives

[statamic/cms

The Statamic CMS Core Package

4.8k3.2M718](/packages/statamic-cms)[ashallendesign/laravel-exchange-rates

A wrapper package for interacting with the exchangeratesapi.io API.

485677.8k](/packages/ashallendesign-laravel-exchange-rates)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3731.2M42](/packages/tencentcloud-tencentcloud-sdk-php)[vluzrmos/slack-api

Wrapper for Slack.com WEB API.

102589.1k3](/packages/vluzrmos-slack-api)[smodav/mpesa

M-Pesa API implementation

16363.7k1](/packages/smodav-mpesa)[codebar-ag/laravel-docuware

DocuWare integration with Laravel

1221.1k](/packages/codebar-ag-laravel-docuware)

PHPackages © 2026

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