Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: felix-schindler/Router
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v2.0.0b1
Choose a base ref
...
head repository: felix-schindler/Router
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref

Commits on Apr 26, 2022

  1. Copy the full SHA
    1af2ec8 View commit details

Commits on Apr 30, 2022

  1. Copy the full SHA
    064c953 View commit details

Commits on May 20, 2022

  1. Copy the full SHA
    f1f3ce2 View commit details

Commits on Jun 3, 2022

  1. Small changes

    - Add IO::accept
    - Update phpstan
    felix-schindler committed Jun 3, 2022
    Copy the full SHA
    d692a83 View commit details

Commits on Jul 8, 2022

  1. Copy the full SHA
    5a96418 View commit details

Commits on Aug 1, 2022

  1. Copy the full SHA
    1346af9 View commit details
  2. Copy the full SHA
    a57b438 View commit details

Commits on Oct 12, 2022

  1. Update README.md

    felix-schindler authored Oct 12, 2022
    Copy the full SHA
    e481f36 View commit details

Commits on Oct 27, 2022

  1. Create class Database for better access to PDO

    With this new class things like transactions are possible for the first time
    felix-schindler committed Oct 27, 2022
    Copy the full SHA
    f268d40 View commit details
  2. Controller->execute() has to return a View

    To make sure some answer is send to the client, `Controller`s now have to return a `View`
    felix-schindler committed Oct 27, 2022
    Copy the full SHA
    7e44e96 View commit details
  3. Copy the full SHA
    a394986 View commit details
  4. Random things

    felix-schindler committed Oct 27, 2022
    Copy the full SHA
    733ae00 View commit details
  5. Create .editorconfig

    felix-schindler committed Oct 27, 2022
    Copy the full SHA
    df796bf View commit details
  6. Copy the full SHA
    e4f8395 View commit details
  7. Copy the full SHA
    c85a2a3 View commit details
  8. Add @throws comments

    felix-schindler committed Oct 27, 2022
    Copy the full SHA
    94431e8 View commit details
  9. Copy the full SHA
    ad31c0b View commit details
  10. Copy the full SHA
    3c42c38 View commit details
  11. Fix LayoutView style

    felix-schindler committed Oct 27, 2022
    Copy the full SHA
    07a3c5f View commit details
  12. Fix composer require

    felix-schindler committed Oct 27, 2022
    Copy the full SHA
    cf5ecba View commit details
  13. Fix workflow

    felix-schindler committed Oct 27, 2022
    Copy the full SHA
    5cc45f8 View commit details
  14. Fix test vscode task

    felix-schindler committed Oct 27, 2022
    Copy the full SHA
    49faaef View commit details
  15. Copy the full SHA
    b2e61c9 View commit details
  16. Copy the full SHA
    f310665 View commit details
  17. Delete InsertQuery.php

    Never really worked
    felix-schindler committed Oct 27, 2022
    Copy the full SHA
    0b508dd View commit details
  18. Copy the full SHA
    75c17d2 View commit details
  19. Copy the full SHA
    a869854 View commit details

Commits on Oct 28, 2022

  1. Copy the full SHA
    af36210 View commit details

Commits on Nov 2, 2022

  1. Update Database & APIView

    - Add @throws to doc comments
    - Database: Make execute throw `PDOException`
    - APIView: Add cache max age
    felix-schindler committed Nov 2, 2022
    Copy the full SHA
    f0dbcfd View commit details

Commits on Dec 3, 2022

  1. Copy the full SHA
    d381ac6 View commit details
  2. Update IO.php

    - Remove useless string to string conversions
    - Simplify `body` function
    - Remove `bool $exact` parameter; Only return sanitized string values
    - Add `@throws` to php doc
    felix-schindler committed Dec 3, 2022
    Copy the full SHA
    80e1547 View commit details
  3. Copy the full SHA
    15517a8 View commit details
  4. Copy the full SHA
    8af8a51 View commit details
  5. fmt

    felix-schindler committed Dec 3, 2022
    Copy the full SHA
    cc58eee View commit details
  6. Imp gh action

    felix-schindler committed Dec 3, 2022
    Copy the full SHA
    62080f8 View commit details

