Skip to content

Commit 0cd2837

Browse files
author
Bastian Schwarz
committed
Removed http package sine it's now its own package
1 parent dec2393 commit 0cd2837

16 files changed

Lines changed: 63 additions & 526 deletions

.idea/deploymentchecks.base.iml

Lines changed: 23 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/php.xml

Lines changed: 18 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/phpunit.xml

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,12 @@ code and leaves the rest to the build system that was running the checks:
3939

4040
use de\codenamephp\deploymentchecks\base\Check\Result\WithExitCodeInterface;
4141
use de\codenamephp\deploymentchecks\base\ExitCode\DefaultExitCodes;
42-
use de\codenamephp\deploymentchecks\http\Check\HttpCheck;
43-
use de\codenamephp\deploymentchecks\http\Check\Test\StatusCode;
44-
use GuzzleHttp\Psr7\Request;
42+
use de\codenamephp\deploymentchecks\http\RunTestsOnHttpResponse;
43+
use de\codenamephp\deploymentchecks\http\Test\StatusCode;
4544

4645
require_once __DIR__ . '/../vendor/autoload.php';
4746

48-
$result = (new HttpCheck(
47+
$result = (new RunTestsOnHttpResponse(
4948
new Request('GET', 'https://localhost/'),
5049
'Frontpage should be available',
5150
new StatusCode(200),
@@ -68,19 +67,18 @@ It's very easy to run multiple checks:
6867
use de\codenamephp\deploymentchecks\base\Check\Collection\SequentialCheckCollection;
6968
use de\codenamephp\deploymentchecks\base\Check\Result\WithExitCodeInterface;
7069
use de\codenamephp\deploymentchecks\base\ExitCode\DefaultExitCodes;
71-
use de\codenamephp\deploymentchecks\http\Check\HttpCheck;
72-
use de\codenamephp\deploymentchecks\http\Check\Test\StatusCode;
73-
use GuzzleHttp\Psr7\Request;
70+
use de\codenamephp\deploymentchecks\http\RunTestsOnHttpResponse;
71+
use de\codenamephp\deploymentchecks\http\Test\StatusCode;
7472

7573
require_once __DIR__ . '/../vendor/autoload.php';
7674

7775
$result = (new SequentialCheckCollection(
78-
new HttpCheck(
76+
new RunTestsOnHttpResponse(
7977
new Request('GET', 'https://localhost'),
8078
'Frontpage should be available',
8179
new StatusCode(200),
8280
),
83-
new HttpCheck(
81+
new RunTestsOnHttpResponse(
8482
new Request('GET', 'https://localhost/admin'),
8583
'Admin login page should be available',
8684
new StatusCode(401),
@@ -101,19 +99,19 @@ It's also very easy to run checks in parallel. The next example uses the async p
10199
use de\codenamephp\deploymentchecks\async\Collection\AsyncCheckCollection;
102100
use de\codenamephp\deploymentchecks\base\Check\Result\WithExitCodeInterface;
103101
use de\codenamephp\deploymentchecks\base\ExitCode\DefaultExitCodes;
104-
use de\codenamephp\deploymentchecks\http\Check\HttpCheck;
105-
use de\codenamephp\deploymentchecks\http\Check\Test\StatusCode;
102+
use de\codenamephp\deploymentchecks\http\RunTestsOnHttpResponse;
103+
use de\codenamephp\deploymentchecks\http\Test\StatusCode;
106104
use GuzzleHttp\Psr7\Request;
107105

108106
require_once __DIR__ . '/../vendor/autoload.php';
109107

110108
$result = (new AsyncCheckCollection(new \Spatie\Async\Pool(),
111-
new HttpCheck(
109+
new RunTestsOnHttpResponse(
112110
new Request('GET', 'https://localhost'),
113111
'Frontpage should be available',
114112
new StatusCode(200),
115113
),
116-
new HttpCheck(
114+
new RunTestsOnHttpResponse(
117115
new Request('GET', 'https://localhost/admin'),
118116
'Admin login page should be available',
119117
new StatusCode(401),
@@ -123,4 +121,4 @@ $result = (new AsyncCheckCollection(new \Spatie\Async\Pool(),
123121
exit($result instanceof WithExitCodeInterface ? $result->exitCode() : ($result->successful() ? DefaultExitCodes::SUCCESSFUL->value : DefaultExitCodes::ERROR->value));
124122
```
125123

126-
Again, not much has changed. The only difference is that the checks are now wrapped in a collection that will run them in parallel.
124+
Again, not much has changed. The only difference is that the checks are now wrapped in a collection that will run them in parallel.

packages/http/.gitattributes

Lines changed: 0 additions & 17 deletions
This file was deleted.

packages/http/.gitignore

Lines changed: 0 additions & 121 deletions
This file was deleted.

packages/http/composer.json

Lines changed: 0 additions & 69 deletions
This file was deleted.

0 commit comments

Comments
 (0)