Skip to content

Commit 2aab91c

Browse files
committed
Update project according to the typhoon template
1 parent a43cbef commit 2aab91c

30 files changed

Lines changed: 11685 additions & 5 deletions

.gitattributes

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
/.github/ export-ignore
2+
/stubs/ export-ignore
3+
/tests/ export-ignore
4+
/tools/ export-ignore
5+
/.gitattributes export-ignore
6+
/.gitignore export-ignore
7+
/.php-cs-fixer.dist.php export-ignore
8+
/composer.lock export-ignore
9+
/infection.json5.dist export-ignore
10+
/phpstan.dist.neon export-ignore
11+
/phpunit.xml.dist export-ignore
12+
/psalm.xml.dist export-ignore

.github/workflows/check.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
on:
2+
workflow_dispatch: ~
3+
push:
4+
branches: ['main', '*.*.x']
5+
pull_request: ~
6+
7+
jobs:
8+
check:
9+
uses: typhoon-php/.github/.github/workflows/check.yml@main
10+
secrets: inherit

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
/tools/**/vendor/
2+
/var/
3+
/vendor/
4+
/.php-cs-fixer.php
5+
/phpstan.neon
6+
/phpunit.xml
7+
/psalm.xml

.php-cs-fixer.dist.php

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
use PhpCsFixer\Config;
6+
use PhpCsFixer\Finder;
7+
use PhpCsFixer\Runner\Parallel\ParallelConfigFactory;
8+
use PHPyh\CodingStandard\PhpCsFixerCodingStandard;
9+
10+
$config = (new Config())
11+
->setFinder(
12+
Finder::create()
13+
->in(__DIR__ . '/src')
14+
->in(__DIR__ . '/tests')
15+
->append([
16+
__FILE__,
17+
]),
18+
)
19+
->setParallelConfig(ParallelConfigFactory::detect())
20+
->setCacheFile(__DIR__ . '/var/' . basename(__FILE__) . '.cache');
21+
22+
(new PhpCsFixerCodingStandard())->applyTo($config);
23+
24+
return $config;

README.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
# Typhoon Typed Map
22

3-
This repository is a readonly Typhoon monorepo subsplit.
4-
Please, open pull requests and issues in the [main repository](https://github.com/typhoon-php/typhoon).
3+
[![PHP Version Requirement](https://img.shields.io/packagist/dependency-v/typhoon/typed-map/php)](https://packagist.org/packages/typhoon/typed-map)
4+
[![GitHub Release](https://img.shields.io/github/v/release/typhoon-php/typed-map)](https://github.com/typhoon-php/typed-map/releases)
5+
[![Code Coverage](https://codecov.io/gh/typhoon-php/typed-map/branch/0.4.x/graph/badge.svg)](https://codecov.io/gh/typhoon-php/typed-map/tree/0.4.x)
6+
[![Mutation testing badge](https://img.shields.io/endpoint?style=flat&url=https%3A%2F%2Fbadge-api.stryker-mutator.io%2Fgithub.com%2Ftyphoon-php%2Ftyped-map%2F0.4.x)](https://dashboard.stryker-mutator.io/reports/github.com/typhoon-php/typed-map/0.4.x)
57

6-
Read [documentation](https://github.com/typhoon-php/typhoon/tree/0.4.x).
8+
## Installation
9+
10+
```shell
11+
composer require typhoon/typed-map
12+
```

composer.json

Lines changed: 41 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,50 @@
1414
}
1515
],
1616
"require": {
17-
"php": "^8.1"
17+
"php": "^8.1",
18+
"typhoon/formatter": "^0.1@dev"
19+
},
20+
"require-dev": {
21+
"bamarni/composer-bin-plugin": "^1.8.2",
22+
"phpunit/phpunit": "^10.5.58",
23+
"symfony/var-dumper": "^6.4.26 || ^7.2.3"
1824
},
1925
"autoload": {
2026
"psr-4": {
21-
"Typhoon\\TypedMap\\": ""
27+
"Typhoon\\TypedMap\\": "src/"
28+
}
29+
},
30+
"autoload-dev": {
31+
"psr-4": {
32+
"Typhoon\\TypedMap\\": "tests/"
33+
}
34+
},
35+
"config": {
36+
"allow-plugins": {
37+
"bamarni/composer-bin-plugin": true
38+
},
39+
"bump-after-update": "dev",
40+
"platform": {
41+
"php": "8.1"
42+
},
43+
"sort-packages": true
44+
},
45+
"extra": {
46+
"bamarni-bin": {
47+
"bin-links": false,
48+
"forward-command": true,
49+
"target-directory": "tools"
2250
}
51+
},
52+
"scripts": {
53+
"analyse-deps": "tools/composer-dependency-analyser/vendor/bin/composer-dependency-analyser",
54+
"fixcs": "tools/php-cs-fixer/vendor/bin/php-cs-fixer fix --diff --verbose",
55+
"infection": "tools/infection/vendor/bin/infection --show-mutations",
56+
"normalize": "@composer bin composer-normalize normalize --diff ../../composer.json",
57+
"phpstan": "tools/phpstan/vendor/bin/phpstan analyze",
58+
"pre-command-run": "mkdir -p var",
59+
"psalm": "tools/psalm/vendor/bin/psalm --show-info --no-diff --no-cache",
60+
"rector": "tools/rector/vendor/bin/rector process",
61+
"test": "phpunit"
2362
}
2463
}

0 commit comments

Comments
 (0)