Skip to content

Commit 132b4ca

Browse files
authored
Merge pull request #4200 from codeigniter4/develop
4.0.5 Ready code
2 parents 056a3b3 + 47d5eb2 commit 132b4ca

File tree

731 files changed

+39615
-27674
lines changed

Some content is hidden

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

731 files changed

+39615
-27674
lines changed

.gitattributes

Lines changed: 21 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,27 @@
55

66
# git files
77
.gitattributes export-ignore
8-
# .gitignore
8+
.gitignore export-ignore
99

10-
# helper config files
11-
.travis.yml export-ignore
12-
phpdoc.dist.xml export-ignore
13-
14-
# Misc other files
15-
readme.rst
10+
# Don't give admin files
11+
.github/ export-ignore
12+
admin/ export-ignore
13+
contributing/ export-ignore
14+
.editorconfig export-ignore
15+
.nojekyll export-ignore export-ignore
16+
CODE_OF_CONDUCT.md export-ignore
17+
DCO.txt export-ignore
18+
PULL_REQUEST_TEMPLATE.md export-ignore
19+
stale.yml export-ignore
20+
Vagrantfile.dist export-ignore
1621

17-
# They don't want all of our tests...
18-
tests/bin/ export-ignore
19-
tests/codeigniter/ export-ignore
20-
tests/travis/ export-ignore
22+
# They don't want our test files
23+
tests/system/ export-ignore
24+
utils/ export-ignore
25+
rector.php export-ignore
26+
phpunit.xml.dist export-ignore
27+
phpstan.neon.dist export-ignore
2128

22-
# User Guide Source Files
23-
user_guide_src
29+
# The source user guide, either
30+
user_guide_src/ export-ignore
31+
phpdoc.dist.xml export-ignore

.github/dependabot.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: composer
4+
directory: "/"
5+
schedule:
6+
interval: daily
7+
open-pull-requests-limit: 10
8+
9+
- package-ecosystem: "github-actions"
10+
directory: "/"
11+
schedule:
12+
# Check for updates to GitHub Actions every weekday
13+
interval: "daily"

.github/scripts/deploy-appstarter

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,15 @@ git checkout master
2020
rm -rf *
2121

2222
# Copy common files
23-
releasable='app public writable env license.txt spark'
24-
for fff in $releasable ; do
23+
releasable='app public writable env LICENSE spark'
24+
for fff in $releasable;
25+
do
2526
cp -Rf ${SOURCE}/$fff ./
2627
done
2728

2829
# Copy repo-specific files
2930
cp -Rf ${SOURCE}/admin/starter/. ./
30-
31+
3132
# Commit the changes
3233
git add .
3334
git commit -m "Release ${RELEASE}"

.github/scripts/deploy-framework

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,15 @@ git checkout master
2020
rm -rf *
2121

2222
# Copy common files
23-
releasable='app public writable env license.txt spark system'
24-
for fff in $releasable ; do
23+
releasable='app public writable env LICENSE spark system'
24+
for fff in $releasable;
25+
do
2526
cp -Rf ${SOURCE}/$fff ./
2627
done
2728

2829
# Copy repo-specific files
2930
cp -Rf ${SOURCE}/admin/framework/. ./
30-
31+
3132
# Commit the changes
3233
git add .
3334
git commit -m "Release ${RELEASE}"

.github/workflows/apidocs-action.yml renamed to .github/workflows/deploy-apidocs.yml

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
name: API Documentation
1+
# When changes are pushed to the develop branch,
2+
# build the current version of the API documentation
3+
# with phpDocumentor and deploy it to the api branch.
4+
name: Deploy API Documentation
25

36
on:
47
push:
@@ -10,10 +13,9 @@ on:
1013
jobs:
1114

1215
build:
13-
name: Generate API Docs
16+
name: Deploy to api
1417
if: (github.repository == 'codeigniter4/CodeIgniter4')
1518
runs-on: ubuntu-latest
16-
1719
steps:
1820
- name: Setup credentials
1921
run: |
@@ -25,7 +27,7 @@ jobs:
2527
with:
2628
path: source
2729

