Skip to content

Commit 5c3de6e

Browse files
committed
Update build
1 parent 9be2b4e commit 5c3de6e

File tree

4 files changed

+59
-41
lines changed

4 files changed

+59
-41
lines changed

.cs.php

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,8 @@
99
[
1010
'@PSR1' => true,
1111
'@PSR2' => true,
12-
'@Symfony' => true,
13-
'psr_autoloading' => true,
1412
// custom rules
13+
'psr_autoloading' => true,
1514
'align_multiline_comment' => ['comment_type' => 'phpdocs_only'], // psr-5
1615
'phpdoc_to_comment' => false,
1716
'no_superfluous_phpdoc_tags' => false,
@@ -51,6 +50,7 @@
5150
'blank_line_between_import_groups' => true,
5251
'fully_qualified_strict_types' => true,
5352
'no_null_property_initialization' => false,
53+
'nullable_type_declaration_for_default_null_value' => false,
5454
'operator_linebreak' => [
5555
'only_booleans' => true,
5656
'position' => 'beginning',
@@ -59,6 +59,16 @@
5959
'import_classes' => true,
6060
'import_constants' => null,
6161
'import_functions' => null
62+
],
63+
'class_definition' => [
64+
'space_before_parenthesis' => true,
65+
],
66+
'trailing_comma_in_multiline' => [
67+
'after_heredoc' => true,
68+
'elements' => ['array_destructuring', 'arrays', 'match']
69+
],
70+
'function_declaration' => [
71+
'closure_fn_spacing' => 'none',
6272
]
6373
]
6474
)

.editorconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,4 @@ indent_style = tab
1919
indent_size = 4
2020

2121
[*.yml]
22-
indent_size = 4
22+
indent_size = 2

.github/workflows/build.yml

Lines changed: 46 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -3,39 +3,49 @@ name: build
33
on: [ push, pull_request ]
44

55
jobs:
6-
run:
7-
runs-on: ${{ matrix.operating-system }}
8-
strategy:
9-
matrix:
10-
operating-system: [ ubuntu-latest ]
11-
php-versions: [ '8.1', '8.2' ]
12-
name: PHP ${{ matrix.php-versions }} Test on ${{ matrix.operating-system }}
13-
14-
steps:
15-
- name: Checkout
16-
uses: actions/checkout@v1
17-
18-
- name: Setup PHP
19-
uses: shivammathur/setup-php@v2
20-
with:
21-
php-version: ${{ matrix.php-versions }}
22-
extensions: mbstring, intl, zip
23-
coverage: none
24-
25-
- name: Check PHP Version
26-
run: php -v
27-
28-
- name: Check Composer Version
29-
run: composer -V
30-
31-
- name: Check PHP Extensions
32-
run: php -m
33-
34-
- name: Validate composer.json and composer.lock
35-
run: composer validate
36-
37-
- name: Install dependencies
38-
run: composer install --prefer-dist --no-progress --no-suggest
39-
40-
- name: Run test suite
41-
run: composer test:all
6+
run:
7+
runs-on: ${{ matrix.operating-system }}
8+
strategy:
9+
matrix:
10+
operating-system: [ ubuntu-latest ]
11+
php-versions: [ '8.1', '8.2', '8.3', '8.4' ]
12+
name: PHP ${{ matrix.php-versions }} Test on ${{ matrix.operating-system }}
13+
14+
steps:
15+
- name: Checkout
16+
uses: actions/checkout@v1
17+
18+
- name: Setup PHP
19+
uses: shivammathur/setup-php@v2
20+
with:
21+
php-version: ${{ matrix.php-versions }}
22+
extensions: mbstring, intl, zip
23+
24+
- name: Check PHP Version
25+
run: php -v
26+
27+
- name: Check Composer Version
28+
run: composer -V
29+
30+
- name: Check PHP Extensions
31+
run: php -m
32+
33+
- name: Validate composer.json and composer.lock
34+
run: composer validate
35+
36+
- name: Install dependencies
37+
run: composer install --prefer-dist --no-progress --no-suggest
38+
39+
- name: Run PHP CodeSniffer
40+
run: composer sniffer:check
41+
42+
- name: Run PHPStan
43+
run: composer stan
44+
45+
- name: Run tests
46+
if: ${{ matrix.php-versions != '8.4' }}
47+
run: composer test
48+
49+
- name: Run tests with coverage
50+
if: ${{ matrix.php-versions == '8.4' }}
51+
run: composer test:coverage

README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ the [notification pattern](https://martinfowler.com/articles/replaceThrowWithNot
66
[![Latest Version on Packagist](https://img.shields.io/github/release/selective-php/validation.svg)](https://packagist.org/packages/selective/validation)
77
[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg)](LICENSE)
88
[![Build Status](https://github.com/selective-php/validation/workflows/build/badge.svg)](https://github.com/selective-php/validation/actions)
9-
[![Coverage Status](https://scrutinizer-ci.com/g/selective-php/validation/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/selective-php/validation/code-structure)
10-
[![Quality Score](https://scrutinizer-ci.com/g/selective-php/validation/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/selective-php/validation/?branch=master)
119
[![Total Downloads](https://img.shields.io/packagist/dt/selective/validation.svg)](https://packagist.org/packages/selective/validation/stats)
1210

1311
## Table of contents

0 commit comments

Comments
 (0)