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
2 changes: 1 addition & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ CHANGELOG.md export-ignore
docker-compose.override.yml.dist export-ignore
docker-compose.yml export-ignore
indocker export-ignore
phpcs.xml export-ignore
mago.toml export-ignore
phpstan.neon export-ignore
17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,23 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com), and this project adheres to [Semantic Versioning](https://semver.org).

## [Unreleased]
### Added
* *Nothing*

### Changed
* Migrate form PHP_CodeSniffer to Mago for code linting and formatting.

### Deprecated
* *Nothing*

### Removed
* *Nothing*

### Fixed
* *Nothing*


## [1.3.0] - 2026-01-07
### Added
* *Nothing*
Expand Down
12 changes: 8 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
"php": "^8.4"
},
"require-dev": {
"carthage-software/mago": "^1.28",
"phpstan/phpstan": "^2.1",
"roave/security-advisories": "dev-master",
"shlinkio/php-coding-standard": "~2.5.0"
"shlinkio/shlink-mago-config": "^1.0"
},
"autoload": {
"files": [
Expand All @@ -29,8 +29,12 @@
"@cs",
"@stan"
],
"cs": "phpcs",
"cs:fix": "phpcbf",
"lint": "mago lint",
"lint:fix": "mago lint --fix",
"format": "mago format",
"format:check": "mago format --check",
"cs": ["@lint", "@format:check"],
"cs:fix": ["@lint:fix", "@format"],
"stan": "phpstan analyse"
},
"scripts-descriptions": {
Expand Down
19 changes: 19 additions & 0 deletions mago.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#:schema https://mago.carthage.software/1.27.1/schema.json
# Welcome to Mago!
# For full documentation, see https://mago.carthage.software/tools/overview
version = "1"
php-version = "8.4.0"
extends = "vendor/shlinkio/shlink-mago-config/mago.toml"

[source]
workspace = "."
paths = ["config", "functions", "src", "test"]
excludes = ["vendor"]

[source.glob]
literal-separator = true

[linter.rules]
no-literal-password = { exclude = ["test"] }
no-empty-catch-clause = { exclude = ["test"] }
no-empty-loop = { exclude = ["test"] }
14 changes: 0 additions & 14 deletions phpcs.xml

This file was deleted.