Skip to content
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
20 changes: 20 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,27 @@ trim_trailing_whitespace = true
[*.js]
indent_size = 2

[*.scss]
indent_size = 2

[*.css]
indent_size = 2

[package.json]
indent_size = 2

[package-lock.json]
indent_size = 2

[src/assets/dist/**]
indent_size = unset
indent_style = unset
insert_final_newline = unset
trim_trailing_whitespace = unset
charset = unset

[*.md]
indent_size = 2
trim_trailing_whitespace = false

[*.php]
Expand Down
9 changes: 4 additions & 5 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,6 @@
*.gif binary
*.ttf binary

# Avoid merge conflicts in CHANGELOG
# https://about.gitlab.com/2015/02/10/gitlab-reduced-merge-conflicts-by-90-percent-with-changelog-placeholders/
/CHANGELOG.md merge=union

# Exclude files from the archive
/.editorconfig export-ignore
/.gitattributes export-ignore
Expand All @@ -38,7 +34,10 @@
/infection.json* export-ignore
/phpstan*.neon* export-ignore
/phpunit.xml.dist export-ignore
/psalm.xml export-ignore
/rector.php export-ignore
/runtime export-ignore
/tests export-ignore

# Avoid merge conflicts in CHANGELOG
# https://about.gitlab.com/2015/02/10/gitlab-reduced-merge-conflicts-by-90-percent-with-changelog-placeholders/
/CHANGELOG.md merge=union
3 changes: 1 addition & 2 deletions .github/linters/.codespellrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
[codespell]
ignore-words-list = CanBe
skip = */tests/*,tests/**,*/composer.lock,*/composer.json
skip = */tests/*,tests/**,*/composer.lock,*/composer.json,*/package-lock.json,*/dist/*,*/node_modules/*,*/CHANGELOG.md,*/UPGRADE.md
11 changes: 11 additions & 0 deletions .github/linters/.editorconfig-checker.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"Exclude": [
"phpstan-baseline\\.neon$",
"^tests/runtime/",
"\\.min\\.css$",
"\\.min\\.js$",
"^vendor/",
"^runtime/",
"scaffold-lock\\.json$"
]
}
10 changes: 10 additions & 0 deletions .github/linters/.gitleaks.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
title = "gitleaks config"

[extend]
useDefault = true

[allowlist]
description = "Allow test fixture data with dummy credentials"
paths = [
'''tests/support/data/.*\.php''',
]
5 changes: 5 additions & 0 deletions .github/linters/.markdown-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
MD007:
indent: 2
MD013: false
MD033: false
2 changes: 0 additions & 2 deletions .github/workflows/ecs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,3 @@ permissions:
jobs:
easy-coding-standard:
uses: yii2-framework/actions/.github/workflows/ecs.yml@v1
with:
php-version: '["8.3"]'
9 changes: 8 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# AI agents (if present)
.codex
.claude
phpunit.xml

# codecoverage (if present)
code_coverage

Expand All @@ -23,11 +28,13 @@ nbproject

# node_modules (if present)
node_modules
package-lock.json

# phpstorm project (if present)
.idea

# phpactor (if present)
.phpactor.*

# phpunit (if present)
.phpunit.cache
.phpunit.result.cache
Expand Down
21 changes: 21 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
**/*.min.css
**/*.min.js

# Vite-built bundles (committed dist/) and lockfiles.
**/dist/**
**/node_modules/**
**/package-lock.json

# Yii AssetManager publishes a hashed copy of src/assets/ under tests/runtime/
# whenever phpunit runs; the tree is regenerated on every test run, never
# authored, and ignored by git already.
tests/runtime/**

# License texts ship verbatim — never auto-formatted.
**/LICENSE*

# Tool configs maintained by hand to keep their array order meaningful.
composer-require-checker.json

