Skip to content

Commit

Permalink
Merge branch 'develop' into feature-cli-added-prompt-select
Browse files Browse the repository at this point in the history
Signed-off-by: Wolf Wortmann <[email protected]>

# Conflicts:
#	system/CLI/CLI.php
  • Loading branch information
element-code committed Feb 2, 2021
2 parents 41e749b + 3f94707 commit 9edf576
Show file tree
Hide file tree
Showing 517 changed files with 19,833 additions and 15,859 deletions.
12 changes: 10 additions & 2 deletions .github/workflows/test-phpstan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,26 +10,34 @@ on:
paths:
- 'app/**'
- 'system/**'
- composer.json
- phpstan.neon.dist
push:
branches:
- 'develop'
- '4.*'
paths:
- 'app/**'
- 'system/**'
- composer.json
- phpstan.neon.dist

jobs:
build:
name: Analyze code (PHPStan)
name: PHP ${{ matrix.php-versions }} Static Analysis
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php-versions: ['7.4', '8.0']
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '7.4'
php-version: ${{ matrix.php-versions }}
extensions: intl

- name: Use latest Composer
Expand Down
12 changes: 8 additions & 4 deletions .github/workflows/test-phpunit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ on:
- 'tests/**'
- composer.json
- spark
- phpunit.xml.dist
- '**.php'
- phpunit.xml.dist
- .github/workflows/test-phpunit.yml
pull_request:
branches:
Expand All @@ -25,7 +27,9 @@ on:
- 'tests/**'
- composer.json
- spark
- phpunit.xml.dist
- '**.php'
- phpunit.xml.dist
- .github/workflows/test-phpunit.yml

jobs:
Expand All @@ -38,8 +42,8 @@ jobs:
strategy:
fail-fast: false
matrix:
php-versions: ['7.2', '7.3', '7.4']
db-platforms: ['MySQLi', 'Postgre', 'SQLite3', 'Sqlsrv']
php-versions: ['7.3', '7.4', '8.0']
db-platforms: ['MySQLi', 'Postgre', 'SQLite3', 'SQLSRV']

services:
mysql:
Expand Down Expand Up @@ -75,7 +79,7 @@ jobs:

steps:
- name: Create database for MSSQL Server
if: ${{ matrix.db-platforms == 'Sqlsrv'}}
if: ${{ matrix.db-platforms == 'SQLSRV'}}
run: sqlcmd -S localhost -U sa -P 1Secure*Password1 -Q "CREATE DATABASE test"

- name: Checkout
Expand All @@ -86,7 +90,7 @@ jobs:
with:
php-version: ${{ matrix.php-versions }}
tools: composer, pecl
extensions: imagick, sqlsrv
extensions: imagick, sqlsrv-beta
coverage: xdebug
env:
update: true
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/test-rector.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ on:
- 'app/**'
- 'system/**'
- '.github/workflows/test-rector.yml'
- composer.json
- 'rector.php'
push:
branches:
Expand All @@ -20,6 +21,7 @@ on:
- 'app/**'
- 'system/**'
- '.github/workflows/test-rector.yml'
- composer.json
- 'rector.php'

jobs:
Expand Down
376 changes: 375 additions & 1 deletion CHANGELOG.md

Large diffs are not rendered by default.

75 changes: 57 additions & 18 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,19 @@
# Contributing to CodeIgniter4


## Contributions

