Skip to content

Commit

Permalink
Merge pull request #2912 from codeigniter4/develop
Browse files Browse the repository at this point in the history
4.0.3 release
  • Loading branch information
lonnieezell committed May 1, 2020
2 parents 278a747 + 7edf31b commit f5ca37a
Show file tree
Hide file tree
Showing 394 changed files with 8,823 additions and 7,084 deletions.
34 changes: 34 additions & 0 deletions .github/scripts/deploy-appstarter
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#!/bin/bash

## Deploy codeigniter4/appstarter

# Setup variables
SOURCE=$1
TARGET=$2
RELEASE=$3

echo "Preparing for version $3"
echo "Merging files from $1 to $2"

# Prepare the source
cd $SOURCE
git checkout master

# Prepare the target
cd $TARGET
git checkout master
rm -rf *

# Copy common files
releasable='app public writable env license.txt spark .gitignore'
for fff in $releasable ; do
cp -Rf ${SOURCE}/$fff ./
done

# Copy repo-specific files
cp -Rf ${SOURCE}/admin/starter/. ./

# Commit the changes
git add .
git commit -m "Release ${RELEASE}"
git push
34 changes: 34 additions & 0 deletions .github/scripts/deploy-framework
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#!/bin/bash

## Deploy codeigniter4/framework

# Setup variables
SOURCE=$1
TARGET=$2
RELEASE=$3

echo "Preparing for version $3"
echo "Merging files from $1 to $2"

# Prepare the source
cd $SOURCE
git checkout master

# Prepare the target
cd $TARGET
git checkout master
rm -rf *

# Copy common files
releasable='app public writable env license.txt spark .gitignore system'
for fff in $releasable ; do
cp -Rf ${SOURCE}/$fff ./
done

# Copy repo-specific files
cp -Rf ${SOURCE}/admin/framework/. ./

# Commit the changes
git add .
git commit -m "Release ${RELEASE}"
git push
94 changes: 94 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
name: Deploy

on:
release:
types: [published]

jobs:
framework:
runs-on: ubuntu-latest

steps:
- name: Identify
run: |
git config --global user.email "action@github.com"
git config --global user.name "${GITHUB_ACTOR}"
- name: Checkout source
uses: actions/checkout@v2
with:
path: source

- name: Checkout target
uses: actions/checkout@v2
with:
repository: codeigniter4/framework
token: ${{ secrets.ACCESS_TOKEN }}
path: framework

- name: Chmod
run: chmod +x ./source/.github/scripts/deploy-framework

