Skip to content

Commit c275806

Browse files
committed
Prepare v1.1.0 release
1 parent 46ee38c commit c275806

File tree

2 files changed

+38
-3
lines changed

2 files changed

+38
-3
lines changed

CHANGELOG.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,31 @@
11
# Changelog
22

3+
## 1.1.0 (2023-04-11)
4+
5+
* Feature: Public `MessageEvent` constructor and refactor property assignments.
6+
(#36 and #41 by @clue)
7+
8+
This is mostly used internally to represent each incoming message event
9+
(see also `message` event). Likewise, you can also use this class in test
10+
cases to test how your application reacts to incoming messages.
11+
12+
```php
13+
$message = new Clue\React\EventSource\MessageEvent('hello', '42', 'message');
14+
15+
assert($message->data === 'hello');
16+
assert($message->lastEventId === '42');
17+
assert($message->type === 'message');
18+
```
19+
20+
* Feature / Fix: Use replacement character for invalid UTF-8, handle null bytes and ignore empty `event` type as per EventSource specs.
21+
(#33 and #40 by @clue)
22+
23+
* Feature: Full support for PHP 8.2 and update test environment.
24+
(#38 by @clue)
25+
26+
* Improve test suite, ensure 100% code coverage and report failed assertions.
27+
(#35 by @clue and #39 by @clue)
28+
329
## 1.0.0 (2022-04-11)
430

531
* First stable release, now following SemVer! 🎉

README.md

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# clue/reactphp-eventsource
22

33
[![CI status](https://github.com/clue/reactphp-eventsource/actions/workflows/ci.yml/badge.svg)](https://github.com/clue/reactphp-eventsource/actions)
4+
[![code coverage](https://img.shields.io/badge/code%20coverage-100%25-success)](#tests)
45
[![installs on Packagist](https://img.shields.io/packagist/dt/clue/reactphp-eventsource?color=blue&label=installs%20on%20Packagist)](https://packagist.org/packages/clue/reactphp-eventsource)
56

67
Instant real-time updates. Lightweight EventSource client receiving live
@@ -332,7 +333,7 @@ This project follows [SemVer](https://semver.org/).
332333
This will install the latest supported version:
333334

334335
```bash
335-
$ composer require clue/reactphp-eventsource:^1
336+
composer require clue/reactphp-eventsource:^1.1
336337
```
337338

338339
See also the [CHANGELOG](CHANGELOG.md) for details about version upgrades.
@@ -347,13 +348,21 @@ To run the test suite, you first need to clone this repo and then install all
347348
dependencies [through Composer](https://getcomposer.org/):
348349

349350
```bash
350-
$ composer install
351+
composer install
351352
```
352353

353354
To run the test suite, go to the project root and run:
354355

355356
```bash
356-
$ vendor/bin/phpunit
357+
vendor/bin/phpunit
358+
```
359+
360+
The test suite is set up to always ensure 100% code coverage across all
361+
supported environments. If you have the Xdebug extension installed, you can also
362+
generate a code coverage report locally like this:
363+
364+
```bash
365+
XDEBUG_MODE=coverage vendor/bin/phpunit --coverage-text
357366
```
358367

359368
## License

0 commit comments

Comments
 (0)