Skip to content

Commit 94deb41

Browse files
author
Greg Bowler
authored
V4 (#496)
* core: Update CI scripts * core: Update CI scripts * refactor: simplify entry point * refactor: simplify start function - moving responsibility to RequestHandler * refactor: simplify lifecycle class with better documentation * refactor: all lifecycle responsibility taken away from Request - closes #307 * add todos * refactor: remove all redundant code * build: update dependencies * feature: default router * feature: default config * refactor: simplify lifecycle * refactor: split view into HTML/Null * refactor: remove old lifecycle functions * refactor: tidy up stan feedback * wip: improving v4 routing * build: upgrade to DOM v3 RC 1 * feature: expand DOM components * tweak: remove commented code * build: upgrade to stable versions * build: upgrade to stable version of logger * build: raise minimum stability * feature: handle modular content * build: require database * feature: database in the service container * config: add default binaries for webpack/sass * config: remove build binaries * build: require phpgt/sync * build: update default filename for es6 module packing * wip: remove uri filter * wip: add dynamic path to service container * wip: lazy load database * wip: refactor service container * wip: autoload project classes * wip: call project service loader * Revert "wip: remove uri filter" This reverts commit dd06666 * wip: do not filter out dynamic files * build: stable release of routing * build: new release of domtemplate * wip: remove debugging * tidy: remove unused imports * wip: clean bind attributes * wip: pass default database collation/charset * wip: improve nested dynamic routing * wip: replace hyphens in do actions * wip: output path to body class * wip: expose request uri as service * wip: differentiate between uri/dir in body class * wip: set request uri in service container * wip: working on csrf * wip: call go_after * wip: expose server as service * wip: expose config as service * wip: update session * wip: update routing dependency * build: upgrade dependencies * wip: if there is no session yet, pass null to suppress warning * wip: improve routing * build: update dependencies * router: sort headers and footers to allow nesting * wip: force all URLs to end with a slash * wip: commend redirection * build: update deps * tweak: rename modular->partial * tweak: rename bindAttributes->datasets * tweak: remove autoloader debug * tweak: pass dependencies to table binder * simplify: routing header/footer ordering * feature: output dynamic URLs to the body tag * tweak: enforce current working dir * tweak: suppress comparison warning (for introducing custom error handler) * tweak: pass exceptions to custom error handler * check if init.php exists before including * build: upgrade dependencies * build: remove behat dependencies * routing: default router matches page-route by default * build: bump dependencies * hotfix: fix typo in routing header matcher * Retain query string on redirect Fixes #486 * build: upgrade ci * build: upgrade deps
1 parent 5f4e0e4 commit 94deb41

File tree

112 files changed

+2728
-19459
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

112 files changed

+2728
-19459
lines changed

.github/FUNDING.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# These are supported funding model platforms
2+
github: [phpgt]

.github/workflows/ci.yml

Lines changed: 31 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,44 +3,64 @@ name: CI
33
on: [push]
44

55
jobs:
6-
build:
6+
composer:
77
runs-on: ubuntu-latest
88

99
steps:
1010
- uses: actions/checkout@v2
11-
- uses: php-actions/composer@v2
12-
- name: Upload build for test runner
11+
12+
- name: Cache Composer dependencies
13+
uses: actions/cache@v2
14+
with:
15+
path: /tmp/composer-cache
16+
key: ${{ runner.os }}-${{ hashFiles('**/composer.lock') }}
17+
18+
- uses: php-actions/composer@v6
19+
20+
- name: Archive build
21+
run: mkdir /tmp/github-actions/ && tar -cvf /tmp/github-actions/build.tar ./
22+
23+
- name: Upload build archive for test runners
1324
uses: actions/upload-artifact@v2
1425
with:
1526
name: build-artifact
16-
path: ./
27+
path: /tmp/github-actions
1728

1829
phpunit:
1930
runs-on: ubuntu-latest
20-
needs: [build]
31+
needs: [composer]
2132

2233
steps:
2334
- uses: actions/download-artifact@v2
2435
with:
2536
name: build-artifact
26-
path: ./
37+
path: /tmp/github-actions
38+
39+
- name: Extract build archive
40+
run: tar -xvf /tmp/github-actions/build.tar ./
2741

2842
- name: PHP Unit tests
29-
uses: php-actions/phpunit@v9
43+
uses: php-actions/phpunit@v3
3044
with:
45+
php_version: 8.0
46+
php_extensions: xdebug
3147
configuration: test/phpunit/phpunit.xml
48+
bootstrap: vendor/autoload.php
3249

3350
phpstan:
3451
runs-on: ubuntu-latest
35-
needs: [build]
52+
needs: [composer]
3653

3754
steps:
3855
- uses: actions/download-artifact@v2
3956
with:
4057
name: build-artifact
41-
path: ./
58+
path: /tmp/github-actions
59+
60+
- name: Extract build archive
61+
run: tar -xvf /tmp/github-actions/build.tar ./
4262

4363
- name: PHP Static Analysis
44-
uses: php-actions/phpstan@master
64+
uses: php-actions/phpstan@v3
4565
with:
46-
path: src/
66+
path: src/

.scrutinizer.yml

Lines changed: 21 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,25 @@
11
build:
22
environment:
3-
php:
4-
version: 7.4.0
5-
tests:
6-
override:
7-
-
8-
command: 'vendor/bin/phpunit test/unit --coverage-clover coverage --whitelist src'
9-
coverage:
10-
file: 'coverage'
11-
format: 'php-clover'
3+
php: 8.0.0
4+
5+
nodes:
6+
analysis:
7+
tests:
8+
override:
9+
- php-scrutinizer-run
10+
11+
tests-and-coverage:
12+
environment:
13+
php:
14+
ini:
15+
"xdebug.mode": coverage
16+
tests:
17+
override:
18+
- phpcs-run ./src
19+
- command: "vendor/bin/phpunit test/phpunit --coverage-clover test/phpunit/_coverage --whitelist src"
20+
coverage:
21+
file: "test/phpunit/_coverage"
22+
format: "php-clover"
1223

1324
checks:
1425
php:
@@ -18,4 +29,4 @@ checks:
1829
filter:
1930
excluded_paths:
2031
- test/*
21-
- vendor/*
32+
- vendor/*

build.default.json

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,11 @@
33
"require": {
44
"node": "*",
55
"babel": "*",
6-
"webpack": "*",
7-
"webpack-cli": "*"
6+
"webpack": "*"
87
},
98
"execute": {
10-
"command": "webpack-cli",
11-
"arguments": ["build", "--mode=development", "--devtool=source-map", "--entry=./script/main.es6", "--output-filename=script.js", "--output-path=./www"]
9+
"command": "webpack",
10+
"arguments": ["--entry","./script/main.es6", "--output-path", "./www", "--output-filename", "script.js", "--devtool", "source-map", "--mode", "production"]
1211
}
1312
},
1413

composer.json

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -13,32 +13,26 @@
1313
"ext-dom": "*",
1414
"ext-json": "*",
1515
"php": ">=8.0",
16-
"phpgt/build": "^1.0",
17-
"phpgt/cli": "^1.3",
16+
1817
"phpgt/config": "^1.0",
19-
"phpgt/cookie": "^1.0",
20-
"phpgt/cron": "^1.0",
21-
"phpgt/csrf": "^1.6",
22-
"phpgt/database": "^1.1",
23-
"phpgt/dom": "v3.0.0",
24-
"phpgt/domtemplate": "^1.3 || ^2.0",
25-
"phpgt/fetch": "^1.0",
18+
"phpgt/csrf": "^1.7.2",
19+
"phpgt/dom": "^3.0.0",
20+
"phpgt/domtemplate": "^2.0",
21+
"phpgt/database": "^1.4",
2622
"phpgt/http": "^1.0",
27-
"phpgt/input": "^1.1",
28-
"phpgt/protectedglobal": "^1.0",
29-
"phpgt/server": "^1.1",
30-
"phpgt/session": "^1.1",
23+
"phpgt/logger": "^1.0",
24+
"phpgt/routing": "^1.0",
25+
"phpgt/servicecontainer": "^1.1.1",
26+
"phpgt/session": "^1.1.2",
3127
"phpgt/sync": "^1.2",
3228

3329
"psr/http-server-middleware": "^1.0",
3430
"willdurand/negotiation": "^3.0"
3531
},
3632

3733
"require-dev": {
38-
"phpunit/phpunit": "8.* || 9.*",
39-
"behat/behat": "^3.0.5",
40-
"behat/mink-extension": "^2.3",
41-
"behat/mink-goutte-driver": "^1.2"
34+
"phpstan/phpstan": "^1.4",
35+
"phpunit/phpunit": "^9.5"
4236
},
4337

4438
"autoload": {
@@ -63,5 +57,12 @@
6357
"router",
6458
"toolbox",
6559
"prototype"
60+
],
61+
62+
"funding": [
63+
{
64+
"type": "github",
65+
"url": "https://github.com/sponsors/PhpGt"
66+
}
6667
]
6768
}

0 commit comments

Comments
 (0)