Skip to content

Commit

Permalink
Merge pull request #83 from neo4j-php/5.0.0-typing-and-consistency
Browse files Browse the repository at this point in the history
Release version 5.0.0
  • Loading branch information
marijnvanwezel authored Jan 9, 2023
2 parents 2fd1194 + 6784fdb commit 7adcb27
Show file tree
Hide file tree
Showing 428 changed files with 20,280 additions and 17,873 deletions.
10 changes: 10 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/.github export-ignore
/tests export-ignore
/.gitattributes export-ignore
/.gitignore export-ignore
/.php-cs-fixer.dist.php export-ignore
/infection.json.dist export-ignore
/phpstan.neon.dist export-ignore
/phpunit.xml.dist export-ignore

*.php diff=php
18 changes: 18 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
name: Bug report 🐛
about: If something isn't working as expected.
---

# Bug report

<!-- Before reporting an issue please check that you are using the latest version of php-cypher-dsl! -->

<!-- Please describe your problem here. -->

### Code snippet that reproduces the problem

<!-- Try to reproduce the issue you are facing using your favorite editor and paste the misbehaving code here -->

### Expected output

<!-- Was the Cypher query invalid or incorrect? Was something allowed even though it shouldn't be, or vice versa? -->
4 changes: 4 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
contact_links:
- name: Support question
url: https://github.com/neo4j-php/php-cypher-dsl/discussions/new
about: Please open a new discussion instead. Thank you.
8 changes: 8 additions & 0 deletions .github/ISSUE_TEMPLATE/missing_feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
name: Missing feature request 🚀
about: Some feature from Cypher has not been implemented
---

# Feature request

<!-- Please provide a clear description of what is missing, preferably with a link to either openCypher or Neo4j. -->
70 changes: 70 additions & 0 deletions .github/SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# Security policy

