Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ APP_ENV="development"
#DB_DATABASE="database.sqlite"

# MySQL
#DB_CONNECTION="mysql"
#DB_DATABASE="my_database"
#DB_HOST="127.0.0.1"
#DB_PORT="3306"
Expand Down
34 changes: 34 additions & 0 deletions .github/workflows/php.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: PHP Unitary

on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
workflow_dispatch:

permissions:
contents: read

jobs:
build:
runs-on: ubuntu-latest
env:
COMPOSER_ROOT_VERSION: 2.x-dev

steps:
- uses: actions/checkout@v4

- name: Cache Composer packages
uses: actions/cache@v3
with:
path: vendor
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-

- name: Install dependencies
run: composer install --prefer-dist --no-progress

- name: Run test suite
run: php vendor/bin/unitary
17 changes: 0 additions & 17 deletions app/Controllers/Cli/TestController.php

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
use MaplePHP\Http\Interfaces\PathInterface;


class StartController extends DefaultController
class HelloWorldController extends DefaultController
{
/**
* Default route example.
Expand Down
8 changes: 5 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,11 @@
"autoload": {
"psr-4": {
"App\\": "app/",
"Configs\\": "configs/",
"Migrations\\": "database/migrations"
}
"Configs\\": "configs/"
},
"classmap": [
"database/migrations"
]
},
"extra": {
"branch-alias": {
Expand Down
68 changes: 0 additions & 68 deletions configs/CliOptions.php

This file was deleted.

22 changes: 0 additions & 22 deletions database/migrations/Test.php

This file was deleted.

2 changes: 2 additions & 0 deletions database/migrations/index.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?php
// Silence is gold
5 changes: 3 additions & 2 deletions routers/console.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@
* @var RouterDispatcher $router
*/

use App\Controllers\Cli\TestController;
use MaplePHP\Core\Router\RouterDispatcher;
//use App\Commands\TestCommand;

$router->cli("/run", [TestController::class, "index"]);
// Run in CLI: `./maple make --type=command --name=Test`
//$router->cli("test", [TestCommand::class, "index"]);

6 changes: 3 additions & 3 deletions routers/web.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
* {lang:(en|sv|de)} Restricts parameter to specific values. (Example: /{lang}/docs)
*/

use App\Controllers\StartController;
use App\Controllers\HelloWorldController;
use MaplePHP\Core\Router\RouterDispatcher;

$router->get("/", [StartController::class, "index"]);
$router->get("/{page}", [StartController::class, "show"]);
$router->get("/", [HelloWorldController::class, "index"]);
$router->get("/{page}", [HelloWorldController::class, "show"]);
1 change: 0 additions & 1 deletion storage/cache/index.php

This file was deleted.

1 change: 0 additions & 1 deletion storage/logs/index.php

This file was deleted.

Loading