Skip to content

Commit

Permalink
Initial implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
vudaltsov committed Feb 26, 2023
0 parents commit 0c22e8f
Show file tree
Hide file tree
Showing 16 changed files with 4,067 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/tests/ export-ignore
/.gitattributes export-ignore
/.gitignore export-ignore
/.php-cs-fixer.dist.php export-ignore
/phpunit.xml.dist export-ignore
/psalm.xml.dist export-ignore
72 changes: 72 additions & 0 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
name: Continuous Integration

on:
pull_request: ~
push:
branches: ['*.x']

jobs:
composer-validate:
runs-on: ubuntu-latest
strategy:
matrix:
php: [8.1]
steps:
- uses: actions/[email protected]
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
tools: composer:v2
coverage: none
- run: composer validate --strict --ansi

composer-normalize:
runs-on: ubuntu-latest
strategy:
matrix:
php: [8.1]
steps:
- uses: actions/[email protected]
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
tools: composer:v2
coverage: none
- uses: ramsey/composer-install@v2
with:
composer-options: --optimize-autoloader
- run: composer normalize --dry-run --diff --ansi

php-cs-fixer:
runs-on: ubuntu-latest
strategy:
matrix:
php: [8.1]
steps:
- uses: actions/[email protected]
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
tools: composer:v2, cs2pr
coverage: none
- uses: ramsey/composer-install@v2
with:
composer-options: --optimize-autoloader
- run: composer fixcs -- --dry-run --diff --format=checkstyle --ansi | cs2pr

psalm:
runs-on: ubuntu-latest
strategy:
matrix:
php: [8.1, 8.2]
steps:
- uses: actions/[email protected]
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
tools: composer:v2
coverage: none
- uses: ramsey/composer-install@v2
with:
composer-options: --optimize-autoloader
- run: composer psalm -- --php-version=${{ matrix.php }} --stats --output-format=github
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/vendor/
/.php-cs-fixer.php
/phpstan.neon
/psalm.xml
25 changes: 25 additions & 0 deletions .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?php

declare(strict_types=1);

use PHPyh\CodingStandard\PhpCsFixerCodingStandard;

require_once __DIR__.'/vendor/autoload.php';

$finder = PhpCsFixer\Finder::create()
->in([
__DIR__.'/src',
])
->append([
__FILE__,
])
;

$config = (new PhpCsFixer\Config())
->setFinder($finder)
->setCacheFile(__DIR__.'/var/.php-cs-fixer.cache')
;

(new PhpCsFixerCodingStandard())->applyTo($config);

return $config;
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# PHP Extended Type System • Reflection
38 changes: 38 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"name": "php-extended-type-system/reflection",
"description": "PHP Extended Type System • Reflection",
"license": "MIT",
"type": "library",
"authors": [
{
"name": "Valentin Udaltsov",
"email": "[email protected]"
}
],
"require": {
"php": "^8.1",
"php-extended-type-system/type": "^0.1@dev"
},
"require-dev": {
"ergebnis/composer-normalize": "^2.30",
"friendsofphp/php-cs-fixer": "^3.14.4",
"phpyh/coding-standard": "^2.0.0",
"vimeo/psalm": "^5.7.7"
},
"autoload": {
"psr-4": {
"PHP\\ExtendedTypeSystem\\Reflection\\": "src/"
}
},
"config": {
"allow-plugins": {
"ergebnis/composer-normalize": true
},
"sort-packages": true
},
"scripts": {
"cleanup": "find var ! -path var ! -path var/.gitignore -exec rm -rf {} +",
"fixcs": "PHP_CS_FIXER_IGNORE_ENV=1 vendor/bin/php-cs-fixer fix -v",
"psalm": "vendor/bin/psalm --show-info"
}
}
Loading

0 comments on commit 0c22e8f

Please sign in to comment.