Skip to content

Commit

Permalink
Detach from monorepo
Browse files Browse the repository at this point in the history
  • Loading branch information
vudaltsov committed Sep 7, 2024
1 parent f4f2b01 commit 8bc7501
Show file tree
Hide file tree
Showing 21 changed files with 10,933 additions and 5 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
/stubs/ export-ignore
/tests/ export-ignore
/.gitattributes export-ignore
/.gitignore export-ignore
/.php-cs-fixer.dist.php export-ignore
/composer.lock export-ignore
/infection.json.dist export-ignore
/phpunit.xml.dist export-ignore
/psalm.xml.dist export-ignore
56 changes: 56 additions & 0 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Check

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

jobs:
composer:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: shivammathur/setup-php@v2
with:
php-version: 8.1
tools: composer:v2
coverage: none
- uses: ramsey/composer-install@v3
with:
composer-options: --optimize-autoloader
- run: composer validate
- run: composer normalize --dry-run
- run: composer check-require
- run: composer check-unused

lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: shivammathur/setup-php@v2
with:
php-version: 8.1
tools: composer:v2
coverage: none
- uses: ramsey/composer-install@v3
with:
composer-options: --optimize-autoloader
- run: composer fixcs -- --dry-run --format=checkstyle

psalm:
runs-on: ubuntu-latest
strategy:
matrix:
dependency-versions: [locked, lowest, highest]
steps:
- uses: actions/checkout@v4
- uses: shivammathur/setup-php@v2
with:
php-version: 8.1
tools: composer:v2
coverage: none
- uses: ramsey/composer-install@v3
with:
composer-options: --optimize-autoloader
dependency-versions: ${{ matrix.dependency-versions }}
- run: composer psalm -- --stats --output-format=github ${{ matrix.dependency-versions == 'locked' && '--shepherd' || '' }}
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/**/vendor/
/var/
/.php-cs-fixer.php
/phpstan.neon
/phpunit.xml
/psalm.xml
24 changes: 24 additions & 0 deletions .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?php

declare(strict_types=1);

use PhpCsFixer\Config;
use PhpCsFixer\Finder;
use PhpCsFixer\Runner\Parallel\ParallelConfigFactory;
use PHPyh\CodingStandard\PhpCsFixerCodingStandard;

$config = (new Config())
->setFinder(
Finder::create()
->in(__DIR__ . '/src')
->in(__DIR__ . '/tests')
->append([
__FILE__,
]),
)
->setParallelConfig(ParallelConfigFactory::detect())
->setCacheFile(__DIR__ . '/var/' . basename(__FILE__) . '.cache');

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

return $config;
12 changes: 9 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
# Typhoon PhpStorm Reflection Stubs

This repository is a readonly Typhoon monorepo subsplit.
Please, open pull requests and issues in the [main repository](https://github.com/typhoon-php/typhoon).
[![PHP Version Requirement](https://img.shields.io/packagist/dependency-v/typhoon/phpstorm-reflection-stubs/php)](https://packagist.org/packages/typhoon/phpstorm-reflection-stubs)
[![GitHub Release](https://img.shields.io/github/v/release/typhoon-php/phpstorm-reflection-stubs)](https://github.com/typhoon-php/phpstorm-reflection-stubs/releases)
[![Psalm Level](https://shepherd.dev/github/typhoon-php/phpstorm-reflection-stubs/level.svg)](https://shepherd.dev/github/typhoon-php/phpstorm-reflection-stubs)
[![Psalm Type Coverage](https://shepherd.dev/github/typhoon-php/phpstorm-reflection-stubs/coverage.svg)](https://shepherd.dev/github/typhoon-php/phpstorm-reflection-stubs)

Read [documentation](https://github.com/typhoon-php/typhoon/tree/0.4.x).
## Installation

```shell
composer require typhoon/phpstorm-reflection-stubs
```
46 changes: 44 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "typhoon/phpstorm-reflection-stubs",
"description": "Typhoon PhpStorm Reflection Stubs",
"description": "PhpStorm Reflection Stubs integration for Typhoon Reflection",
"license": "MIT",
"type": "library",
"authors": [
Expand All @@ -23,9 +23,51 @@
"typhoon/type": "^0.4",
"typhoon/typed-map": "^0.4"
},
"require-dev": {
"bamarni/composer-bin-plugin": "^1.8.2",
"ergebnis/composer-normalize": "^2.43.0",
"friendsofphp/php-cs-fixer": "^3.64.0",
"phpyh/coding-standard": "^2.6.2"
},
"autoload": {
"psr-4": {
"Typhoon\\PhpStormReflectionStubs\\": ""
"Typhoon\\PhpStormReflectionStubs\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"Typhoon\\PhpStormReflectionStubs\\": "tests/"
}
},
"config": {
"allow-plugins": {
"bamarni/composer-bin-plugin": true,
"ergebnis/composer-normalize": true,
"infection/extension-installer": true
},
"platform": {
"php": "8.1"
},
"sort-packages": true
},
"extra": {
"bamarni-bin": {
"bin-links": false,
"forward-command": true,
"target-directory": "tools"
}
},
"scripts": {
"bump-dev": [
"@composer bump --dev-only",
"@composer bin all bump --dev-only"
],
"check-require": "tools/composer-require-checker/vendor/bin/composer-require-checker",
"check-unused": "tools/composer-unused/vendor/bin/composer-unused",
"fixcs": "php-cs-fixer fix --diff",
"infection": "infection --show-mutations",
"pre-command-run": "mkdir -p var",
"psalm": "tools/psalm/vendor/bin/psalm --show-info --no-diff --no-cache",
"test": "phpunit"
}
}
Loading

0 comments on commit 8bc7501

Please sign in to comment.