Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10050 from jrfnl/feature/10037-classmapgenerator-…
…bug-fixes ClassMapGenerator: fix two bugs (long heredocs + markers in text)
- Loading branch information
Showing
8 changed files
with
2,229 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
87 changes: 87 additions & 0 deletions
87
tests/Composer/Test/Autoload/Fixtures/pcrebacktracelimit/StripNoise.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
<?php | ||
|
||
namespace Foo; | ||
|
||
/** | ||
* class StripNoise { } | ||
*/ | ||
class StripNoise | ||
{ | ||
public function test_heredoc() | ||
{ | ||
return <<<HEREDOC | ||
class FailHeredocBasic | ||
{ | ||
} | ||
HEREDOC . <<< WHITESPACE | ||
class FailHeredocWhitespace | ||
{ | ||
} | ||
WHITESPACE . <<<"DOUBLEQUOTES" | ||
class FailHeredocDoubleQuotes | ||
{ | ||
} | ||
DOUBLEQUOTES . <<< "DOUBLEQUOTESTABBED" | ||
class FailHeredocDoubleQuotesTabbed | ||
{ | ||
} | ||
DOUBLEQUOTESTABBED . <<<HEREDOCPHP73 | ||
class FailHeredocPHP73 | ||
{ | ||
} | ||
HEREDOCPHP73; | ||
} | ||
|
||
public function test_nowdoc() | ||
{ | ||
return <<<'NOWDOC' | ||
class FailNowdocBasic | ||
{ | ||
} | ||
NOWDOC . <<< 'WHITESPACE' | ||
class FailNowdocWhitespace | ||
{ | ||
} | ||
WHITESPACE . <<< 'NOWDOCTABBED' | ||
class FailNowdocTabbed | ||
{ | ||
} | ||
NOWDOCTABBED . <<<'NOWDOCPHP73' | ||
class FailNowdocPHP73 | ||
{ | ||
} | ||
NOWDOCPHP73; | ||
} | ||
|
||
public function test_followed_by_parentheses() | ||
{ | ||
return array(<<<PARENTHESES | ||
class FailParentheses | ||
{ | ||
} | ||
PARENTHESES); | ||
} | ||
|
||
public function test_followed_by_comma() | ||
{ | ||
return array(1, 2, <<<COMMA | ||
class FailComma | ||
{ | ||
} | ||
COMMA, 3, 4); | ||
} | ||
|
||
public function test_followed_by_period() | ||
{ | ||
return <<<PERIOD | ||
class FailPeriod | ||
{ | ||
} | ||
PERIOD.'?>'; | ||
} | ||
|
||
public function test_simple_string() | ||
{ | ||
return 'class FailSimpleString {}'; | ||
} | ||
} |
464 changes: 464 additions & 0 deletions
464
tests/Composer/Test/Autoload/Fixtures/pcrebacktracelimit/VeryLongHeredoc.php
Large diffs are not rendered by default.
Oops, something went wrong.
327 changes: 327 additions & 0 deletions
327
tests/Composer/Test/Autoload/Fixtures/pcrebacktracelimit/VeryLongNowdoc.php
Large diffs are not rendered by default.
Oops, something went wrong.
307 changes: 307 additions & 0 deletions
307
tests/Composer/Test/Autoload/Fixtures/pcrebacktracelimit/VeryLongPHP73Heredoc.php
Large diffs are not rendered by default.
Oops, something went wrong.
1,018 changes: 1,018 additions & 0 deletions
1,018
tests/Composer/Test/Autoload/Fixtures/pcrebacktracelimit/VeryLongPHP73Nowdoc.php
Large diffs are not rendered by default.
Oops, something went wrong.