Skip to content

Commit c5cf6ba

Browse files
authored
Merge pull request #8 from datamweb/develop
1.x.x Ready code
2 parents 229058a + 5668b98 commit c5cf6ba

Some content is hidden

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

58 files changed

+3195
-1
lines changed
Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
name: Bug report
2+
description: Create a report to help us improve CodeIgniter DEA Rule
3+
title: "Bug: "
4+
labels: ['bug']
5+
6+
body:
7+
- type: markdown
8+
attributes:
9+
value: |
10+
Thanks for taking the time to fill out this bug report!
11+
12+
Before you begin, **please ensure that there are no existing issues,
13+
whether still open or closed, related to your report**.
14+
If there is, your report will be closed promptly.
15+
16+
---
17+
18+
- type: input
19+
id: php-version
20+
attributes:
21+
label: PHP Version
22+
description: |
23+
e.g. 8.2.6
24+
validations:
25+
required: true
26+
27+
- type: input
28+
id: codeigniter-version
29+
attributes:
30+
label: CodeIgniter4 Version
31+
description: |
32+
e.g. 4.4.3
33+
validations:
34+
required: true
35+
36+
- type: input
37+
id: dea-rule-version
38+
attributes:
39+
label: CodeIgniter DEA Rule Version
40+
description: |
41+
e.g. 1.0.0-beta.1
42+
If you are not using the [latest version](https://github.com/datamweb/codeigniter-dea-rule/releases), please
43+
check to see if the problem occurs with the latest version.
44+
validations:
45+
required: true
46+
47+
- type: dropdown
48+
id: operating-systems
49+
attributes:
50+
label: Which operating systems have you tested for this bug?
51+
description: You may select more than one.
52+
multiple: true
53+
options:
54+
- macOS
55+
- Windows
56+
- Linux
57+
validations:
58+
required: true
59+
60+
- type: dropdown
61+
id: server
62+
attributes:
63+
label: Which server did you use?
64+
options:
65+
- apache
66+
- cli
67+
- cli-server (PHP built-in webserver)
68+
- cgi-fcgi
69+
- fpm-fcgi
70+
- phpdbg
71+
validations:
72+
required: true
73+
74+
- type: input
75+
id: database
76+
attributes:
77+
label: Database
78+
description: e.g. MySQL 5.6, MariaDB 10.2, PostgreSQL 9.6
79+
validations:
80+
required: true
81+
82+
- type: textarea
83+
id: description
84+
attributes:
85+
label: What happened?
86+
placeholder: Tell us what you see!
87+
validations:
88+
required: true
89+
90+
- type: textarea
91+
attributes:
92+
label: Steps to Reproduce
93+
description: Steps to reproduce the behavior.
94+
validations:
95+
required: true
96+
97+
- type: textarea
98+
attributes:
99+
label: Expected Output
100+
description: What do you expect to happen instead of this filed bug?
101+
validations:
102+
required: true
103+
104+
- type: textarea
105+
attributes:
106+
label: Anything else?
107+
description: |
108+
Links? References? Anything that will give us more context about the issue you are encountering!
109+
110+
Tip: You can attach images or log files by clicking this area to highlight it and then dragging files in.
111+
validations:
112+
required: false

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
blank_issues_enabled: false
2+
contact_links:
3+
- name: GitHub Discussions
4+
url: https://github.com/datamweb/codeigniter-dea-rule/discussions
5+
about: Please ask your support questions in the Discussions. Thanks!
6+
7+
- name: CodeIgniter Slack channel
8+
url: https://join.slack.com/t/codeigniterchat/shared_invite/zt-244xrrslc-l_I69AJSi5y2a2RVN~xIdQ
9+
about: Engage with other members of the community in our Slack channel.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
---
2+
name: Feature request
3+
about: How to submit a feature request
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
Please submit feature requests to [Discussions](https://github.com/datamweb/codeigniter-dea-rule/discussions/categories/ideas).
11+
We use GitHub Issues to track bugs and planned work.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
name: Planned work
3+
about: Approved work planning
4+
title: 'Dev: '
5+
labels: dev
6+
assignees: ''
7+
8+
---
9+
10+
Repo maintainers will create "issues" for planned work, so it can be tracked.

.github/dependabot.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: composer
4+
directory: "/"
5+
schedule:
6+
interval: daily
7+
time: "08:30"
8+
timezone: "Asia/Tehran"
9+
open-pull-requests-limit: 5
10+
target-branch: "develop"
11+
reviewers:
12+
- "datamweb"
13+
assignees:
14+
- "datamweb"
15+
labels:
16+
- "dependa bot"
17+
18+
- package-ecosystem: "github-actions"
19+
directory: "/"
20+
schedule:
21+
interval: daily
22+
time: "08:30"
23+
timezone: "Asia/Tehran"
24+
open-pull-requests-limit: 5
25+
target-branch: "develop"
26+
reviewers:
27+
- "datamweb"
28+
assignees:
29+
- "datamweb"
30+
labels:
31+
- "dependa bot"
32+

.github/release.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
changelog:
2+
exclude:
3+
authors:
4+
- dependabot
5+
categories:
6+
- title: Breaking Changes
7+
labels:
8+
- 'breaking change'
9+
- title: Fixed Bugs
10+
labels:
11+
- bug
12+
- title: New Features
13+
labels:
14+
- 'new feature'
15+
- title: Enhancements
16+
labels:
17+
- enhancement
18+
- title: Translations
19+
labels:
20+
- lang
21+
- title: Refactoring
22+
labels:
23+
- refactor
24+
- title: Others (Only for checking. Remove this category)
25+
labels:
26+
- "*"

.github/workflows/deptrac.yml

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
name: Deptrac
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- develop
7+
paths:
8+
- '**.php'
9+
- 'composer.*'
10+
- 'depfile.yaml'
11+
- '.github/workflows/deptrac.yml'
12+
push:
13+
branches:
14+
- develop
15+
paths:
16+
- '**.php'
17+
- 'composer.*'
18+
- 'depfile.yaml'
19+
- '.github/workflows/deptrac.yml'
20+
21+
jobs:
22+
build:
23+
name: Dependency Tracing
24+
runs-on: ubuntu-latest
25+
if: "!contains(github.event.head_commit.message, '[ci skip]')"
26+
27+
steps:
28+
- name: Checkout
29+
uses: actions/checkout@v4
30+
31+
- name: Set up PHP
32+
uses: shivammathur/setup-php@v2
33+
with:
34+
php-version: '8.1'
35+
tools: phive
36+
extensions: intl, json, mbstring, xml
37+
coverage: none
38+
env:
39+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
40+
41+
- name: Get composer cache directory
42+
run: echo "COMPOSER_CACHE_FILES_DIR=$(composer config cache-files-dir)" >> $GITHUB_ENV
43+
44+
- name: Cache composer dependencies
45+
uses: actions/cache@v3
46+
with:
47+
path: ${{ env.COMPOSER_CACHE_FILES_DIR }}
48+
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}-${{ hashFiles('**/composer.lock') }}
49+
restore-keys: ${{ runner.os }}-composer-
50+
51+
- name: Create Deptrac cache directory
52+
run: mkdir -p build/
53+
54+
- name: Cache Deptrac results
55+
uses: actions/cache@v3
56+
with:
57+
path: build
58+
key: ${{ runner.os }}-deptrac-${{ github.sha }}
59+
restore-keys: ${{ runner.os }}-deptrac-
60+
61+
- name: Install dependencies
62+
run: |
63+
if [ -f composer.lock ]; then
64+
composer install --no-progress --no-interaction --prefer-dist --optimize-autoloader
65+
else
66+
composer update --no-progress --no-interaction --prefer-dist --optimize-autoloader
67+
fi
68+
69+
- name: Trace dependencies
70+
run: |
71+
sudo phive --no-progress install --global --trust-gpg-keys B8F640134AB1782E,A98E898BB53EB748 qossmic/deptrac
72+
deptrac analyze --cache-file=build/deptrac.cache

.github/workflows/docs.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: docs
2+
on:
3+
push:
4+
branches:
5+
- develop
6+
- main
7+
permissions:
8+
contents: write
9+
jobs:
10+
deploy:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout Repository
14+
uses: actions/checkout@v4
15+
with:
16+
fetch-depth: 0
17+
- name: Setup Python
18+
uses: actions/setup-python@v4
19+
with:
20+
python-version: 3.x
21+
- name: Install Dependencies
22+
run: |
23+
pip3 install mkdocs-material
24+
pip3 install mkdocs-git-revision-date-localized-plugin
25+
- name: Publish codeigniter DEA Rule Documentation
26+
run: mkdocs gh-deploy --force

.github/workflows/phpcpd.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: PHPCPD
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- develop
7+
paths:
8+
- '**.php'
9+
- '.github/workflows/phpcpd.yml'
10+
push:
11+
branches:
12+
- develop
13+
paths:
14+
- '**.php'
15+
- '.github/workflows/phpcpd.yml'
16+
17+
jobs:
18+
build:
19+
name: Code Copy-Paste Detection
20+
runs-on: ubuntu-latest
21+
if: "!contains(github.event.head_commit.message, '[ci skip]')"
22+
23+
steps:
24+
- name: Checkout
25+
uses: actions/checkout@v4
26+
27+
- name: Setup PHP
28+
uses: shivammathur/setup-php@v2
29+
with:
30+
php-version: '8.0'
31+
tools: phpcpd
32+
extensions: dom, mbstring
33+
coverage: none
34+
35+
- name: Detect duplicate code
36+
run: phpcpd src/ tests/

0 commit comments

Comments
 (0)