Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support all versions Yii2. #7

Merged
merged 3 commits into from
Nov 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ name: build

jobs:
phpunit:
uses: yiisoft/actions/.github/workflows/phpunit.yml@master
uses: php-forge/actions/.github/workflows/phpunit.yml@main
with:
os: >-
['ubuntu-latest', 'windows-latest']
Expand Down
35 changes: 35 additions & 0 deletions .github/workflows/compatibility.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
on:
pull_request:
paths-ignore:
- 'docs/**'
- 'README.md'
- 'CHANGELOG.md'
- '.gitignore'
- '.gitattributes'
- 'infection.json.dist'
- 'psalm.xml'

push:
paths-ignore:
- 'docs/**'
- 'README.md'
- 'CHANGELOG.md'
- '.gitignore'
- '.gitattributes'
- 'infection.json.dist'
- 'psalm.xml'

name: compatibility

jobs:
phpunit:
uses: php-forge/actions/.github/workflows/phpunit.yml@main
with:
composer-command: |
composer require yiisoft/yii2:^2.0.49 --prefer-dist --no-progress --no-suggest --no-interaction --no-scripts --ansi

extensions: intl
os: >-
['ubuntu-latest', 'windows-latest']
php: >-
['8.1', '8.2', '8.3']
2 changes: 1 addition & 1 deletion .github/workflows/dependency-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ name: Composer require checker

jobs:
composer-require-checker:
uses: yiisoft/actions/.github/workflows/composer-require-checker.yml@master
uses: php-forge/actions/.github/workflows/composer-require-checker.yml@main
with:
os: >-
['ubuntu-latest']
Expand Down
35 changes: 29 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@
<a href="https://www.php.net/releases/8.1/en.php" target="_blank">
<img src="https://img.shields.io/badge/PHP-%3E%3D8.1-787CB5" alt="php-version">
</a>
<a href="https://github.com/yiisoft/yii2/tree/2.2" target="_blank">
<img src="https://img.shields.io/badge/Yii2%20version-2.2-blue" alt="yii2-version">
</a>
<a href="https://github.com/yii2-extensions/phpstan/actions/workflows/build.yml" target="_blank">
<img src="https://github.com/yii2-extensions/phpstan/actions/workflows/build.yml/badge.svg" alt="PHPUnit">
</a>
<a href="https://github.com/yii2-extensions/phpstan/actions/workflows/compatibility.yml" target="_blank">
<img src="https://github.com/yii2-extensions/phpstan/actions/workflows/compatibility.yml/badge.svg" alt="PHPUnit">
</a>
<a href="https://codecov.io/gh/yii2-extensions/phpstan" target="_blank">
<img src="https://codecov.io/gh/yii2-extensions/phpstan/branch/main/graph/badge.svg?token=MF0XUGVLYC" alt="Codecov">
</a>
Expand All @@ -29,11 +29,34 @@
</a>
</p>

## Requirements
## Installation

The preferred way to install this extension is through [composer](https://getcomposer.org/download/).

Either run

```
composer require --dev --prefer-dist yii2-extensions/phpstan
```

or add

The minimun version of `PHP` required by this package is `PHP 8.1`.
```
"yii2-extensions/phpstan": "dev-main"
```

For install this package, you need [composer](https://getcomposer.org/).
to the require-dev section of your `composer.json` file.

## Support versions Yii2

<p>
<a href="https://github.com/yiisoft/yii2/tree/2.2" target="_blank">
<img src="https://img.shields.io/badge/Yii2%20version-2.2-blue" alt="yii2-version">
</a>
<a href="https://github.com/yiisoft/yii2/tree/2.0.49.3" target="_blank">
<img src="https://img.shields.io/badge/Yii2%20version-2.0.49.3-blue" alt="yii2-version">
</a>
</p>

## Testing

Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"php": ">=8.1",
"nikic/php-parser": "^4.1.0",
"phpstan/phpstan": "^1.0",
"yiisoft/yii2": "^2.2"
"yiisoft/yii2": "*"
},
"require-dev": {
"maglnet/composer-require-checker": "^4.6",
Expand Down