Skip to content
This repository was archived by the owner on Mar 1, 2023. It is now read-only.

Commit c9a9cf6

Browse files
committedMar 25, 2020
feat : added cs with license update, added changelog
1 parent abe1a9c commit c9a9cf6

12 files changed

+64
-43
lines changed
 

‎.changelog

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
use ChangelogGenerator\ChangelogConfig;
6+
7+
return [
8+
(new ChangelogConfig(
9+
'narrowspark',
10+
'coding-standard',
11+
'v4.1.0',
12+
['Added', 'Changed', 'Deprecated', 'Removed', 'Fixed', 'Security']
13+
))
14+
];

‎.dependabot/config.yml

+1
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,4 @@ update_configs:
2828
prefix: "Build"
2929
default_labels:
3030
- "dependency"
31+
- "Changed"

‎.github/settings.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -102,4 +102,4 @@ repository:
102102

103103
# https://developer.github.com/v3/repos/branches/#remove-branch-protection
104104

105-
topics: "php, library, coding-standard, php-cs-fixer, phpstan, psalm, changelog, narrowspark"
105+
topics: "php, library, coding-standard, php-cs-fixer, phpstan, psalm, changelog, narrowspark, rector"

‎.github/workflows/license-update.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414

1515
strategy:
1616
matrix:
17-
php-versions: ["7.4.2"]
17+
php-versions: ["7.2"]
1818

1919
env:
2020
key: "license-update-linux-v1" # change key (version) to clear cache
@@ -91,10 +91,10 @@ jobs:
9191
restore-keys: ${{ runner.os }}-composer-
9292

9393
- name: "Install highest .build dependencies"
94-
run: $COMPOSER_UP
94+
run: $COMPOSER_UP --working-dir=./.build --lock
9595

9696
- name: "Run friendsofphp/php-cs-fixer"
97-
run: ./vendor/bin/php-cs-fixer fix --dry-run --diff --diff-format=udiff --verbose
97+
run: composer cs:check -- --diff --diff-format=udiff --verbose
9898

9999
- name: "Open pull request updating license year"
100100
uses: gr2m/create-or-update-pull-request-action@v1.2.9

‎.github/workflows/static-analyze.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212

1313
strategy:
1414
matrix:
15-
php-versions: ["7.4.2"]
15+
php-versions: ["7.2"]
1616

1717
env:
1818
key: "static-analyze-v1" # change key (version) to clear cache

‎.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ infection.log
1515
!/.build/infection/.gitkeep
1616
/.build/php-cs-fixer/
1717
!/.build/php-cs-fixer/.gitkeep
18+
/.build/phpstan/
19+
!/.build/phpstan/.gitkeep
1820
/.build/phpunit/
1921
!/.build/phpunit/.gitkeep
2022
/.build/psalm/

‎.php_cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ $license = License\Type\MIT::markdown(
1212
new \DateTimeZone('UTC')
1313
),
1414
License\Holder::fromString('Daniel Bannert'),
15-
License\Url::fromString('https://github.com/narrowspark/php-library-template')
15+
License\Url::fromString('https://github.com/narrowspark/coding-standard')
1616
);
1717

1818
$license->save();

‎CHANGELOG.md