We expect all contributions to conform to our [style guide](https://github.com/codeigniter4/CodeIgniter4/blob/develop/contributing/styleguide.rst), be commented (inside the PHP source files),
be documented (in the [user guide](https://codeigniter4.github.io/userguide/)), and unit tested (in the [test folder](https://github.com/codeigniter4/CodeIgniter4/tree/develop/tests)).
We expect all contributions to conform to our
[style guide](https://github.com/codeigniter4/CodeIgniter4/blob/develop/contributing/styleguide.rst),
be commented (inside the PHP source files), be documented (in the
[user guide](https://codeigniter4.github.io/userguide/)), and unit tested (in
the [test folder](https://github.com/codeigniter4/CodeIgniter4/tree/develop/tests)).
There is a [Contributing to CodeIgniter](./contributing/README.rst) section in the repository which describes the contribution process; this page is an overview.

Note, we expect all code changes or bug-fixes to be accompanied by one or more tests added to our test suite to prove the code works. If pull requests are not accompanied by relevant tests, they will likely be closed. Since we are a team of volunteers, we don't have any more time to work on the framework than you do. Please make it as painless for your contributions to be included as possible. If you need help with getting tests running on your local machines, ask for help on the forums. We would be happy to help out.
Note, we expect all code changes or bug-fixes to be accompanied by one or more tests added to our test suite
to prove the code works. If pull requests are not accompanied by relevant tests, they will likely be closed.
Since we are a team of volunteers, we don't have any more time to work on the framework than you do. Please
make it as painless for your contributions to be included as possible. If you need help with getting tests
running on your local machines, ask for help on the forums. We would be happy to help out.

The [Open Source Guide](https://opensource.guide/) is a good first read for those new to contributing to open source!
## Issues
Expand All @@ -18,14 +24,17 @@ Issues are a quick way to point out a bug. If you find a bug or documentation er
2. The Issue has not already been fixed (check the develop branch or look for [closed Issues](https://github.com/codeigniter4/CodeIgniter4/issues?q=is%3Aissue+is%3Aclosed))
3. It's not something really obvious that you can fix yourself

Reporting Issues is helpful, but an even [better approach](./contributing/workflow.rst) is to send a [Pull Request](https://help.github.com/en/articles/creating-a-pull-request), which is done by [Forking](https://help.github.com/en/articles/fork-a-repo) the main repository and making a [Commit](https://help.github.com/en/desktop/contributing-to-projects/committing-and-reviewing-changes-to-your-project) to your own copy of the project. This will require you to use the version control system called [Git](https://git-scm.com/).
Reporting Issues is helpful, but an even [better approach](./contributing/workflow.rst) is to send a
[Pull Request](https://help.github.com/en/articles/creating-a-pull-request), which is done by
[Forking](https://help.github.com/en/articles/fork-a-repo) the main repository and making
a [Commit](https://help.github.com/en/desktop/contributing-to-projects/committing-and-reviewing-changes-to-your-project)
to your own copy of the project. This will require you to use the version control system called [Git](https://git-scm.com/).

## Guidelines

Before we look into how to contribute to CodeIgniter4, here are some guidelines. If your Pull Requests fail
to pass these guidelines, they will be declined, and you will need to re-submit
when you’ve made the changes. This might sound a bit tough, but it is required
for us to maintain the quality of the codebase.
to pass these guidelines, they will be declined, and you will need to re-submit when you’ve made the changes.
This might sound a bit tough, but it is required for us to maintain the quality of the codebase.

### PHP Style

Expand All @@ -38,13 +47,14 @@ 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

CodeIgniter4 uses the [Git-Flow](http://nvie.com/posts/a-successful-git-branching-model/) branching model which requires all
Pull Requests to be sent to the "develop" branch; this is where the next planned version will be developed.
The "master" branch will always contain the latest stable version and is kept clean so a "hotfix" (e.g. an
CodeIgniter4 uses the [Git-Flow](http://nvie.com/posts/a-successful-git-branching-model/) branching model
which requires all Pull Requests to be sent to the __"develop"__ branch; this is where the next planned version will be developed.

The __"master"__ branch will always contain the latest stable version and is kept clean so a "hotfix" (e.g. an
emergency security patch) can be applied to the "master" branch to create a new version, without worrying
about other features holding it up. For this reason, all commits need to be made to the "develop" branch,
and any sent to the "master" branch will be closed automatically. If you have multiple changes to submit,
Expand All @@ -56,12 +66,35 @@ but send a pull request for both at the same time, we might really want X but di
meaning we cannot merge the request. Using the Git-Flow branching model you can create new
branches for both of these features and send two requests.

A reminder: **please use separate branches for each of your PRs** - it will make it easier for you to keep changes separate from
each other and from whatever else you are doing with your repository!
A reminder: **please use separate branches for each of your PRs** - it will make it easier for you to keep
changes separate from each other and from whatever else you are doing with your repository!

### Signing

You must [GPG-sign](./contributing/signing.rst) your work, certifying that you either wrote the work or otherwise have the right to pass it on to an open-source project. This is *not* just a "signed-off-by" commit, but instead, a digitally signed one.
You must [GPG-sign](./contributing/signing.rst) your work, certifying that you either wrote the work or
otherwise have the right to pass it on to an open-source project. This is *not* just a "signed-off-by"
commit, but instead, a digitally signed one.

### Static Analysis on PHP code

We cannot, at all times, guarantee that all PHP code submitted on pull requests to be working well without
actually running the code. For this reason, we make use of two static analysis tools, [PHPStan][1]
and [Rector][2] to do the analysis for us.

These tools have already been integrated into our CI/CD workflow to minimize unannounced bugs. Pull requests
are expected that their code will pass these two. In your local machine, you can manually run these tools
so that you can fix whatever errors that pop up with your submission.

PHPStan is expected to scan the entire framework by running this command in your terminal:

vendor/bin/phpstan analyse

Rector, on the other hand, can be run on the specific files you modified or added:

vendor/bin/rector process --dry-run path/to/file

[1]: https://github.com/phpstan/phpstan-src
[2]: https://github.com/rector/rector

### Breaking Changes

Expand All @@ -83,12 +116,18 @@ The best way to contribute is to fork the CodeIgniter4 repository, and "clone" t
5. Create a new [branch](https://help.github.com/en/articles/about-branches) in your project for each set of changes you want to make.
6. Fix existing bugs on the [Issue tracker](https://github.com/codeigniter4/CodeIgniter4/issues) after confirming that no one else is working on them.
7. [Commit](https://help.github.com/en/desktop/contributing-to-projects/committing-and-reviewing-changes-to-your-project) the changed files in your contribution branch.
8. [Push](https://docs.github.com/en/github/using-git/pushing-commits-to-a-remote-repository) your contribution branch to your fork.
9. Send a [pull request](https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request-from-a-fork).
8. Commit messages are expected to be descriptive of what you changed specifically. Commit messages like
"Fixes #1234" would be asked by the reviewer to be revised.
9. If there are intermediate commits that are not meaningful to the overall PR, such as "Fixed error on style guide", "Fixed phpstan error", "Fixing mistake in code", and other related commits, it is advised to squash your commits so that we can have a clean commit history.
10. If you have touched PHP code, run static analysis.
11. Run unit tests on the specific file you modified. If there are no existing tests yet, please create one.
12. Make sure the tests pass to have a higher chance of merging.
13. [Push](https://docs.github.com/en/github/using-git/pushing-commits-to-a-remote-repository) your contribution branch to your fork.
14. Send a [pull request](https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/creating-a-pull-request-from-a-fork).

The codebase maintainers will now be alerted to the submission and someone from the team will respond. If your change fails to meet the guidelines, it will be rejected or feedback will be provided to help you improve it.

Once the maintainer handling your pull request is satisfied with it they will approve the pull request and merge it into the "develop" branch; your patch will now be part of the next release!
Once the maintainer handling your pull request is satisfied with it they will approve the pull request and merge it into the "develop" branch. Your patch will now be part of the next release!

### Keeping your fork up-to-date

Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
The MIT License (MIT)

Copyright (c) 2014-2019 British Columbia Institute of Technology
Copyright (c) 2019-2020 CodeIgniter Foundation
Copyright (c) 2019-2021 CodeIgniter Foundation

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

## What is CodeIgniter?

CodeIgniter is a PHP full-stack web framework that is light, fast, flexible, and secure.
CodeIgniter is a PHP full-stack web framework that is light, fast, flexible and secure.
More information can be found at the [official site](http://codeigniter.com).

This repository holds the source code for CodeIgniter 4 only.
Expand Down 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: 2 additions & 0 deletions admin/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ This folder contains tools or docs useful for project maintainers.

## Release Building Scripts

*Do not use these scripts! They are left here for reference only.*

The release workflow is detailed in its own writeup; these are the main
scripts used by the release manager:

Expand Down
8 changes: 0 additions & 8 deletions admin/framework/.gitattributes

This file was deleted.

4 changes: 2 additions & 2 deletions admin/framework/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## What is CodeIgniter?

CodeIgniter is a PHP full-stack web framework that is light, fast, flexible, and secure.
CodeIgniter is a PHP full-stack web framework that is light, fast, flexible and secure.
More information can be found at the [official site](http://codeigniter.com).

This repository holds the distributable version of the framework,
Expand Down 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
12 changes: 9 additions & 3 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",
"php": "^7.3||^8.0",
"ext-curl": "*",
"ext-intl": "*",
"ext-json": "*",
Expand All @@ -18,14 +18,20 @@
"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"
},
"suggest": {
"ext-fileinfo": "Improves mime type detection for files"
},
"autoload": {
"psr-4": {
"CodeIgniter\\": "system/"
}
},
"exclude-from-classmap": [
"**/Database/Migrations/**"
]
},
"scripts": {
"post-update-cmd": [
Expand Down
Loading

0 comments on commit 9edf576

Please sign in to comment.