Skip to content

Commit a69eea4

Browse files
committed
first commit
0 parents  commit a69eea4

22 files changed

+7185
-0
lines changed

.dependabot/config.yml

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# https://dependabot.com/docs/config-file/
2+
3+
version: 1
4+
5+
update_configs:
6+
- default_assignees:
7+
- "laragraph"
8+
default_reviewers:
9+
- "laragraph"
10+
directory: "/"
11+
package_manager: "php:composer"
12+
update_schedule: "live"
13+
version_requirement_updates: "increase_versions"

.editorconfig

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
indent_size = 4
6+
indent_style = space
7+
insert_final_newline = true
8+
trim_trailing_whitespace = true
9+
10+
[*.json]
11+
indent_size = 2
12+
13+
[*.neon]
14+
indent_style = tab
15+
16+
[*.yml]
17+
indent_size = 2
18+
19+
[Makefile]
20+
indent_style = tab

.gitattributes

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
/.dependabot/ export-ignore
2+
/.github/ export-ignore
3+
/test/ export-ignore
4+
/.editorconfig export-ignore
5+
/.gitattributes export-ignore
6+
/.gitignore export-ignore
7+
/infection.json export-ignore
8+
/Makefile export-ignore
9+
/phpstan.neon export-ignore
10+
/phpunit.xml export-ignore

.github/CONTRIBUTING.md

