1
0
Fork 0
Go to file
jrfnl 40bd4b03ad
ClassMapGenerator: stabilize the heredoc/nowdoc stripping
I've looked into 10067 and have come to the conclusion that using a single regex to strip the heredoc/nowdocs is always going to run into trouble as:
* Either the matching will be too greedy (issue 10067);
* Or the matching will run into backtrace limits for large heredoc/nowdocs.

We cannot solve both within a single regex.

So, I'm proposing a slightly different solution which should support both and should also improve performance for files containing large heredoc/nowdocs.

The `stripHereNowDocs()` function will find a start marker and remember the offset of the start marker.
It will then find the end marker and strip the contents between the two (replace with `null`).
The function will then recurse onto itself until all heredocs/nowdocs in a file have been removed.
2021-08-21 17:45:43 +02:00
.github PHPUnit: move environment variable into PHPUnit config file (#10062) 2021-08-19 13:21:04 +02:00
bin Register ErrorHandler early to catch deprecation notices while the Application is being initialized 2021-07-22 12:58:14 +02:00
doc Update community page 2021-08-19 16:03:36 +02:00
phpstan PHPStan Level 5 (#10070) 2021-08-21 17:41:52 +02:00
res Add "symlink" option for "bin-compat" config (#9959) 2021-06-09 11:33:44 +02:00
src ClassMapGenerator: stabilize the heredoc/nowdoc stripping 2021-08-21 17:45:43 +02:00
tests ClassMapGeneratorTest: add test with consecutive duplicate heredoc markers 2021-08-21 17:45:42 +02:00
.editorconfig Enhancement: Add .editorconfig 2019-01-03 10:49:27 +01:00
.gitattributes Update HTTP URLs to their HTTPS if they already redirect automatically 2020-04-13 06:22:02 +07:00
.gitignore PHPUnit: move environment variable into PHPUnit config file (#10062) 2021-08-19 13:21:04 +02:00
.php_cs Uses config data from Composer object whenever possible on ArchiveCommand 2020-02-10 13:15:58 -02:00
CHANGELOG.md Update changelog 2021-08-19 17:04:25 +02:00
CODE_OF_CONDUCT.md Add coc file to appease the github UI 2020-04-23 11:14:08 +02:00
LICENSE lets avoid silly commits in the future 2017-01-19 12:10:26 +01:00
PORTING_INFO Import initial partial port of the libzypp satsolver. 2011-04-05 17:37:19 +02:00
README.md Update community section of readme 2021-05-19 15:24:01 +02:00
UPGRADE-2.0.md Escape special characters in Markdown files 2020-10-24 11:53:20 +01:00
composer.json PHPStan Level 5 (#10070) 2021-08-21 17:41:52 +02:00
composer.lock PHPStan Level 5 (#10070) 2021-08-21 17:41:52 +02:00
phpunit.xml.dist PHPUnit: move environment variable into PHPUnit config file (#10062) 2021-08-19 13:21:04 +02:00

README.md

Composer - Dependency Management for PHP

Composer helps you declare, manage, and install dependencies of PHP projects.

See https://getcomposer.org/ for more information and documentation.

Continuous Integration

Installation / Usage

Download and install Composer by following the official instructions.

For usage, see the documentation.

Packages

Find packages on Packagist.

Community

Follow @packagist or @seldaek on Twitter for announcements, or check the #composerphp hashtag.

For support, Stack Overflow offers a good collection of Composer related questions, or you can use the GitHub discussions.

Please note that this project is released with a Contributor Code of Conduct. By participating in this project and its community you agree to abide by those terms.

Requirements

PHP 5.3.2 or above (at least 5.3.4 recommended to avoid potential bugs)

Authors

See also the list of contributors who participated in this project.

Security Reports

Please send any sensitive issue to security@packagist.org. Thanks!

License

Composer is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments