From d80440b7f49723ccb298fdf81f3eab25f83435e7 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Marek=20Barto=C5=A1?=
Date: Thu, 20 Jun 2024 19:00:11 +0200
Subject: [PATCH] Update metadata and build config
---
.gitattributes | 1 -
.github/workflows/ci.yaml | 12 ++++-----
.github/workflows/dependency-review.yaml | 4 +--
CHANGELOG.md | 2 +-
Makefile | 31 +++++++++++++++++-------
README.md | 24 +++++-------------
6 files changed, 37 insertions(+), 37 deletions(-)
diff --git a/.gitattributes b/.gitattributes
index 1d5c74d..0dadbd0 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -8,6 +8,5 @@ tools export-ignore
.editorconfig export-ignore
.gitattributes export-ignore
.gitignore export-ignore
-CHANGELOG-*.md export-ignore
Makefile export-ignore
README.md export-ignore
diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml
index 6620380..b65ac91 100644
--- a/.github/workflows/ci.yaml
+++ b/.github/workflows/ci.yaml
@@ -39,7 +39,7 @@ jobs:
steps:
- name: "Checkout"
- uses: "actions/checkout@v3"
+ uses: "actions/checkout@v4"
- name: "PHP"
uses: "orisai/github-workflows/.github/actions/setup-php@v1"
@@ -72,7 +72,7 @@ jobs:
steps:
- name: "Checkout"
- uses: "actions/checkout@v3"
+ uses: "actions/checkout@v4"
- name: "PHP"
uses: "orisai/github-workflows/.github/actions/setup-php@v1"
@@ -116,7 +116,7 @@ jobs:
steps:
- name: "Checkout"
- uses: "actions/checkout@v3"
+ uses: "actions/checkout@v4"
- name: "PHP"
uses: "orisai/github-workflows/.github/actions/setup-php@v1"
@@ -143,7 +143,7 @@ jobs:
token: "${{ secrets.GITHUB_TOKEN }}"
- name: "Upload logs"
- uses: "actions/upload-artifact@v3"
+ uses: "actions/upload-artifact@v4"
with:
name: "Logs - Tests (${{ matrix.operating-system }}, ${{ matrix.php-version }}, ${{ matrix.composer-flags }})"
path: "var/log"
@@ -186,7 +186,7 @@ jobs:
steps:
- name: "Checkout"
- uses: "actions/checkout@v3"
+ uses: "actions/checkout@v4"
- name: "PHP"
uses: "orisai/github-workflows/.github/actions/setup-php@v1"
@@ -212,7 +212,7 @@ jobs:
stryker-token: "${{ secrets.STRYKER_DASHBOARD_API_KEY }}"
- name: "Upload logs"
- uses: "actions/upload-artifact@v3"
+ uses: "actions/upload-artifact@v4"
with:
name: "Logs - Mutations"
path: "var/coverage/mutations/infection.log"
diff --git a/.github/workflows/dependency-review.yaml b/.github/workflows/dependency-review.yaml
index 36e1193..891f921 100644
--- a/.github/workflows/dependency-review.yaml
+++ b/.github/workflows/dependency-review.yaml
@@ -29,10 +29,10 @@ jobs:
steps:
- name: "Checkout"
- uses: "actions/checkout@v3"
+ uses: "actions/checkout@v4"
- name: "Dependency Review"
- uses: "actions/dependency-review-action@v3"
+ uses: "actions/dependency-review-action@v4"
with:
base-ref: "${{ github.event.before }}"
head-ref: "${{ github.sha }}"
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 10b40d2..3578ef4 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -5,6 +5,6 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).
-## [Unreleased](https://github.com/orisai/vfs/compare/...HEAD)
+## [Unreleased](https://github.com/orisai/vfs/compare/...v1.x)
### Added
diff --git a/Makefile b/Makefile
index 5792bae..242a8a2 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,6 @@
_: list
-# Config
+## Config
PHPCS_CONFIG=tools/phpcs.xml
PHPSTAN_CONFIG=tools/phpstan.neon
@@ -8,10 +8,15 @@ PHPSTAN_BASELINE_CONFIG=tools/phpstan.baseline.neon
PHPUNIT_CONFIG=tools/phpunit.xml
INFECTION_CONFIG=tools/infection.json
-# QA
+## Install
-qa: ## Check code quality - coding style and static analysis
- make cs & make phpstan
+update: ## Update all dependencies
+ make update-php
+
+update-php: ## Update PHP dependencies
+ composer update
+
+## QA
cs: ## Check PHP files coding style
mkdir -p var/tools/PHP_CodeSniffer
@@ -28,7 +33,7 @@ phpstan: ## Analyse code with PHPStan
phpstan-baseline: ## Add PHPStan errors to baseline
make phpstan ARGS="-b $(PHPSTAN_BASELINE_CONFIG)"
-# Tests
+## Tests
.PHONY: tests
tests: ## Run all tests
@@ -56,14 +61,22 @@ mutations-infection:
--skip-initial-tests \
$(ARGS)
-# Utilities
+## Utilities
.SILENT: $(shell grep -h -E '^[a-zA-Z_-]+:.*?$$' $(MAKEFILE_LIST) | sort -u | awk 'BEGIN {FS = ":.*?"}; {printf "%s ", $$1}')
-LIST_PAD=20
list:
- awk 'BEGIN {FS = ":.*##"; printf "Usage:\n make \033[36m\033[0m\n\nTargets:\n"}'
- grep -h -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort -u | awk 'BEGIN {FS = ":.*?## "}; {printf " \033[36m%-$(LIST_PAD)s\033[0m %s\n", $$1, $$2}'
+ awk 'BEGIN {FS = ":.*##"; printf "Usage:\n make \033[36m\033[0m\n"}'
+ @max_len=0; \
+ for target in $$(grep -h -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "} {print $$1}'); do \
+ len=$${#target}; \
+ if [ $$len -gt $$max_len ]; then \
+ max_len=$$len; \
+ fi \
+ done; \
+ awk -v max_len=$$max_len 'BEGIN {FS = ":.*?## "; last_section=""} \
+ /^## /{last_section=sprintf("\n\033[1m%s\033[0m", substr($$0, 4)); next} \
+ /^[a-zA-Z_-]+:.*?## /{if (last_section != "") { printf "%s\n", last_section; last_section=""; } printf " \033[36m%-*s\033[0m %s\n", max_len + 1, $$1, $$2}' $(MAKEFILE_LIST)
PRE_PHP=XDEBUG_MODE=off
diff --git a/README.md b/README.md
index cd137f9..127c5a8 100644
--- a/README.md
+++ b/README.md
@@ -17,24 +17,12 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
##