# Auto-generated by yii2-extensions/scaffold; never hand-edited.
scaffold-lock.json
28 changes: 28 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"tabWidth": 4,
"useTabs": false,
"singleQuote": false,
"trailingComma": "all",
"printWidth": 80,
"overrides": [
{
"files": ["**/*.{js,jsx,ts,tsx,vue,css,scss,html,yml,yaml}"],
"options": {
"tabWidth": 2
}
},
{
"files": "**/*.md",
"options": {
"embeddedLanguageFormatting": "off",
"tabWidth": 2
}
},
{
"files": ["**/package.json", "**/package-lock.json"],
"options": {
"tabWidth": 2
}
}
]
}
1 change: 1 addition & 0 deletions .stylelintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
**/*.min.css
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ The format is based on Keep a Changelog, and this project adheres to Semantic Ve

## 0.6.2 Under development

- chore: migrate to `yii2-extensions/scaffold` consumer model with `php-forge/baseline` and `php-forge/coding-standard ^0.3@dev`.

## 0.6.1 May 1, 2026

- fix(deps): update `ui-awesome/html-mixin` requirement to `^0.6`.
Expand Down
3 changes: 3 additions & 0 deletions composer-require-checker.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"symbol-whitelist": []
}
17 changes: 13 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,16 @@
"ui-awesome/html-mixin": "^0.6"
},
"require-dev": {
"infection/infection": "^0.32",
"infection/infection": "^0.33",
"maglnet/composer-require-checker": "^4.1",
"php-forge/coding-standard": "^0.1",
"php-forge/baseline": "^0.1@dev",
"php-forge/coding-standard": "^0.3@dev",
"php-forge/support": "^0.3",
"phpstan/extension-installer": "^1.4",
"phpstan/phpstan": "^2.1",
"phpstan/phpstan-strict-rules": "^2.0",
"phpunit/phpunit": "^12.5"
"phpunit/phpunit": "^12.5",
"yii2-extensions/scaffold": "^0.1@dev"
},
"autoload": {
"psr-4": {
Expand All @@ -44,13 +46,20 @@
"extra": {
"branch-alias": {
"dev-main": "0.7.x-dev"
},
"scaffold": {
"allowed-packages": [
"php-forge/baseline",
"php-forge/coding-standard"
]
}
},
"config": {
"sort-packages": true,
"allow-plugins": {
"infection/extension-installer": true,
"phpstan/extension-installer": true
"phpstan/extension-installer": true,
"yii2-extensions/scaffold": true
}
},
"scripts": {
Expand Down
6 changes: 3 additions & 3 deletions ecs.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

declare(strict_types=1);

/** @var \Symplify\EasyCodingStandard\Configuration\ECSConfigBuilder $ecsConfigBuilder */
$ecsConfigBuilder = require __DIR__ . '/vendor/php-forge/coding-standard/config/ecs.php';
/** @var \Symplify\EasyCodingStandard\Configuration\ECSConfigBuilder $builder */
$builder = require __DIR__ . '/vendor/php-forge/coding-standard/src/ecs-83.php';

