Skip to content

Commit cbd3099

Browse files
committed
Release 4.0.0-rc.2
1 parent c90c996 commit cbd3099

38 files changed

+798
-209
lines changed

app/Config/Boot/development.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
| painful debugging.
99
*/
1010
error_reporting(-1);
11-
ini_set('display_errors', 1);
11+
ini_set('display_errors', '1');
1212

1313
/*
1414
|--------------------------------------------------------------------------

app/Config/Boot/production.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
| Don't show ANY in production environments. Instead, let the system catch
88
| it and display a generic error message.
99
*/
10-
ini_set('display_errors', 0);
10+
ini_set('display_errors', '0');
1111
error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED & ~E_STRICT & ~E_USER_NOTICE & ~E_USER_DEPRECATED);
1212

1313
/*

app/Config/Boot/testing.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
| painful debugging.
1010
*/
1111
error_reporting(-1);
12-
ini_set('display_errors', 1);
12+
ini_set('display_errors', '1');
1313

1414
/*
1515
|--------------------------------------------------------------------------

app/Config/Constants.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
// NOTE: changing this will require manually modifying the
1212
// existing namespaces of App\* namespaced-classes.
1313
//
14-
define('APP_NAMESPACE', 'App');
14+
defined('APP_NAMESPACE') || define('APP_NAMESPACE', 'App');
1515

1616
/*
1717
|--------------------------------------------------------------------------
@@ -21,7 +21,7 @@
2121
| The path that Composer's autoload file is expected to live. By default,
2222
| the vendor folder is in the Root directory, but you can customize that here.
2323
*/
24-
define('COMPOSER_PATH', ROOTPATH . 'vendor/autoload.php');
24+
defined('COMPOSER_PATH') || define('COMPOSER_PATH', ROOTPATH . 'vendor/autoload.php');
2525

2626
/*
2727
|--------------------------------------------------------------------------

app/Config/Paths.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,6 @@ class Paths
5656
* ---------------------------------------------------------------
5757
*
5858
* This variable must contain the name of your "tests" directory.
59-
* The writable directory allows you to group all directories that
60-
* need write permission to a single place that can be tucked away
61-
* for maximum security, keeping it out of the app and/or
62-
* system directories.
6359
*/
6460
public $testsDirectory = __DIR__ . '/../../tests';
6561

system/CLI/BaseCommand.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,20 @@ public function __get(string $key)
190190

191191
//--------------------------------------------------------------------
192192

193+
/**
194+
* Makes it simple to check our protected properties.
195+
*
196+
* @param string $key
197+
*
198+
* @return bool
199+
*/
200+
public function __isset(string $key): bool
201+
{
202+
return isset($this->$key);
203+
}
204+
205+
//--------------------------------------------------------------------
206+
193207
/**
194208
* show Help include (usage,arguments,description,options)
195209
*/

system/CodeIgniter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ class CodeIgniter
6565
/**
6666
* The current version of CodeIgniter Framework
6767
*/
68-
const CI_VERSION = '4.0.0-rc.1';
68+
const CI_VERSION = '4.0.0-rc.2';
6969

7070
/**
7171
* App startup time.

system/Common.php

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -433,16 +433,16 @@ function single_service(string $name, ...$params)
433433
if (! function_exists('lang'))
434434
{
435435
/**
436-
* A convenience method to translate a string and format it
437-
* with the intl extension's MessageFormatter object.
436+
* A convenience method to translate a string or array of them and format
437+
* the result with the intl extension's MessageFormatter.
438438
*
439-
* @param string $line
440-
* @param array $args
441-
* @param string $locale
439+
* @param string|[] $line
440+
* @param array $args
441+
* @param string $locale
442442
*
443443
* @return string
444444
*/
445-
function lang(string $line, array $args = [], string $locale = null): string
445+
function lang(string $line, array $args = [], string $locale = null)
446446
{
447447
return Services::language($locale)
448448
->getLine($line, $args);
@@ -1079,7 +1079,22 @@ function function_usable(string $function_name): bool
10791079
*/
10801080
function dd(...$vars)
10811081
{
1082+
Kint::$aliases[] = 'dd';
10821083
Kint::dump(...$vars);
10831084
exit;
10841085
}
10851086
}
1087+
1088+
//--------------------------------------------------------------------
1089+
1090+
if (! function_exists('trace'))
1091+
{
1092+
/**
1093+
* Provides a backtrace to the current execution point, from Kint.
1094+
*/
1095+
function trace()
1096+
{
1097+
Kint::$aliases[] = 'trace';
1098+
Kint::trace();
1099+
}
1100+
}

0 commit comments

Comments
 (0)