Skip to content

Commit a902ae6

Browse files
committed
Initial release
1 parent 17a07d9 commit a902ae6

Some content is hidden

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

48 files changed

+2380
-0
lines changed

.editorconfig

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
end_of_line = lf
6+
indent_size = 4
7+
indent_style = space
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true
10+
11+
[*.md]
12+
trim_trailing_whitespace = false
13+
14+
[*.{yml,yaml}]
15+
indent_size = 2

.gitattributes

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Path-based git attributes
2+
# https://www.kernel.org/pub/software/scm/git/docs/gitattributes.html
3+
4+
# Ignore all test and documentation with "export-ignore".
5+
/.github export-ignore
6+
/.gitattributes export-ignore
7+
/.gitignore export-ignore
8+
/phpunit.xml.dist export-ignore
9+
/art export-ignore
10+
/docs export-ignore
11+
/tests export-ignore
12+
/workbench export-ignore
13+
/.editorconfig export-ignore
14+
/.php_cs.dist.php export-ignore
15+
/psalm.xml export-ignore
16+
/psalm.xml.dist export-ignore
17+
/testbench.yaml export-ignore
18+
/UPGRADING.md export-ignore
19+
/phpstan.neon.dist export-ignore
20+
/phpstan-baseline.neon export-ignore

.github/FUNDING.yml

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
github: alexstewartja
2+
buy_me_a_coffee: alexstewartja

.github/ISSUE_TEMPLATE/bug.yml

+66
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
name: Bug Report
2+
description: Report an Issue or Bug with the Package
3+
title: "[Bug]: "
4+
labels: ["bug"]
5+
body:
6+
- type: markdown
7+
attributes:
8+
value: |
9+
We're sorry to hear you have a problem. Can you help us solve it by providing the following details.
10+
- type: textarea
11+
id: what-happened
12+
attributes:
13+
label: What happened?
14+
description: What did you expect to happen?
15+
placeholder: I cannot currently do X thing because when I do, it breaks X thing.
16+
validations:
17+
required: true
18+
- type: textarea
19+
id: how-to-reproduce
20+
attributes:
21+
label: How to reproduce the bug
22+
description: How did this occur, please add any config values used and provide a set of reliable steps if possible.
23+
placeholder: When I do X I see Y.
24+
validations:
25+
required: true
26+
- type: input
27+
id: package-version
28+
attributes:
29+
label: Package Version
30+
description: What version of our Package are you running? Please be as specific as possible
31+
placeholder: 2.0.0
32+
validations:
33+
required: true
34+
- type: input
35+
id: php-version
36+
attributes:
37+
label: PHP Version
38+
description: What version of PHP are you running? Please be as specific as possible
39+
placeholder: 8.2.0
40+
validations:
41+
required: true
42+
- type: input
43+
id: laravel-version
44+
attributes:
45+
label: Laravel Version
46+
description: What version of Laravel are you running? Please be as specific as possible
47+
placeholder: 9.0.0
48+
validations:
49+
required: true
50+
- type: dropdown
51+
id: operating-systems
52+
attributes:
53+
label: Which operating systems does this happen with?
54+
description: You may select more than one.
55+
multiple: true
56+
options:
57+
- macOS
58+
- Windows
59+
- Linux
60+
- type: textarea
61+
id: notes
62+
attributes:
63+
label: Notes
64+
description: Use this field to provide any other notes that you feel might be relevant to the issue.
65+
validations:
66+
required: false

.github/ISSUE_TEMPLATE/config.yml

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
blank_issues_enabled: false
2+
contact_links:
3+
- name: Ask a question
4+
url: https://github.com/alexstewartja/php-didit/discussions/new?category=q-a
5+
about: Ask the community for help
6+
- name: Request a feature
7+
url: https://github.com/alexstewartja/php-didit/discussions/new?category=ideas
8+
about: Share ideas for new features
9+
- name: Report a security issue
10+
url: https://github.com/alexstewartja/php-didit/security/policy
11+
about: Learn how to notify us for sensitive bugs

