PHPackages                             michal-kocarek/teamcity-messages - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. michal-kocarek/teamcity-messages

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

michal-kocarek/teamcity-messages
================================

Write TeamCity service messages from PHP.

1.2.1(10y ago)216.2k1MITPHPPHP &gt;=5.4

Since Mar 17Pushed 10y agoCompare

[ Source](https://github.com/michal-kocarek/teamcity-messages)[ Packagist](https://packagist.org/packages/michal-kocarek/teamcity-messages)[ RSS](/packages/michal-kocarek-teamcity-messages/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (4)Dependencies (2)Versions (5)Used By (0)

TeamCity Messages
=================

[](#teamcity-messages)

This PHP library simplifies formatting and writing TeamCity service messages.

[![Build Status](https://camo.githubusercontent.com/32e8d6e3347a0b78a3385a83826d4fef4f472842c7d40fa1fdee2cb6b6e00987/68747470733a2f2f7472617669732d63692e6f72672f6d696368616c2d6b6f636172656b2f7465616d636974792d6d657373616765732e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/michal-kocarek/teamcity-messages)[![Coverage Status](https://camo.githubusercontent.com/e0e3b9143f00b2c4bc44b4ccb3f1e62ab04db9f0cb8557adedc2c97f9b785a20/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f6d696368616c2d6b6f636172656b2f7465616d636974792d6d657373616765732f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/github/michal-kocarek/teamcity-messages?branch=master)

Installation
------------

[](#installation)

To add TeamcityMessages as a local, per-project dependency to your project, simply add a dependency on `michal-kocarek/teamcity-messages` to your project's `composer.json` file. Here is a minimal example of a `composer.json` file that just defines a dependency on TeamcityMessages:

```
{
    "require": {
        "michal-kocarek/teamcity-messages": "^1.2"
    }
}

```

Usage
-----

[](#usage)

Here's the basic example. MessageLogger instance dumps everything through the writer.

StdOutWriter echoes output directly to script standard output. (You may use CallbackWriter to pass messages to arbitrary callback.)

Code like this:

```
use MichalKocarek\TeamcityMessages\MessageLogger;
use MichalKocarek\TeamcityMessages\Writers\StdoutWriter;

$logger = new MessageLogger(new StdoutWriter());

$logger->progressMessage('Reticulating splines...');

$logger->block('Counting llamas...', null, function(MessageLogger $logger) {
    $logger->logWarning('Too many llamas!');
    $logger->publishArtifacts('logs/llamas-count.csv');
});
```

produces following output:

```
##teamcity[progressMessage timestamp='2016-03-16T23:29:37.120555+0000' message='Reticulating splines...']
##teamcity[blockOpened timestamp='2016-03-16T23:29:37.134303+0000' name='Counting llamas...']
##teamcity[message timestamp='2016-03-16T23:29:37.134535+0000' text='Too many llamas!' status='WARNING']
##teamcity[publishArtifacts timestamp='2016-03-16T23:29:37.134635+0000' path='logs/llamas-count.csv']
##teamcity[blockClosed timestamp='2016-03-16T23:29:37.134993+0000' name='Counting llamas...']

```

See MessageLogger public methods for more info about the usage and link below for detailed message specification.

Links
-----

[](#links)

- [Build Script Interaction with TeamCity](https://confluence.jetbrains.com/display/TCD9/Build+Script+Interaction+with+TeamCity)

Authors
-------

[](#authors)

Michal Kočárek  -

License
-------

[](#license)

This library is licensed under the MIT License – see the [LICENSE](LICENSE.txt) file for details.

###  Health Score

32

—

LowBetter than 69% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity27

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity61

Established project with proven stability

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

Total

4

Last Release

3720d ago

PHP version history (3 changes)1.0.0PHP &gt;=5.6

1.1.0PHP &gt;=5.5

1.2.0PHP &gt;=5.4

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/762095?v=4)[Michal Kočárek](/maintainers/michal-kocarek)[@michal-kocarek](https://github.com/michal-kocarek)

---

Tags

teamcity

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/michal-kocarek-teamcity-messages/health.svg)

```
[![Health](https://phpackages.com/badges/michal-kocarek-teamcity-messages/health.svg)](https://phpackages.com/packages/michal-kocarek-teamcity-messages)
```

###  Alternatives

[atchondjo/geoip2country

A lightweight but powerful IP address lookup database solution to determine visitors country

344.7k](/packages/atchondjo-geoip2country)

PHPackages © 2026

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