Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Impl. response using PSR-7 interface #1706

Merged
merged 98 commits into from
Feb 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
98 commits
Select commit Hold shift + click to select a range
7fd95be
Add nyholm/psr7 for default response and laminas-httphandlerunner as …
abbadon1334 Nov 25, 2021
6aa0564
Implemented Psr7 response in App::run() & App::terminate() not SSE
abbadon1334 Nov 25, 2021
a28abe4
Raise visibility of Response, which is immutable so no worry for muta…
abbadon1334 Nov 25, 2021
7e074be
Merge branch 'develop' of https://github.com/atk4/ui into feature/add…
abbadon1334 Nov 27, 2021
37f9700
Removed uneeded comments
abbadon1334 Nov 27, 2021
41bb064
Removed laminas-httphandlerrunner refactor App::emitResponse()
abbadon1334 Nov 27, 2021
39c2cda
Use header_sent() to strict check for unexcepted output
abbadon1334 Nov 27, 2021
cb3b2f8
Emit directly response before Exit
abbadon1334 Nov 27, 2021
cb56315
Merge branch 'develop' of https://github.com/atk4/ui into develop
abbadon1334 Nov 27, 2021
beb149f
Merge branch 'develop' into feature/add-psr7
abbadon1334 Nov 27, 2021
a15b54a
CleanUp code
abbadon1334 Nov 27, 2021
52d3b69
Add request changes
abbadon1334 Nov 27, 2021
ec35302
Fix Guzzle response->getBody()->getContents() gives empty string
abbadon1334 Nov 27, 2021
f7f6f95
Add Sse support
abbadon1334 Nov 27, 2021
98eda01
Fix CodeStyle
abbadon1334 Nov 27, 2021
91752b7
Fix LateError
abbadon1334 Nov 27, 2021
2fc8036
Revert $isCli check for headers
abbadon1334 Nov 27, 2021
101325f
Merge remote-tracking branch 'origin/develop' into feature/add-psr7
abbadon1334 Nov 27, 2021
79212e7
Revert changes in Tests
abbadon1334 Nov 27, 2021
e42c267
Reworked code after merge
abbadon1334 Nov 27, 2021
ef2f475
Fix CodeStyle
abbadon1334 Nov 27, 2021
653a34b
Removed pattern in PHPStan not present anymore
abbadon1334 Nov 27, 2021
d817b6a
Added check same response in Tests
abbadon1334 Nov 27, 2021
ae6a852
Add rule to phpstan for App::$responseClass
abbadon1334 Nov 27, 2021
eefffe2
Moved $app exception not raise in DemosTest::createTestingApp() (PHPS…
abbadon1334 Nov 27, 2021
94e4aca
Fix CodeStyle
abbadon1334 Nov 27, 2021
8e07e8c
Separate response building from emitting
abbadon1334 Nov 28, 2021
ce6c0ce
Fix Typo
abbadon1334 Nov 28, 2021
45cf56e
Add some comments to explain better Sse Flow
abbadon1334 Nov 28, 2021
f53e958
Move back in try/catch $this->createTestingApp()
abbadon1334 Nov 29, 2021
7785073
Fix phpstan error, hope for codestyle
abbadon1334 Nov 29, 2021
8f94a2f
Fix phpstan
abbadon1334 Nov 29, 2021
4c1a5fb
Merge branch 'develop' of https://github.com/atk4/ui into feature/add…
abbadon1334 Dec 5, 2021
55fafcc
Removed App $responseClass
abbadon1334 Dec 6, 2021
a75b111
Align composer require-release to require
abbadon1334 Dec 6, 2021
0f782ec
Add composer nyholm/psr7-server
abbadon1334 Dec 8, 2021
d132293
Inject response and request on private properties
abbadon1334 Dec 8, 2021
37b98d0
Fix Request
abbadon1334 Dec 8, 2021
b1521fa
Simplify headers management using response
abbadon1334 Dec 8, 2021
206800d
Simplify getRequestUrl using Request
abbadon1334 Dec 8, 2021
b8c03f0
Add some tests and comments
abbadon1334 Dec 8, 2021
c340087
Removed normalizeHeaders + Tests (Response do it internally)
abbadon1334 Dec 8, 2021
cc0b7d0
Clean up
abbadon1334 Dec 8, 2021
8b71aa3
Fix phpstan error
abbadon1334 Dec 8, 2021
b074150
Fix unit test errors
abbadon1334 Dec 8, 2021
a4bbf53
CleanUp
abbadon1334 Dec 8, 2021
04c430d
Fix no assertion for testDemoLateOutputError
abbadon1334 Dec 8, 2021
ef9dee6
Remove unused normalizeHeaders
abbadon1334 Dec 8, 2021
7a9b203
Removed Test LateOutputError assert StatusCode = 500
abbadon1334 Dec 8, 2021
6fa75c6
Try Fix PHPUnit test for LateOutputError (cannot recreate locally)
abbadon1334 Dec 8, 2021
8cdd09a
Fix PHPUnit test for LateOutputError
abbadon1334 Dec 8, 2021
959dbc7
Try Fix MemLeak in UnitTest 8.1 for Psr7 response
abbadon1334 Dec 8, 2021
8aa9cf9
Try Fix MemLeak in UnitTest 8.1 for Psr7 response
abbadon1334 Dec 8, 2021
a148bc4
Fix UnitTest use App::run in place of App::terminateHtml, due to stra…
abbadon1334 Dec 8, 2021
0b24853
Fix typo
abbadon1334 Dec 8, 2021
0d9bd12
Fix style
abbadon1334 Dec 8, 2021
608acf2
Remove Duplicates
abbadon1334 Dec 9, 2021
09ec6e1
Add App::getRequest() + method helpers for _GET _POST
abbadon1334 Dec 19, 2021
dc943af
Removed gc_collect_cycles()
abbadon1334 Dec 28, 2021
0e66555
Merge remote-tracking branch 'origin/develop' into feature/add-psr7
abbadon1334 Dec 28, 2021
8511308
Fix $response->getBody()->getContents() not returning string
abbadon1334 Dec 28, 2021
5ee20b1
Delete outputErrors.php
mvorisek Dec 29, 2021
35e9f13
Merge branch 'develop' into feature/add-psr7
mvorisek Feb 8, 2022
4dd4fc0
Merge branch 'develop' into feature/add-psr7
mvorisek Feb 8, 2022
ebf8084
fix 500 with unexpected flush
mvorisek Feb 8, 2022
0f7813d
fix stan
mvorisek Feb 8, 2022
cd3e806
Merge branch 'develop' into feature/add-psr7
mvorisek Feb 8, 2022
db7267d
fix rewinding and assert no direct output
mvorisek Feb 18, 2022
5bcf3bd
Merge branch 'develop' into feature/add-psr7
mvorisek Aug 20, 2022
9fed29c
Merge branch 'develop' into feature/add-psr7
mvorisek Aug 20, 2022
6785c7d
Merge branch 'develop' into feature/add-psr7
mvorisek Aug 20, 2022
aa40f03
Merge branch 'develop' into feature/add-psr7
mvorisek Aug 20, 2022
29889e5
Merge branch 'develop' into feature/add-psr7
mvorisek Aug 20, 2022
acf944b
DEBUG hotfix tests after develop merge
mvorisek Aug 20, 2022
8eb3401
Merge branch 'develop' into feature/add-psr7
mvorisek Aug 21, 2022
9f082cb
Merge branch 'develop' into feature/add-psr7
mvorisek Aug 27, 2022
74c5ab2
Merge branch 'develop' into feature/add-psr7
mvorisek Sep 28, 2022
005cb91
remove todo in app
mvorisek Sep 28, 2022
73822e7
Merge branch 'develop' into feature/add-psr7
mvorisek Oct 2, 2022
8b74105
Merge branch 'develop' into feature/add-psr7
mvorisek Dec 22, 2022
970511d
Merge branch 'develop' into feature/add-psr7
mvorisek Feb 24, 2023
ee52c89
DEBUG Revert "remove todo in app"
mvorisek Sep 28, 2022
0647b73
REVERT ALL
mvorisek Feb 27, 2023
dfbce1a
add PSR7 request/response create
mvorisek Feb 27, 2023
fb09616
refactor App::getRequestUrl() to use PSR7 request as source
mvorisek Feb 27, 2023
93bb214
remove App::normalizeHeaders - recheck after finish
mvorisek Feb 27, 2023
1b992f9
remove $headersNew param from App::outputResponseUnsafe
mvorisek Feb 27, 2023
11e2b4d
add request/response getters
mvorisek Feb 27, 2023
5958bd9
drop magic App::HEADER_STATUS_CODE header support
mvorisek Feb 27, 2023
91e12db
drop $headers param from App::outputResponse{Html,Json}
mvorisek Feb 27, 2023
b353374
replace App::$_sentHeaders with PSR7 response data
mvorisek Feb 27, 2023
60e12f0
replace echo with App::emitResponse()
mvorisek Feb 28, 2023
407e6b3
fix App::outputLateOutputError()
mvorisek Feb 28, 2023
40a03e1
assert if headers can be set early
mvorisek Feb 28, 2023
d7faa9c
fix SSE
mvorisek Feb 28, 2023
92126f3
fix typo
mvorisek Feb 28, 2023
cb4b48d
drop internal App::outputResponseRaw
mvorisek Feb 28, 2023
634063c
drop unused request getters
mvorisek Feb 28, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,16 @@
"require": {
"php": ">=7.4 <8.3",
"atk4/data": "dev-develop",
"nyholm/psr7": "^1.4",
"nyholm/psr7-server": "^1.0",
"symfony/filesystem": "^4.4 || ^5.3",
"symfony/http-foundation": "^4.4 || ^5.3"
},
"require-release": {
mvorisek marked this conversation as resolved.
Show resolved Hide resolved
"php": ">=7.4 <8.3",
"atk4/data": "~5.0.0",
"nyholm/psr7": "^1.4",
"nyholm/psr7-server": "^1.0",
"symfony/filesystem": "^4.4 || ^5.3",
"symfony/http-foundation": "^4.4 || ^5.3"
},
Expand Down
Loading