Skip to content

Commit fe1c105

Browse files
committed
feat: First implementation
Signed-off-by: Julien Guittard <[email protected]>
1 parent 87e21e7 commit fe1c105

Some content is hidden

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

54 files changed

+8817
-0
lines changed

.docheader

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
/**
2+
* This file is part of phayne-io/%regexp:[a-z0-9-]*% and is proprietary and confidential.
3+
* Unauthorized copying of this file, via any medium is strictly prohibited.
4+
*
5+
* @see https://github.com/phayne-io/%regexp:[a-z0-9-]*% for the canonical source repository
6+
* @copyright Copyright (c) 2024-20%regexp:\d{2}% Phayne Limited. (https://phayne.io)
7+
*/

.gitattributes

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
/build/ export-ignore
2+
/.docheader export-ignore
3+
/.gitattributes export-ignore
4+
/.github/ export-ignore
5+
/.gitignore export-ignore
6+
/psalm.xml export-ignore
7+
/phpcs.xml.dist export-ignore
8+
/phpunit.xml.dist export-ignore

.github/workflows/ci.yml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
on:
2+
- push
3+
4+
name: Continuous Integration
5+
jobs:
6+
tests:
7+
name: Run tests
8+
runs-on: ubuntu-22.04
9+
steps:
10+
- name: Checkout
11+
uses: actions/checkout@v4
12+
13+
- name: Install PHP
14+
uses: shivammathur/setup-php@v2
15+
with:
16+
php-version: 8.4
17+
coverage: xdebug
18+
tools: composer:v2
19+
env:
20+
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
21+
22+
- name: Get Composer Cache Directory
23+
id: composer-cache
24+
run: echo "{cache_dir}={$(composer config cache-files-dir)}" >> $GITHUB_OUTPUT
25+
26+
- name: Cache PHP dependencies
27+
uses: actions/cache@v4
28+
id: vendor-cache
29+
with:
30+
path: vendor
31+
key: ${{ runner.os }}-build-${{ hashFiles('**/composer.lock') }}
32+
33+
- name: Install Composer dependencies
34+
if: steps.composer-cache.outputs.cache-hit != 'true'
35+
uses: php-actions/composer@v6
36+
with:
37+
php_version: 8.4
38+
version: 2
39+
args: --ignore-platform-reqs
40+
env:
41+
ACTION_PHP_VERSION: 8.4
42+
43+
- name: Run code styling with phpcs
44+
run: ./vendor/bin/phpcs
45+
46+
- name: Run header check with docheader
47+
run: ./vendor/bin/docheader check src/ test/
48+
49+
- name: Run static code analysis with psalm
50+
run: ./vendor/bin/psalm --config=psalm.xml
51+
52+
- name: Run unit tests with phpunit
53+
run: ./vendor/bin/phpunit --coverage-clover build/logs/clover.xml
54+
55+
# - name: Run coverage
56+
# env:
57+
# COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
58+
# run: ./vendor/bin/php-coveralls --coverage_clover=build/logs/clover.xml -v

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ composer.phar
44
# Commit your application's lock file https://getcomposer.org/doc/01-basic-usage.md#commit-your-composer-lock-file-to-version-control
55
# You may choose to ignore a library lock file http://getcomposer.org/doc/02-libraries.md#lock-file
66
# composer.lock
7+
/.idea/

composer.json

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
{
2+
"name": "phayne-io/php-dynamodb",
3+
"description": "description",
4+
"homepage": "https://github.com/phayne-io/php-dynamodb#readme",
5+
"minimum-stability": "stable",
6+
"license": "BSD-3-Clause",
7+
"authors": [
8+
{
9+
"name": "Julien Guittard",
10+
"email": "[email protected]"
11+
}
12+
],
13+
"require": {
14+
"php": "^8.4",
15+
"aws/aws-sdk-php": "^3.342",
16+
"laminas/laminas-filter": "^2.5",
17+
"psr/container": "^2.0",
18+
"phayne-io/php-collection": "^1.0"
19+
},
20+
"require-dev": {
21+
"malukenho/docheader": "^1.1",
22+
"phpunit/phpunit": "^11.5",
23+
"squizlabs/php_codesniffer": "^3.12",
24+
"vimeo/psalm": "^6.10"
25+
},
26+
"autoload": {
27+
"psr-4": {
28+
"Phayne\\DynamoDB\\": "src/"
29+
}
30+
},
31+
"autoload-dev": {
32+
"psr-4": {
33+
"PhayneTest\\DynamoDB\\": "test/"
34+
}
35+
},
36+
"scripts": {
37+
"psalm": "psalm",
38+
"phpcbf": "phpcbf -vpw --cache=build/cache/phpcs.cache",
39+
"phpcs": "phpcs --cache=build/cache/phpcs.cache",
40+
"phpunit": "phpunit --colors=always",
41+
"phpunit-coverage": "phpunit --colors=always --coverage-html build/report",
42+
"test": [
43+
"@phpcs",
44+
"@phpunit-coverage"
45+
]
46+
},
47+
"support": {
48+
"source": "https://github.com/phayne-io/php-dynamodb",
49+
"issues": "https://github.com/phayne-io/php-dynamodb/issues",
50+
"rss": "https://github.com/phayne-io/php-dynamodb/releases.atom",
51+
"wiki": "https://github.com/phayne-io/php-dynamodb/wiki"
52+
},
53+
"extra": {
54+
"branch-alias": {
55+
"dev-main": "1.0.x-dev"
56+
},
57+
"laminas": {
58+
"component": "Phayne\\DynamoDB",
59+
"config-provider": "Phayne\\DynamoDB\\ConfigProvider"
60+
}
61+
},
62+
"config": {
63+
64+
}
65+
}

0 commit comments

Comments
 (0)