Skip to content

Initial version #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 3, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
14 changes: 14 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
root = true

[*]
end_of_line = lf
indent_style = tab
insert_final_newline = true
trim_trailing_whitespace = true

[*.{md,neon,yml}]
indent_size = 2
indent_style = space

[phpstan-baseline.neon]
indent_style = tab
9 changes: 9 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
.editorconfig export-ignore
.gitattributes export-ignore
.gitignore export-ignore
.github export-ignore
phpstan-baseline.neon export-ignore
phpstan.neon export-ignore
tests/ export-ignore

*.php* diff=php linguist-language=PHP
75 changes: 75 additions & 0 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
name: checks

on:
- push

jobs:
static_analysis:
name: Static analysis

runs-on: ubuntu-latest

env:
COMPOSER_NO_INTERACTION: "1"

steps:
- uses: actions/checkout@v4

- uses: shivammathur/setup-php@v2
with:
php-version: '8.4'
coverage: none

- run: composer install --ansi --no-progress --prefer-dist

- name: Run parallel-lint
run: composer run lint

- name: Run PHPStan
run: composer run phpstan

tests:
name: PHP ${{ matrix.php }} tests on ${{ matrix.os }} with ${{ matrix.deps }} deps

needs:
- static_analysis

strategy:
matrix:
deps:
- stable
- lowest
os:
- macos-latest
- ubuntu-latest
- windows-latest
php:
- '8.4'

fail-fast: false

runs-on: ${{ matrix.os }}

env:
COMPOSER_NO_INTERACTION: "1"

steps:
- uses: actions/checkout@v4

- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
coverage: none

- run: composer install --ansi --no-progress --prefer-dist

- run: composer update --ansi --no-progress --prefer-lowest
if: matrix.deps == 'lowest'

- name: Run tests
run: composer run test

- if: failure()
uses: actions/upload-artifact@v4
with:
path: tests/output
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.DS_Store
.phpunit.cache
.phpunit.result.cache
tests-temp
vendor
28 changes: 28 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
BSD 3-Clause License

Copyright (c) 2025, Vojtěch Dobeš

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.

3. Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
57 changes: 57 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
{
"authors": [
{
"name": "Vojtěch Dobeš",
"homepage": "https://vojtechdobes.com"
}
],
"autoload": {
"psr-4": {
"Vojtechdobes\\PHPStan\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"Vojtechdobes\\Tests\\": "tests/"
}
},
"config": {
"sort-packages": true
},
"keywords": [
"ci",
"graphql",
"integration",
"nette",
"phpstan",
"phpstan-rules",
"static-analysis",
"static-code-analysis"
],
"license": [
"BSD-3-Clause"
],
"name": "vojtech-dobes/phpstan-php-graphql-server-nette-integration",
"require": {
"php": "~8.4",
"vojtech-dobes/php-graphql-server-nette-integration": "dev-master@dev"
},
"require-dev": {
"nette/bootstrap": "^3.2.5",
"nette/di": "^3.2",
"php-parallel-lint/php-parallel-lint": "^1.4.0",
"phpstan/phpstan": "^2.1.12",
"phpstan/phpstan-strict-rules": "^2.0.4",
"phpunit/phpunit": "^12.1",
"spaze/phpstan-disallowed-calls": "^4.5.0",
"tracy/tracy": "^2.10.9",
"vojtech-dobes/php-grammar-processing": "dev-master@dev",
"vojtech-dobes/php-graphql-server": "dev-master@dev",
"vojtech-dobes/phpstan-php-graphql-server": "dev-master@dev"
},
"scripts": {
"lint": "parallel-lint src tests",
"phpstan": "phpstan analyse --memory-limit 256M",
"test": "composer dump-autoload && phpunit tests"
}
}
Loading