Simplify hook patterns using *MARK
Problem/Motivation
The Lexer class in phpstan/phpdoc-parser uses this $pattern = '(?:' . $pattern . ')(*MARK:' . $type . ')';. This might come as a surprise because up until yesterday support for *MARK in PHP was almost entirely undocumented, only the PHP 5.6 changelog mentions it briefly, I have now added it to the PCRE documentation. We totally could and should follow. It majorly simplifies the entire hook pattern mechanism: some 50 lines can be deleted including a runtime query. Also, the restriction of 65536 dynamic hooks is removed. (Phew, I was getting worried.)
Steps to reproduce
- Look at Lexer
- Go hmmm
Proposed resolution
Delete, delete, delete.
Remaining tasks
Ain't much.
User interface changes
API changes
DocBlockInterface::getHookFunction is gone. We hardly knew ya.