- name: Deploy
run: ./source/.github/scripts/deploy-framework ${GITHUB_WORKSPACE}/source ${GITHUB_WORKSPACE}/framework ${GITHUB_REF##*/}

- name: Release
uses: actions/github-script@0.8.0
with:
github-token: ${{secrets.ACCESS_TOKEN}}
script: |
const release = await github.repos.getLatestRelease({
owner: context.repo.owner,
repo: context.repo.repo
})
github.repos.createRelease({
owner: context.repo.owner,
repo: 'framework',
tag_name: release.data.tag_name,
name: release.data.name,
body: release.data.body
})
appstarter:
runs-on: ubuntu-latest

steps:
- name: Identify
run: |
git config --global user.email "action@github.com"
git config --global user.name "${GITHUB_ACTOR}"
- name: Checkout source
uses: actions/checkout@v2
with:
path: source

- name: Checkout target
uses: actions/checkout@v2
with:
repository: codeigniter4/appstarter
token: ${{ secrets.ACCESS_TOKEN }}
path: appstarter

- name: Chmod
run: chmod +x ./source/.github/scripts/deploy-appstarter

- name: Deploy
run: ./source/.github/scripts/deploy-appstarter ${GITHUB_WORKSPACE}/source ${GITHUB_WORKSPACE}/appstarter ${GITHUB_REF##*/}

- name: Release
uses: actions/github-script@0.8.0
with:
github-token: ${{secrets.ACCESS_TOKEN}}
script: |
const release = await github.repos.getLatestRelease({
owner: context.repo.owner,
repo: context.repo.repo
})
github.repos.createRelease({
owner: context.repo.owner,
repo: 'appstarter',
tag_name: release.data.tag_name,
name: release.data.name,
body: release.data.body
})
227 changes: 217 additions & 10 deletions CHANGELOG.md

Large diffs are not rendered by default.

8 changes: 8 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,3 +92,11 @@ If you are using the command-line, you can do the following to update your fork
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.

## Translations Installation

If you wish to contribute to the system message translations,
then fork and clone the [translations repository](https://github.com/codeigniter4/translations>)
separately from the codebase.

These are two independent repositories!
35 changes: 19 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,29 @@

[![Build Status](https://travis-ci.org/codeigniter4/CodeIgniter4.svg?branch=develop)](https://travis-ci.org/codeigniter4/CodeIgniter4)
[![Coverage Status](https://coveralls.io/repos/github/codeigniter4/CodeIgniter4/badge.svg?branch=develop)](https://coveralls.io/github/codeigniter4/CodeIgniter4?branch=develop)
[![Downloads](https://poser.pugx.org/codeigniter4/framework/downloads)](https://packagist.org/packages/codeigniter4/framework)
[![GitHub release (latest by date)](https://img.shields.io/github/v/release/codeigniter4/CodeIgniter4)](https://packagist.org/packages/codeigniter4/framework)
[![GitHub stars](https://img.shields.io/github/stars/codeigniter4/CodeIgniter4)](https://packagist.org/packages/codeigniter4/framework)
[![GitHub license](https://img.shields.io/github/license/codeigniter4/CodeIgniter4)](https://github.com/codeigniter4/CodeIgniter4/blob/develop/license.txt)
[![contributions welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat)](https://github.com/codeigniter4/CodeIgniter4/pulls)
<br>

## 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.
Version 4 is a complete rewrite to bring the quality and the code into a more modern version,
while still keeping as many of the things intact that has made people love the framework over the years.

**This is pre-release code and should not be used in production sites.**
This repository holds the source code for CodeIgniter 4 only.
Version 4 is a complete rewrite to bring the quality and the code into a more modern version,
while still keeping as many of the things intact that has made people love the framework over the years.

More information about the plans for version 4 can be found in [the announcement](http://forum.codeigniter.com/thread-62615.html) on the forums.

### Documentation

The [User Guide](https://codeigniter4.github.io/userguide/) is the primary documentation for CodeIgniter 4.
The [User Guide](https://codeigniter4.github.io/userguide/) is the primary documentation for CodeIgniter 4.

The current **in-progress** User Guide can be found [here](https://codeigniter4.github.io/CodeIgniter4/).
The current **in-progress** User Guide can be found [here](https://codeigniter4.github.io/CodeIgniter4/).
As with the rest of the framework, it is a work in progress, and will see changes over time to structure, explanations, etc.

You might also be interested in the [API documentation](https://codeigniter4.github.io/api/) for the framework components.
Expand All @@ -40,9 +43,9 @@ The user guide updating and deployment is a bit awkward at the moment, but we ar

## Repository Management

CodeIgniter is developed completely on a volunteer basis. As such, please give up to 7 days
for your issues to be reviewed. If you haven't heard from one of the team in that time period,
feel free to leave a comment on the issue so that it gets brought back to our attention.
CodeIgniter is developed completely on a volunteer basis. As such, please give up to 7 days
for your issues to be reviewed. If you haven't heard from one of the team in that time period,
feel free to leave a comment on the issue so that it gets brought back to our attention.

We use Github issues to track **BUGS** and to track approved **DEVELOPMENT** work packages.
We use our [forum](http://forum.codeigniter.com) to provide SUPPORT and to discuss
Expand All @@ -53,7 +56,7 @@ be closed! If you are not sure if you have found a bug, raise a thread on the fo
someone else may have encountered the same thing.

Before raising a new Github issue, please check that your bug hasn't already
been reported or fixed.
been reported or fixed.

We use pull requests (PRs) for CONTRIBUTIONS to the repository.
We are looking for contributions that address one of the reported bugs or
Expand All @@ -69,8 +72,8 @@ to optional packages, with their own repository.

We **are** accepting contributions from the community!

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

At this time, we are not looking for out-of-scope contributions, only those that would be considered part of our controlled evolution!
Expand All @@ -79,17 +82,17 @@ 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.2 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
- [mbstring](http://php.net/manual/en/mbstring.installation.php)

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)

## Running CodeIgniter Tests
Expand Down
8 changes: 2 additions & 6 deletions admin/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ This folder contains tools or docs useful for project maintainers.
It is meant to be downloaded by developers, or composer-installed.
This is a read-only repository.
- **appstarter** is the released application starter repository.
It is derived from the framework's `application` and `public` folders, with
It is derived from the framework's `app` and `public` folders, with
a composer requirement dependency to pull in the framework itself.
It is meant to be downloaded or composer-installed.
This is a read-only repository.
Expand Down Expand Up @@ -64,14 +64,10 @@ scripts used by the release manager:
in it, and it will run the related scripts following, to revise
the release distributions.
Usage: `admin/release version qualifier`
- **release-framework** builds the distributable framework repo.
It could be used on its own, but is normally part of `release`.
- **release-appstarter** builds the distributable appstarter repo.
It could be used on its own, but is normally part of `release`.
- **release-userguide** builds the distributable userguide repo.
It could be used on its own, but is normally part of `release`.
- **release-deploy** pushes the release changes to the appropriate github
repositories. Tag & create releases on github. This is not easily reversible!
repositories. Tag & create releases on GitHub. This is not easily reversible!
Usage: `admin/release-deploy version qualifier`
- **release-revert** can be used to restore your repositories to the state they
were in before you started a release. **IF** you haven't deployed.
Expand Down
2 changes: 0 additions & 2 deletions admin/framework/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ This repository holds the distributable version of the framework,
including the user guide. It has been built from the
[development repository](https://github.com/codeigniter4/CodeIgniter4).

**This is pre-release code and should not be used in production sites.**

More information about the plans for version 4 can be found in [the announcement](http://forum.codeigniter.com/thread-62615.html) on the forums.

The user guide corresponding to this version of the framework can be found
Expand Down
1 change: 1 addition & 0 deletions admin/framework/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"ext-curl": "*",
"ext-intl": "*",
"ext-json": "*",
"ext-mbstring": "*",
"kint-php/kint": "^3.3",
"psr/log": "^1.1",
"laminas/laminas-escaper": "^2.6"
Expand Down
1 change: 1 addition & 0 deletions admin/module/tests/database/ExampleDatabaseTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ public function testSoftDeleteLeavesRow()
{
$model = new ExampleModel();
$this->setPrivateProperty($model, 'useSoftDeletes', true);
$this->setPrivateProperty($model, 'tempUseSoftDeletes', true);

$object = $model->first();
$model->delete($object->id);
Expand Down
4 changes: 2 additions & 2 deletions admin/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ SFILES=${SFILES:-$STAGED_FILES_CMD}
echo "Checking PHP Lint..."
for FILE in $SFILES
do
php -l -d display_errors=0 $PROJECT/$FILE
php -l -d display_errors=0 "$PROJECT/$FILE"
if [ $? != 0 ]
then
echo "Fix the error before commit."
exit 1
fi
FILES="$FILES $PROJECT/$FILE"
FILES="$FILES $FILE"
done

if [ "$FILES" != "" ]
Expand Down
4 changes: 0 additions & 4 deletions admin/release
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,7 @@ if [ -d dist ]; then
fi
mkdir dist

setup_repo framework
setup_repo userguide
setup_repo appstarter

#---------------------------------------------------
# Housekeeping - make sure writable is flushed of test files
Expand Down Expand Up @@ -139,9 +137,7 @@ git commit -S -m "Release ${RELEASE}"
#---------------------------------------------------
# Build the distributables

. admin/release-framework
. admin/release-userguide
. admin/release-appstarter

#---------------------------------------------------
# Done for now
Expand Down
42 changes: 0 additions & 42 deletions admin/release-appstarter

This file was deleted.

Loading

0 comments on commit f5ca37a

Please sign in to comment.