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
47 changes: 47 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# editorconfig.org

root = true

[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
indent_style = space
indent_size = 4
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

[*.md]
indent_size = 2
trim_trailing_whitespace = false

[*.php]
ij_php_space_before_short_closure_left_parenthesis = false
ij_php_space_after_type_cast = true

[*.yaml]
indent_size = 2

[*.yml]
indent_size = 2

[*.xml.dist]
indent_size = 2

[LICENSE*]
indent_style = unset
indent_size = unset
43 changes: 43 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Autodetect text files
* text=auto eol=lf

# ...Unless the name matches the following overriding patterns

# Definitively text files
*.php text
*.css text
*.js text
*.txt text
*.md text
*.xml text
*.json text
*.bat text
*.sql text
*.yml text

# Ensure those won't be messed up with
*.png binary
*.jpg binary
*.gif binary
*.ttf binary

# Exclude files from the archive
/.editorconfig export-ignore
/.gitattributes export-ignore
/.github export-ignore
/.gitignore export-ignore
/.styleci.yml export-ignore
/codeception.yml export-ignore
/composer-require-checker.json export-ignore
/docs export-ignore
/ecs.php export-ignore
/infection.json* export-ignore
/phpstan*.neon* export-ignore
/phpunit.xml.dist 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
36 changes: 36 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
version: 2
updates:
# Maintain dependencies for GitHub Actions
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
cooldown:
default-days: 7
groups:
github-actions:
patterns: ["*"]

# Maintain dependencies for Composer
- package-ecosystem: "composer"
directory: "/"
schedule:
interval: "daily"
cooldown:
default-days: 7
groups:
composer:
patterns: ["*"]
versioning-strategy: increase-if-necessary

# Maintain dependencies for npm
- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "daily"
cooldown:
default-days: 7
groups:
npm:
patterns: ["*"]
2 changes: 2 additions & 0 deletions .github/linters/.codespellrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[codespell]
skip = ./.git,.claude/*,.codex/*,.config/gh/*,.github/agents/*,.github/copilot-instructions.md,.github/copilot/*,.github/instructions/*,.github/prompts/*,.github/skills/*,.vscode/*,*/composer.json,*/composer.lock,*/dist/*,*/node_modules/*,*/package-lock.json,*/tests/*,code_coverage/*,CHANGELOG.md,UPGRADE.md,runtime/*,scaffold-lock.json,vendor/*
23 changes: 23 additions & 0 deletions .github/linters/.editorconfig-checker.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"Exclude": [
"\\.min\\.css$",
"\\.min\\.js$",
"^\\.claude/",
"^\\.codex/",
"^\\.config/gh/",
"^\\.github/agents/",
"^\\.github/copilot-instructions\\.md$",
"^\\.github/copilot/",
"^\\.github/instructions/",
"^\\.github/prompts/",
"^\\.github/skills/",
"^\\.vscode/",
"^code_coverage/",
"^composer\\.lock$",
"^runtime/",
"^tests/runtime/",
"^vendor/",
"phpstan-baseline\\.neon$",
"scaffold-lock\\.json$"
]
}
4 changes: 4 additions & 0 deletions .github/linters/.gitleaks.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
title = "gitleaks config"

[extend]
useDefault = true
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
26 changes: 26 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
on:
pull_request: &ignore-paths
paths-ignore:
- ".gitattributes"
- ".gitignore"
- "CHANGELOG.md"
- "docs/**"
- "README.md"

push: *ignore-paths

name: build

permissions:
contents: read

jobs:
phpunit:
uses: yii2-framework/actions/.github/workflows/phpunit.yml@670b6444a11798dc2b38f2563dbbcef063dfc0ab # v2.0.1
secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
concurrency-group: phpunit-${{ github.workflow }}-${{ github.ref }}
extensions: mbstring
php-version: '["8.3","8.4","8.5"]'
20 changes: 20 additions & 0 deletions .github/workflows/dependency-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
on:
pull_request: &ignore-paths
paths-ignore:
- ".gitattributes"
- ".gitignore"
- "CHANGELOG.md"
- "docs/**"
- "README.md"

push: *ignore-paths

name: Composer require checker

permissions:
contents: read

jobs:
composer-require-checker:
uses: yii2-framework/actions/.github/workflows/composer-require-checker.yml@670b6444a11798dc2b38f2563dbbcef063dfc0ab # v2.0.1
20 changes: 20 additions & 0 deletions .github/workflows/ecs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
on:
pull_request: &ignore-paths
paths-ignore:
- ".gitattributes"
- ".gitignore"
- "CHANGELOG.md"
- "docs/**"
- "README.md"

push: *ignore-paths

name: ecs

permissions:
contents: read

jobs:
easy-coding-standard:
uses: yii2-framework/actions/.github/workflows/ecs.yml@670b6444a11798dc2b38f2563dbbcef063dfc0ab # v2.0.1
25 changes: 25 additions & 0 deletions .github/workflows/mutation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
on:
pull_request: &ignore-paths
paths-ignore:
- ".gitattributes"
- ".gitignore"
- "CHANGELOG.md"
- "docs/**"
- "README.md"

push: *ignore-paths

name: mutation test

permissions:
contents: read

jobs:
mutation:
uses: yii2-framework/actions/.github/workflows/infection.yml@670b6444a11798dc2b38f2563dbbcef063dfc0ab # v2.0.1
with:
command-options: --threads=4 --ignore-msi-with-no-mutations
phpstan: true
secrets:
STRYKER_DASHBOARD_API_KEY: ${{ secrets.STRYKER_DASHBOARD_API_KEY }}
22 changes: 22 additions & 0 deletions .github/workflows/quality.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
on:
- pull_request
- push

name: quality

permissions:
contents: read

jobs:
quality:
uses: yii2-framework/actions/.github/workflows/quality.yml@670b6444a11798dc2b38f2563dbbcef063dfc0ab # v2.0.1
permissions:
contents: read
with:
codespell-config: .github/linters/.codespellrc
editorconfig-checker-config: .github/linters/.editorconfig-checker.json
markdownlint-config: .github/linters/.markdown-lint.yml
prettier-config: .prettierrc.json
prettier-ignore-path: .prettierignore
yamllint-targets: .github
19 changes: 19 additions & 0 deletions .github/workflows/security.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
on:
- pull_request
- push

name: security

permissions:
contents: read

jobs:
security:
uses: yii2-framework/actions/.github/workflows/security.yml@670b6444a11798dc2b38f2563dbbcef063dfc0ab # v2.0.1
permissions:
contents: read
with:
gitleaks-config: .github/linters/.gitleaks.toml
secrets:
GITLEAKS_LICENSE: ${{ secrets.GITLEAKS_LICENSE }}
20 changes: 20 additions & 0 deletions .github/workflows/static.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
on:
pull_request: &ignore-paths
paths-ignore:
- ".gitattributes"
- ".gitignore"
- "CHANGELOG.md"
- "docs/**"
- "README.md"

push: *ignore-paths

name: static analysis

permissions:
contents: read

jobs:
phpstan:
uses: yii2-framework/actions/.github/workflows/phpstan.yml@670b6444a11798dc2b38f2563dbbcef063dfc0ab # v2.0.1
64 changes: 58 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,58 @@
assets/*
!assets/.gitignore
protected/runtime/*
!protected/runtime/.gitignore
protected/data/*.db
themes/classic/views/
# Local AI agent, editor, and GitHub CLI config (if present)
.claude
.codex
.config/gh

# codecoverage (if present)
code_coverage

# codeception (if present)
c3.php

# composer
composer.lock

# GitHub Copilot config (if present)
.github/agents/**
.github/copilot-instructions.md
.github/copilot/**
.github/instructions/**
.github/prompts/**
.github/skills/**

# mac ds_store (if present)
.DS_Store

# netbeans project (if present)
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

# vagrant (if present)
.vagrant

# vendor
vendor

# vscode project (if present)
.vscode

# windows thumbnail cache (if present)
Thumbs.db

# zend studio for eclipse project (if present)
.buildpath
.project
.settings
Loading
Loading