Skip to content

Commit 51e2371

Browse files
authored
Merge pull request #4202 from codeigniter4/develop
4.1.0 Ready code
2 parents 132b4ca + 93a942f commit 51e2371

Some content is hidden

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

60 files changed

+247
-298
lines changed

.github/workflows/test-phpunit.yml

+3-1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ on:
1212
- 'tests/**'
1313
- composer.json
1414
- spark
15+
- phpunit.xml.dist
1516
- '**.php'
1617
- phpunit.xml.dist
1718
- .github/workflows/test-phpunit.yml
@@ -26,6 +27,7 @@ on:
2627
- 'tests/**'
2728
- composer.json
2829
- spark
30+
- phpunit.xml.dist
2931
- '**.php'
3032
- phpunit.xml.dist
3133
- .github/workflows/test-phpunit.yml
@@ -40,7 +42,7 @@ jobs:
4042
strategy:
4143
fail-fast: false
4244
matrix:
43-
php-versions: ['7.2', '7.3', '7.4', '8.0']
45+
php-versions: ['7.3', '7.4', '8.0']
4446
db-platforms: ['MySQLi', 'Postgre', 'SQLite3', 'SQLSRV']
4547

4648
services:

CHANGELOG.md

+12-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,18 @@
22

33
## [Unreleased](https://github.com/codeigniter4/CodeIgniter4/tree/HEAD)
44

