Skip to content

Commit 142479b

Browse files
committed
README.md add Conclusion section
1 parent c3016cd commit 142479b

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ A php test tool that mock **anything** without using any extensions.
2222
- [DaggerFactory](#daggerFactory)
2323
- [Testing](#testing)
2424
- [Disadvantage](#disadvantage)
25+
- [Conclusion](#conclusion)
2526
- [Inspire](#inspire)
2627
- [Related repo](#related-repo)
2728
- [License](#license)
@@ -394,6 +395,12 @@ The two biggest disadvantages of using RewriteDagger are reduced test coverage a
394395
- test coverage: Since the rewritten code does not belong to the original code in the project, for most test coverage tools, the original code in the project is not actually executed.
395396
- readability: People who read the test program must understand all of the tested target to understand the side effects of each rewriting rule.
396397

398+
# Conclusion
399+
400+
RewriteDagger is not intended to be a modern, full-featured mocking framework. It trades strict structure and advanced language features for simplicity, zero-extension deployment, and compatibility with legacy PHP systems (environments that may still run on PHP 4/5).
401+
402+
This design inevitably introduces complexity in the rewritten code, and prevents the use of certain newer PHP features or AST-based tooling. However, for teams dealing with legacy codebases where the original source cannot be modified safely, RewriteDagger provides a practical, low-friction shielding layer that enables testing without invasive refactoring.
403+
397404
# Inspire
398405

399406
RewriteDagger is inspired by the book 《*Working Effectively with Legacy Code*》 ( ISBN 13: 978-0131177055). Hope to provide *Link Seams* in PHP to make legacy PHP code easier to test.

0 commit comments

Comments
 (0)