Skip to content

Commit 77a863a

Browse files
authored
Merge pull request #45 from utopia-php/feat-request-model
Support model passthrough
2 parents 04255de + ee1eb73 commit 77a863a

24 files changed

Lines changed: 1185 additions & 212 deletions

.github/workflows/codeql.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: "CodeQL"
2+
3+
on: [pull_request]
4+
jobs:
5+
analyse:
6+
name: Static Analysis
7+
runs-on: ubuntu-latest
8+
9+
steps:
10+
- name: Checkout repository
11+
uses: actions/checkout@v3
12+
with:
13+
fetch-depth: 2
14+
15+
- run: git checkout HEAD^2
16+
17+
- name: Run PHPStan
18+
run: |
19+
docker run --rm -v $PWD:/app composer sh -c \
20+
"composer install --profile --ignore-platform-reqs && composer check"

.github/workflows/tests.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: "Tests"
2+
3+
on: [pull_request]
4+
jobs:
5+
test:
6+
name: Tests
7+
runs-on: ubuntu-latest
8+
9+
steps:
10+
- name: Checkout repository
11+
uses: actions/checkout@v3
12+
with:
13+
fetch-depth: 2
14+
15+
- run: git checkout HEAD^2
16+
17+
- name: Run Tests
18+
run: |
19+
docker compose up -d
20+
sleep 10
21+
docker compose exec -T web vendor/bin/phpunit --configuration phpunit.xml

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
vendor
22
composer.lock
33
.phpunit.result.cache
4+
.idea

Dockerfile

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
FROM composer:2.0 AS step0
22

3-
43
ARG TESTING=true
5-
64
ENV TESTING=$TESTING
75

86
WORKDIR /usr/local/src/
@@ -13,17 +11,16 @@ RUN composer update --ignore-platform-reqs --optimize-autoloader \
1311
--no-plugins --no-scripts --prefer-dist \
1412
`if [ "$TESTING" != "true" ]; then echo "--no-dev"; fi`
1513

16-
FROM php:8.0-cli-alpine as final
14+
FROM php:8.4-cli-alpine3.21 AS final
1715
LABEL maintainer="team@appwrite.io"
1816

1917
ENV DEBIAN_FRONTEND=noninteractive \
20-
PHP_VERSION=8
18+
PHP_VERSION=84
2119

2220
RUN \
2321
apk add --no-cache --virtual .deps \
2422
supervisor php$PHP_VERSION php$PHP_VERSION-fpm nginx bash
2523

26-
2724
# Nginx Configuration (with self-signed ssl certificates)
2825
COPY ./tests/docker/nginx.conf /etc/nginx/nginx.conf
2926

composer.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,19 @@
2424
},
2525
"require-dev": {
2626
"phpunit/phpunit": "9.*",
27-
"laravel/pint": "1.*"
27+
"laravel/pint": "1.*",
28+
"phpstan/phpstan": "2.*"
2829
},
2930
"scripts": {
3031
"format": "vendor/bin/pint",
3132
"lint": "vendor/bin/pint --test",
33+
"check": "vendor/bin/phpstan analyse --level 8 src tests --memory-limit=4G",
3234
"test": "docker-compose up -d && sleep 10 && docker-compose exec web vendor/bin/phpunit --configuration phpunit.xml"
3335
},
3436
"config": {
37+
"platform": {
38+
"php": "8.0"
39+
},
3540
"allow-plugins": {
3641
"php-http/discovery": false,
3742
"tbachert/spi": false

0 commit comments

Comments
 (0)