Skip to content
Open
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
.phpdoc
/vendor
35 changes: 35 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-merge-conflict
- id: check-yaml
- id: mixed-line-ending
args: [--fix=lf]

- repo: local
hooks:
- id: phpcs-drupal
name: PHPCS - Drupal coding standards
entry: vendor/bin/phpcs
language: script
types: [php]
args:
- --standard=Drupal,DrupalPractice
- --extensions=php,module,inc,install,test,profile,theme,yml
pass_filenames: true

- id: phpstan
name: PHPStan - Static analysis
entry: vendor/bin/phpstan analyse
language: script
types: [php]
pass_filenames: false

- repo: https://github.com/commitizen-tools/commitizen
rev: v3.29.0
hooks:
- id: commitizen
stages: [commit-msg]
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,21 @@ the processed arguments, and it is available to use it anywhere.
\Drupal::service('alias_subpaths.context_manager')->getProcessedContextBag();
```

## Requirements

Install pre-commit

# Mac
brew install pre-commit

# Linux
pip install pre-commit

# From project root
pre-commit install
pre-commit install --hook-type commit-msg


## Installation
To install this module as mrmilu module inside `modules/mrmilu` folder following composer commands should be executed:
<ul>
Expand Down
18 changes: 17 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
{
"name": "mrmilu/alias_subpaths",
"description": "Allows have aliases with subpaths.",
"type": "drupal-mrmilu-module"
"type": "drupal-mrmilu-module",
"require-dev": {
"drupal/coder": "^8.3",
"squizlabs/php_codesniffer": "^3.13",
"mglaman/phpstan-drupal": "^2.0",
"drupal/core": "^10",
"tomasvotruba/cognitive-complexity": "^1.0"
},
"config": {
"allow-plugins": {
"composer/installers": true,
"drupal/core-composer-scaffold": false,
"drupal/core-project-message": false,
"phpstan/extension-installer": true,
"dealerdirect/phpcodesniffer-composer-installer": true
}
}
}
Loading