Skip to content

Commit 18bf776

Browse files
committed
Release v4.0.3
1 parent 21d182b commit 18bf776

Some content is hidden

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

72 files changed

+72
-1319
lines changed

.github/workflows/phpunit.yml

+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: PHPUnit
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- develop
7+
8+
jobs:
9+
main:
10+
name: Build and test
11+
12+
strategy:
13+
matrix:
14+
php-versions: ['7.2', '7.3', '7.4']
15+
16+
runs-on: ubuntu-latest
17+
18+
if: "!contains(github.event.head_commit.message, '[ci skip]')"
19+
20+
steps:
21+
- name: Checkout
22+
uses: actions/checkout@v2
23+
24+
- name: Setup PHP, with composer and extensions
25+
uses: shivammathur/setup-php@master
26+
with:
27+
php-version: ${{ matrix.php-versions }}
28+
tools: composer, pecl, phpunit
29+
extensions: intl, json, mbstring, mysqlnd, xdebug, xml, sqlite3
30+
coverage: xdebug
31+
32+
- name: Get composer cache directory
33+
id: composer-cache
34+
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
35+
36+
- name: Cache composer dependencies
37+
uses: actions/cache@v1
38+
with:
39+
path: ${{ steps.composer-cache.outputs.dir }}
40+
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
41+
restore-keys: ${{ runner.os }}-composer-
42+
43+
- name: Install dependencies
44+
run: composer install --no-progress --no-suggest --no-interaction --prefer-dist --optimize-autoloader
45+
# To prevent rate limiting you may need to supply an OAuth token in Settings > Secrets
46+
# env:
47+
# https://getcomposer.org/doc/articles/troubleshooting.md#api-rate-limit-and-oauth-tokens
48+
# COMPOSER_AUTH: ${{ secrets.COMPOSER_AUTH }}
49+
50+
- name: Test with phpunit
51+
run: vendor/bin/phpunit --coverage-text

LICENSE

-21
This file was deleted.

README.md

-2
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ This repository holds a composer-installable app starter.
99
It has been built from the
1010
[development repository](https://github.com/codeigniter4/CodeIgniter4).
1111

12-
**This is pre-release code and should not be used in production sites.**
13-
1412
More information about the plans for version 4 can be found in [the announcement](http://forum.codeigniter.com/thread-62615.html) on the forums.
1513

1614
The user guide corresponding to this version of the framework can be found

app/Config/Kint.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php namespace Config;
22

3-
use Kint\Renderer\Renderer;
43
use CodeIgniter\Config\BaseConfig;
4+
use Kint\Renderer\Renderer;
55

66
class Kint extends BaseConfig
77
{

app/Config/Logger.php

+8-9
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,6 @@ class Logger extends BaseConfig
3434
*/
3535
public $threshold = 3;
3636

37-
/*
38-
|--------------------------------------------------------------------------
39-
| Error Logging Directory Path
40-
|--------------------------------------------------------------------------
41-
| By default, logs are written to WRITEPATH . 'logs/'
42-
| Specify a different destination here, if desired.
43-
*/
44-
public $path = '';
45-
4637
/*
4738
|--------------------------------------------------------------------------
4839
| Date Format for Logs
@@ -116,6 +107,14 @@ class Logger extends BaseConfig
116107
* integer notation (i.e. 0700, 0644, etc.)
117108
*/
118109
'filePermissions' => 0644,
110+
111+
/*
112+
* Logging Directory Path
113+
*
114+
* By default, logs are written to WRITEPATH . 'logs/'
115+
* Specify a different destination here, if desired.
116+
*/
117+
'path' => '',
119118
],
120119

121120
/**

app/Config/Mimes.php

+1-5
Original file line numberDiff line numberDiff line change
@@ -516,11 +516,7 @@ public static function guessExtensionFromType(string $type, ?string $proposed_ex
516516

517517
foreach (static::$mimes as $ext => $types)
518518
{
519-
if (is_string($types) && $types === $type)
520-
{
521-
return $ext;
522-
}
523-
else if (is_array($types) && in_array($type, $types))
519+
if ((is_string($types) && $types === $type) || (is_array($types) && in_array($type, $types)))
524520
{
525521
return $ext;
526522
}

app/Config/Routes.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?php namespace Config;
22

33
// Create a new instance of our RouteCollection class.
4-
$routes = Services::routes(true);
4+
$routes = Services::routes();
55

66
// Load the system's routing file first, so that the app and ENVIRONMENT
77
// can override as needed.

app/Config/Services.php

-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
<?php namespace Config;
22

33
use CodeIgniter\Config\Services as CoreServices;
4-
use CodeIgniter\Config\BaseConfig;
54

65
require_once SYSTEMPATH . 'Config/Services.php';
76

app/Views/errors/html/error_exception.php

+5-5
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@
132132
<?php if (empty($GLOBALS[$var]) || ! is_array($GLOBALS[$var]))
133133
{
134134
continue;
135-
} ?>
135+
} ?>
136136

137137
<h3>$<?= $var ?></h3>
138138

@@ -235,7 +235,7 @@
235235
<?php if (empty($GLOBALS[$var]) || ! is_array($GLOBALS[$var]))
236236
{
237237
continue;
238-
} ?>
238+
} ?>
239239

240240
<?php $empty = false; ?>
241241

@@ -287,15 +287,15 @@
287287
</tr>
288288
</thead>
289289
<tbody>
290-
<?php foreach ($headers as $name => $value) : ?>
290+
<?php foreach ($headers as $value) : ?>
291291
<?php if (empty($value))
292292
{
293293
continue;
294-
} ?>
294+
} ?>
295295
<?php if (! is_array($value))
296296
{
297297
$value = [$value];
298-
} ?>
298+
} ?>
299299
<?php foreach ($value as $h) : ?>
300300
<tr>
301301
<td><?= esc($h->getName(), 'html') ?></td>

builds

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env php
22
<?php
33

4-
define('LATEST_RELEASE', '^4@rc');
4+
define('LATEST_RELEASE', '^4.0');
55
define('GITHUB_URL', 'https://github.com/codeigniter4/codeigniter4');
66

77
/*
@@ -41,6 +41,7 @@ if (is_file($file))
4141
{
4242
// Set 'minimum-stability'
4343
$array['minimum-stability'] = 'dev';
44+
$array['prefer-stable'] = true;
4445

4546
// Make sure the repo is configured
4647
if (! isset($array['repositories']))
@@ -72,7 +73,7 @@ if (is_file($file))
7273
$array['require']['codeigniter4/codeigniter4'] = 'dev-develop';
7374
unset($array['require']['codeigniter4/framework']);
7475
}
75-
76+
7677
// Release
7778
else
7879
{

contributing.md

-94
This file was deleted.

public/index.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
// Location of the Paths config file.
1515
// This is the line that might need to be changed, depending on your folder structure.
16-
$pathsPath = FCPATH . '../app/Config/Paths.php';
16+
$pathsPath = realpath(FCPATH . '../app/Config/Paths.php');
1717
// ^^^ Change this if you move your application folder
1818

1919
/*

tests/_support/Autoloader/UnnamespacedClass.php

-5
This file was deleted.

tests/_support/Commands/AbstractInfo.php

-13
This file was deleted.

tests/_support/Commands/AppInfo.php

-36
This file was deleted.

tests/_support/Config/BadRegistrar.php

-18
This file was deleted.

0 commit comments

Comments
 (0)