Commits on May 11, 2023

  1. Copy the full SHA
    4b5ebd8 View commit details
  2. Copy the full SHA
    ad6510c View commit details
  3. Create sample test

    felix-schindler committed May 11, 2023
    Copy the full SHA
    3bc6d9e View commit details
  4. Update README.md

    felix-schindler committed May 11, 2023
    Copy the full SHA
    04f6ef2 View commit details
  5. Copy the full SHA
    ea7ef21 View commit details
  6. Update composer.lock

    felix-schindler committed May 11, 2023
    Copy the full SHA
    426837c View commit details

Commits on May 12, 2023

  1. Move favicon to src/

    felix-schindler committed May 12, 2023
    Copy the full SHA
    327fe78 View commit details
  2. Copy the full SHA
    4ecbf8b View commit details
  3. Copy the full SHA
    830c7e2 View commit details
  4. Copy the full SHA
    8ff556d View commit details
  5. Update README.md

    felix-schindler committed May 12, 2023
    Copy the full SHA
    dde408b View commit details
  6. Copy the full SHA
    95c7f10 View commit details
  7. Copy the full SHA
    892be62 View commit details
  8. Copy the full SHA
    56af2cf View commit details

Commits on May 19, 2023

  1. Copy the full SHA
    918e92c View commit details
Showing with 5,367 additions and 905 deletions.
  1. +9 −0 .editorconfig
  2. +6 −0 .github/dependabot.yml
  3. +6 −6 .github/workflows/php.yml
  4. +2 −1 .gitignore
  5. +15 −0 .php-cs-fixer.php
  6. +5 −0 .phpactor.json
  7. +3 −4 .phpstan.neon
  8. +10 −0 .vscode/settings.json
  9. +18 −18 .vscode/tasks.json
  10. +0 −17 Backend/Controllers/NotCalledController.php
  11. +0 −16 Backend/Controllers/SecondHome.php
  12. +0 −28 Backend/Controllers/TestController.php
  13. +0 −45 Backend/Core/ClassLoader.php
  14. +0 −42 Backend/Core/Data/InsertQuery.php
  15. +0 −68 Backend/Core/Data/Model.php
  16. +0 −68 Backend/Core/Functions/Auth.php
  17. +0 −172 Backend/Core/System/IO.php
  18. +0 −103 Backend/Core/System/Router.php
  19. +0 −51 Backend/Core/System/View.php
  20. +0 −5 Backend/Libraries/composer.json
  21. +0 −78 Backend/Libraries/composer.lock
  22. +0 −20 Backend/Views/Base/APIView.php
  23. +0 −47 Backend/Views/Base/LayoutView.php
  24. +15 −0 Caddyfile
  25. +22 −0 Dockerfile
  26. +41 −17 README.md
  27. +27 −0 composer.json
  28. +4,227 −0 composer.lock
  29. +0 −32 index.php
  30. +3 −2 {Backend/Controllers → src/controllers}/APIController.php
  31. +17 −0 src/controllers/ArticleController.php
  32. +4 −3 {Backend/Controllers → src/controllers}/HomeController.php
  33. +19 −0 src/controllers/NotCalledController.php
  34. +100 −0 src/core/ClassLoader.php
  35. +76 −0 src/core/data/Database.php
  36. +8 −0 src/core/data/Model.php
  37. +52 −34 {Backend/Core/Data → src/core/data}/Query.php
  38. +93 −0 src/core/functions/Auth.php
  39. +7 −3 {Backend/Core/Functions → src/core/functions}/Utils.php
  40. +35 −16 {Backend/Core/System → src/core/system}/Controller.php
  41. +182 −0 src/core/system/IO.php
  42. +115 −0 src/core/system/Router.php
  43. +79 −0 src/core/system/View.php
  44. BIN { → src}/favicon.ico
  45. +37 −0 src/index.php
  46. +24 −0 src/views/base/APIView.php
  47. +7 −5 {Backend/Views/Base → src/views/base}/ErrorView.php
  48. +83 −0 src/views/base/LayoutView.php
  49. +4 −2 {Backend/Views/Components → src/views/components}/HeadingView.php
  50. +4 −2 {Backend/Views/Components → src/views/components}/TextView.php
  51. +12 −0 tests/SampleTest.php