**Please do not disclose security-related issues publicly, [see
below](#reporting-a-vulnerability).**

## Reporting a vulnerability

If you discover a security vulnerability within php-cypher-dsl, please send an
e-mail to Marijn van Wezel at marijnvanwezel@gmail.com. All security
vulnerabilities will be promptly addressed.

You may optionally encrypt your report with PGP, using the following key
(fingerprint: `98ED96AA2260D7E3`, proof:
[keybase.io](https://keybase.io/01101101)):

```text
-----BEGIN PGP PUBLIC KEY BLOCK-----
mQINBGHDX78BEACdBJTxzeBZqXprVACYX6z3G+CMWFCoer4eeJbPRHafme3pMnP2
y6rtEA8MYBPeP7MV54HghNbXWKjr7fNaaVA9/FBNdyHUo/HfKx+HeqdeVpLND+8Q
0zCMJjrsQ9YpUwra3CgwVee5D/J7tQFU+HjwO8fB7LG1P8TgWWxqxjhosjZPaf6K
lUfmEvZI6MXKc+nZfFdlYAQIexT+HTuyfiXSGsQd8c9kvMLb3GDxLTOeIG/Ge4g7
S9RaBFI5wZdf20djrLqtqBkiHiecFf9mKLIHS1wb2i2QLQQNhjKGOf6aqUd5zMu2
SBWvhK5vr5i9RZ2HfxVQJlEEX7jpMRINCb2hSWIoqs1UISJNtC6GK3Wu7X9U5WB1
q95ffU9Ppc57WxuawI4lKdH/+NKy+iuQspeebKsBQ6uUylK9Z/PQQMVNCfIqrdpW
Lqj7fHZI+MX4YnwmdnZ4cgAQYvLryMha9Ruzz+ek8IbHjzLXPQp19YgQnWZK11xk
3A7bkWbKslqMrdDz08EX3tHafNa8qsPL+21/+OeRNKqzaZGVppFidUOr7Rp3aQCG
UoNAdKEWo5VW1gEnNinH1DX45/NpDJUFU93drThBrOjn4288/PEwgEy0A4buScH0
5BYbbkSdKttn0YERTYO9p1DLaPg7G2fWNxZdNkSpiwj6Qu52+bXypO3aEQARAQAB
tCtNYXJpam4gdmFuIFdlemVsIDxtYXJpam52YW53ZXplbEBnbWFpbC5jb20+iQJO
BBMBCgA4FiEE32OnYKaJzJteJXzimO2WqiJg1+MFAmHDX78CGwMFCwkIBwIGFQoJ
CAsCBBYCAwECHgECF4AACgkQmO2WqiJg1+PqHQ//YjnKZBo64PIDxdZQYMJIS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whr
1t3QWAzGmg==
=Yjmm
-----END PGP PUBLIC KEY BLOCK-----
```

38 changes: 38 additions & 0 deletions .github/workflows/analyse.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: analyse

on:
push:
branches: [ 'main' ]
pull_request:
workflow_dispatch:

jobs:
analyse:
name: "Static analysis (PHP ${{ matrix.php-version }})"
runs-on: "ubuntu-22.04"
continue-on-error: true

strategy:
matrix:
php-version: [ "8.1" ]

env:
COMPOSER_VERSION: 2
COVERAGE_DRIVER: none

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

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
coverage: ${{ env.COVERAGE_DRIVER }}
tools: composer:${{ env.COMPOSER_VERSION }}

- name: Install dependencies
run: composer install --no-interaction --prefer-dist --no-progress

- name: Execute type checking
run: php vendor/bin/phpstan
59 changes: 59 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: lint

on:
push:
branches: [ 'main' ]
pull_request:
workflow_dispatch:

jobs:
lint:
name: "Linting (PHP ${{ matrix.php-version }})"
runs-on: "ubuntu-22.04"
continue-on-error: true

strategy:
matrix:
php-version: [ "8.1" ]

env:
COMPOSER_VERSION: 2
COVERAGE_DRIVER: none

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

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
coverage: ${{ env.COVERAGE_DRIVER }}
tools: composer:${{ env.COMPOSER_VERSION }}

- name: Install dependencies
run: composer install --no-interaction --prefer-dist --no-progress

- name: Run PHP-CS-Fixer
run: php vendor/bin/php-cs-fixer fix --config .php-cs-fixer.dist.php --verbose --dry-run


validate:
name: "Validating composer.json"
runs-on: "ubuntu-22.04"
continue-on-error: true

env:
COMPOSER_VERSION: 2

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

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
tools: composer:${{ env.COMPOSER_VERSION }}

- name: Run composer validate
run: composer validate
67 changes: 0 additions & 67 deletions .github/workflows/main.yml

This file was deleted.

50 changes: 50 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: test

on:
push:
branches: ['main']
pull_request:
workflow_dispatch:

jobs:
unit:
name: "Unit and mutation testing (PHP ${{ matrix.php-version }})"
runs-on: "ubuntu-22.04"
continue-on-error: true

strategy:
matrix:
php-version: [ "7.4", "8.0", "8.1", "8.2" ]

env:
COMPOSER_VERSION: 2
COVERAGE_DRIVER: xdebug
MINIMUM_COVERAGE_PERCENTAGE: 90
MINIMUM_MSI_PERCENTAGE: 80

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

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
coverage: ${{ env.COVERAGE_DRIVER }}
ini-values: memory_limit=512M, xdebug.mode=off
tools: composer:${{ env.COMPOSER_VERSION }}

- name: Install dependencies
run: composer install --no-interaction --prefer-dist --no-progress

- name: Run unit tests
run: XDEBUG_MODE=coverage php vendor/bin/phpunit --testsuite unit

- name: Check coverage
run: php vendor/bin/coverage-check coverage/clover.xml ${{ env.MINIMUM_COVERAGE_PERCENTAGE }}

- name: Run end-to-end tests
run: php vendor/bin/phpunit --testsuite end-to-end --no-coverage

- name: Run mutation tests
run: XDEBUG_MODE=coverage php vendor/bin/infection --show-mutations --min-msi=${{ env.MINIMUM_MSI_PERCENTAGE }} --threads=4
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
.DS_Store
composer.lock
coverage/
doxygen/
phpunit.xml
vendor/
*.idea
Expand Down
Loading

0 comments on commit 7adcb27

Please sign in to comment.