Compare commits
No commits in common. "master" and "1.0.0" have entirely different histories.
|
@ -1,19 +0,0 @@
|
||||||
name: Validate
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- '*'
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
validate_package:
|
|
||||||
runs-on: ubuntu-22.04
|
|
||||||
container: git.gertjankrol.nl/docker/php-toolkit:latest
|
|
||||||
steps:
|
|
||||||
- name: Check out repository
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
- name: composer install
|
|
||||||
run: composer install --profile
|
|
||||||
- name: composer security-check
|
|
||||||
run: composer security-check
|
|
||||||
- name: composer normalize check
|
|
||||||
run: composer normalize --dry-run
|
|
14
CHANGELOG.md
14
CHANGELOG.md
|
@ -3,19 +3,5 @@ All notable changes to this package will be documented in this file
|
||||||
|
|
||||||
## Unreleased
|
## Unreleased
|
||||||
|
|
||||||
## 1.1.2 - 2023-09-01
|
|
||||||
- Bumped dependencies [patch]
|
|
||||||
|
|
||||||
## 1.1.1 - 2023-05-28
|
|
||||||
- Hotfix: fix `slevomat-coding-standard` ruleset [patch]
|
|
||||||
|
|
||||||
## 1.1.0 - 2023-05-28
|
|
||||||
- Bumped PHP requirement to 8.2 and bumped Composer dependencies [minor]
|
|
||||||
- Added Forgejo test workflows [patch]
|
|
||||||
- Updated `README` & `LICENSE` [patch]
|
|
||||||
|
|
||||||
## 1.0.1 - 2022-08-18
|
|
||||||
- Added exclusion for `SlevomatCodingStandard.Classes.DisallowLateStaticBindingForConstants` to allow late static binding for constants [patch]
|
|
||||||
|
|
||||||
## 1.0.0 - 2022-08-20
|
## 1.0.0 - 2022-08-20
|
||||||
- Initial release [major]
|
- Initial release [major]
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
MIT License
|
MIT License
|
||||||
|
|
||||||
Copyright (c) 2023 - Gertjan Krol
|
Copyright (c) Author
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
|
10
README.md
10
README.md
|
@ -1,9 +1,9 @@
|
||||||
# Crawl Coding Standard
|
# crawl/coding-standard
|
||||||
|
|
||||||
[![Latest Version on Packagist](https://img.shields.io/packagist/v/crawl/coding-standard.svg?style=flat-square)](https://packagist.org/packages/crawl/coding-standard)
|
[![Latest Version on Packagist](https://img.shields.io/packagist/v/crawl/coding-standard.svg?style=flat-square)](https://packagist.org/packages/crawl/coding-standard)
|
||||||
[![Total Downloads](https://img.shields.io/packagist/dt/crawl/coding-standard.svg?style=flat-square)](https://packagist.org/packages/crawl/coding-standard)
|
[![Total Downloads](https://img.shields.io/packagist/dt/crawl/coding-standard.svg?style=flat-square)](https://packagist.org/packages/crawl/coding-standard)
|
||||||
|
|
||||||
This package provides rule sets for the Crawl Coding Standard.
|
This package provides rule sets for the Crawl Coding Standard.\
|
||||||
It requires `squizlabs/php_codesniffer` and some extensions (see [composer.json](composer.json)).
|
It requires `squizlabs/php_codesniffer` and some extensions (see [composer.json](composer.json)).
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
@ -15,9 +15,8 @@ composer require crawl/coding-standard --dev
|
||||||
```
|
```
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
Depending on your project, copy `phpcs-laravel.xml` or `phpcs-package.xml` from `config/` to your project.
|
Depending on your project, copy `phpcs-laravel.xml` or `phpcs-package.xml` from `config/` to your project.\
|
||||||
|
**Note:** don't forget to update `Package\Namespace` when using `phpcs-package.xml`.
|
||||||
> **Note:** don't forget to update `Package\Namespace` when using `phpcs-package.xml`.
|
|
||||||
|
|
||||||
You can then run PHP Code Sniffer/Beautifier:
|
You can then run PHP Code Sniffer/Beautifier:
|
||||||
```bash
|
```bash
|
||||||
|
@ -29,7 +28,6 @@ For easier usage, add the following to `scripts` in your project's `composer.jso
|
||||||
```json
|
```json
|
||||||
...
|
...
|
||||||
"scripts": {
|
"scripts": {
|
||||||
...
|
|
||||||
"style": "vendor/bin/phpcs --standard=./path/to/copied/phpcs.xml",
|
"style": "vendor/bin/phpcs --standard=./path/to/copied/phpcs.xml",
|
||||||
"fix-style": "vendor/bin/phpcbf --standard=./path/to/copied/phpcs.xml",
|
"fix-style": "vendor/bin/phpcbf --standard=./path/to/copied/phpcs.xml",
|
||||||
}.
|
}.
|
||||||
|
|
|
@ -1,41 +1,39 @@
|
||||||
{
|
{
|
||||||
"name": "crawl/coding-standard",
|
"name": "crawl/coding-standard",
|
||||||
"description": "The Crawl Coding Standard",
|
"description": "The Crawl Coding Standard",
|
||||||
"license": "MIT",
|
|
||||||
"type": "library",
|
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"crawl",
|
"crawl",
|
||||||
"coding standard",
|
"coding standard",
|
||||||
"code sniffer",
|
"code sniffer",
|
||||||
"code quality"
|
"code quality"
|
||||||
],
|
],
|
||||||
|
"homepage": "https://git.gertjankrol.nl/crawl/coding-standard",
|
||||||
|
"license": "MIT",
|
||||||
|
"type": "library",
|
||||||
"authors": [
|
"authors": [
|
||||||
{
|
{
|
||||||
"name": "Gertjan Krol",
|
"name": "Gertjan Krol",
|
||||||
"email": "hello@gertjankrol.nl"
|
"email": "hello@gertjankrol.nl"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"homepage": "https://git.gertjankrol.nl/crawl/coding-standard",
|
|
||||||
"require": {
|
"require": {
|
||||||
"php": "^8.2",
|
"php": "^8.1",
|
||||||
"phpcompatibility/php-compatibility": "^9.3",
|
"phpcompatibility/php-compatibility": "^9.3",
|
||||||
"sirbrillig/phpcs-variable-analysis": "^2.11",
|
"sirbrillig/phpcs-variable-analysis": "^2.11",
|
||||||
"slevomat/coding-standard": "^8.13",
|
"slevomat/coding-standard": "^7.2",
|
||||||
"squizlabs/php_codesniffer": "^3.7"
|
"squizlabs/php_codesniffer": "^3.7"
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"enlightn/security-checker": "^1.10",
|
"enlightn/security-checker": "^1.10"
|
||||||
"ergebnis/composer-normalize": "^2.35"
|
|
||||||
},
|
|
||||||
"config": {
|
|
||||||
"allow-plugins": {
|
|
||||||
"dealerdirect/phpcodesniffer-composer-installer": true,
|
|
||||||
"ergebnis/composer-normalize": true
|
|
||||||
},
|
|
||||||
"optimize-autoloader": true,
|
|
||||||
"sort-packages": true
|
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"security-checker": "vendor/bin/security-checker security:check composer.lock"
|
"security-checker": "vendor/bin/security-checker security:check composer.lock"
|
||||||
|
},
|
||||||
|
"config": {
|
||||||
|
"optimize-autoloader": true,
|
||||||
|
"sort-packages": true,
|
||||||
|
"allow-plugins": {
|
||||||
|
"dealerdirect/phpcodesniffer-composer-installer": true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,9 +22,6 @@
|
||||||
<!-- Disabled since subclasses can't always overrule parents -->
|
<!-- Disabled since subclasses can't always overrule parents -->
|
||||||
<exclude name="SlevomatCodingStandard.TypeHints.PropertyTypeHint.MissingNativeTypeHint"/>
|
<exclude name="SlevomatCodingStandard.TypeHints.PropertyTypeHint.MissingNativeTypeHint"/>
|
||||||
|
|
||||||
<!-- Disabled to allow late static binding for constants (static::CONST) -->
|
|
||||||
<exclude name="SlevomatCodingStandard.Classes.DisallowLateStaticBindingForConstants"/>
|
|
||||||
|
|
||||||
<exclude name="SlevomatCodingStandard.TypeHints.PropertyTypeHint.MissingTraversableTypeHintSpecification"/>
|
<exclude name="SlevomatCodingStandard.TypeHints.PropertyTypeHint.MissingTraversableTypeHintSpecification"/>
|
||||||
</rule>
|
</rule>
|
||||||
|
|
||||||
|
@ -80,12 +77,9 @@
|
||||||
<element value="static constructors"/>
|
<element value="static constructors"/>
|
||||||
<element value="constructor"/>
|
<element value="constructor"/>
|
||||||
<element value="destructor"/>
|
<element value="destructor"/>
|
||||||
<element value="public final methods, protected final methods"/>
|
|
||||||
<element value="public methods, protected methods, private methods"/>
|
<element value="public methods, protected methods, private methods"/>
|
||||||
<element value="public static methods, protected static methods, private static methods"/>
|
<element value="public static methods, protected static methods, private static methods"/>
|
||||||
<element value="public static final methods, protected static final methods"/>
|
|
||||||
<element value="magic methods"/>
|
<element value="magic methods"/>
|
||||||
<element value="enum cases"/>
|
|
||||||
</property>
|
</property>
|
||||||
</properties>
|
</properties>
|
||||||
</rule>
|
</rule>
|
||||||
|
|
Loading…
Reference in New Issue