return $ecsConfigBuilder->withPaths(
return $builder->withPaths(
[
__DIR__ . '/src',
__DIR__ . '/tests',
Expand Down
2 changes: 1 addition & 1 deletion rector.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
use Rector\Config\RectorConfig;

return static function (RectorConfig $rectorConfig): void {
$rectorConfig->import(__DIR__ . '/vendor/php-forge/coding-standard/config/rector.php');
$rectorConfig->import(__DIR__ . '/vendor/php-forge/coding-standard/src/rector-83.php');

$rectorConfig->paths(
[
Expand Down
104 changes: 104 additions & 0 deletions scaffold-lock.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
{
"providers": {
"php-forge/baseline": {
"version": "0.1.1",
"path": "vendor/php-forge/baseline"
},
"php-forge/coding-standard": {
"version": "0.3.1",
"path": "vendor/php-forge/coding-standard"
}
},
"files": {
".editorconfig": {
"hash": "sha256:8fa5db985f2fea9f215165d95979f902cdefab1abe76b751ce946fd08308657a",
"provider": "php-forge/baseline",
"source": "metadata/.editorconfig",
"mode": "append"
},
".gitattributes": {
"hash": "sha256:88b62c371df01eac6e0298625a03baee372bd4048a6452cc2a1aeee0d49eba10",
"provider": "php-forge/baseline",
"source": "metadata/gitattributes",
"mode": "replace"
},
".gitignore": {
"hash": "sha256:04789ff5b83d0f6a22592de9b5b3c0fee0095ab0398532412ea8486d3cdade9f",
"provider": "php-forge/baseline",
"source": "metadata/.gitignore",
"mode": "append"
},
".styleci.yml": {
"hash": "sha256:825f8c744ffbd2bc2369712e7192b8694129a8ecbc3fd91dc9300fccecf827bd",
"provider": "php-forge/baseline",
"source": "metadata/.styleci.yml",
"mode": "replace"
},
".prettierignore": {
"hash": "sha256:d12c54d82c23d562342765ceda6897ca26b73eba0c700c127408c0a9bc17d595",
"provider": "php-forge/baseline",
"source": "metadata/.prettierignore",
"mode": "replace"
},
".prettierrc.json": {
"hash": "sha256:4bf1ad096981736c7bd00136026e046f4b23fcefa1f8db84dcd0bacac19e97a2",
"provider": "php-forge/baseline",
"source": "metadata/.prettierrc.json",
"mode": "replace"
},
".stylelintignore": {
"hash": "sha256:12186f0a5c42b4f894f7bdda1b1ca5ebc69f92d906aa9075a459d4d08fe4edc1",
"provider": "php-forge/baseline",
"source": "metadata/.stylelintignore",
"mode": "replace"
},
"composer-require-checker.json": {
"hash": "sha256:f4fbbc7876fa3f695b69dd7dc7ad4637d33dfab97fe445b476de26480f85055d",
"provider": "php-forge/baseline",
"source": "metadata/composer-require-checker.json",
"mode": "preserve"
},
".github/linters/.codespellrc": {
"hash": "sha256:c89a5fae6e0bba775cede6add224570db555ebd607f2737c8efc15ba9a32fe92",
"provider": "php-forge/baseline",
"source": "metadata/.github/linters/.codespellrc",
"mode": "replace"
},
".github/linters/.editorconfig-checker.json": {
"hash": "sha256:8227fada934c245fc98e67d691a9c8bee48b86adbbac9fbb6282057ca321d9b5",
"provider": "php-forge/baseline",
"source": "metadata/.github/linters/.editorconfig-checker.json",
"mode": "replace"
},
".github/linters/.gitleaks.toml": {
"hash": "sha256:33589aa4b1b2bd29dc30603b2e590d75a83f59da3fcd8e0b7a148c59726efb85",
"provider": "php-forge/baseline",
"source": "metadata/.github/linters/.gitleaks.toml",
"mode": "replace"
},
".github/linters/.markdown-lint.yml": {
"hash": "sha256:5d41c7471e15fea1b307a39791436179c5db6ae7c7daf00042d21750117bead4",
"provider": "php-forge/baseline",
"source": "metadata/.github/linters/.markdown-lint.yml",
"mode": "replace"
},
".github/linters/actionlint.yml": {
"hash": "sha256:5c4071e2aa711e7d2e6bbb9c06d82399feab06ef5ff8feae4f9b6a61b383852f",
"provider": "php-forge/baseline",
"source": "metadata/.github/linters/actionlint.yml",
"mode": "replace"
},
"ecs.php": {
"hash": "sha256:7c054b397506c1a4d4ab2d1197e9536b44f114e2721a0e9f8c46f362efcc7bae",
"provider": "php-forge/coding-standard",
"source": "src/config/ecs.php",
"mode": "preserve"
},
"rector.php": {
"hash": "sha256:5d55b6ca3154c904e8c6f35206dc90aad77112266dc7b5eb084f8c2f6765a3c5",
"provider": "php-forge/coding-standard",
"source": "src/config/rector.php",
"mode": "preserve"
}
}
}
2 changes: 1 addition & 1 deletion src/Exception/Message.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ enum Message: string
* Format: "Attribute value must be of type 'scalar' or 'Closure', '%s' given."
*/
case ATTRIBUTE_VALUE_MUST_BE_SCALAR_OR_CLOSURE = "Attribute value must be of type 'scalar' or 'Closure', "
. "'%s' given.";
. "'%s' given.";

/**
* Error when a key is not a non-empty string.
Expand Down
Loading