28-
- name: Checkout api
30+
- name: Checkout target
2931
uses: actions/checkout@v2
3032
with:
3133
repository: codeigniter4/api
@@ -35,13 +37,12 @@ jobs:
3537
- name: Setup PHP
3638
uses: shivammathur/setup-php@v2
3739
with:
38-
php-version: '7.2'
39-
extensions: intl, json, mbstring, mysqlnd, xdebug, xml, sqlite3
40-
coverage: xdebug
40+
php-version: '7.4'
41+
extensions: intl
4142

42-
- name: Download GraphViz for phpDocumentor
43+
- name: Install GraphViz for phpDocumentor
4344
run: |
44-
sudo apt-get install -yq graphviz
45+
sudo apt install -yq graphviz
4546
4647
- name: Download phpDocumentor
4748
run: |
@@ -50,21 +51,21 @@ jobs:
5051
-L https://github.com/phpDocumentor/phpDocumentor/releases/download/v2.9.1/phpDocumentor.phar \
5152
-o admin/phpDocumentor.phar
5253
53-
- name: Prepare API
54+
- name: Prepare
5455
run: |
5556
cd ./api
5657
rm -rf ./api/docs*
5758
mkdir -p ./api/docs
5859
git reset --hard master
5960
60-
- name: Make the new API docs
61+
- name: Build
6162
run: |
6263
cd ./source
6364
chmod +x admin/phpDocumentor.phar
6465
admin/phpDocumentor.phar
6566
cp -R ${GITHUB_WORKSPACE}/source/api/build/* ${GITHUB_WORKSPACE}/api/docs
6667
67-
- name: Deploy API
68+
- name: Deploy
6869
run: |
6970
cd ./api
7071
git add .

.github/workflows/deploy.yml renamed to .github/workflows/deploy-framework.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
1-
name: Deploy
1+
# When a new Release is created, deploy relevant
2+
# files to each of the generated repos.
3+
name: Deploy Framework
24

35
on:
46
release:
57
types: [published]
68

79
jobs:
810
framework:
11+
name: Deploy to framework
12+
if: (github.repository == 'codeigniter4/CodeIgniter4')
913
runs-on: ubuntu-latest
10-
1114
steps:
1215
- name: Identify
1316
run: |
@@ -33,7 +36,7 @@ jobs:
3336
run: ./source/.github/scripts/deploy-framework ${GITHUB_WORKSPACE}/source ${GITHUB_WORKSPACE}/framework ${GITHUB_REF##*/}
3437

