40bd4b03ad
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. |
||
---|---|---|
.github | ||
bin | ||
doc | ||
phpstan | ||
res | ||
src | ||
tests | ||
.editorconfig | ||
.gitattributes | ||
.gitignore | ||
.php_cs | ||
CHANGELOG.md | ||
CODE_OF_CONDUCT.md | ||
LICENSE | ||
PORTING_INFO | ||
README.md | ||
UPGRADE-2.0.md | ||
composer.json | ||
composer.lock | ||
phpunit.xml.dist |
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.
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
- Nils Adermann | GitHub | Twitter | naderman@naderman.de | naderman.de
- Jordi Boggiano | GitHub | Twitter | j.boggiano@seld.be | seld.be
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
- This project's Solver started out as a PHP port of openSUSE's Libzypp satsolver.