.github/dependabot.yml

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Please see the documentation for all configuration options:
2+
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
3+
4+
version: 2
5+
updates:
6+
7+
- package-ecosystem: "github-actions"
8+
directory: "/"
9+
schedule:
10+
interval: "weekly"
11+
labels:
12+
- "dependencies"
13+
14+
- package-ecosystem: "composer"
15+
directory: "/"
16+
schedule:
17+
interval: "weekly"
18+
labels:
19+
- "dependencies"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: dependabot-auto-merge
2+
on: pull_request_target
3+
4+
permissions:
5+
pull-requests: write
6+
contents: write
7+
8+
jobs:
9+
dependabot:
10+
runs-on: ubuntu-latest
11+
timeout-minutes: 5
12+
if: ${{ github.actor == 'dependabot[bot]' }}
13+
steps:
14+
15+
- name: Dependabot metadata
16+
id: metadata
17+
uses: dependabot/[email protected]
18+
with:
19+
github-token: "${{ secrets.GITHUB_TOKEN }}"
20+
21+
- name: Auto-merge Dependabot PRs for semver-minor updates
22+
if: ${{steps.metadata.outputs.update-type == 'version-update:semver-minor'}}
23+
run: gh pr merge --auto --merge "$PR_URL"
24+
env:
25+
PR_URL: ${{github.event.pull_request.html_url}}
26+
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
27+
28+
- name: Auto-merge Dependabot PRs for semver-patch updates
29+
if: ${{steps.metadata.outputs.update-type == 'version-update:semver-patch'}}
30+
run: gh pr merge --auto --merge "$PR_URL"
31+
env:
32+
PR_URL: ${{github.event.pull_request.html_url}}
33+
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Fix PHP code style issues
2+
3+
on:
4+
push:
5+
paths:
6+
- '**.php'
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
php-code-styling:
13+
runs-on: ubuntu-latest
14+
timeout-minutes: 5
15+
16+
steps:
17+
- name: Checkout code
18+
uses: actions/checkout@v4
19+
with:
20+
ref: ${{ github.head_ref }}
21+
22+
- name: Fix PHP code style issues
23+
uses: aglipanci/[email protected]
24+
25+
- name: Commit changes
26+
uses: stefanzweifel/git-auto-commit-action@v5
27+
with:
28+
commit_message: Fix styling

.github/workflows/phpstan.yml

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: PHPStan
2+
3+
on:
4+
push:
5+
paths:
6+
- '**.php'
7+
- 'phpstan.neon.dist'
8+
- '.github/workflows/phpstan.yml'
9+
10+
jobs:
11+
phpstan:
12+
name: phpstan
13+
runs-on: ubuntu-latest
14+
timeout-minutes: 5
15+
steps:
16+
- uses: actions/checkout@v4
17+
18+
- name: Setup PHP
19+
uses: shivammathur/setup-php@v2
20+
with:
21+
php-version: '8.4'
22+
coverage: none
23+
24+
- name: Install composer dependencies
25+
uses: ramsey/composer-install@v3
26+
27+
- name: Run PHPStan
28+
run: ./vendor/bin/phpstan --error-format=github

.github/workflows/run-tests.yml