9 changes: 9 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
root = true

[*]
end_of_line = lf
insert_final_newline = true
indent_style = tab
indent_size = 2
charset = utf-8
trim_trailing_whitespace = true
6 changes: 6 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
version: 2
updates:
- package-ecosystem: "composer"
directory: "/"
schedule:
interval: "weekly"
12 changes: 6 additions & 6 deletions .github/workflows/php.yml
Original file line number Diff line number Diff line change
@@ -9,22 +9,22 @@ on:
jobs:
build:

runs-on: ubuntu-latest
runs-on: ubuntu-24.04

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: Backend/Libraries/vendor
path: vendor
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-
- name: Install dependencies
run: cd Backend/Libraries && composer install --no-progress
run: composer install --no-progress

- name: Run test suite
run: php Backend/Libraries/vendor/bin/phpstan analyse -c .phpstan.neon --memory-limit 500M
run: composer run test:static -- --no-progress
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
/Backend/Libraries/vendor/
vendor/
*.cache
.DS_Store
15 changes: 15 additions & 0 deletions .php-cs-fixer.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?php

use PhpCsFixer\Config;
use PhpCsFixer\Finder;

$finder = Finder::create()
->in(__DIR__ . DIRECTORY_SEPARATOR . 'src')
->name('*.php')
->ignoreDotFiles(true)
->ignoreVCS(true);

return (new Config())
->setIndent("\t")
->setCacheFile(__DIR__ . DIRECTORY_SEPARATOR . '.php-cs-fixer.cache')
->setFinder($finder);
5 changes: 5 additions & 0 deletions .phpactor.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"$schema": "https://gist.githubusercontent.com/montchr/59fc36b090597960be9ac5d01e425320/raw/c163933d93a1707fd815886d2a339aaec946d06b/schema.json",
"language_server_phpstan.enabled": true,
"language_server_php_cs_fixer.enabled": true
}
7 changes: 3 additions & 4 deletions .phpstan.neon
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
parameters:
level: 6
level: 8
excludePaths:
- Backend/Libraries/vendor/*
- vendor/*
paths:
- index.php
- Backend
- src
10 changes: 10 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"editor.formatOnSave": true,
"editor.tabSize": 2,
"editor.useTabStops": true,
"files.insertFinalNewline": true,
"files.trimTrailingWhitespace": true,
"phpstan.binPath": "vendor/bin/phpstan",
"phpstan.configFile": ".phpstan.neon",
"phpstan.enabled": true,
}
36 changes: 18 additions & 18 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "PHPStan",
"type": "shell",
"command": "php Backend/Libraries/vendor/bin/phpstan analyse -c .phpstan.neon --memory-limit 500M",
"group": {
"kind": "build",
"isDefault": true
},
"presentation": {
"reveal": "always",
"focus": true,
"showReuseMessage": false,
"clear": true
}
}
]
"version": "2.0.0",
"tasks": [
{
"label": "PHPStan",
"type": "shell",
"command": "php vendor/bin/phpstan analyse -c .phpstan.neon --memory-limit 500M",
"group": {
"kind": "build",
"isDefault": true
},
"presentation": {
"reveal": "always",
"focus": true,
"showReuseMessage": false,
"clear": true
}
}
]
}
17 changes: 0 additions & 17 deletions Backend/Controllers/NotCalledController.php

This file was deleted.

16 changes: 0 additions & 16 deletions Backend/Controllers/SecondHome.php

This file was deleted.

28 changes: 0 additions & 28 deletions Backend/Controllers/TestController.php

This file was deleted.

45 changes: 0 additions & 45 deletions Backend/Core/ClassLoader.php

This file was deleted.

42 changes: 0 additions & 42 deletions Backend/Core/Data/InsertQuery.php

This file was deleted.

68 changes: 0 additions & 68 deletions Backend/Core/Data/Model.php

This file was deleted.

Loading