5-
[Full Changelog](https://github.com/codeigniter4/CodeIgniter4/compare/v4.0.5...HEAD)
5+
[Full Changelog](https://github.com/codeigniter4/CodeIgniter4/compare/v4.1.0...HEAD)
6+
7+
## [v4.1.0](https://github.com/codeigniter4/CodeIgniter4/tree/v4.1.0) (2021-01-31)
8+
9+
[Full Changelog](https://github.com/codeigniter4/CodeIgniter4/compare/v4.0.5...v4.1.0)
10+
11+
**Implemented enhancements:**
12+
13+
- Rector 0.9 fixes [\#4196](https://github.com/codeigniter4/CodeIgniter4/issues/#4196)
14+
- Cannot declare class Config\App error on running PHPUnit [\#4114](https://github.com/codeigniter4/CodeIgniter4/issues/4114)
15+
- Backfill non-optional parameters (https://github.com/codeigniter4/CodeIgniter4/pull/3938)
16+
- Change deprecated assertFileNotExists (https://github.com/codeigniter4/CodeIgniter4/pull/3862)
617

718
## [v4.0.5](https://github.com/codeigniter4/CodeIgniter4/tree/v4.0.5) (2021-01-31)
819

CONTRIBUTING.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ If you change anything that requires a change to documentation, then you will ne
4747

4848
### Compatibility
4949

50-
CodeIgniter4 requires [PHP 7.2](https://php.net/releases/7_2_0.php).
50+
CodeIgniter4 requires [PHP 7.3](https://php.net/releases/7_3_0.php).
5151

5252
### Branching
5353

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ Please read the [*Contributing to CodeIgniter*](https://github.com/codeigniter4/
8181

8282
## Server Requirements
8383

84-
PHP version 7.2 or higher is required, with the following extensions installed:
84+
PHP version 7.3 or higher is required, with the following extensions installed:
8585

8686

8787
- [intl](http://php.net/manual/en/intl.requirements.php)

Vagrantfile.dist

+3-3
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ Vagrant.configure("2") do |config|
5050
PGSQL_ROOT_PASS="password"
5151
VIRTUALHOST="localhost"
5252
CODEIGNITER_PATH="/var/www/codeigniter"
53-
PHP_VERSION=7.2
53+
PHP_VERSION=7.3
5454
PGSQL_VERSION=10
5555
#APT_PROXY="192.168.10.1:3142"
5656
@@ -164,8 +164,8 @@ Vagrant.configure("2") do |config|
164164
sed -i "s/APACHE_RUN_USER=www-data/APACHE_RUN_USER=vagrant/" /etc/apache2/envvars
165165
sed -i "s/APACHE_RUN_GROUP=www-data/APACHE_RUN_GROUP=vagrant/" /etc/apache2/envvars
166166
grep -q "Listen 81" /etc/apache2/ports.conf || sed -i "s/^Listen 80/Listen 80\\nListen 81\\nListen 82/" /etc/apache2/ports.conf
167-
sed -i "s/^display_errors = Off/display_errors = On/" /etc/php/7.2/apache2/php.ini
168-
sed -i "s/^display_startup_errors = Off/display_startup_errors = On/" /etc/php/7.2/apache2/php.ini
167+
sed -i "s/^display_errors = Off/display_errors = On/" /etc/php/7.3/apache2/php.ini
168+
sed -i "s/^display_startup_errors = Off/display_startup_errors = On/" /etc/php/7.3/apache2/php.ini
169169
170170
echo "ServerName ${VIRTUALHOST}
171171
<Directory ${CODEIGNITER_PATH}>

admin/framework/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ Please read the [*Contributing to CodeIgniter*](https://github.com/codeigniter4/
4343

4444
## Server Requirements
4545

46-
PHP version 7.2 or higher is required, with the following extensions installed:
46+
PHP version 7.3 or higher is required, with the following extensions installed:
4747

4848
- [intl](http://php.net/manual/en/intl.requirements.php)
4949
- [libcurl](http://php.net/manual/en/curl.requirements.php) if you plan to use the HTTP\CURLRequest library

admin/framework/composer.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"homepage": "https://codeigniter.com",
66
"license": "MIT",
77
"require": {
8-
"php": "^7.2 || ^8.0",
8+
"php": "^7.3||^8.0",
99
"ext-curl": "*",
1010
"ext-intl": "*",
1111
"ext-json": "*",
@@ -18,7 +18,7 @@
1818
"codeigniter4/codeigniter4-standard": "^1.0",
1919
"fakerphp/faker": "^1.9",
2020
"mikey179/vfsstream": "^1.6",
21-
"phpunit/phpunit": "^8.5",
21+
"phpunit/phpunit": "^9.1",
2222
"predis/predis": "^1.1",
2323
"squizlabs/php_codesniffer": "^3.3"
2424
},

admin/framework/phpunit.xml.dist

+30-33
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<phpunit bootstrap="system/Test/bootstrap.php"
2+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
bootstrap="system/Test/bootstrap.php"
34
backupGlobals="false"
45
colors="true"
56
convertErrorsToExceptions="true"
@@ -8,53 +9,49 @@
89
stopOnError="false"
910
stopOnFailure="false"
1011
stopOnIncomplete="false"
11-
stopOnSkipped="false">
12+
stopOnSkipped="false"
13+
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd">
14+
<coverage includeUncoveredFiles="true" processUncoveredFiles="true">
15+
<include>
16+
<directory suffix=".php">./app</directory>
17+
</include>
18+
<exclude>
19+
<directory suffix=".php">./app/Views</directory>
20+
<file>./app/Config/Routes.php</file>
21+
</exclude>
22+
<report>
23+
<clover outputFile="build/logs/clover.xml"/>
24+
<html outputDirectory="build/logs/html"/>
25+
<php outputFile="build/logs/coverage.serialized"/>
26+
<text outputFile="php://stdout" showUncoveredFiles="false"/>
27+
</report>
28+
</coverage>
1229
<testsuites>
1330
<testsuite name="App">
1431
<directory>./tests</directory>
1532
</testsuite>
1633
</testsuites>
17-
18-
<filter>
19-
<whitelist addUncoveredFilesFromWhitelist="true" processUncoveredFilesFromWhitelist="true">
20-
<directory suffix=".php">./app</directory>
21-
<exclude>
22-
<directory suffix=".php">./app/Views</directory>
23-
<file>./app/Config/Routes.php</file>
24-
</exclude>
25-
</whitelist>
26-
</filter>
27-
2834
<logging>
29-
<log type="coverage-html" target="build/logs/html"/>
30-
<log type="coverage-clover" target="build/logs/clover.xml"/>
31-
<log type="coverage-php" target="build/logs/coverage.serialized"/>
32-
<log type="coverage-text" target="php://stdout" showUncoveredFiles="false"/>
33-
<log type="testdox-html" target="build/logs/testdox.html"/>
34-
<log type="testdox-text" target="build/logs/testdox.txt"/>
35-
<log type="junit" target="build/logs/logfile.xml"/>
35+
<testdoxHtml outputFile="build/logs/testdox.html"/>
36+
<testdoxText outputFile="build/logs/testdox.txt"/>
37+
<junit outputFile="build/logs/logfile.xml"/>
3638
</logging>
37-
3839
<php>
3940
<server name="app.baseURL" value="http://example.com/"/>
40-
4141
<!-- Directory containing phpunit.xml -->
4242
<const name="HOMEPATH" value="./"/>
43-
4443
<!-- Directory containing the Paths config file -->
4544
<const name="CONFIGPATH" value="./app/Config/"/>
46-
4745
<!-- Directory containing the front controller (index.php) -->
4846
<const name="PUBLICPATH" value="./public/"/>
49-
5047
<!-- Database configuration -->
51-
<!-- <env name="database.tests.hostname" value="localhost"/> -->
52-
<!-- <env name="database.tests.database" value="tests"/> -->
53-
<!-- <env name="database.tests.username" value="tests_user"/> -->
54-
<!-- <env name="database.tests.password" value=""/> -->
55-
<!-- <env name="database.tests.DBDriver" value="MySQLi"/> -->
56-
<!-- <env name="database.tests.DBPrefix" value="tests_"/> -->
57-
<env name="database.tests.database" value=":memory:"/>
58-
<env name="database.tests.DBDriver" value="SQLite3"/>
48+
<!-- Uncomment to provide your own database for testing
49+
<env name="database.tests.hostname" value="localhost"/>
50+
<env name="database.tests.database" value="tests"/>
51+
<env name="database.tests.username" value="tests_user"/>
52+
<env name="database.tests.password" value=""/>
53+
<env name="database.tests.DBDriver" value="MySQLi"/>
54+
<env name="database.tests.DBPrefix" value="tests_"/>
55+
-->
5956
</php>
6057
</phpunit>

admin/module/composer.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
"homepage": "https://codeigniter.com",
55
"license": "MIT",
66
"require": {
7-
"php": "^7.2 || ^8.0"
7+
"php": "^7.3||^8.0"
88
},
99
"require-dev": {
1010
"codeigniter4/codeigniter4": "dev-develop",
1111
"fakerphp/faker": "^1.9",
1212
"mikey179/vfsstream": "^1.6",
13-
"phpunit/phpunit": "^8.5"
13+
"phpunit/phpunit": "^9.1"
1414
},
1515
"suggest": {
1616
"ext-fileinfo": "Improves mime type detection for files"

admin/module/phpunit.xml.dist

+30-33
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<phpunit bootstrap="vendor/codeigniter4/framework/system/Test/bootstrap.php"
2+
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
bootstrap="vendor/codeigniter4/framework/system/Test/bootstrap.php"
34
backupGlobals="false"
45
colors="true"
56
convertErrorsToExceptions="true"
@@ -8,53 +9,49 @@
89
stopOnError="false"
910
stopOnFailure="false"
1011
stopOnIncomplete="false"
11-
stopOnSkipped="false">
12+
stopOnSkipped="false"
13+
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd">
14+
<coverage includeUncoveredFiles="true" processUncoveredFiles="true">
15+
<include>
16+
<directory suffix=".php">./src</directory>
17+
</include>
18+
<exclude>
19+
<directory suffix=".php">./src/Views</directory>
20+
<file>./src/Config/Routes.php</file>
21+
</exclude>
22+
<report>
23+
<clover outputFile="build/logs/clover.xml"/>
24+
<html outputDirectory="build/logs/html"/>
25+
<php outputFile="build/logs/coverage.serialized"/>
26+
<text outputFile="php://stdout" showUncoveredFiles="false"/>
27+
</report>
28+
</coverage>
1229
<testsuites>
1330
<testsuite name="App">
1431
<directory>./tests</directory>
1532
</testsuite>
1633
</testsuites>
17-
18-
<filter>
19-
<whitelist addUncoveredFilesFromWhitelist="true" processUncoveredFilesFromWhitelist="true">
20-
<directory suffix=".php">./src</directory>
21-
<exclude>
22-
<directory suffix=".php">./src/Views</directory>
23-
<file>./src/Config/Routes.php</file>
24-
</exclude>
25-
</whitelist>
26-
</filter>
27-
2834
<logging>
29-
<log type="coverage-html" target="build/logs/html"/>
30-
<log type="coverage-clover" target="build/logs/clover.xml"/>
31-
<log type="coverage-php" target="build/logs/coverage.serialized"/>
32-
<log type="coverage-text" target="php://stdout" showUncoveredFiles="false"/>
33-
<log type="testdox-html" target="build/logs/testdox.html"/>
34-
<log type="testdox-text" target="build/logs/testdox.txt"/>
35-
<log type="junit" target="build/logs/logfile.xml"/>
35+
<testdoxHtml outputFile="build/logs/testdox.html"/>
36+
<testdoxText outputFile="build/logs/testdox.txt"/>
37+
<junit outputFile="build/logs/logfile.xml"/>
3638
</logging>
37-
3839
<php>
3940
<server name="app.baseURL" value="http://example.com/"/>
40-
4141
<!-- Directory containing phpunit.xml -->
4242
<const name="HOMEPATH" value="./"/>
43-
4443
<!-- Directory containing the Paths config file -->
4544
<const name="CONFIGPATH" value="./vendor/codeigniter4/framework/app/Config/"/>
46-
4745
<!-- Directory containing the front controller (index.php) -->
4846
<const name="PUBLICPATH" value="./vendor/codeigniter4/framework/public/"/>
49-
5047
<!-- Database configuration -->
51-
<!-- <env name="database.tests.hostname" value="localhost"/> -->
52-
<!-- <env name="database.tests.database" value="tests"/> -->
53-
<!-- <env name="database.tests.username" value="tests_user"/> -->
54-
<!-- <env name="database.tests.password" value=""/> -->
55-
<!-- <env name="database.tests.DBDriver" value="MySQLi"/> -->
56-
<!-- <env name="database.tests.DBPrefix" value="tests_"/> -->
57-
<env name="database.tests.database" value=":memory:"/>
58-
<env name="database.tests.DBDriver" value="SQLite3"/>
48+
<!-- Uncomment to provide your own database for testing
49+
<env name="database.tests.hostname" value="localhost"/>
50+
<env name="database.tests.database" value="tests"/>
51+
<env name="database.tests.username" value="tests_user"/>
52+
<env name="database.tests.password" value=""/>
53+
<env name="database.tests.DBDriver" value="MySQLi"/>
54+
<env name="database.tests.DBPrefix" value="tests_"/>
55+
-->
5956
</php>
6057
</phpunit>

admin/starter/.github/workflows/phpunit.yml

+5-5
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111

1212
strategy:
1313
matrix:
14-
php-versions: ['7.2', '7.3', '7.4']
14+
php-versions: ['7.3', '7.4']
1515

1616
runs-on: ubuntu-latest
1717

@@ -22,7 +22,7 @@ jobs:
2222
uses: actions/checkout@v2
2323

2424
- name: Setup PHP, with composer and extensions
25-
uses: shivammathur/setup-php@master
25+
uses: shivammathur/setup-php@v2
2626
with:
2727
php-version: ${{ matrix.php-versions }}
2828
tools: composer, pecl, phpunit
@@ -34,14 +34,14 @@ jobs:
3434
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
3535

3636
- name: Cache composer dependencies
37-
uses: actions/cache@v1
37+
uses: actions/cache@v2
3838
with:
3939
path: ${{ steps.composer-cache.outputs.dir }}
40-
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
40+
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
4141
restore-keys: ${{ runner.os }}-composer-
4242

4343
- name: Install dependencies
44-
run: composer install --no-progress --no-suggest --no-interaction --prefer-dist --optimize-autoloader
44+
run: composer install --no-progress --no-interaction --prefer-dist --optimize-autoloader
4545
# To prevent rate limiting you may need to supply an OAuth token in Settings > Secrets
4646
# env:
4747
# https://getcomposer.org/doc/articles/troubleshooting.md#api-rate-limit-and-oauth-tokens

admin/starter/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ Problems with it can be raised on our forum, or as issues in the main repository
5050

5151
## Server Requirements
5252

53-
PHP version 7.2 or higher is required, with the following extensions installed:
53+
PHP version 7.3 or higher is required, with the following extensions installed:
5454

5555
- [intl](http://php.net/manual/en/intl.requirements.php)
5656
- [libcurl](http://php.net/manual/en/curl.requirements.php) if you plan to use the HTTP\CURLRequest library

admin/starter/composer.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@
55
"homepage": "https://codeigniter.com",
66
"license": "MIT",
77
"require": {
8-
"php": "^7.2 || ^8.0",
8+
"php": "^7.3||^8.0",
99
"codeigniter4/framework": "^4"
1010
},
1111
"require-dev": {
1212
"fakerphp/faker": "^1.9",
1313
"mikey179/vfsstream": "^1.6",
14-
"phpunit/phpunit": "^8.5"
14+
"phpunit/phpunit": "^9.1"
1515
},
1616
"suggest": {
1717
"ext-fileinfo": "Improves mime type detection for files"

0 commit comments

Comments
 (0)