+63
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
# CONTRIBUTING
2+
3+
We are using [GitHub Actions](https://github.com/features/actions) as a continuous integration system.
4+
5+
For details, see [`workflows/continuous-integration.yml`](workflows/continuous-integration.yml).
6+
7+
## Code Style
8+
9+
The code style is automatically fixed through [StyleCI](https://styleci.io/).
10+
11+
## Static Code Analysis
12+
13+
We are using [`phpstan/phpstan`](https://github.com/phpstan/phpstan) to statically analyze the code.
14+
15+
Run
16+
17+
```bash
18+
make stan
19+
```
20+
21+
to run a static code analysis.
22+
23+
## Tests
24+
25+
We are using [`phpunit/phpunit`](https://github.com/sebastianbergmann/phpunit) to drive the development.
26+
27+
Run
28+
29+
```bash
30+
make test
31+
```
32+
33+
to run all the tests.
34+
35+
## Mutation Tests
36+
37+
We are using [`infection/infection`](https://github.com/infection/infection) to ensure a minimum quality of the tests.
38+
39+
Enable `Xdebug` and run
40+
41+
```bash
42+
make infection
43+
```
44+
45+
to run mutation tests.
46+
47+
## Extra lazy?
48+
49+
Run
50+
51+
```bash
52+
make
53+
```
54+
55+
to enforce coding standards, perform a static code analysis, and run tests!
56+
57+
:bulb: Run
58+
59+
```bash
60+
make help
61+
```
62+
63+
to display a list of available targets with corresponding descriptions.

.github/ISSUE_TEMPLATE/bug_report.md

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
name: Bug report
3+
about: Report a bug
4+
5+
---
6+
7+
<!-- Please file a bug report only if there is a problem with this library.
8+
To get help on an issue or ask a question, consult Stackoverflow. -->
9+
10+
**Describe the bug**
11+
12+
<!-- In what way is it behaving incorrectly or unexpectedly? -->
13+
14+
**Expected behavior/Solution**
15+
16+
<!-- What do you think should happen instead? How could the issue be resolved?-->
17+
18+
**Steps to reproduce**
19+
20+
1.
21+
2.
22+
3.
23+
24+
**Output/Logs**
25+
26+
<details><summary>Click to expand</summary>
27+
28+
```
29+
# Add in log output/error messages here
30+
```
31+
32+
</details></br>
+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: Feature request
3+
about: Propose an idea for a feature
4+
5+
---
6+
7+
<!-- Please keep in mind that this is a community project and features take effort.
8+
Are you willing to provide a PR for this issue or aid in developing it? -->
9+
10+
**Is your feature request related to a problem? Please describe.**
11+
12+
<!-- A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] -->
13+
14+
**Describe the solution you'd like**
15+
16+
<!-- A clear and concise description of what you want to happen. -->
17+
18+
**Describe alternatives you've considered**
19+
20+
<!-- A clear and concise description of any alternative solutions or features you've considered. -->

.github/PULL_REQUEST_TEMPLATE.md

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
- [ ] Added automated tests
2+
- [ ] Documented for all relevant versions
3+
- [ ] Updated the changelog
4+
5+
<!-- Link to related issues this PR resolves, e.g. "Resolves #236"-->
6+
7+
**Changes**
8+
9+
<!-- Detail the changes in behaviour this PR introduces. -->
10+
11+
**Breaking changes**
12+
13+
<!-- If there are any breaking changes, list them here. -->

.github/settings.yml

+53
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# https://github.com/probot/settings
2+
3+
branches:
4+
- name: master
5+
protection:
6+
enforce_admins: false
7+
required_pull_request_reviews:
8+
dismiss_stale_reviews: true
9+
require_code_owner_reviews: true
10+
required_approving_review_count: 1
11+
required_status_checks:
12+
contexts:
13+
- "Coding Standards"
14+
- "Static Code Analysis"
15+
- "Tests (php7.3, lowest)"
16+
- "Tests (php7.3, locked)"
17+
- "Tests (php7.3, highest)"
18+
- "Tests (php7.3, lowest)"
19+
- "Tests (php7.3, locked)"
20+
- "Tests (php7.3, highest)"
21+
- "Code Coverage"
22+
- "Mutation Tests"
23+
- "codecov/patch"
24+
- "codecov/project"
25+
strict: false
26+
restrictions: null
27+
28+
labels:
29+
- name: bug
30+
color: ee0701
31+
32+
- name: dependencies
33+
color: 0366d6
34+
35+
- name: enhancement
36+
color: 0e8a16
37+
38+
- name: stale
39+
color: eeeeee
40+
41+
repository:
42+
allow_merge_commit: true
43+
allow_rebase_merge: false
44+
allow_squash_merge: false
45+
default_branch: master
46+
description: "Utilities for using GraphQL with Laravel"
47+
has_downloads: true
48+
has_issues: true
49+
has_pages: false
50+
has_projects: false
51+
has_wiki: false
52+
name: laravel-graphql-utils
53+
private: false
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
# https://help.github.com/en/categories/automating-your-workflow-with-github-actions
2+
3+
on:
4+
- pull_request
5+
- push
6+
7+
name: "Continuous Integration"
8+
9+
jobs:
10+
coding-standards:
11+
name: "Coding Standards"
12+
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- name: "Checkout"
17+
uses: actions/checkout@master
18+
19+
- name: "Validate composer.json and composer.lock"
20+
run: php7.3 /usr/bin/composer validate --strict
21+
22+
- name: "Install locked dependencies with composer"
23+
run: php7.3 /usr/bin/composer install --no-interaction --no-progress --no-suggest
24+
25+
- name: "Run localheinz/composer-normalize"
26+
run: php7.3 /usr/bin/composer normalize --dry-run
27+
28+
static-code-analysis:
29+
name: "Static Code Analysis"
30+
31+
runs-on: ubuntu-latest
32+
33+
steps:
34+
- name: "Checkout"
35+
uses: actions/checkout@master
36+
37+
- name: "Install locked dependencies with composer"
38+
run: php7.3 /usr/bin/composer install --no-interaction --no-progress --no-suggest
39+
40+
- name: "Run phpstan/phpstan"
41+
run: php7.3 vendor/bin/phpstan analyse --configuration=phpstan.neon
42+
43+
tests:
44+
name: "Tests"
45+
46+
runs-on: ubuntu-latest
47+
48+
strategy:
49+
matrix:
50+
php-binary:
51+
- php7.2
52+
- php7.3
53+
54+
dependencies:
55+
- lowest
56+
- locked
57+
- highest
58+
59+
steps:
60+
- name: "Checkout"
61+
uses: actions/checkout@master
62+
63+
- name: "Install lowest dependencies with composer"
64+
if: matrix.dependencies == 'lowest'
65+
run: ${{ matrix.php-binary }} /usr/bin/composer update --prefer-lowest --no-interaction --no-progress --no-suggest
66+
67+
- name: "Install locked dependencies with composer"
68+
if: matrix.dependencies == 'locked'
69+
run: ${{ matrix.php-binary }} /usr/bin/composer install --no-interaction --no-progress --no-suggest
70+
71+
- name: "Install highest dependencies with composer"
72+
if: matrix.dependencies == 'highest'
73+
run: ${{ matrix.php-binary }} /usr/bin/composer update --no-interaction --no-progress --no-suggest
74+
75+
- name: "Run unit tests with phpunit/phpunit"
76+
run: ${{ matrix.php-binary }} vendor/bin/phpunit
77+
78+
code-coverage:
79+
name: "Code Coverage"
80+
81+
runs-on: ubuntu-latest
82+
83+
steps:
84+
- name: "Checkout"
85+
uses: actions/checkout@master
86+
87+
- name: "Install locked dependencies with composer"
88+
run: php7.3 /usr/bin/composer install --no-interaction --no-progress --no-suggest
89+
90+
- name: "Dump Xdebug filter with phpunit/phpunit"
91+
run: php7.3 vendor/bin/phpunit --dump-xdebug-filter=.build/phpunit/xdebug-filter.php
92+
93+
- name: "Collect code coverage with Xdebug and phpunit/phpunit"
94+
run: php7.3 vendor/bin/phpunit --coverage-clover=build/logs/clover.xml --prepend=.build/phpunit/xdebug-filter.php
95+
96+
# Not using codecov/codecov-action for now, as the build is prohibitively slow
97+
- name: "Download code coverage uploader for Codecov.io"
98+
run: curl -s https://codecov.io/bash -o codecov
99+
100+
- name: "Send code coverage report to Codecov.io"
101+
run: bash codecov -t ${{ secrets.CODECOV_TOKEN }}
102+
103+
mutation-tests:
104+
name: "Mutation Tests"
105+
106+
runs-on: ubuntu-latest
107+
108+
steps:
109+
- name: "Checkout"
110+
uses: actions/checkout@master
111+
112+
- name: "Install locked dependencies with composer"
113+
run: php7.3 /usr/bin/composer install --no-interaction --no-progress --no-suggest
114+
115+
- name: "Run mutation tests with infection/infection"
116+
run: php7.3 vendor/bin/infection --ignore-msi-with-no-mutations --min-covered-msi=100 --min-msi=100

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/.build/
2+
/vendor/

.styleci.yml

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
preset: laravel
2+
risky: true
3+
enabled:
4+
- declare_strict_types
5+
- unalign_double_arrow

CHANGELOG.md

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6+
7+
## Unreleased
8+
9+
### Added
10+
11+
-

LICENSE

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2019 Benedikt Franke
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
6+
documentation files (the "Software"), to deal in the Software without restriction, including without limitation the
7+
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit
8+
persons to whom the Software is furnished to do so, subject to the following conditions:
9+
10+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the
11+
Software.
12+
13+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
14+
WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
15+
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
16+
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

0 commit comments

Comments
 (0)