+33-33
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,33 @@
1-
v4.1.0
2-
======
3-
4-
- Total issues resolved: **0**
5-
- Total pull requests resolved: **14**
6-
- Total contributors: **2**
7-
8-
Added
9-
-----
10-
11-
- [61: Added rector for automatic refactoring](https://github.com/narrowspark/coding-standard/pull/61) thanks to @prisis
12-
13-
Changed
14-
-------
15-
16-
- [60: Build(deps): Bump mkdirp from 0.5.3 to 0.5.4](https://github.com/narrowspark/coding-standard/pull/60) thanks to @dependabot-preview[bot]
17-
- [59: Build(deps): Bump remark-frontmatter from 1.3.2 to 1.3.3](https://github.com/narrowspark/coding-standard/pull/59) thanks to @dependabot-preview[bot]
18-
- [58: Build(deps): Bump es-abstract from 1.17.4 to 1.17.5](https://github.com/narrowspark/coding-standard/pull/58) thanks to @dependabot-preview[bot]
19-
- [56: Build(deps): Bump mkdirp from 0.5.1 to 0.5.3](https://github.com/narrowspark/coding-standard/pull/56) thanks to @dependabot-preview[bot]
20-
- [55: Build(deps): Bump json5 from 2.1.1 to 2.1.2](https://github.com/narrowspark/coding-standard/pull/55) thanks to @dependabot-preview[bot]
21-
- [54: Build(deps): Bump vfile-statistics from 1.1.3 to 1.1.4](https://github.com/narrowspark/coding-standard/pull/54) thanks to @dependabot-preview[bot]
22-
- [53: Build(deps): Bump vfile-sort from 2.2.1 to 2.2.2](https://github.com/narrowspark/coding-standard/pull/53) thanks to @dependabot-preview[bot]
23-
- [52: Build(deps-dev): Update symfony/var-exporter requirement from ^5.0.4 to ^5.0.5](https://github.com/narrowspark/coding-standard/pull/52) thanks to @dependabot-preview[bot]
24-
- [51: Build(deps): Bump hosted-git-info from 2.8.7 to 2.8.8](https://github.com/narrowspark/coding-standard/pull/51) thanks to @dependabot-preview[bot]
25-
- [50: Build(deps): Bump hosted-git-info from 2.8.6 to 2.8.7](https://github.com/narrowspark/coding-standard/pull/50) thanks to @dependabot-preview[bot]
26-
- [49: Build(deps): Bump hosted-git-info from 2.8.5 to 2.8.6](https://github.com/narrowspark/coding-standard/pull/49) thanks to @dependabot-preview[bot]
27-
- [48: Build(deps): Bump mdast-comment-marker from 1.1.1 to 1.1.2](https://github.com/narrowspark/coding-standard/pull/48) thanks to @dependabot-preview[bot]
28-
29-
Changed,Security
30-
----------------
31-
32-
- [57: Build(deps): &#91;Security&#93; Bump minimist from 1.2.0 to 1.2.5](https://github.com/narrowspark/coding-standard/pull/57) thanks to @dependabot-preview[bot]
33-
1+
v4.1.0
2+
======
3+
4+
- Total issues resolved: **0**
5+
- Total pull requests resolved: **14**
6+
- Total contributors: **2**
7+
8+
Added
9+
-----
10+
11+
- [61: Added rector for automatic refactoring](https://github.com/narrowspark/coding-standard/pull/61) thanks to @prisis
12+
13+
Changed
14+
-------
15+
16+
- [60: Build(deps): Bump mkdirp from 0.5.3 to 0.5.4](https://github.com/narrowspark/coding-standard/pull/60) thanks to @dependabot-preview[bot]
17+
- [59: Build(deps): Bump remark-frontmatter from 1.3.2 to 1.3.3](https://github.com/narrowspark/coding-standard/pull/59) thanks to @dependabot-preview[bot]
18+
- [58: Build(deps): Bump es-abstract from 1.17.4 to 1.17.5](https://github.com/narrowspark/coding-standard/pull/58) thanks to @dependabot-preview[bot]
19+
- [56: Build(deps): Bump mkdirp from 0.5.1 to 0.5.3](https://github.com/narrowspark/coding-standard/pull/56) thanks to @dependabot-preview[bot]
20+
- [55: Build(deps): Bump json5 from 2.1.1 to 2.1.2](https://github.com/narrowspark/coding-standard/pull/55) thanks to @dependabot-preview[bot]
21+
- [54: Build(deps): Bump vfile-statistics from 1.1.3 to 1.1.4](https://github.com/narrowspark/coding-standard/pull/54) thanks to @dependabot-preview[bot]
22+
- [53: Build(deps): Bump vfile-sort from 2.2.1 to 2.2.2](https://github.com/narrowspark/coding-standard/pull/53) thanks to @dependabot-preview[bot]
23+
- [52: Build(deps-dev): Update symfony/var-exporter requirement from ^5.0.4 to ^5.0.5](https://github.com/narrowspark/coding-standard/pull/52) thanks to @dependabot-preview[bot]
24+
- [51: Build(deps): Bump hosted-git-info from 2.8.7 to 2.8.8](https://github.com/narrowspark/coding-standard/pull/51) thanks to @dependabot-preview[bot]
25+
- [50: Build(deps): Bump hosted-git-info from 2.8.6 to 2.8.7](https://github.com/narrowspark/coding-standard/pull/50) thanks to @dependabot-preview[bot]
26+
- [49: Build(deps): Bump hosted-git-info from 2.8.5 to 2.8.6](https://github.com/narrowspark/coding-standard/pull/49) thanks to @dependabot-preview[bot]
27+
- [48: Build(deps): Bump mdast-comment-marker from 1.1.1 to 1.1.2](https://github.com/narrowspark/coding-standard/pull/48) thanks to @dependabot-preview[bot]
28+
29+
Changed,Security
30+
----------------
31+
32+
- [57: Build(deps): &#91;Security&#93; Bump minimist from 1.2.0 to 1.2.5](https://github.com/narrowspark/coding-standard/pull/57) thanks to @dependabot-preview[bot]
33+

‎README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ return $config;
9696

9797
> **Info:**
9898
>
99-
> The used [php-cs-fixer rules](PHP-CS-Fixer-Rules-List.md).
99+
> The used [php-cs-fixer rules](docs/PHP-CS-Fixer-Rules-List.md).
100100
>
101101
> For more information, take a look on [php-cs-fixer-config](https://github.com/narrowspark/php-cs-fixer-config).
102102

‎bin/CreatePhpCsFixerList.php

+3-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* For the full copyright and license information, please view
99
* the LICENSE.md file that was distributed with this source code.
1010
*
11-
* @see https://github.com/narrowspark/php-library-template
11+
* @see https://github.com/narrowspark/coding-standard
1212
*/
1313

1414
use Narrowspark\CS\Config\Config;
@@ -31,7 +31,8 @@ public static function build(): int
3131
$content .= VarExporter::export($rules);
3232
$content .= '```';
3333

34-
$return = file_put_contents(dirname(__DIR__) . \DIRECTORY_SEPARATOR . 'PHP-CS-Fixer-Rules-List.md', $content);
34+
$dir = dirname(__DIR__) . \DIRECTORY_SEPARATOR . 'docs';
35+
$return = file_put_contents($dir . \DIRECTORY_SEPARATOR . 'PHP-CS-Fixer-Rules-List.md', $content);
3536

3637
return (int) $return;
3738
}

‎composer.json

+4-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,10 @@
6262
"minimum-stability": "dev",
6363
"prefer-stable": true,
6464
"scripts": {
65-
"build": "\\CreatePhpCsFixerList::build"
65+
"build": "\\CreatePhpCsFixerList::build",
66+
"changelog": "changelog-generator generate --config=\"./.changelog\" --file --prepend",
67+
"cs": "php-cs-fixer fix --config=\"./.php_cs\" --ansi",
68+
"cs:check": "php-cs-fixer fix --config=\"./.php_cs\" --ansi --dry-run"
6669
},
6770
"support": {
6871
"issues": "https://github.com/narrowspark/coding-standard/issues",
File renamed without changes.

0 commit comments

Comments
 (0)
This repository has been archived.