Skip to content
This repository has been archived by the owner on Dec 11, 2020. It is now read-only.

NL_be text provider crashes Serenata #1810

Closed
marcguyer opened this issue Oct 10, 2019 · 3 comments
Closed

NL_be text provider crashes Serenata #1810

marcguyer opened this issue Oct 10, 2019 · 3 comments

Comments

@marcguyer
Copy link

Summary

See Gert-dev/php-ide-serenata#483. The https://github.com/fzaninotto/Faker/blob/v1.8.0/src/Faker/Provider/nl_BE/Text.php file causes php to crash when Serenata is attempting to index the file. I'm not certain why but the file is quite large (>1M). My workaround is to delete the content of the nowdoc property after line 75.

Versions

Version
PHP 7.1.23
fzaninotto/faker 1.8.0

Self-enclosed code snippet for reproduction

This can be reproduced in the Atom editor by installing the php-ide-serenata and indexing a project with fzaninotto/faker installed.

Expected output

Successful indexing

Actual output

php crash

@pimjansen
Copy link
Contributor

This does not seem to be a bug for me. The content of the file is valid and i dont see my script crashing at all? If Serenata crashes i think the problem lies in the editor and not directly the script.

@marcguyer
Copy link
Author

I suppose it's a matter of opinion. Most text providers are <300K but they differ dramatically in size with NL_be being the largest at ~1M. IMO, 10K is more than enough since it's only used to seed a random text generator. The larger the file the larger the memory footprint.

This lib is ~11M total. The Text.php files together are the majority of that bulk at ~7M.

There's #1802, too. Instead of compression, just make them small.

@pimjansen
Copy link
Contributor

Since this is not a bug we are not going to patch this anytime soon. We however will take this into account in the design of 2.0 see #1807.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants