Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
498 commits
Select commit Hold shift + click to select a range
4dcee8f
Merge pull request #829 from kenjis/fix-ValidationRules-prepareValidF…
kenjis Sep 18, 2023
692d0a9
Bump phpstan-codeigniter version
paulbalandan Sep 18, 2023
804e449
Regenerate baseline
paulbalandan Sep 18, 2023
0c551dc
Initial work on HMAC implementation.
tswagger Aug 11, 2023
f634172
Authenticator test pass
tswagger Aug 15, 2023
52b5d8b
Authenticator test pass
tswagger Aug 15, 2023
1a7802e
Added HMAC Filter tests. Pass
tswagger Aug 15, 2023
1cd518f
Added documentation
tswagger Aug 18, 2023
91adb87
Added missing helper
tswagger Aug 23, 2023
50d70e2
Minor syntax fix
tswagger Aug 23, 2023
5be8b2c
Codeing standards cleanup
tswagger Aug 23, 2023
89f38a8
Clarified Return statements
tswagger Aug 24, 2023
2adcdbd
Update docs/guides/api_hmac_keys.md
tswagger Aug 28, 2023
bbc2496
Update docs/guides/api_hmac_keys.md
tswagger Aug 28, 2023
1243efc
Minor typo fix, clarification of key vs secretKey
tswagger Aug 30, 2023
498e685
Update docs/authentication.md
tswagger Aug 31, 2023
ac61035
Renamed 'HMAC' in the code to a consistent 'Hmac'
tswagger Aug 31, 2023
c8058f7
Update docs/authentication.md
tswagger Aug 31, 2023
755a99c
Update docs/authentication.md
tswagger Aug 31, 2023
19d7cea
Update docs/authentication.md
tswagger Aug 31, 2023
72b9a70
Update docs/authentication.md
tswagger Aug 31, 2023
daee371
Update docs/guides/api_hmac_keys.md
tswagger Aug 31, 2023
8990cef
Update docs/guides/api_hmac_keys.md
tswagger Aug 31, 2023
5f56a55
Added ToC entries.
tswagger Aug 31, 2023
4b452b9
Added CURLRequest example
tswagger Aug 31, 2023
547e455
Update docs/guides/api_hmac_keys.md
tswagger Sep 5, 2023
65853f7
Update docs/guides/api_hmac_keys.md
tswagger Sep 6, 2023
9f9506d
Improved HMAC Docs
tswagger Sep 6, 2023
7791f87
Updated phpdpd to suppress errors from HMAC Addition
tswagger Sep 6, 2023
b5d7fa1
Updated login recording to match JWT Authorization
tswagger Sep 12, 2023
d8e4262
Update src/Authentication/Authenticators/HmacSha256.php
tswagger Sep 13, 2023
6ac224e
Added HMAC References to installation documentation
tswagger Sep 13, 2023
08e0b8e
Cleaned up table formatting in markdown
tswagger Sep 13, 2023
bbcf8b5
Updated byte size for HMAC Secret Key
tswagger Sep 14, 2023
f47891a
Update tests/Authentication/Authenticators/HmacAuthenticatorTest.php
tswagger Sep 15, 2023
10147cf
Update tests/Authentication/Authenticators/HmacAuthenticatorTest.php
tswagger Sep 15, 2023
2eb3588
Initial fix to PHPStan errors
tswagger Sep 15, 2023
37c9f82
Syntax adjustment
tswagger Sep 15, 2023
58b6042
Added additional test
tswagger Sep 16, 2023
76baf80
Added additional tests
tswagger Sep 16, 2023
f57f45f
Fix to test
tswagger Sep 16, 2023
968997a
Removed redundant comment
tswagger Sep 16, 2023
a1b64db
Added config copy to Setup script
tswagger Sep 18, 2023
9d223a4
Minor fix in docs
tswagger Sep 18, 2023
a3030f9
Merge pull request #795 from geniza-ai/feature/HMAC
kenjis Sep 19, 2023
ebfa46d
docs: add "What is Shield?"
kenjis Sep 17, 2023
d649989
docs: remove TOC
kenjis Sep 17, 2023
eb48201
docs: remove white speaces
kenjis Sep 17, 2023
0ca67e3
docs: add section title
kenjis Sep 17, 2023
b602056
docs: reorganize TOC
kenjis Sep 17, 2023
f9fbb4a
docs: split quickstart.md
kenjis Sep 17, 2023
79ff70c
docs: remove redundant TOC
kenjis Sep 17, 2023
c14253a
docs: move two pages to Guides
kenjis Sep 17, 2023
5db8120
docs: move Concepts to first
kenjis Sep 17, 2023
e43e689
docs: move two files to guides/
kenjis Sep 17, 2023
32a68b0
docs: fix typo in file name
kenjis Sep 17, 2023
ac9aff9
docs: move three files to quick_start_guide/
kenjis Sep 17, 2023
0c60b99
docs: fix indentation
kenjis Sep 17, 2023
4db3730
docs: split customization.md
kenjis Sep 17, 2023
f5be159
docs: update links
kenjis Sep 17, 2023
d19c6e3
docs: fix invalid markdown
kenjis Sep 17, 2023
33a4c58
docs: replace handler with authenticator
kenjis Sep 17, 2023
8115054
docs: add "official"
kenjis Sep 17, 2023
424b2cb
Merge pull request #840 from paulbalandan/update-phpstan-codeigniter
kenjis Sep 19, 2023
fdd5bcb
Merge pull request #839 from kenjis/docs-reorganize
kenjis Sep 19, 2023
826ca41
docs: improve comments
kenjis Sep 19, 2023
92ca399
fix: AccessTokens authenticator records all accesses
kenjis Sep 19, 2023
5e75998
docs: add UPGRADING.md
kenjis Sep 19, 2023
2bb0114
docs: fix wrong header key
kenjis Sep 19, 2023
a331260
Merge pull request #844 from kenjis/fix-hmac-loggedIn
kenjis Sep 19, 2023
fc0926b
Merge pull request #833 from kenjis/feat-user-command
kenjis Sep 19, 2023
2907a5c
Merge pull request #843 from kenjis/fix-token-auth-logging
kenjis Sep 19, 2023
e977f0e
docs: extract "Controller Filters"
kenjis Sep 17, 2023
159295b
docs: remove "the"
kenjis Sep 17, 2023
b42159c
docs: add list of Authenticators
kenjis Sep 17, 2023
a937a80
docs: add section title
kenjis Sep 17, 2023
5c636e5
docs: change first letters of keywords to capital letters
kenjis Sep 17, 2023
91e094d
docs: change page titles
kenjis Sep 17, 2023
a3d84c8
docs: add "Using Authorization"
kenjis Sep 18, 2023
2952e1f
docs: replace "Magic Login Links" with "Magic Link Login"
kenjis Sep 18, 2023
0d3c652
docs: add page for Magic Link Login
kenjis Sep 18, 2023
0ffd7c6
docs: add "Controller Filters"
kenjis Sep 18, 2023
228ad48
docs: change filename
kenjis Sep 18, 2023
6f260fe
docs: add descriptions
kenjis Sep 18, 2023
7008664
docs: remove using_access_tokens_auth.md
kenjis Sep 18, 2023
85fd665
docs: change section title
kenjis Sep 18, 2023
adf6024
docs: add links
kenjis Sep 18, 2023
cf1e5f1
docs: add "Getting Started > Configuration"
kenjis Sep 18, 2023
80e46eb
docs: update link
kenjis Sep 18, 2023
604b390
docs: fix section title
kenjis Sep 18, 2023
32ab5ca
docs: remove duplicated "the"
kenjis Sep 18, 2023
38fb0da
docs: move Configuration to References
kenjis Sep 18, 2023
ae56615
docs: add explanation to configuration.md
kenjis Sep 18, 2023
969e47c
docs: add empty line
kenjis Sep 18, 2023
d7008e8
docs: move configuration.md to "Getting Started"
kenjis Sep 18, 2023
a6a6d12
docs: add Configuration in magic_link_login.md
kenjis Sep 18, 2023
14a607c
docs: fix rebase mistake
kenjis Sep 19, 2023
dfe0448
docs: add empty lines and line breaks
kenjis Sep 19, 2023
331a81e
docs: improve descriptions for Filters
kenjis Sep 19, 2023
ba72bdd
docs: add line break after **Note**
kenjis Sep 19, 2023
a33cf5a
docs: add HmacSha256 authenticator
kenjis Sep 19, 2023
6584605
docs: move "Managing Users" to "Guides"
kenjis Sep 19, 2023
ae30aac
docs: add section "User Management" and change section order
kenjis Sep 19, 2023
62685e8
docs: change sub section order
kenjis Sep 19, 2023
e523415
docs: move files to references/
kenjis Sep 19, 2023
780c57b
docs: update links
kenjis Sep 19, 2023
564352a
docs: fix link text
kenjis Sep 19, 2023
588d17d
docs: add about app/Config/AuthToken.php
kenjis Sep 19, 2023
2e48eca
docs: remove out-of-dated error description
kenjis Sep 19, 2023
2316f76
docs: replace "remember me" with remember-me
kenjis Sep 19, 2023
ab65804
docs: replace Email/Password with ID/Password
kenjis Sep 19, 2023
4f7d592
docs: add section title
kenjis Sep 19, 2023
cd757a2
docs: move note up
kenjis Sep 19, 2023
10d5f4d
docs: add link to CI4 user guide
kenjis Sep 19, 2023
f40a5ee
docs: make page title shorter
kenjis Sep 19, 2023
52d24fd
docs: add Acknowledgements
kenjis Sep 19, 2023
d8c89bc
docs: update and move description for Authenticators
kenjis Sep 19, 2023
d7449c4
chore: use codeigniter4/.github/.github/workflows/phpcpd.yml
kenjis Sep 7, 2023
f55f63c
chore: enable phpstan's bleedingEdge.neon
paulbalandan Sep 20, 2023
98d1069
Merge pull request #842 from paulbalandan/bleeding-edge
paulbalandan Sep 20, 2023
6be3162
Merge pull request #841 from kenjis/docs-reorganize-2
kenjis Sep 22, 2023
c6112fa
docs: add references/authentication/ and move files
kenjis Sep 19, 2023
4914538
docs: split authentication.md
kenjis Sep 19, 2023
5567353
docs: move session_auth_event_and_logging.md contents to authenticati…
kenjis Sep 19, 2023
9fe3ee8
docs: update link
kenjis Sep 22, 2023
3d1b055
chore: enable content.code.copy feature
kenjis Sep 22, 2023
a2dc641
docs: add links to references
kenjis Sep 22, 2023
77e2564
docs: add about shield:user command
kenjis Sep 22, 2023
36a0621
docs: update README.md
kenjis Sep 23, 2023
c39b057
docs: update LICENSE
kenjis Sep 23, 2023
e186140
Merge pull request #813 from kenjis/reuse-phpcpd.yml
datamweb Sep 23, 2023
dda86eb
Merge pull request #847 from kenjis/docs-reorganize-3
datamweb Sep 23, 2023
4ac3c55
Merge pull request #850 from kenjis/docs-LICENSE
datamweb Sep 23, 2023
8c4276b
Merge pull request #848 from kenjis/docs-shield-user-command
datamweb Sep 23, 2023
ba1a6c4
docs: fix typo
kenjis Sep 23, 2023
7c2c66b
Merge pull request #849 from kenjis/docs-README.md
kenjis Sep 24, 2023
75cf64d
refactor: move $authenticatorHeader and $unusedTokenLifetime to Confi…
kenjis Sep 19, 2023
faf90f6
style: break long lines
kenjis Sep 19, 2023
4664eb7
config: add comments
kenjis Sep 19, 2023
0f85914
config: move items to right place
kenjis Sep 19, 2023
68ce900
refactor: move $usernameValidationRules and $emailValidationRules to …
kenjis Sep 19, 2023
e09b0bf
docs: add UPGRADING.md
kenjis Sep 19, 2023
1ce4093
config: remove unused items
kenjis Sep 19, 2023
b0535e5
docs: fix typos
kenjis Sep 19, 2023
cc5d01f
docs: update config file path
kenjis Sep 23, 2023
9dd0068
docs: update validation rules
kenjis Sep 24, 2023
ac302be
fix: remove `strong_password`
kenjis Sep 24, 2023
9554986
lang: [ar] fix issue 851
mshannaq Sep 24, 2023
425a550
Merge pull request #854 from mshannaq/ar-fix
datamweb Sep 24, 2023
41f319b
Merge pull request #852 from kenjis/docs-validation_rules.md
kenjis Sep 24, 2023
cbaa02f
Merge pull request #853 from kenjis/fix-shield-users-validation-rules
kenjis Sep 24, 2023
6189f9e
Merge pull request #845 from kenjis/move-config-items
datamweb Sep 25, 2023
6963bb0
chore: add navigation footer
datamweb Sep 25, 2023
4d3c185
add send PR from site
datamweb Sep 25, 2023
0d2b743
add accent with colore orange
datamweb Sep 25, 2023
3aee075
add back to top
datamweb Sep 25, 2023
23dfa28
add copyright for codeigniter
datamweb Sep 25, 2023
697643f
improve search
datamweb Sep 25, 2023
49a3509
add dark mode
datamweb Sep 25, 2023
cb1ed21
add more social link
datamweb Sep 25, 2023
b6a0e3c
improve sidbar nav
datamweb Sep 25, 2023
ccb0dc1
Merge pull request #855 from datamweb/add-feat-site
datamweb Sep 25, 2023
9ada80c
docs: remove space from code
datamweb Sep 25, 2023
47a6442
remove space from jwt.md
datamweb Sep 25, 2023
b77aaf8
Update authorization.md
datamweb Sep 25, 2023
5eb96b4
Merge pull request #856 from codeigniter4/datamweb-patch-1
kenjis Sep 25, 2023
18517d2
Add revokeAccessTokenBySecret
WaaaghNL Sep 26, 2023
6ace36c
chore(deps-dev): update rector/rector requirement from 0.18.3 to 0.18.4
dependabot[bot] Sep 26, 2023
cb3ade8
Merge pull request #857 from codeigniter4/dependabot/composer/rector/…
samsonasik Sep 26, 2023
82f0ee5
docs: improve dark mode (#859)
datamweb Sep 27, 2023
19bbfbb
use new style for note and warning
datamweb Sep 26, 2023
fa091c8
fix note format
datamweb Sep 27, 2023
d148d87
use new style for note/warning format
datamweb Sep 27, 2023
cecc5ff
update dark mode css for note/warning
datamweb Sep 27, 2023
ddfc52b
use LF
datamweb Sep 27, 2023
e5217b5
use curl for beter code show
datamweb Sep 27, 2023
ae1449e
update highlightjs to 11.8.0
datamweb Sep 27, 2023
1c68542
show Last update/Created date
datamweb Sep 27, 2023
292e0a3
fix: remiove space codeblock
datamweb Sep 27, 2023
7d6c685
Merge pull request #858 from WaaaghNL/develop
kenjis Sep 28, 2023
eefd888
chore: add phpunit-lowest.yml
kenjis Sep 28, 2023
48d0118
use pip3 instance pip
datamweb Sep 28, 2023
9376575
docs: change dotenv to text
kenjis Sep 28, 2023
b1adfa8
Merge pull request #860 from datamweb/improve-site-part2
datamweb Sep 28, 2023
41fb00e
Merge pull request #864 from kenjis/docs-do-not-use-dotenv
datamweb Sep 28, 2023
16fb1e4
docs: add "How to Build Shield Documentation"
kenjis Sep 28, 2023
cc2a25b
Merge pull request #862 from kenjis/docs-HowToBuildDocs
datamweb Sep 29, 2023
59cc3dc
Merge pull request #863 from kenjis/fix-phpunit-workflow
kenjis Sep 29, 2023
c5a4b45
refactor: move `label` for validation rules to Config\Auth
kenjis Sep 27, 2023
84df605
refactor: rename classname and method name
kenjis Sep 27, 2023
cc481f5
refactor: extract methods for password fields
kenjis Sep 27, 2023
82fe260
refactor: add private property
kenjis Sep 27, 2023
d1c0658
refactor: move validation rules to ValidationRules
kenjis Sep 27, 2023
e25fe07
refactor: if setting returns values, returns it
kenjis Sep 27, 2023
95ecdc1
docs: update doc comments
kenjis Sep 27, 2023
114cfba
fix: wrong password validation rules for login
kenjis Sep 27, 2023
76f8c97
refactor: do not use array_merge()
kenjis Sep 27, 2023
b080a71
refactor: shorten variable names
kenjis Sep 27, 2023
8badb41
docs: update default validation rules
kenjis Sep 30, 2023
1d9a659
Merge pull request #861 from kenjis/refactor-validation-rules
kenjis Sep 30, 2023
fafa9a9
changed the visibility of properties for easier inheritance
sammyskills Sep 30, 2023
164bce4
redirect inactive account to auth action
sammyskills Sep 30, 2023
91c0025
added tests
sammyskills Sep 30, 2023
a5483f9
Merge pull request #868 from sammyskills/fix-validation-class-visibil…
kenjis Oct 1, 2023
679a569
docs: remove config method in .env
kenjis Oct 1, 2023
09a7cf3
Merge pull request #870 from kenjis/fix-docs-install-csrfProtection
kenjis Oct 2, 2023
fe04c11
refactor: remove Composer autoloading of email helper
kenjis Oct 2, 2023
a8b48ca
docs: update sample LoginController
kenjis Oct 2, 2023
4851a59
Merge pull request #873 from kenjis/docs-jwt-LoginController
kenjis Oct 2, 2023
9843f27
Merge pull request #872 from kenjis/remove-autoload-email_helper
kenjis Oct 2, 2023
4a25453
chore: update minimum CI4 version to 4.3.5
kenjis Oct 2, 2023
4c381f4
refactor: remove code for 4.2.x or before
kenjis Oct 2, 2023
0b05a96
chore: configure page redirects
kenjis Oct 3, 2023
9dee01e
docs: add emojis
kenjis Oct 3, 2023
c0cc266
docs: add features
kenjis Oct 3, 2023
8ff5ad6
Merge pull request #830 from codeigniter4/datamweb-patch-conflict--label
kenjis Oct 3, 2023
defdd11
Merge pull request #869 from sammyskills/fix-inactive-redirect
datamweb Oct 3, 2023
e3ab1ac
Merge pull request #871 from kenjis/update-min-CI4-version-435
kenjis Oct 3, 2023
280b8f1
Merge pull request #874 from kenjis/docs-mkdocs-redirect
kenjis Oct 3, 2023
70e49c5
Merge pull request #875 from kenjis/docs-improve-home
kenjis Oct 3, 2023
86fe095
feat: add Config\Email setup
kenjis Oct 3, 2023
0ea6604
feat: add InputOutput::error() for testing
kenjis Oct 3, 2023
2196278
refactor: use InputOutput::error()
kenjis Oct 3, 2023
57986ba
refactor: extract BaseCommand
kenjis Oct 3, 2023
af9df72
docs: update docs
kenjis Oct 3, 2023
b92554d
docs: update sample code
kenjis Oct 3, 2023
c27ec88
refactor: remove unused property
kenjis Oct 3, 2023
02188a7
fix: add null check
kenjis Oct 3, 2023
b788545
refactor: use config()
kenjis Oct 3, 2023
41fb8c8
test: add test for EmailConfig is fine
kenjis Oct 3, 2023
7eb6697
test: extract methods
kenjis Oct 3, 2023
fe0da3d
chore: add RecastingRemovalRector in skip()
kenjis Oct 3, 2023
a3f947d
fix: remove unneeded CITestStreamFilter removal
kenjis Oct 3, 2023
a7ad37e
fix: add missing CITestStreamFilter::addErrorFilter()
kenjis Oct 3, 2023
a7481fc
refactor: remove outdated code for CI 4.2 or before
kenjis Oct 3, 2023
d03c793
fix: set InputOutput when constructing
kenjis Oct 3, 2023
f6c1a4d
test: add logic to normalize line break code
kenjis Oct 3, 2023
3a24d28
test: fix assertions for Windows
kenjis Oct 3, 2023
c78caad
Merge pull request #877 from kenjis/remove-old-code-for-CI-4.2
kenjis Oct 4, 2023
d693af3
Merge pull request #878 from kenjis/fix-UserTest-for-Windows
datamweb Oct 4, 2023
b968a39
chore(deps-dev): update rector/rector requirement from 0.18.4 to 0.18.5
dependabot[bot] Oct 5, 2023
0133ff5
Merge pull request #881 from codeigniter4/dependabot/composer/rector/…
kenjis Oct 5, 2023
112ba2a
Merge pull request #876 from kenjis/feat-setup-command-email-setup
kenjis Oct 7, 2023
0cf7e59
used named routes for redirects and form submission
sammyskills Oct 8, 2023
bd0bf21
docs: add about locale routes
kenjis Oct 9, 2023
d225640
docs: add about global filter config update
kenjis Oct 9, 2023
a2a5b0d
Merge pull request #883 from sammyskills/fix/use-named-routes
kenjis Oct 9, 2023
312f367
Merge pull request #884 from kenjis/docs-add-locale-routes
kenjis Oct 9, 2023
9e95081
Prep for 1.0.0-beta.7 release
kenjis Oct 9, 2023
5f81a95
Merge pull request #886 from codeigniter4/release-1.0.0-beta.7
kenjis Oct 9, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 2 additions & 51 deletions .github/workflows/deptrac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,54 +19,5 @@ on:
- '.github/workflows/deptrac.yml'

jobs:
build:
name: Dependency Tracing
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[ci skip]')"

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

- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.1'
tools: phive
extensions: intl, json, mbstring, xml
coverage: none
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Get composer cache directory
run: echo "COMPOSER_CACHE_FILES_DIR=$(composer config cache-files-dir)" >> $GITHUB_ENV

- name: Cache composer dependencies
uses: actions/cache@v3
with:
path: ${{ env.COMPOSER_CACHE_FILES_DIR }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer-

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

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

- name: Install dependencies
run: |
if [ -f composer.lock ]; then
composer install --no-progress --no-interaction --prefer-dist --optimize-autoloader
else
composer update --no-progress --no-interaction --prefer-dist --optimize-autoloader
fi

- name: Trace dependencies
run: |
sudo phive --no-progress install --global --trust-gpg-keys B8F640134AB1782E,A98E898BB53EB748 qossmic/deptrac
deptrac analyze --cache-file=build/deptrac.cache
deptrac:
uses: codeigniter4/.github/.github/workflows/deptrac.yml@main
6 changes: 4 additions & 2 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,11 @@ jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: 3.x
- run: pip install mkdocs-material
- run: pip3 install mkdocs-material
- run: pip3 install mkdocs-git-revision-date-localized-plugin
- run: pip3 install mkdocs-redirects
- run: mkdocs gh-deploy --force
22 changes: 22 additions & 0 deletions .github/workflows/no-merge-commits.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Detect Merge Commits

on:
pull_request:

permissions:
contents: read
pull-requests: read

jobs:
test:
name: Check for merge commits
runs-on: ubuntu-22.04

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

- name: Run test
uses: NexusPHP/no-merge-commits@v2.0.0
with:
token: ${{ secrets.GITHUB_TOKEN }}
24 changes: 5 additions & 19 deletions .github/workflows/phpcpd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,8 @@ on:
- '.github/workflows/phpcpd.yml'

jobs:
build:
name: Code Copy-Paste Detection
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[ci skip]')"

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

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.0'
tools: phpcpd
extensions: dom, mbstring
coverage: none

- name: Detect duplicate code
run: phpcpd src/ tests/ --exclude src/Database/Migrations/2020-12-28-223112_create_auth_tables.php
phpcpd:
uses: codeigniter4/.github/.github/workflows/phpcpd.yml@main
with:
dirs: "src/ tests/"
options: "--exclude src/Database/Migrations/2020-12-28-223112_create_auth_tables.php --exclude src/Authentication/Authenticators/HmacSha256.php --exclude tests/Authentication/Authenticators/AccessTokenAuthenticatorTest.php"
44 changes: 2 additions & 42 deletions .github/workflows/phpcsfixer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,45 +15,5 @@ on:
- '.github/workflows/phpcsfixer.yml'

jobs:
build:
name: PHP ${{ matrix.php-versions }} Coding Standards
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[ci skip]')"
strategy:
fail-fast: false
matrix:
php-versions: ['7.4', '8.0', '8.1']

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

- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
extensions: json, tokenizer
coverage: none
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Get composer cache directory
run: echo "COMPOSER_CACHE_FILES_DIR=$(composer config cache-files-dir)" >> $GITHUB_ENV

- name: Cache composer dependencies
uses: actions/cache@v3
with:
path: ${{ env.COMPOSER_CACHE_FILES_DIR }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer-

- name: Install dependencies
run: |
if [ -f composer.lock ]; then
composer install --no-progress --no-interaction --prefer-dist --optimize-autoloader
else
composer update --no-progress --no-interaction --prefer-dist --optimize-autoloader
fi

- name: Check code for standards compliance
run: vendor/bin/php-cs-fixer fix --verbose --ansi --dry-run --using-cache=no --diff
phpcsfixer:
uses: codeigniter4/.github/.github/workflows/phpcsfixer.yml@main
55 changes: 2 additions & 53 deletions .github/workflows/phpstan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,56 +19,5 @@ on:
- '.github/workflows/phpstan.yml'

jobs:
build:
name: PHP ${{ matrix.php-versions }} Static Analysis
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[ci skip]')"
strategy:
fail-fast: false
matrix:
php-versions: ['7.4', '8.0', '8.1']

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

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
tools: phpstan, phpunit
extensions: intl, json, mbstring, xml
coverage: none
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Get composer cache directory
run: echo "COMPOSER_CACHE_FILES_DIR=$(composer config cache-files-dir)" >> $GITHUB_ENV

- name: Cache composer dependencies
uses: actions/cache@v3
with:
path: ${{ env.COMPOSER_CACHE_FILES_DIR }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer-

- name: Create PHPStan cache directory
run: mkdir -p build/phpstan

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

- name: Install dependencies
run: |
if [ -f composer.lock ]; then
composer install --no-progress --no-interaction --prefer-dist --optimize-autoloader
else
composer update --no-progress --no-interaction --prefer-dist --optimize-autoloader
fi

- name: Run static analysis
run: vendor/bin/phpstan analyze
phpstan:
uses: codeigniter4/.github/.github/workflows/phpstan.yml@main
2 changes: 1 addition & 1 deletion .github/workflows/phpunit-lang.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set up PHP
uses: shivammathur/setup-php@v2
Expand Down
23 changes: 23 additions & 0 deletions .github/workflows/phpunit-lowest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: PHPUnit Lowest

on:
pull_request:
branches:
- develop
paths:
- '**.php'
- 'composer.*'
- 'phpunit*'
- '.github/workflows/phpunit-lowest.yml'
push:
branches:
- develop
paths:
- '**.php'
- 'composer.*'
- 'phpunit*'
- '.github/workflows/phpunit-lowest.yml'

jobs:
phpunit:
uses: codeigniter4/.github/.github/workflows/phpunit-lowest.yml@main
Loading