Skip to content

Commit

Permalink
Merge framework develop
Browse files Browse the repository at this point in the history
  • Loading branch information
MGatner committed Dec 9, 2019
2 parents fa0bf1d + 7c15ad4 commit 6cb4e18
Show file tree
Hide file tree
Showing 480 changed files with 13,078 additions and 2,787 deletions.
3 changes: 3 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
---
name: Bug report
about: Create a report to help us improve
title: 'Bug: '
labels: bug
assignees: ''

---

Expand Down
11 changes: 11 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
name: Feature request
about: How to submit a feature request
title: ''
labels: ''
assignees: ''

---

Please submit feature requests to our [forum](https://forum.codeigniter.com/forum-29.html).
We use github issues to track bugs and planned work.
10 changes: 10 additions & 0 deletions .github/ISSUE_TEMPLATE/planned-work.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
name: Planned work
about: Approved work planning
title: 'Dev: '
labels: dev
assignees: ''

---

Repo maintainers will create "issues" for planned work, so it can be tracked.
11 changes: 11 additions & 0 deletions .github/ISSUE_TEMPLATE/support-question.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
name: Support question
about: How to ask a support question
title: ''
labels: ''
assignees: ''

---

Please ask support questions on our [forum](https://forum.codeigniter.com/forum-30.html).
We use github issues to track bugs and planned work.
92 changes: 92 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
# 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)).
There is a [Contributing to CodeIgniter](./contributing/README.rst) section in the repository which describes the contribution process; this page is an overview.

The [Open Source Guide](https://opensource.guide/) is a good first read for those new to contributing to open source!
## Issues

Issues are a quick way to point out a bug. If you find a bug or documentation error in CodeIgniter then please make sure that:

1. There is not already an open [Issue](https://github.com/codeigniter4/CodeIgniter4/issues)
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/).

## 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 quality of the codebase.

### PHP Style

All code must meet the [Style Guide](./contributing/styleguide.rst).
This makes certain that all submitted code is of the same format as the existing code and ensures that the codebase will be as readable as possible.

### Documentation

If you change anything that requires a change to documentation, then you will need to add to the documentation. New classes, methods, parameters, changing default values, etc. are all changes that require a change to documentation. Also, the [changelog](https://codeigniter4.github.io/CodeIgniter4/changelogs/index.html) must be updated for every change, and [PHPDoc](https://github.com/codeigniter4/CodeIgniter4/blob/develop/phpdoc.dist.xml) blocks must be maintained.

### Compatibility

CodeIgniter4 requires [PHP 7.2](https://php.net/releases/7_2_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
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,
please place all changes into their own branch on your fork.

**One thing at a time:** A pull request should only contain one change. That does not mean only one commit,
but one change - however many commits it took. The reason for this is that if you change X and Y,
but send a pull request for both at the same time, we might really want X but disagree with Y,
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!

### 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.

## How-to Guide

The best way to contribute is to fork the CodeIgniter4 repository, and "clone" that to your development area. That sounds like some jargon, but "forking" on GitHub means "making a copy of that repo to your account" and "cloning" means "copying that code to your environment so you can work on it".

1. Set up Git ([Windows](https://git-scm.com/download/win), [Mac](https://git-scm.com/download/mac), & [Linux](https://git-scm.com/download/linux)).
2. Go to the [CodeIgniter4 repository](https://github.com/codeigniter4/CodeIgniter4).
3. [Fork](https://help.github.com/en/articles/fork-a-repo) it (to your Github account).
4. [Clone](https://help.github.com/en/articles/cloning-a-repository) your CodeIgniter repository: `[email protected]:\<your-name>/CodeIgniter4.git`
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://help.github.com/en/articles/pushing-to-a-remote) your contribution branch to your fork.
9. Send a [pull request](http://help.github.com/send-pull-requests/).

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!

### Keeping your fork up-to-date

Unlike systems like Subversion, Git can have multiple remotes. A remote is the name for the URL of a Git repository. By default, your fork will have a remote named "origin", which points to your fork, but you can add another remote named "codeigniter", which points to `git://github.com/codeigniter4/CodeIgniter4.git`. This is a read-only remote, but you can pull from this develop branch to update your own.

If you are using the command-line, you can do the following to update your fork to the latest changes:

1. `git remote add codeigniter git://github.com/codeigniter4/CodeIgniter4.git`
2. `git pull codeigniter develop`
3. `git push origin develop`

Your fork is now up to date. This should be done regularly and, at the least, before you submit a pull request.
6 changes: 3 additions & 3 deletions PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Each pull request should address a single issue, and have a meaningful title.
Each pull request should address a single issue and have a meaningful title.

**Description**
Explain what you have changed, and why.
Expand All @@ -15,8 +15,8 @@ Explain what you have changed, and why.
**Notes**
- Pull requests must be in English
- If the PR solves an issue, reference it with a suitable verb and the issue number
(e.g. fixes <hash>12345
- Unsolicited PRs will be considered, but there is no guarantee of acceptance
(e.g. fixes <hash>12345)
- Unsolicited pull requests will be considered, but there is no guarantee of acceptance
- Pull requests should be from a feature branch in the contributor's fork of the repository
to the develop branch of the project repository

16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,15 +63,15 @@ to optional packages, with their own repository.

## Contributing

We **are** accepting contributions from the community, specifically those identified as part of phase 2.
We **are** accepting contributions from the community!

We will try to manage the process somewhat, by adding a "Help wanted" label to those that we are
specifically interested in at any point in time. Join the discussion for those issues, and let us know
if you want to take the lead for one of them.
We will try to manage the process somewhat, by adding a ["help wanted" label](https://github.com/codeigniter4/CodeIgniter4/labels/help%20wanted) to those that we are
specifically interested in at any point in time. Join the discussion for those issues and let us know
if you want to take the lead on one of them.

We are not looking for out-of-scope contributions, only those that would be considered part of our controlled evolution!
At this time, we are not looking for out-of-scope contributions, only those that would be considered part of our controlled evolution!

Please read the [*Contributing to CodeIgniter*](https://github.com/codeigniter4/CodeIgniter4/blob/develop/contributing.md) section in the user guide
Please read the [*Contributing to CodeIgniter*](https://github.com/codeigniter4/CodeIgniter4/blob/develop/CONTRIBUTING.md) section in the user guide.

## Server Requirements

Expand All @@ -84,10 +84,10 @@ PHP version 7.2 or higher is required, with the following extensions installed:
Additionally, make sure that the following extensions are enabled in your PHP:

- json (enabled by default - don't turn it off)
- xml (enabled by default - don't turn it off)
- [mbstring](http://php.net/manual/en/mbstring.installation.php)
- [mysqlnd](http://php.net/manual/en/mysqlnd.install.php)
- xml (enabled by default - don't turn it off)

## Running CodeIgniter Tests

Information on running CodeIgniter test suite can be found in the [README.md](tests/README.md) file in the tests directory.
Information on running the CodeIgniter test suite can be found in the [README.md](tests/README.md) file in the tests directory.
2 changes: 1 addition & 1 deletion admin/release-appstarter
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ git checkout $branch
echo -e "${BOLD}Build the framework distributable${NORMAL}"

echo -e "${BOLD}Copy the main files/folders...${NORMAL}"
releasable='app public writable README.md contributing.md env license.txt spark tests/_support'
releasable='app public writable README.md contributing.md env license.txt spark .gitignore'
for fff in $releasable ; do
if [ -d "$fff" ] ; then
rm -rf $fff
Expand Down
8 changes: 6 additions & 2 deletions admin/release-framework
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ git checkout $branch
echo -e "${BOLD}Build the framework distributable${NORMAL}"

echo -e "${BOLD}Copy the main files/folders...${NORMAL}"
releasable='app docs public system writable contributing.md env license.txt spark tests/_support'
releasable='app docs public system writable contributing.md env license.txt spark .gitignore'
for fff in $releasable ; do
if [ -d "$fff" ] ; then
rm -rf $fff
Expand All @@ -21,7 +21,11 @@ for fff in $releasable ; do
done

echo -e "${BOLD}Override as needed...${NORMAL}"
cp -rf ${CI_DIR}/admin/framework/* .
cprm -rf tests
mkdir tests
cp -rf ${CI_DIR}/tests/_support tests/

-rf ${CI_DIR}/admin/framework/* .

#---------------------------------------------------
# And finally, get ready for merging
Expand Down
2 changes: 1 addition & 1 deletion admin/starter/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"license": "MIT",
"require": {
"php": ">=7.2",
"codeigniter4/framework": "^4@alpha"
"codeigniter4/framework": "^4@rc"
},
"require-dev": {
"mikey179/vfsstream": "1.6.*",
Expand Down
15 changes: 15 additions & 0 deletions app/Common.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?php

/**
* The goal of this file is to allow developers a location
* where they can overwrite core procedural functions and
* replace them with their own. This file is loaded during
* the bootstrap process and is called during the frameworks
* execution.
*
* This can be looked at as a `master helper` file that is
* loaded early on, and may also contain additional functions
* that you'd like to use throughout your entire application
*
* @link: https://codeigniter4.github.io/CodeIgniter4/
*/
4 changes: 3 additions & 1 deletion app/Config/App.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class App extends BaseConfig
| environments.
|
*/
public $baseURL = 'http://localhost:8080';
public $baseURL = 'http://localhost:8080/';

/*
|--------------------------------------------------------------------------
Expand Down Expand Up @@ -237,12 +237,14 @@ class App extends BaseConfig
| recommended CSRF protection be enabled.
|
| CSRFTokenName = The token name
| CSRFHeaderName = The header name
| CSRFCookieName = The cookie name
| CSRFExpire = The number in seconds the token should expire.
| CSRFRegenerate = Regenerate token on every submission
| CSRFRedirect = Redirect to previous page with error on failure
*/
public $CSRFTokenName = 'csrf_test_name';
public $CSRFHeaderName = 'X-CSRF-TOKEN';
public $CSRFCookieName = 'csrf_cookie_name';
public $CSRFExpire = 7200;
public $CSRFRegenerate = true;
Expand Down
2 changes: 1 addition & 1 deletion app/Config/Boot/development.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
| painful debugging.
*/
error_reporting(-1);
ini_set('display_errors', 1);
ini_set('display_errors', '1');

/*
|--------------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion app/Config/Boot/production.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
| Don't show ANY in production environments. Instead, let the system catch
| it and display a generic error message.
*/
ini_set('display_errors', 0);
ini_set('display_errors', '0');
error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED & ~E_STRICT & ~E_USER_NOTICE & ~E_USER_DEPRECATED);

/*
Expand Down
2 changes: 1 addition & 1 deletion app/Config/Boot/testing.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
| painful debugging.
*/
error_reporting(-1);
ini_set('display_errors', 1);
ini_set('display_errors', '1');

/*
|--------------------------------------------------------------------------
Expand Down
4 changes: 2 additions & 2 deletions app/Config/Constants.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
// NOTE: changing this will require manually modifying the
// existing namespaces of App\* namespaced-classes.
//
define('APP_NAMESPACE', 'App');
defined('APP_NAMESPACE') || define('APP_NAMESPACE', 'App');

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

/*
|--------------------------------------------------------------------------
Expand Down
Loading

0 comments on commit 6cb4e18

Please sign in to comment.