Skip to content

Commit 1c8ed95

Browse files
Merge pull request #92 from utopia-php/feat-routing-v2
2 parents 02d0504 + 557afb8 commit 1c8ed95

34 files changed

+1391
-1810
lines changed

.github/workflows/bench.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: "Benchmarks"
2+
3+
on: [pull_request]
4+
jobs:
5+
lint:
6+
name: Benchmarks
7+
runs-on: ubuntu-latest
8+
9+
steps:
10+
- name: Checkout repository
11+
uses: actions/checkout@v3
12+
13+
- name: Setup PHP
14+
uses: shivammathur/setup-php@v2
15+
with:
16+
php-version: '8.0'
17+
18+
- name: Install dependencies
19+
run: composer install --prefer-dist
20+
21+
- name: Run Benchmarks
22+
run: composer bench -- --progress=plain

.github/workflows/lint.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: "Linter"
2+
3+
on: [pull_request]
4+
jobs:
5+
lint:
6+
name: Linter
7+
runs-on: ubuntu-latest
8+
9+
steps:
10+
- name: Checkout repository
11+
uses: actions/checkout@v3
12+
13+
- name: Setup PHP
14+
uses: shivammathur/setup-php@v2
15+
with:
16+
php-version: '8.0'
17+
18+
- name: Install dependencies
19+
run: composer install --prefer-dist
20+
21+
- name: Run Linter
22+
run: composer lint

.github/workflows/test.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: "Tests"
2+
3+
on: [pull_request]
4+
jobs:
5+
lint:
6+
name: Tests
7+
runs-on: ubuntu-latest
8+
9+
steps:
10+
- name: Checkout repository
11+
uses: actions/checkout@v3
12+
13+
- name: Setup PHP
14+
uses: shivammathur/setup-php@v2
15+
with:
16+
php-version: '8.0'
17+
18+
- name: Setup Docker
19+
run: docker-compose up -d --build
20+
21+
- name: Wait for Server to be ready
22+
run: sleep 10
23+
24+
- name: Run Tests
25+
run: docker compose exec web vendor/bin/phpunit --configuration phpunit.xml

.gitlab-ci.yml

Lines changed: 0 additions & 26 deletions
This file was deleted.

.travis.yml

Lines changed: 0 additions & 36 deletions
This file was deleted.

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ ENV DEBIAN_FRONTEND=noninteractive \
2121

2222
RUN \
2323
apk add --no-cache --virtual .deps \
24-
supervisor php$PHP_VERSION php$PHP_VERSION-fpm nginx bash
24+
supervisor php$PHP_VERSION php$PHP_VERSION-fpm php$PHP_VERSION-mbstring nginx bash
2525

2626

2727
# Nginx Configuration (with self-signed ssl certificates)
@@ -38,7 +38,7 @@ COPY ./tests/docker/start /usr/local/bin/start
3838
COPY ./src /usr/share/nginx/html/src
3939
COPY ./tests /usr/share/nginx/html/tests
4040
COPY ./phpunit.xml /usr/share/nginx/html/phpunit.xml
41-
COPY ./psalm.xml /usr/share/nginx/html/psalm.xml
41+
COPY ./phpbench.json /usr/share/nginx/html/phpbench.json
4242
COPY --from=step0 /usr/local/src/vendor /usr/share/nginx/html/vendor
4343

4444
# Supervisord Conf

composer.json

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,32 @@
22
"name": "utopia-php/framework",
33
"description": "A simple, light and advanced PHP framework",
44
"type": "library",
5-
"keywords": ["php","framework", "upf"],
5+
"keywords": [
6+
"php",
7+
"framework",
8+
"upf"
9+
],
610
"license": "MIT",
711
"minimum-stability": "stable",
812
"autoload": {
9-
"psr-4": {"Utopia\\": "src/"}
13+
"psr-4": {
14+
"Utopia\\": "src/"
15+
}
1016
},
1117
"scripts": {
12-
"lint": "./vendor/bin/pint --test",
13-
"format": "./vendor/bin/pint",
14-
"check": "./vendor/bin/phpstan analyse -l 5 src tests"
18+
"lint": "vendor/bin/pint --test",
19+
"format": "vendor/bin/pint",
20+
"check": "vendor/bin/phpstan analyse -c phpstan.neon",
21+
"test": "vendor/bin/phpunit --configuration phpunit.xml",
22+
"bench": "vendor/bin/phpbench run --report=benchmark"
1523
},
1624
"require": {
1725
"php": ">=8.0"
1826
},
1927
"require-dev": {
2028
"phpunit/phpunit": "^9.5.25",
21-
"vimeo/psalm": "4.27.0",
2229
"laravel/pint": "^1.2",
23-
"phpstan/phpstan": "1.9.x-dev"
30+
"phpstan/phpstan": "^1.10",
31+
"phpbench/phpbench": "^1.2"
2432
}
2533
}

0 commit comments

Comments
 (0)