Skip to content

Commit

Permalink
Merge pull request #72 from bowphp/5.x-ref-update
Browse files Browse the repository at this point in the history
Change framework version for release
  • Loading branch information
papac authored May 11, 2023
2 parents c29ad20 + 5665e50 commit 1e1cbf0
Show file tree
Hide file tree
Showing 8 changed files with 62 additions and 59 deletions.
4 changes: 2 additions & 2 deletions .env.example.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@

"S3_KEY": "",
"S3_SECRET": "",
"S3_REGION": "",
"S3_BUCKET": "",
"S3_REGION": "us-east-1",
"S3_BUCKET": "buckets",

"FTP_HOSTNAME": "localhost",
"FTP_PASSWORD": "password",
Expand Down
25 changes: 13 additions & 12 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
.idea/
!.gitignore
composer.lock
node_modules
vendor/
package-lock.json
!.gitkeep
!public/**/.gitkeep
!var/**/.gitkeep
.env.json
config/.key
mix-manifest.json
.idea/
!.gitignore
composer.lock
node_modules
vendor/
package-lock.json
!.gitkeep
!public/**/.gitkeep
!var/**/.gitkeep
.env.json
config/.key
mix-manifest.json
.phpunit.result.cache
7 changes: 4 additions & 3 deletions app/Exceptions/ErrorHandle.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@

namespace App\Exceptions;

use Bow\Database\Exception\NotFoundException as ModelNotFoundException;
use Bow\Http\Exception\HttpException;
use Bow\Http\Exception\ResponseException as HttpResponseException;
use Exception;
use PDOException;
use Bow\Http\Exception\HttpException;
use Bow\Router\Exception\RouterException;
use Policier\Exception\TokenExpiredException;
use Policier\Exception\TokenInvalidException;
use Bow\Http\Exception\ResponseException as HttpResponseException;
use Bow\Database\Exception\NotFoundException as ModelNotFoundException;

class ErrorHandle
{
Expand Down
8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@
"ext-openssl": "*",
"ext-pdo": "*",
"ext-pdo_mysql": "*",
"ext-pdo_sqlite": "*",
"ext-pdo_pgsql": "*",
"ext-xml": "*",
"ext-pdo_sqlite": "*",
"ext-redis": "*",
"bowphp/framework": "5.x-dev",
"ext-xml": "*",
"bowphp/framework": "^5.0",
"bowphp/meta-manager": "^1.0",
"bowphp/policier": "^2.1"
},
Expand All @@ -45,7 +45,7 @@
},
"scripts": {
"lint": "phpcbf --standard=psr12 --tab-width=4 app tests config migrations seeders routes",
"test": "phpunit --configuration phpunit.dist.xml",
"test": "phpunit --configuration phpunit.xml",
"post-root-package-install": [
"@php -r \"file_exists('.env.json') || copy('.env.example.json', '.env.json');\""
],
Expand Down
2 changes: 1 addition & 1 deletion config/security.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* Can be reorder by the command
* <code>`php bow generate:key`</code>
*/
'key' => app_env('APP_KEY', file_get_contents(__DIR__. "/.key")),
'key' => app_env('APP_KEY'),

/**
* The Encrypt method
Expand Down
6 changes: 3 additions & 3 deletions config/storage.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,13 @@
*/
's3' => [
'driver' => 's3',
'bucket' => app_env('S3_BUCKET', 'settlements'),
'region' => app_env('S3_REGION'),
'version' => 'latest',
'credentials' => [
'key' => app_env('S3_KEY'),
'secret' => app_env('S3_SECRET'),
],
'bucket' => app_env('S3_BUCKET'),
'region' => app_env('S3_REGION'),
'version' => 'latest'
]
],
];
11 changes: 5 additions & 6 deletions phpunit.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<phpunit colors="true" bootstrap="tests/bootstrap.php" stopOnFailure="false">
<testsuite name="Application Testsuite">
<directory>tests/</directory>
</testsuite>
</phpunit>
<phpunit colors="true" bootstrap="tests/bootstrap.php">
<testsuite name="Bow Framework Application Testsuite">
<directory suffix=".php">tests/</directory>
</testsuite>
</phpunit>
58 changes: 30 additions & 28 deletions public/index.php
Original file line number Diff line number Diff line change
@@ -1,28 +1,30 @@
<?php

use App\Kernel;
use Bow\Application\Application;
use Bow\Http\Request;
use Bow\Http\Response;

// Register The Auto Loader
if (!file_exists(__DIR__."/../vendor/autoload.php")) {
die("Please install the depencencies with 'composer update'");
}

require __DIR__."/../vendor/autoload.php";

// Create kernel instance
$kernel = Kernel::configure(realpath(__DIR__.'/../config'));

// Creation of application
$app = Application::make(Request::getInstance(), Response::getInstance());

// Bind kernel to application
$app->bind($kernel);

// Load application routing
require __DIR__ . "/../routes/app.php";

// Run The Application
$app->send();
<?php

use App\Kernel;
use Bow\Application\Application;
use Bow\Http\Request;
use Bow\Http\Response;

if (file_exists(__DIR__ . '/../var/storage/maintenance.php')) {
require __DIR__ . '/../var/storage/maintenance.php';
}

// Register The Auto Loader
if (!file_exists(__DIR__ . "/../vendor/autoload.php")) {
die("Please install the depencencies with 'composer update'");
}

require __DIR__."/../vendor/autoload.php";

$app = Application::make(Request::getInstance(), Response::getInstance());

// Bind kernel to application
$app->bind(
Kernel::configure(realpath(__DIR__ . '/../config'))
);

// Load application routing
require __DIR__ . "/../routes/app.php";

// Run The Application
$app->send();

0 comments on commit 1e1cbf0

Please sign in to comment.