Skip to content

Commit

Permalink
Merge pull request #4202 from codeigniter4/develop
Browse files Browse the repository at this point in the history
4.1.0 Ready code
  • Loading branch information
MGatner authored Feb 1, 2021
2 parents 132b4ca + 93a942f commit 51e2371
Show file tree
Hide file tree
Showing 60 changed files with 247 additions and 298 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/test-phpunit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ on:
- 'tests/**'
- composer.json
- spark
- phpunit.xml.dist
- '**.php'
- phpunit.xml.dist
- .github/workflows/test-phpunit.yml
Expand All @@ -26,6 +27,7 @@ on:
- 'tests/**'
- composer.json
- spark
- phpunit.xml.dist
- '**.php'
- phpunit.xml.dist
- .github/workflows/test-phpunit.yml
Expand All @@ -40,7 +42,7 @@ jobs:
strategy:
fail-fast: false
matrix:
php-versions: ['7.2', '7.3', '7.4', '8.0']
php-versions: ['7.3', '7.4', '8.0']
db-platforms: ['MySQLi', 'Postgre', 'SQLite3', 'SQLSRV']

services:
Expand Down
13 changes: 12 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,18 @@

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

[Full Changelog](https://github.com/codeigniter4/CodeIgniter4/compare/v4.0.5...HEAD)
[Full Changelog](https://github.com/codeigniter4/CodeIgniter4/compare/v4.1.0...HEAD)

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

[Full Changelog](https://github.com/codeigniter4/CodeIgniter4/compare/v4.0.5...v4.1.0)

**Implemented enhancements:**

- Rector 0.9 fixes [\#4196](https://github.com/codeigniter4/CodeIgniter4/issues/#4196)
- Cannot declare class Config\App error on running PHPUnit [\#4114](https://github.com/codeigniter4/CodeIgniter4/issues/4114)
- Backfill non-optional parameters (https://github.com/codeigniter4/CodeIgniter4/pull/3938)
- Change deprecated assertFileNotExists (https://github.com/codeigniter4/CodeIgniter4/pull/3862)

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

Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ If you change anything that requires a change to documentation, then you will ne

### Compatibility

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

### Branching

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ Please read the [*Contributing to CodeIgniter*](https://github.com/codeigniter4/

## Server Requirements

PHP version 7.2 or higher is required, with the following extensions installed:
PHP version 7.3 or higher is required, with the following extensions installed:


- [intl](http://php.net/manual/en/intl.requirements.php)
Expand Down
6 changes: 3 additions & 3 deletions Vagrantfile.dist
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ Vagrant.configure("2") do |config|
PGSQL_ROOT_PASS="password"
VIRTUALHOST="localhost"
CODEIGNITER_PATH="/var/www/codeigniter"
PHP_VERSION=7.2
PHP_VERSION=7.3
PGSQL_VERSION=10
#APT_PROXY="192.168.10.1:3142"
Expand Down Expand Up @@ -164,8 +164,8 @@ Vagrant.configure("2") do |config|
sed -i "s/APACHE_RUN_USER=www-data/APACHE_RUN_USER=vagrant/" /etc/apache2/envvars
sed -i "s/APACHE_RUN_GROUP=www-data/APACHE_RUN_GROUP=vagrant/" /etc/apache2/envvars
grep -q "Listen 81" /etc/apache2/ports.conf || sed -i "s/^Listen 80/Listen 80\\nListen 81\\nListen 82/" /etc/apache2/ports.conf
sed -i "s/^display_errors = Off/display_errors = On/" /etc/php/7.2/apache2/php.ini
sed -i "s/^display_startup_errors = Off/display_startup_errors = On/" /etc/php/7.2/apache2/php.ini
sed -i "s/^display_errors = Off/display_errors = On/" /etc/php/7.3/apache2/php.ini
sed -i "s/^display_startup_errors = Off/display_startup_errors = On/" /etc/php/7.3/apache2/php.ini
echo "ServerName ${VIRTUALHOST}
<Directory ${CODEIGNITER_PATH}>
Expand Down
2 changes: 1 addition & 1 deletion admin/framework/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ Please read the [*Contributing to CodeIgniter*](https://github.com/codeigniter4/

## Server Requirements

PHP version 7.2 or higher is required, with the following extensions installed:
PHP version 7.3 or higher is required, with the following extensions installed:

- [intl](http://php.net/manual/en/intl.requirements.php)
- [libcurl](http://php.net/manual/en/curl.requirements.php) if you plan to use the HTTP\CURLRequest library
Expand Down
4 changes: 2 additions & 2 deletions admin/framework/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"homepage": "https://codeigniter.com",
"license": "MIT",
"require": {
"php": "^7.2 || ^8.0",
"php": "^7.3||^8.0",
"ext-curl": "*",
"ext-intl": "*",
"ext-json": "*",
Expand All @@ -18,7 +18,7 @@
"codeigniter4/codeigniter4-standard": "^1.0",
"fakerphp/faker": "^1.9",
"mikey179/vfsstream": "^1.6",
"phpunit/phpunit": "^8.5",
"phpunit/phpunit": "^9.1",
"predis/predis": "^1.1",
"squizlabs/php_codesniffer": "^3.3"
},
Expand Down
63 changes: 30 additions & 33 deletions admin/framework/phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit bootstrap="system/Test/bootstrap.php"
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
bootstrap="system/Test/bootstrap.php"
backupGlobals="false"
colors="true"
convertErrorsToExceptions="true"
Expand All @@ -8,53 +9,49 @@
stopOnError="false"
stopOnFailure="false"
stopOnIncomplete="false"
stopOnSkipped="false">
stopOnSkipped="false"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd">
<coverage includeUncoveredFiles="true" processUncoveredFiles="true">
<include>
<directory suffix=".php">./app</directory>
</include>
<exclude>
<directory suffix=".php">./app/Views</directory>
<file>./app/Config/Routes.php</file>
</exclude>
<report>
<clover outputFile="build/logs/clover.xml"/>
<html outputDirectory="build/logs/html"/>
<php outputFile="build/logs/coverage.serialized"/>
<text outputFile="php://stdout" showUncoveredFiles="false"/>
</report>
</coverage>
<testsuites>
<testsuite name="App">
<directory>./tests</directory>
</testsuite>
</testsuites>

<filter>
<whitelist addUncoveredFilesFromWhitelist="true" processUncoveredFilesFromWhitelist="true">
<directory suffix=".php">./app</directory>
<exclude>
<directory suffix=".php">./app/Views</directory>
<file>./app/Config/Routes.php</file>
</exclude>
</whitelist>
</filter>

<logging>
<log type="coverage-html" target="build/logs/html"/>
<log type="coverage-clover" target="build/logs/clover.xml"/>
<log type="coverage-php" target="build/logs/coverage.serialized"/>
<log type="coverage-text" target="php://stdout" showUncoveredFiles="false"/>
<log type="testdox-html" target="build/logs/testdox.html"/>
<log type="testdox-text" target="build/logs/testdox.txt"/>
<log type="junit" target="build/logs/logfile.xml"/>
<testdoxHtml outputFile="build/logs/testdox.html"/>
<testdoxText outputFile="build/logs/testdox.txt"/>
<junit outputFile="build/logs/logfile.xml"/>
</logging>

<php>
<server name="app.baseURL" value="http://example.com/"/>

<!-- Directory containing phpunit.xml -->
<const name="HOMEPATH" value="./"/>

<!-- Directory containing the Paths config file -->
<const name="CONFIGPATH" value="./app/Config/"/>

<!-- Directory containing the front controller (index.php) -->
<const name="PUBLICPATH" value="./public/"/>

<!-- Database configuration -->
<!-- <env name="database.tests.hostname" value="localhost"/> -->
<!-- <env name="database.tests.database" value="tests"/> -->
<!-- <env name="database.tests.username" value="tests_user"/> -->
<!-- <env name="database.tests.password" value=""/> -->
<!-- <env name="database.tests.DBDriver" value="MySQLi"/> -->
<!-- <env name="database.tests.DBPrefix" value="tests_"/> -->
<env name="database.tests.database" value=":memory:"/>
<env name="database.tests.DBDriver" value="SQLite3"/>
<!-- Uncomment to provide your own database for testing
<env name="database.tests.hostname" value="localhost"/>
<env name="database.tests.database" value="tests"/>
<env name="database.tests.username" value="tests_user"/>
<env name="database.tests.password" value=""/>
<env name="database.tests.DBDriver" value="MySQLi"/>
<env name="database.tests.DBPrefix" value="tests_"/>
-->
</php>
</phpunit>
4 changes: 2 additions & 2 deletions admin/module/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
"homepage": "https://codeigniter.com",
"license": "MIT",
"require": {
"php": "^7.2 || ^8.0"
"php": "^7.3||^8.0"
},
"require-dev": {
"codeigniter4/codeigniter4": "dev-develop",
"fakerphp/faker": "^1.9",
"mikey179/vfsstream": "^1.6",
"phpunit/phpunit": "^8.5"
"phpunit/phpunit": "^9.1"
},
"suggest": {
"ext-fileinfo": "Improves mime type detection for files"
Expand Down
63 changes: 30 additions & 33 deletions admin/module/phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit bootstrap="vendor/codeigniter4/framework/system/Test/bootstrap.php"
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
bootstrap="vendor/codeigniter4/framework/system/Test/bootstrap.php"
backupGlobals="false"
colors="true"
convertErrorsToExceptions="true"
Expand All @@ -8,53 +9,49 @@
stopOnError="false"
stopOnFailure="false"
stopOnIncomplete="false"
stopOnSkipped="false">
stopOnSkipped="false"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd">
<coverage includeUncoveredFiles="true" processUncoveredFiles="true">
<include>
<directory suffix=".php">./src</directory>
</include>
<exclude>
<directory suffix=".php">./src/Views</directory>
<file>./src/Config/Routes.php</file>
</exclude>
<report>
<clover outputFile="build/logs/clover.xml"/>
<html outputDirectory="build/logs/html"/>
<php outputFile="build/logs/coverage.serialized"/>
<text outputFile="php://stdout" showUncoveredFiles="false"/>
</report>
</coverage>
<testsuites>
<testsuite name="App">
<directory>./tests</directory>
</testsuite>
</testsuites>

<filter>
<whitelist addUncoveredFilesFromWhitelist="true" processUncoveredFilesFromWhitelist="true">
<directory suffix=".php">./src</directory>
<exclude>
<directory suffix=".php">./src/Views</directory>
<file>./src/Config/Routes.php</file>
</exclude>
</whitelist>
</filter>

<logging>
<log type="coverage-html" target="build/logs/html"/>
<log type="coverage-clover" target="build/logs/clover.xml"/>
<log type="coverage-php" target="build/logs/coverage.serialized"/>
<log type="coverage-text" target="php://stdout" showUncoveredFiles="false"/>
<log type="testdox-html" target="build/logs/testdox.html"/>
<log type="testdox-text" target="build/logs/testdox.txt"/>
<log type="junit" target="build/logs/logfile.xml"/>
<testdoxHtml outputFile="build/logs/testdox.html"/>
<testdoxText outputFile="build/logs/testdox.txt"/>
<junit outputFile="build/logs/logfile.xml"/>
</logging>

<php>
<server name="app.baseURL" value="http://example.com/"/>

<!-- Directory containing phpunit.xml -->
<const name="HOMEPATH" value="./"/>

<!-- Directory containing the Paths config file -->
<const name="CONFIGPATH" value="./vendor/codeigniter4/framework/app/Config/"/>

<!-- Directory containing the front controller (index.php) -->
<const name="PUBLICPATH" value="./vendor/codeigniter4/framework/public/"/>

<!-- Database configuration -->
<!-- <env name="database.tests.hostname" value="localhost"/> -->
<!-- <env name="database.tests.database" value="tests"/> -->
<!-- <env name="database.tests.username" value="tests_user"/> -->
<!-- <env name="database.tests.password" value=""/> -->
<!-- <env name="database.tests.DBDriver" value="MySQLi"/> -->
<!-- <env name="database.tests.DBPrefix" value="tests_"/> -->
<env name="database.tests.database" value=":memory:"/>
<env name="database.tests.DBDriver" value="SQLite3"/>
<!-- Uncomment to provide your own database for testing
<env name="database.tests.hostname" value="localhost"/>
<env name="database.tests.database" value="tests"/>
<env name="database.tests.username" value="tests_user"/>
<env name="database.tests.password" value=""/>
<env name="database.tests.DBDriver" value="MySQLi"/>
<env name="database.tests.DBPrefix" value="tests_"/>
-->
</php>
</phpunit>
10 changes: 5 additions & 5 deletions admin/starter/.github/workflows/phpunit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:

strategy:
matrix:
php-versions: ['7.2', '7.3', '7.4']
php-versions: ['7.3', '7.4']

runs-on: ubuntu-latest

Expand All @@ -22,7 +22,7 @@ jobs:
uses: actions/checkout@v2

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

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

- name: Install dependencies
run: composer install --no-progress --no-suggest --no-interaction --prefer-dist --optimize-autoloader
run: composer install --no-progress --no-interaction --prefer-dist --optimize-autoloader
# To prevent rate limiting you may need to supply an OAuth token in Settings > Secrets
# env:
# https://getcomposer.org/doc/articles/troubleshooting.md#api-rate-limit-and-oauth-tokens
Expand Down
2 changes: 1 addition & 1 deletion admin/starter/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ Problems with it can be raised on our forum, or as issues in the main repository

## Server Requirements

PHP version 7.2 or higher is required, with the following extensions installed:
PHP version 7.3 or higher is required, with the following extensions installed:

- [intl](http://php.net/manual/en/intl.requirements.php)
- [libcurl](http://php.net/manual/en/curl.requirements.php) if you plan to use the HTTP\CURLRequest library
Expand Down
4 changes: 2 additions & 2 deletions admin/starter/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
"homepage": "https://codeigniter.com",
"license": "MIT",
"require": {
"php": "^7.2 || ^8.0",
"php": "^7.3||^8.0",
"codeigniter4/framework": "^4"
},
"require-dev": {
"fakerphp/faker": "^1.9",
"mikey179/vfsstream": "^1.6",
"phpunit/phpunit": "^8.5"
"phpunit/phpunit": "^9.1"
},
"suggest": {
"ext-fileinfo": "Improves mime type detection for files"
Expand Down
Loading

0 comments on commit 51e2371

Please sign in to comment.