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

Update GitHub actions #35

Merged
merged 4 commits into from
Sep 1, 2022
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: 2 additions & 2 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

[*.md]
trim_trailing_whitespace = false
[*.{yml,yaml}]
indent_size = 2
17 changes: 7 additions & 10 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
},
"require-dev": {
"codeigniter/coding-standard": "^1.1",
"codeigniter4/codeigniter4": "dev-develop",
"codeigniter4/framework": "^4.2.3",
"fakerphp/faker": "^1.9",
"mockery/mockery": "^1.0",
"nexusphp/cs-config": "^3.1",
Expand All @@ -45,31 +45,28 @@
"Tests\\Support\\": "tests/_support"
}
},
"repositories": [
{
"type": "vcs",
"url": "https://github.com/codeigniter4/CodeIgniter4"
}
],
"minimum-stability": "dev",
"prefer-stable": true,
"scripts": {
"post-update-cmd": [
"bash -c \"if [ -f admin/setup.sh ]; then bash admin/setup.sh; fi\""
],
"analyze": "phpstan analyze",
"sa": "@analyze",
"ci": [
"Composer\\Config::disableProcessTimeout",
"@cs",
"@deduplicate",
"@analyze",
"@test",
"@inspect",
"@style"
"@test"
],
"cs": "php-cs-fixer fix --ansi --verbose --dry-run --diff",
"cs-fix": "php-cs-fixer fix --ansi --verbose --diff --using-cache=yes",
"style": "@cs-fix",
"deduplicate": "phpcpd app/ src/",
"inspect": "deptrac analyze --cache-file=build/deptrac.cache",
"mutate": "infection --threads=2 --skip-initial-tests --coverage=build/phpunit",
"style": "php-cs-fixer fix --verbose --ansi --using-cache=no",
"test": "phpunit"
}
}
155 changes: 0 additions & 155 deletions depfile.yaml

This file was deleted.

156 changes: 156 additions & 0 deletions deptrac.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,156 @@
parameters:
paths:
- ./src
- ./vendor/codeigniter4/framework/system
exclude_files:
- '#.*test.*#i'
layers:
- name: Model
collectors:
- type: bool
must:
- type: className
regex: .*[A-Za-z]+Model$
must_not:
- type: directory
regex: vendor/.*
- name: Vendor Model
collectors:
- type: bool
must:
- type: className
regex: .*[A-Za-z]+Model$
- type: directory
regex: vendor/.*
- name: Controller
collectors:
- type: bool
must:
- type: className
regex: .*\/Controllers\/.*
must_not:
- type: directory
regex: vendor/.*
- name: Vendor Controller
collectors:
- type: bool
must:
- type: className
regex: .*\/Controllers\/.*
- type: directory
regex: vendor/.*
- name: Config
collectors:
- type: bool
must:
- type: directory
regex: src/Config/.*
must_not:
- type: className
regex: .*Services
- type: directory
regex: vendor/.*
- name: Vendor Config
collectors:
- type: bool
must:
- type: directory
regex: vendor/.*/Config/.*
must_not:
- type: className
regex: .*Services
- name: Entity
collectors:
- type: bool
must:
- type: directory
regex: src/Entities/.*
must_not:
- type: directory
regex: vendor/.*
- name: Vendor Entity
collectors:
- type: bool
must:
- type: directory
regex: vendor/.*/Entities/.*
- name: View
collectors:
- type: bool
must:
- type: directory
regex: src/Views/.*
must_not:
- type: directory
regex: vendor/.*
- name: Vendor View
collectors:
- type: bool
must:
- type: directory
regex: vendor/.*/Views/.*
- name: Service
collectors:
- type: className
regex: .*Services.*
ruleset:
Entity:
- Config
- Model
- Service
- Vendor Config
- Vendor Entity
- Vendor Model
Config:
- Service
- Vendor Config
Model:
- Config
- Entity
- Service
- Vendor Config
- Vendor Entity
- Vendor Model
Service:
- Config
- Vendor Config

# Ignore anything in the Vendor layers
Vendor Model:
- Config
- Service
- Vendor Config
- Vendor Controller
- Vendor Entity
- Vendor Model
- Vendor View
Vendor Controller:
- Service
- Vendor Config
- Vendor Controller
- Vendor Entity
- Vendor Model
- Vendor View
Vendor Config:
- Config
- Service
- Vendor Config
- Vendor Controller
- Vendor Entity
- Vendor Model
- Vendor View
Vendor Entity:
- Service
- Vendor Config
- Vendor Controller
- Vendor Entity
- Vendor Model
- Vendor View
Vendor View:
- Service
- Vendor Config
- Vendor Controller
- Vendor Entity
- Vendor Model
- Vendor View
skip_violations:
4 changes: 2 additions & 2 deletions phpstan.neon.dist
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ parameters:
- src
- tests
bootstrapFiles:
- vendor/codeigniter4/codeigniter4/system/Test/bootstrap.php
- vendor/codeigniter4/framework/system/Test/bootstrap.php
excludePaths:
- src/Config/Routes.php
- src/Views/*
Expand All @@ -15,7 +15,7 @@ parameters:
- CodeIgniter\Entity\Entity
- Faker\Generator
scanDirectories:
- vendor/codeigniter4/codeigniter4/system/Helpers
- vendor/codeigniter4/framework/system/Helpers
dynamicConstantNames:
- APP_NAMESPACE
- CI_DEBUG
Expand Down
Loading