Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
* develop:
  specify next release
  wait for the server to be ready
  allow to use innmind/operating-system 5 and innmind/async-http-server 3
  CS
  fix release date
  • Loading branch information
Baptouuuu committed Mar 10, 2024
2 parents 7405a65 + b96f062 commit cd84504
Show file tree
Hide file tree
Showing 8 changed files with 26 additions and 27 deletions.
9 changes: 8 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
# Changelog

## 2.0.0 - 2023-10-26
## 2.1.0 - 2024-03-10

### Added

- Support for `innmind/operating-system:~5.0`
- Support for `innmind/async-http-server:~3.0`

## 2.0.0 - 2023-11-26

### Added

Expand Down
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
},
"require": {
"php": "~8.2",
"innmind/operating-system": "~4.1",
"innmind/operating-system": "~4.1|~5.0",
"innmind/cli": "^3.1",
"innmind/immutable": "~5.2",
"innmind/di": "^2.0",
Expand All @@ -40,11 +40,11 @@
"vimeo/psalm": "~5.6",
"innmind/black-box": "~5.5",
"innmind/coding-standard": "~2.0",
"innmind/async-http-server": "~2.0"
"innmind/async-http-server": "~2.0|~3.0"
},
"conflict": {
"innmind/black-box": "<5.0|~6.0",
"innmind/async-http-server": "<2.0|~3.0"
"innmind/async-http-server": "<2.0|~4.0"
},
"suggest": {
"innmind/black-box": "For property based testing",
Expand Down
5 changes: 1 addition & 4 deletions src/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,7 @@
ServerRequest,
Response,
};
use Innmind\Router\{
Route,
Route\Variables,
};
use Innmind\Router\Route\Variables;

/**
* @template I of ServerRequest|CliEnv
Expand Down
6 changes: 1 addition & 5 deletions src/Application/Async/Http.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,7 @@
Environment as CliEnv,
Commands,
};
use Innmind\OperatingSystem\{
OperatingSystem,
OperatingSystem\Unix,
};
use Innmind\OperatingSystem\OperatingSystem;
use Innmind\Async\HttpServer\Command\Serve;
use Innmind\DI\{
Container,
Expand All @@ -29,7 +26,6 @@
};
use Innmind\Router\{
Route,
Route\Variables,
};
use Innmind\Immutable\{
Maybe,
Expand Down
5 changes: 1 addition & 4 deletions src/Application/Http.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,7 @@
ServerRequest,
Response,
};
use Innmind\Router\{
Route,
Route\Variables,
};
use Innmind\Router\Route;
use Innmind\Immutable\{
Maybe,
Sequence,
Expand Down
5 changes: 1 addition & 4 deletions src/Application/Implementation.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,7 @@
ServerRequest,
Response,
};
use Innmind\Router\{
Route,
Route\Variables,
};
use Innmind\Router\Route\Variables;

/**
* @internal
Expand Down
5 changes: 1 addition & 4 deletions tests/ApplicationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,7 @@
Path,
};
use Innmind\UrlTemplate\Template;
use Innmind\Immutable\{
Map,
Str,
};
use Innmind\Immutable\Str;
use Innmind\BlackBox\{
PHPUnit\BlackBox,
Set,
Expand Down
12 changes: 10 additions & 2 deletions tests/FunctionalTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,16 @@ public function tearDown(): void

public function testAsyncHttpServer()
{
// let the server time to boot
\usleep(500_000);
$started = $this
->server
->output()
->chunks()
->find(static fn($pair) => $pair[0]->startsWith('HTTP server ready!'));

$this->assertTrue($started->match(
static fn() => true,
static fn() => false,
));

$error = $this
->os
Expand Down

0 comments on commit cd84504

Please sign in to comment.