Skip to content

Commit

Permalink
Merge pull request #11 from DaveLiddament/bump/php8.2
Browse files Browse the repository at this point in the history
Add support for PHP8.2
  • Loading branch information
DaveLiddament committed Dec 23, 2022
2 parents 137680e + 16f7f53 commit e5f917b
Show file tree
Hide file tree
Showing 11 changed files with 243 additions and 232 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/full-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,9 @@ jobs:
php-version:
- "8.0"
- "8.1"
- "8.2"
operating-system:
- "ubuntu-18.04"
- "ubuntu-22.04"

steps:
- name: "Checkout"
Expand Down
1 change: 1 addition & 0 deletions .php-cs-fixer.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
'no_useless_return' => true,
'ordered_imports' => true,
'phpdoc_order' => true,
'no_unused_imports' => true,
'strict_comparison' => true,
'phpdoc_align' => false,
'phpdoc_to_comment' => false,
Expand Down
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# PHP Language Extensions (currently in BETA)

[![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)
[![Latest Stable Version](https://poser.pugx.org/dave-liddament/php-language-extensions/v/stable)](https://packagist.org/packages/dave-liddament/php-language-extensions)
[![License](https://poser.pugx.org/dave-liddament/php-language-extensions/license)](https://github.com/DaveLiddament/php-language-extensions/blob/main/LICENSE.md)
[![Total Downloads](https://poser.pugx.org/dave-liddament/php-language-extensions/downloads)](https://packagist.org/packages/dave-liddament/php-language-extensions/stats)

[![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)
[![Psalm level 1](https://img.shields.io/badge/Psalm-max%20level-brightgreen.svg)](https://github.com/DaveLiddament/php-language-extensions/blob/main/psalm.xml)
[![PHPStan level 8](https://img.shields.io/badge/PHPStan-max%20level-brightgreen.svg)](https://github.com/DaveLiddament/php-language-extensions/blob/main/phpstan.neon)



This library provides attributes for extending the PHP language (e.g. adding `package` visibility).
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.

Expand Down
46 changes: 27 additions & 19 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
{
"name": "dave-liddament/php-language-extensions",
"description": "Attributes for extending the PHP language, using static analysis to enforce new language constructs",
"keywords": ["static analysis", "package attribute", "friend attribute", "sealed attribute"],
"type" : "library",
"keywords": [
"static analysis",
"package attribute",
"friend attribute",
"sealed attribute"
],
"type": "library",
"minimum-stability": "stable",
"license": "MIT",
"authors": [
Expand All @@ -13,11 +18,11 @@
],
"autoload": {
"psr-4": {
"DaveLiddament\\PhpLanguageExtensions\\" : "src/"
"DaveLiddament\\PhpLanguageExtensions\\": "src/"
}
},
"require" : {
"php": "^8"
"require": {
"php": "^8.0 || ^8.1 || ^8.2"
},
"require-dev": {
"phpstan/phpstan": "^1.5",
Expand All @@ -26,18 +31,21 @@
"vimeo/psalm": "^4.22"
},
"scripts": {
"composer-validate" : "@composer validate --no-check-all --strict",
"cs-fix" : "php-cs-fixer fix",
"cs" : "php-cs-fixer fix --dry-run -v",
"phpstan" : "phpstan analyse",
"psalm" : "psalm",
"lint" : "parallel-lint src",
"ci" : [
"@composer-validate",
"@lint",
"@cs",
"@phpstan",
"@psalm"
]
}
"composer-validate": "@composer validate --no-check-all --strict",
"cs-fix": "php-cs-fixer fix",
"cs": [
"@putenv PHP_CS_FIXER_IGNORE_ENV=1",
"php-cs-fixer fix --dry-run -v"
],
"phpstan": "phpstan analyse",
"psalm": "psalm",
"lint": "parallel-lint src",
"ci": [
"@composer-validate",
"@lint",
"@cs",
"@phpstan",
"@psalm"
]
}
}
Loading

0 comments on commit e5f917b

Please sign in to comment.