-
-
Notifications
You must be signed in to change notification settings - Fork 14
Migrate Laravel View #304
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
Open
bluehaha
wants to merge
29
commits into
hypervel:main
Choose a base branch
from
bluehaha:feature/view
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Migrate Laravel View #304
Changes from all commits
Commits
Show all changes
29 commits
Select commit
Hold shift + click to select a range
6ed899c
feat: copy source code from laravel
bluehaha d78e603
feat: change namespace from Illuminate to Hypervel
bluehaha 09555f8
feat: add type hints
bluehaha a2a12fb
feat: copy test from Laravel
bluehaha 2902396
feat: use Hypervel namespace
bluehaha 32d63b5
feat: use strict type
bluehaha c02c360
feat: add view package in composer
bluehaha 327d7fb
feat: add contracts
bluehaha cbb8e28
style: remove useless type hint
bluehaha 8286d7a
test: beautify test
bluehaha 7efe459
Merge branch 'main' into feature/view
bluehaha d4103ac
fix: fix namespace
bluehaha 333f59f
refactor: add type hint
bluehaha 66321b0
feat: migrate compilers and engines
bluehaha 4d4c6f2
refactor: add type hints
bluehaha 29531a3
feat: migrate Compilers
bluehaha 4d9bae7
feat: migrate Laravel view
bluehaha 0be9324
feat: use constructor property promotion
bluehaha 5a81433
feat: migrate Laravel view
bluehaha 011c576
feat: migrate Laravel view
bluehaha 2eaebe3
feat: return Html component
bluehaha df3daa6
feat: migrate Laravel view
bluehaha 117b966
feat: migrate Laravel view
bluehaha e5ee166
Merge branch 'main' into feature/view
bluehaha 860a552
feat: migrate Laravel view
bluehaha e6ca111
fix: fix cs
bluehaha 34806cc
fix: need to save session
bluehaha 368eb28
fix: fix phpstan for PHP 8.2
bluehaha 3315b29
fix test
bluehaha File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -17,6 +17,7 @@ | |
| use Hyperf\HttpServer\Router\DispatcherFactory; | ||
| use Hyperf\Server\Exception\ServerException; | ||
| use Hyperf\View\RenderInterface; | ||
| use Hyperf\ViewEngine\Contract\Htmlable; | ||
| use Hyperf\ViewEngine\Contract\Renderable; | ||
| use Hyperf\ViewEngine\Contract\ViewInterface; | ||
| use Hypervel\Context\ResponseContext; | ||
|
|
@@ -65,6 +66,12 @@ protected function transferToResponse($response, ServerRequestInterface $request | |
| ->setBody(new SwooleStream($response->render())); | ||
| } | ||
|
|
||
| if ($response instanceof Htmlable) { | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. When will we receive |
||
| return $this->response() | ||
| ->addHeader('content-type', 'text/html') | ||
| ->setBody(new SwooleStream((string) $response)); | ||
| } | ||
|
|
||
| if (is_string($response)) { | ||
| return $this->response()->addHeader('content-type', 'text/plain')->setBody(new SwooleStream($response)); | ||
| } | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.