Skip to content

Commit

Permalink
Merge pull request #5294 from codeigniter4/develop
Browse files Browse the repository at this point in the history
4.1.5 Ready code
  • Loading branch information
MGatner authored Nov 8, 2021
2 parents d686c86 + eede117 commit 8c7f701
Show file tree
Hide file tree
Showing 392 changed files with 15,217 additions and 6,870 deletions.
1 change: 0 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ contributing/ export-ignore
.editorconfig export-ignore
.nojekyll export-ignore export-ignore
CODE_OF_CONDUCT.md export-ignore
DCO.txt export-ignore
PULL_REQUEST_TEMPLATE.md export-ignore
stale.yml export-ignore
Vagrantfile.dist export-ignore
Expand Down
39 changes: 0 additions & 39 deletions .github/ISSUE_TEMPLATE/bug_report.md

This file was deleted.

105 changes: 105 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
name: Bug report
description: Create a report to help us improve CodeIgniter
title: "Bug: "
labels: ['bug']

body:
- type: markdown
attributes:
value: |
Thanks for taking the time to fill out this bug report!
Before you begin, **please ensure that there are no existing issues,
whether still open or closed, related to your report**.
If there is, your report will be closed promptly.
And if you are not using the [latest version](https://github.com/codeigniter4/CodeIgniter4/releases) of CodeIgniter, please update.
---
- type: dropdown
id: php-version
attributes:
label: PHP Version
description: Which PHP versions did you run your code?
multiple: true
options:
- '7.3'
- '7.4'
- '8.0'
- '8.1'
validations:
required: true

- type: input
id: codeigniter-version
attributes:
label: CodeIgniter4 Version
validations:
required: true

- type: dropdown
id: operating-systems
attributes:
label: Which operating systems have you tested for this bug?
description: You may select more than one.
multiple: true
options:
- macOS
- Windows
- Linux
validations:
required: true

- type: dropdown
id: server
attributes:
label: Which server did you use?
options:
- apache
- cli
- cli-server (PHP built-in webserver)
- cgi-fcgi
- fpm-fcgi
- phpdbg
validations:
required: true

- type: input
id: database
attributes:
label: Database
validations:
required: false

- type: textarea
id: description
attributes:
label: What happened?
placeholder: Tell us what you see!
validations:
required: true

- type: textarea
attributes:
label: Steps to Reproduce
description: Steps to reproduce the behavior.
validations:
required: true

- type: textarea
attributes:
label: Expected Output
description: What do you expect to happen instead of this filed bug?
validations:
required: true

- type: textarea
attributes:
label: Anything else?
description: |
Links? References? Anything that will give us more context about the issue you are encountering!
Tip: You can attach images or log files by clicking this area to highlight it and then dragging files in.
validations:
required: false
9 changes: 9 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
blank_issues_enabled: false
contact_links:
- name: CodeIgniter Forum
url: https://forum.codeigniter.com
about: Please ask your support questions in the forums. Thanks!

- name: CodeIgniter Slack channel
url: https://codeigniterchat.slack.com
about: Engage with other members of the community in our Slack channel.
11 changes: 0 additions & 11 deletions .github/ISSUE_TEMPLATE/support-question.md

This file was deleted.

7 changes: 4 additions & 3 deletions PULL_REQUEST_TEMPLATE.md → .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ Explain what you have changed, and why.

**Checklist:**
- [ ] Securely signed commits
- [ ] Component(s) with PHPdocs
- [ ] Component(s) with PHPDoc blocks, only if necessary or adds value
- [ ] Unit testing, with >80% coverage
- [ ] User guide updated
- [ ] Conforms to style guide

---------Remove from here down in your description----------
<!--
**Notes**
- Pull requests must be in English
Expand All @@ -19,4 +19,5 @@ Explain what you have changed, and why.
- 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

-->
12 changes: 5 additions & 7 deletions .github/workflows/deploy-apidocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,12 @@ jobs:
uses: shivammathur/setup-php@v2
with:
php-version: '8.0'
tools: phive
coverage: none

- name: Download phpDocumentor v3.1
run: |
cd ./source
curl \
-L https://github.com/phpDocumentor/phpDocumentor/releases/download/v3.1.0/phpDocumentor.phar \
-o admin/phpDocumentor.phar
- name: Download latest phpDocumentor
working-directory: source
run: sudo phive --no-progress install --global --trust-gpg-keys 67F861C3D889C656 phpDocumentor

- name: Prepare API repo
working-directory: api
Expand All @@ -58,7 +56,7 @@ jobs:
- name: Build API in source repo
working-directory: source
run: |
php admin/phpDocumentor.phar run --ansi --verbose
phpDocumentor run --ansi --verbose
cp -R ${GITHUB_WORKSPACE}/source/api/build/* ${GITHUB_WORKSPACE}/api/docs
- name: Deploy to API repo
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/deploy-framework.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
run: ./source/.github/scripts/deploy-framework ${GITHUB_WORKSPACE}/source ${GITHUB_WORKSPACE}/framework ${GITHUB_REF##*/}

