Skip to content

Commit

Permalink
chore: add Amp coroutine driver
Browse files Browse the repository at this point in the history
  • Loading branch information
mcharytoniuk committed May 25, 2024
1 parent 45693b6 commit 87eba4d
Show file tree
Hide file tree
Showing 84 changed files with 2,765 additions and 998 deletions.
7 changes: 5 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@ tools/php-cs-fixer/vendor/bin/php-cs-fixer:
tools/psalm/vendor/bin/psalm:
$(MAKE) -C tools/psalm vendor

tools/psalm-phar/vendor/bin/psalm.phar:
$(MAKE) -C tools/psalm-phar vendor

vendor: composer.lock
${PHP_BIN} ${COMPOSER_BIN} install --no-interaction --prefer-dist --optimize-autoloader;
touch vendor;
Expand Down Expand Up @@ -154,8 +157,8 @@ prettier: node_modules
"resources/{css,ts}/**/*.{js,css,ts,tsx}"

.PHONY: psalm
psalm: tools/psalm/vendor/bin/psalm vendor
./tools/psalm/vendor/bin/psalm \
psalm: tools/psalm/vendor/bin/psalm tools/psalm-phar/vendor/bin/psalm.phar vendor
./tools/psalm-phar/vendor/bin/psalm.phar \
--no-cache \
--show-info=true \
--root=$(CURDIR)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ advantage of the asynchronous environment.
)]
function Homepage(ServerRequestInterface $request, ResponseInterface $response): TwigTemplate
{
return new TwigTemplate('website/homepage.twig');
return new TwigTemplate($request, $response, 'website/homepage.twig');
}
```

Expand Down
9 changes: 5 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@
"license": "MIT",
"autoload": {
"files": [
"src/helpers/coroutineMustGetContext.php",
"src/helpers/coroutineMustGo.php",
"src/helpers/coroutineMustRun.php",
"src/helpers/generatorGetReturn.php"
],
"psr-4": {
Expand Down Expand Up @@ -64,7 +61,11 @@
"twig/twig": "^3.7",
"webonyx/graphql-php": "^15.6",
"beberlei/assert": "^3.3",
"dunglas/doctrine-json-odm": "^1.4"
"dunglas/doctrine-json-odm": "^1.4",
"amphp/amp": "^3.0",
"revolt/event-loop": "^1.0",
"amphp/http-server": "^3.3",
"amphp/http-server-form-parser": "^2.0"
},
"require-dev": {
"phpunit/phpunit": "^11.0",
Expand Down
Loading

0 comments on commit 87eba4d

Please sign in to comment.