+53
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: run-tests
2+
3+
on:
4+
push:
5+
paths:
6+
- '**.php'
7+
- '.github/workflows/run-tests.yml'
8+
- 'phpunit.xml.dist'
9+
- 'composer.json'
10+
- 'composer.lock'
11+
12+
jobs:
13+
test:
14+
runs-on: ${{ matrix.os }}
15+
timeout-minutes: 5
16+
strategy:
17+
fail-fast: true
18+
matrix:
19+
os: [ubuntu-latest, windows-latest]
20+
php: [8.4, 8.3, 8.2, 8.1]
21+
stability: [prefer-lowest, prefer-stable]
22+
23+
name: P${{ matrix.php }} - ${{ matrix.stability }} - ${{ matrix.os }}
24+
25+
steps:
26+
- name: Checkout code
27+
uses: actions/checkout@v4
28+
29+
- name: Setup PHP
30+
uses: shivammathur/setup-php@v2
31+
with:
32+
php-version: ${{ matrix.php }}
33+
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, fileinfo, reflection, json
34+
coverage: none
35+
36+
- name: Setup problem matchers
37+
run: |
38+
echo "::add-matcher::${{ runner.tool_cache }}/php.json"
39+
echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
40+
41+
- name: Install dependencies
42+
run: |
43+
composer update --${{ matrix.stability }} --prefer-dist --no-interaction
44+
45+
- name: List Installed Dependencies
46+
run: composer show -D
47+
48+
- name: Setup Credentials
49+
run: |
50+
cp tests/assets/credentials.json.example tests/assets/credentials.json
51+
52+
- name: Execute tests
53+
run: vendor/bin/pest --ci
+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: "Update Changelog"
2+
3+
on:
4+
release:
5+
types: [released]
6+
7+
permissions:
8+
contents: write
9+
10+
jobs:
11+
update:
12+
runs-on: ubuntu-latest
13+
timeout-minutes: 5
14+
15+
steps:
16+
- name: Checkout code
17+
uses: actions/checkout@v4
18+
with:
19+
ref: main
20+
21+
- name: Update Changelog
22+
uses: stefanzweifel/changelog-updater-action@v1
23+
with:
24+
latest-version: ${{ github.event.release.name }}
25+
release-notes: ${{ github.event.release.body }}
26+
27+
- name: Commit updated CHANGELOG
28+
uses: stefanzweifel/git-auto-commit-action@v5
29+
with:
30+
branch: main
31+
commit_message: Update CHANGELOG
32+
file_pattern: CHANGELOG.md

.gitignore

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Composer Related
2+
composer.lock
3+
/vendor
4+
5+
# Logs
6+
npm-debug.log
7+
yarn-error.log
8+
9+
# Caches
10+
.phpunit.cache
11+
.phpunit.result.cache
12+
/build
13+
14+
# Editors
15+
/.idea
16+
.phpstorm.meta.php
17+
/.fleet
18+
/.vscode
19+
20+
# Tests
21+
tests/assets/*
22+
!tests/assets/credentials.json.example
23+
!tests/assets/session.json
24+
25+
# Misc
26+
phpunit.xml
27+
phpstan.neon
28+
testbench.yaml
29+
/docs
30+
/coverage

.lando.yml

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
name: php-didit
2+
recipe: lamp
3+
config:
4+
webroot: .
5+
php: 8.4

CHANGELOG.md

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Changelog
2+
3+
All notable changes to `php-didit` will be documented in this file.
4+
5+
## 1.0.0 - Mar 13, 2025
6+
7+
- Initial release
8+
- Verification/KYC features implemented

CONTRIBUTING.md

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Contributing
2+
3+
Contributions are **welcome** and will be fully **credited**.
4+
5+
We accept contributions via Pull Requests on [GitHub](https://github.com/alexstewartja/php-didit).
6+
7+
8+
## Pull Requests
9+
10+
- **Add tests!** - For feature additions/modifications, your PR won't be merged if it doesn't have/pass tests.
11+
12+
- **Document any change in behaviour** - Make sure the `README.md` and any other relevant documentation are kept up-to-date.
13+
14+
- **Consider our release cycle** - We try to follow [SemVer v2.0.0](http://semver.org/). Randomly breaking public APIs is not an option.
15+
16+
- **Create feature branches** - Don't ask us to pull from your master branch.
17+
18+
- **One pull request per feature** - If you want to do more than one thing, send multiple pull requests.
19+
20+
- **Send coherent history** - Make sure each individual commit in your pull request is meaningful.
21+
If you had to make multiple intermediate commits while developing, please [squash them](http://www.git-scm.com/book/en/v2/Git-Tools-Rewriting-History#Changing-Multiple-Commit-Messages) before submitting.
22+
23+
24+
**Happy coding**!

0 commit comments

Comments
 (0)