3538
- name: Release
36-
uses: actions/github-script@0.8.0
39+
uses: actions/github-script@v3
3740
with:
3841
github-token: ${{secrets.ACCESS_TOKEN}}
3942
script: |
@@ -50,8 +53,9 @@ jobs:
5053
})
5154
5255
appstarter:
56+
name: Deploy to appstarter
57+
if: (github.repository == 'codeigniter4/CodeIgniter4')
5358
runs-on: ubuntu-latest
54-
5559
steps:
5660
- name: Identify
5761
run: |
@@ -77,7 +81,7 @@ jobs:
7781
run: ./source/.github/scripts/deploy-appstarter ${GITHUB_WORKSPACE}/source ${GITHUB_WORKSPACE}/appstarter ${GITHUB_REF##*/}
7882

7983
- name: Release
80-
uses: actions/github-script@0.8.0
84+
uses: actions/github-script@v3
8185
with:
8286
github-token: ${{secrets.ACCESS_TOKEN}}
8387
script: |
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# When changes are pushed to the develop branch,
2+
# build the current version of the User Guide
3+
# with Sphinx and deploy it to the gh-pages branch.
4+
#
5+
# @todo Consolidate checkouts
6+
name: Deploy User Guide (latest)
7+
8+
on:
9+
push:
10+
branches:
11+
- 'develop'
12+
paths:
13+
- 'user_guide_src/**'
14+
15+
jobs:
16+
build:
17+
name: Deploy to gh-pages
18+
if: (github.repository == 'codeigniter4/CodeIgniter4')
19+
runs-on: ubuntu-latest
20+
steps:
21+
- name: Checkout
22+
uses: actions/checkout@v2
23+
24+
# Build the latest User Guide
25+
- name: Build with Sphinx
26+
uses: ammaraskar/[email protected]
27+
with:
28+
docs-folder: user_guide_src/
29+
30+
# Create an artifact of the html output
31+
- name: Upload artifact
32+
uses: actions/upload-artifact@v2
33+
with:
34+
name: HTML Documentation
35+
path: user_guide_src/build/html/
36+
37+
# Commit changes to the gh-pages branch
38+
- name: Commit changes
39+
run: |
40+
git clone https://github.com/codeigniter4/CodeIgniter4.git --branch gh-pages --single-branch gh-pages
41+
cp -r user_guide_src/build/html/* gh-pages/
42+
cd gh-pages
43+
git config --local user.email "[email protected]"
44+
git config --local user.name "${GITHUB_ACTOR}"
45+
git add .
46+
# Ignore failures due to lack of changes
47+
git commit -m "Update User Guide" -a || true
48+
49+
- name: Push changes
50+
uses: ad-m/[email protected]
51+
with:
52+
branch: gh-pages
53+
directory: gh-pages
54+
github_token: ${{ secrets.ACCESS_TOKEN }}

.github/workflows/docs_nightly.yml

Lines changed: 0 additions & 52 deletions
This file was deleted.

.github/workflows/test-phpstan.yml

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
# When a PR is opened or a push is made, perform
2+
# a static analysis check on the code using PHPStan.
3+
name: PHPStan
4+
5+
on:
6+
pull_request:
7+
branches:
8+
- 'develop'
9+
- '4.*'
10+
paths:
11+
- 'app/**'
12+
- 'system/**'
13+
- composer.json
14+
- phpstan.neon.dist
15+
push:
16+
branches:
17+
- 'develop'
18+
- '4.*'
19+
paths:
20+
- 'app/**'
21+
- 'system/**'
22+
- composer.json
23+
- phpstan.neon.dist
24+
25+
jobs:
26+
build:
27+
name: PHP ${{ matrix.php-versions }} Static Analysis
28+
runs-on: ubuntu-latest
29+
strategy:
30+
fail-fast: false
31+
matrix:
32+
php-versions: ['7.4', '8.0']
33+
steps:
34+
- name: Checkout
35+
uses: actions/checkout@v2
36+
37+
- name: Setup PHP
38+
uses: shivammathur/setup-php@v2
39+
with:
40+
php-version: ${{ matrix.php-versions }}
41+
extensions: intl
42+
43+
- name: Use latest Composer
44+
run: composer self-update
45+
46+
- name: Validate composer.json
47+
run: composer validate --strict
48+
49+
- name: Get composer cache directory
50+
id: composer-cache
51+
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
52+
53+
- name: Create composer cache directory
54+
run: mkdir -p ${{ steps.composer-cache.outputs.dir }}
55+
56+
- name: Cache composer dependencies
57+
uses: actions/cache@v2
58+
with:
59+
path: ${{ steps.composer-cache.outputs.dir }}
60+
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
61+
restore-keys: ${{ runner.os }}-composer-
62+
63+
- name: Create PHPStan result cache directory
64+
run: mkdir -p build/phpstan
65+
66+
- name: Cache PHPStan result cache directory
67+
uses: actions/cache@v2
68+
with:
69+
path: build/phpstan
70+
key: ${{ runner.os }}-phpstan-${{ github.sha }}
71+
restore-keys: ${{ runner.os }}-phpstan-
72+
73+
- name: Install dependencies
74+
run: composer update --ansi --no-interaction
75+
76+
- name: Run static analysis
77+
run: vendor/bin/phpstan analyse

0 commit comments

Comments
 (0)