From b424ab60c66c7497cb335c7884c82e042a736782 Mon Sep 17 00:00:00 2001 From: Tomas Votruba Date: Fri, 2 May 2025 12:28:37 +0200 Subject: [PATCH] docs --- resources/docs/swiss-knife.md | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/resources/docs/swiss-knife.md b/resources/docs/swiss-knife.md index 927c276f5..5acf37a64 100644 --- a/resources/docs/swiss-knife.md +++ b/resources/docs/swiss-knife.md @@ -1,4 +1,4 @@ -In 2024 we shipped an in-house tool that we originally used only internally to help with upgrades. +In 2024 we published an in-house tool that we used only internal for years. It can help you with various everyday tasks that are outside Rector's scope, but are connected with upgrades and code quality. @@ -8,11 +8,21 @@ It can help you with various everyday tasks that are outside Rector's scope, but composer require rector/swiss-knife --dev ``` -It helps with: +It helps you to: + +* **finalize all classes** except entities, mocked classes, classes with children, YAML-defined etc. +* **privatize class constant**, that are never used outside the class +* detect commented code creep +* **convert random namespaces to PSR-4** - updates `composer.json`, class names and use imports +* spot accidental git conflicts in CI +* turn any JSON file to **nice and human-readable format** +* search all PHP files with quick regex +* generate [Symfony 5.3](https://symfony.com/blog/new-in-symfony-5-3-config-builder-classes) configs +* split huge Symfony configs to per-package in `/packages/` folder +* spot fake-traits + +...and more -* fixing PSR-4 namespace to match `composer.json` autoload -* finalizing all classes excepts parents, entities marked with docblock, attributes or YAML-defined -* detecting commented code or git conflicts