Skip to content
New issue

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

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

Already on GitHub? # to your account

Support Yii Assets 5 + Bump PHP to 8.1 #73

Merged
merged 3 commits into from
Feb 4, 2025
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
4 changes: 3 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ on:
- 'psalm.xml'

push:
branches:
- master
paths-ignore:
- 'docs/**'
- 'README.md'
Expand All @@ -28,4 +30,4 @@ jobs:
os: >-
['ubuntu-latest', 'windows-latest']
php: >-
['8.0', '8.1']
['8.1', '8.2', '8.3']
4 changes: 3 additions & 1 deletion .github/workflows/composer-require-checker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ on:
- 'psalm.xml'

push:
branches:
- master
paths-ignore:
- 'docs/**'
- 'README.md'
Expand All @@ -30,4 +32,4 @@ jobs:
os: >-
['ubuntu-latest']
php: >-
['8.0', '8.1']
['8.1', '8.2', '8.3']
2 changes: 1 addition & 1 deletion .github/workflows/rector.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ jobs:
os: >-
['ubuntu-latest']
php: >-
['8.0']
['8.3']
4 changes: 3 additions & 1 deletion .github/workflows/static.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ on:
- 'phpunit.xml.dist'

push:
branches:
- master
paths-ignore:
- 'docs/**'
- 'README.md'
Expand All @@ -28,4 +30,4 @@ jobs:
os: >-
['ubuntu-latest']
php: >-
['8.0', '8.1']
['8.1', '8.2', '8.3']
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ The package ...

## Requirements

- PHP 8.0 or higher.
- PHP 8.1 or higher.

## Installation

Expand Down
8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@
}
],
"require": {
"php": "^8.0",
"php": "^8.1",
"nyholm/psr7": "^1.3",
"psr/http-message": "^1.1",
"psr/http-server-handler": "^1.0",
"psr/http-server-middleware": "^1.0",
"yiisoft/assets": "^4.0",
"yiisoft/assets": "^4.0|^5.0",
"yiisoft/data-response": "^2.0",
"yiisoft/http": "^1.1",
"yiisoft/router": "^3.1",
Expand All @@ -51,7 +51,7 @@
"rector/rector": "^0.15.1",
"roave/infection-static-analysis-plugin": "^1.21",
"spatie/phpunit-watcher": "^1.23",
"vimeo/psalm": "^4.18",
"vimeo/psalm": "^5.26.1",
"yiisoft/aliases": "^3.0",
"yiisoft/config": "^1.0",
"yiisoft/di": "^1.1",
Expand Down Expand Up @@ -119,7 +119,7 @@
"allow-plugins": {
"infection/extension-installer": true,
"composer/package-versions-deprecated": true,
"yiisoft/config": true
"yiisoft/config": false
}
},
"scripts": {
Expand Down
203 changes: 0 additions & 203 deletions config/.merge-plan.php

This file was deleted.

2 changes: 2 additions & 0 deletions psalm.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
<?xml version="1.0"?>
<psalm
errorLevel="2"
findUnusedBaselineEntry="true"
findUnusedCode="false"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="https://getpsalm.org/schema/config"
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
Expand Down
13 changes: 13 additions & 0 deletions src/Asset/DevPanelAsset.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,27 @@
namespace Yiisoft\Yii\Debug\Viewer\Asset;

use Yiisoft\Assets\AssetBundle;
use Yiisoft\Assets\AssetManager;
use Yiisoft\View\WebView;

/**
* @psalm-import-type CssFile from AssetManager
* @psalm-import-type JsFile from AssetManager
*/
final class DevPanelAsset extends AssetBundle
{
public bool $cdn = true;

/**
* @psalm-var array<array-key, string|JsFile>
*/
public array $js = [
['/bundle.js', WebView::POSITION_END, 'type' => 'module'],
];

/**
* @psalm-var array<array-key, string|CssFile>
*/
public array $css = [
'/bundle.css',
];
Expand Down
13 changes: 13 additions & 0 deletions src/Asset/ToolbarAsset.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,27 @@
namespace Yiisoft\Yii\Debug\Viewer\Asset;

use Yiisoft\Assets\AssetBundle;
use Yiisoft\Assets\AssetManager;
use Yiisoft\View\WebView;

/**
* @psalm-import-type CssFile from AssetManager
* @psalm-import-type JsFile from AssetManager
*/
final class ToolbarAsset extends AssetBundle
{
public bool $cdn = true;

/**
* @psalm-var array<array-key, string|JsFile>
*/
public array $js = [
['/bundle.js', WebView::POSITION_END, 'type' => 'module'],
];

/**
* @psalm-var array<array-key, string|CssFile>
*/
public array $css = [
'/bundle.css',
];
Expand Down