- name: Release
uses: actions/github-script@v4
uses: actions/github-script@v5
with:
github-token: ${{secrets.ACCESS_TOKEN}}
script: |
Expand Down Expand Up @@ -81,7 +81,7 @@ jobs:
run: ./source/.github/scripts/deploy-appstarter ${GITHUB_WORKSPACE}/source ${GITHUB_WORKSPACE}/appstarter ${GITHUB_REF##*/}

- name: Release
uses: actions/github-script@v4
uses: actions/github-script@v5
with:
github-token: ${{secrets.ACCESS_TOKEN}}
script: |
Expand Down
75 changes: 75 additions & 0 deletions .github/workflows/test-deptrac.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
# When a PR is opened or a push is made, perform an
# architectural inspection on the code using Deptrac.
name: Deptrac

on:
pull_request:
branches:
- 'develop'
- '4.*'
paths:
- 'app/**'
- 'system/**'
- 'composer.json'
- 'depfile.yaml'
- '.github/workflows/test-deptrac.yml'
push:
branches:
- 'develop'
- '4.*'
paths:
- 'app/**'
- 'system/**'
- 'composer.json'
- 'depfile.yaml'
- '.github/workflows/test-deptrac.yml'

jobs:
build:
name: Architectural Inspection
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.0'
tools: composer, phive
extensions: intl, json, mbstring, gd, mysqlnd, xdebug, xml, sqlite3

- name: Validate composer.json
run: composer validate --strict

- name: Get composer cache directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"

- name: Create composer cache directory
run: mkdir -p ${{ steps.composer-cache.outputs.dir }}

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

- name: Create Deptrac cache directory
run: mkdir -p build/

- name: Cache Deptrac results
uses: actions/cache@v2
with:
path: build
key: ${{ runner.os }}-deptrac-${{ github.sha }}
restore-keys: ${{ runner.os }}-deptrac-

- name: Install dependencies
run: composer update --ansi --no-interaction

- name: Run architectural inspection
run: |
sudo phive --no-progress install --global qossmic/deptrac --trust-gpg-keys B8F640134AB1782E
deptrac analyze --cache-file=build/deptrac.cache
8 changes: 3 additions & 5 deletions .github/workflows/test-phpcpd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,8 @@ jobs:
uses: shivammathur/setup-php@v2
with:
php-version: '8.0'
tools: phive
extensions: intl, json, mbstring, xml
tools: phpcpd
extensions: dom, mbstring

- name: Detect code duplication
run: |
sudo phive --no-progress install --global --trust-gpg-keys 4AA394086372C20A phpcpd
phpcpd --exclude system/Test --exclude system/ThirdParty --exclude system/Database/SQLSRV/Builder.php app/ public/ system/
run: phpcpd --exclude system/Test --exclude system/ThirdParty --exclude system/Database/SQLSRV/Builder.php --exclude system/Database/SQLSRV/Forge.php -- app/ public/ system/
1 change: 0 additions & 1 deletion .github/workflows/test-phpunit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,6 @@ jobs:
run: |
composer update --ansi --no-interaction
composer remove --ansi --dev --unused -W rector/rector phpstan/phpstan friendsofphp/php-cs-fixer nexusphp/cs-config codeigniter/coding-standard
php -r 'file_put_contents("vendor/laminas/laminas-zendframework-bridge/src/autoload.php", "");'
env:
COMPOSER_AUTH: ${{ secrets.COMPOSER_AUTH }}

Expand Down
12 changes: 8 additions & 4 deletions .github/workflows/test-userguide.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,22 @@ name: Test User Guide

on:
pull_request:
branches:
- 'develop'
- '4.*'
paths:
- 'user_guide_src/**'
- '.github/workflows/test-userguide.yml'

jobs:
syntax_check:
name: Check User Guide syntax
runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v2
- name: Checkout
uses: actions/checkout@v2

- name: Detect usage of tabs in RST files
run: php utils/check_tabs_in_rst.php

- uses: ammaraskar/[email protected]
with:
docs-folder: user_guide_src
17 changes: 15 additions & 2 deletions .no-header.php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,22 @@
__DIR__ . '/app',
__DIR__ . '/public',
])
->notName('#Logger\.php$#');
->notName('#Logger\.php$#')
->append([
__DIR__ . '/admin/starter/builds',
]);

$overrides = [];
$overrides = [
'ordered_class_elements' => [
'order' => [
'use_trait',
'constant',
'property',
'method',
],
'sort_algorithm' => 'none',
],
];

$options = [
'cacheFile' => 'build/.no-header.php-cs-fixer.cache',
Expand Down
Loading

0 comments on commit 8c7f701

Please sign in to comment.