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

Feat di upgrade #132

Closed
wants to merge 39 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
e2e7498
Add req&res classes
Meldiron Mar 8, 2024
662f7f9
Fixed status code 451
eldadfux Apr 1, 2024
111da1c
Merge remote-tracking branch 'origin/master' into feat-framework-v2
eldadfux Apr 3, 2024
5db6b13
Work in progress
eldadfux Apr 4, 2024
90cd4e6
Fixed method mixup
eldadfux Apr 4, 2024
b263f10
Tests...
eldadfux Apr 4, 2024
654a917
Fixed test
eldadfux Apr 4, 2024
241aebf
Fixed a few more tests
eldadfux Apr 5, 2024
4351e83
Update benchmark
eldadfux Apr 5, 2024
f5abb5f
Updated benchmark
eldadfux Apr 7, 2024
590eb6f
Deprecated swoole request and response getters
eldadfux Apr 8, 2024
6359661
Improved tests
eldadfux Apr 8, 2024
93b8568
Fixed tests
eldadfux Apr 8, 2024
dc646e2
tests
eldadfux Apr 8, 2024
e268ec3
Fixed format
eldadfux Apr 8, 2024
1daba1c
Fixed tests
eldadfux Apr 8, 2024
afc610e
Fixed code analysis
eldadfux Apr 8, 2024
05bec61
Changed dependency method to inject
eldadfux Apr 8, 2024
bf05cca
Updated composer.lock
eldadfux Apr 8, 2024
23829ef
Fixed test
eldadfux Apr 9, 2024
ea0cfc3
Cleanups
eldadfux Apr 9, 2024
5a5fd25
Updated composer
eldadfux Apr 9, 2024
b76d415
Added more tests
eldadfux Apr 9, 2024
0bfe44c
Deprecated request hooks
eldadfux Apr 9, 2024
cde62b8
Test public swoole
eldadfux Apr 9, 2024
524f5d4
Updated lock file
eldadfux Apr 10, 2024
5434c04
Updated tests
eldadfux Apr 10, 2024
1221d45
Updated tests
eldadfux Apr 10, 2024
995dacb
Added test logs
eldadfux Apr 11, 2024
bb1421a
Removed logs
eldadfux Apr 11, 2024
ac7940b
Added DBPool test
eldadfux Apr 12, 2024
08e70ee
Test
eldadfux Apr 13, 2024
efb7331
Isolated server start context
eldadfux Apr 13, 2024
22e634e
Run event in coroutine
eldadfux Apr 13, 2024
b303e29
Fixed typo
eldadfux Apr 13, 2024
1d8ced9
Fixed callback
eldadfux Apr 13, 2024
aef4e9a
Fixed arg count
eldadfux Apr 13, 2024
d600ae2
Fixed bug with params
eldadfux Apr 14, 2024
5905398
Always return Route, added not found test
eldadfux Apr 14, 2024
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
9 changes: 9 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"name": "Listen for Xdebug",
"type": "php",
"request": "launch",
"port": 9003,
"pathMappings": {
"/usr/src/code": "${workspaceRoot}"
}
}
25 changes: 22 additions & 3 deletions Dockerfile.swoole
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
FROM composer:2.0 AS step0


ARG TESTING=true
ARG TESTING=false
ARG DEBUG=false

ENV TESTING=$TESTING
ENV DEBUG=$DEBUG

WORKDIR /usr/local/src/

Expand All @@ -13,17 +14,35 @@ RUN composer install --ignore-platform-reqs --optimize-autoloader \
--no-plugins --no-scripts --prefer-dist \
`if [ "$TESTING" != "true" ]; then echo "--no-dev"; fi`

FROM appwrite/base:0.4.3 as final
FROM appwrite/base:0.9.0 as final

ARG TESTING=false
ARG DEBUG=false

ENV TESTING=$TESTING
ENV DEBUG=$DEBUG

LABEL maintainer="[email protected]"

RUN \
if [ "$DEBUG" == "true" ]; then \
apk add boost boost-dev; \
fi

WORKDIR /usr/src/code

COPY ./dev /usr/src/code/dev
COPY ./src /usr/src/code/src
COPY ./tests /usr/src/code/tests
COPY ./phpunit.xml /usr/src/code/phpunit.xml
COPY ./phpbench.json /usr/src/code/phpbench.json
COPY --from=step0 /usr/local/src/vendor /usr/src/code/vendor

# Enable Extensions
RUN if [ "$DEBUG" == "true" ]; then cp /usr/src/code/dev/xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini; fi
RUN if [ "$DEBUG" = "false" ]; then rm -rf /usr/src/code/dev; fi
RUN if [ "$DEBUG" = "false" ]; then rm -f /usr/local/lib/php/extensions/no-debug-non-zts-20220829/xdebug.so; fi

EXPOSE 80

CMD ["php", "tests/e2e/server-swoole.php"]
21 changes: 16 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,29 +9,40 @@
"upf"
],
"license": "MIT",
"minimum-stability": "stable",
"autoload": {
"psr-4": {
"Utopia\\": "src/",
"Utopia\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"Tests\\E2E\\": "tests/e2e"
}
},
"scripts": {
"lint": "vendor/bin/pint --test",
"format": "vendor/bin/pint",
"check": "vendor/bin/phpstan analyse -c phpstan.neon",
"check": "vendor/bin/phpstan analyse -c phpstan.neon --memory-limit=256M",
"test": "vendor/bin/phpunit --configuration phpunit.xml",
"bench": "vendor/bin/phpbench run --report=benchmark"
},
"require": {
"php": ">=8.0",
"ext-swoole": "*"
"ext-swoole": "*",
"utopia-php/di": "dev-main"
},
"require-dev": {
"ext-xdebug": "*",
"phpunit/phpunit": "^9.5.25",
"laravel/pint": "^1.2",
"swoole/ide-helper": "4.8.3",
"phpstan/phpstan": "^1.10",
"phpbench/phpbench": "^1.2"
}
},
"repositories": [
{
"type": "vcs",
"url": "https://github.com/utopia-php/di"
}
]
}
Loading
Loading