Skip to content

Commit e5f917b

Browse files
Merge pull request #11 from DaveLiddament/bump/php8.2
Add support for PHP8.2
2 parents 137680e + 16f7f53 commit e5f917b

File tree

11 files changed

+243
-232
lines changed

11 files changed

+243
-232
lines changed

.github/workflows/full-checks.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,9 @@ jobs:
2323
php-version:
2424
- "8.0"
2525
- "8.1"
26+
- "8.2"
2627
operating-system:
27-
- "ubuntu-18.04"
28+
- "ubuntu-22.04"
2829

2930
steps:
3031
- name: "Checkout"

.php-cs-fixer.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
'no_useless_return' => true,
1919
'ordered_imports' => true,
2020
'phpdoc_order' => true,
21+
'no_unused_imports' => true,
2122
'strict_comparison' => true,
2223
'phpdoc_align' => false,
2324
'phpdoc_to_comment' => false,

README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
11
# PHP Language Extensions (currently in BETA)
22

3+
[![PHP versions: 8.0 to 8.2](https://img.shields.io/badge/php-8.0|8.1|8.2-blue.svg)](https://packagist.org/packages/dave-liddament/php-language-extensions)
4+
[![Latest Stable Version](https://poser.pugx.org/dave-liddament/php-language-extensions/v/stable)](https://packagist.org/packages/dave-liddament/php-language-extensions)
5+
[![License](https://poser.pugx.org/dave-liddament/php-language-extensions/license)](https://github.com/DaveLiddament/php-language-extensions/blob/main/LICENSE.md)
6+
[![Total Downloads](https://poser.pugx.org/dave-liddament/php-language-extensions/downloads)](https://packagist.org/packages/dave-liddament/php-language-extensions/stats)
7+
8+
[![Continuous Integration](https://github.com/DaveLiddament/php-language-extensions/workflows/Full%20checks/badge.svg)](https://github.com/DaveLiddament/php-language-extensions/actions/workflows/full-checks.yml)
9+
[![Psalm level 1](https://img.shields.io/badge/Psalm-max%20level-brightgreen.svg)](https://github.com/DaveLiddament/php-language-extensions/blob/main/psalm.xml)
10+
[![PHPStan level 8](https://img.shields.io/badge/PHPStan-max%20level-brightgreen.svg)](https://github.com/DaveLiddament/php-language-extensions/blob/main/phpstan.neon)
11+
12+
13+
314
This library provides attributes for extending the PHP language (e.g. adding `package` visibility).
415
The intention, at least initially, is that these extra language features are enforced by static analysis tools (such as Psalm, PHPStan and, ideally, PhpStorm) and NOT at runtime.
516

composer.json

Lines changed: 27 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
11
{
22
"name": "dave-liddament/php-language-extensions",
33
"description": "Attributes for extending the PHP language, using static analysis to enforce new language constructs",
4-
"keywords": ["static analysis", "package attribute", "friend attribute", "sealed attribute"],
5-
"type" : "library",
4+
"keywords": [
5+
"static analysis",
6+
"package attribute",
7+
"friend attribute",
8+
"sealed attribute"
9+
],
10+
"type": "library",
611
"minimum-stability": "stable",
712
"license": "MIT",
813
"authors": [
@@ -13,11 +18,11 @@
1318
],
1419
"autoload": {
1520
"psr-4": {
16-
"DaveLiddament\\PhpLanguageExtensions\\" : "src/"
21+
"DaveLiddament\\PhpLanguageExtensions\\": "src/"
1722
}
1823
},
19-
"require" : {
20-
"php": "^8"
24+
"require": {
25+
"php": "^8.0 || ^8.1 || ^8.2"
2126
},
2227
"require-dev": {
2328
"phpstan/phpstan": "^1.5",
@@ -26,18 +31,21 @@
2631
"vimeo/psalm": "^4.22"
2732
},
2833
"scripts": {
29-
"composer-validate" : "@composer validate --no-check-all --strict",
30-
"cs-fix" : "php-cs-fixer fix",
31-
"cs" : "php-cs-fixer fix --dry-run -v",
32-
"phpstan" : "phpstan analyse",
33-
"psalm" : "psalm",
34-
"lint" : "parallel-lint src",
35-
"ci" : [
36-
"@composer-validate",
37-
"@lint",
38-
"@cs",
39-
"@phpstan",
40-
"@psalm"
41-
]
42-
}
34+
"composer-validate": "@composer validate --no-check-all --strict",
35+
"cs-fix": "php-cs-fixer fix",
36+
"cs": [
37+
"@putenv PHP_CS_FIXER_IGNORE_ENV=1",
38+
"php-cs-fixer fix --dry-run -v"
39+
],
40+
"phpstan": "phpstan analyse",
41+
"psalm": "psalm",
42+
"lint": "parallel-lint src",
43+
"ci": [
44+
"@composer-validate",
45+
"@lint",
46+
"@cs",
47+
"@phpstan",
48+
"@psalm"
49+
]
50+
}
4351
}

0 commit comments

Comments
 (0)