Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Loader: add includes max nesting level #164

Closed
wants to merge 5 commits into from

Conversation

trejjam
Copy link
Contributor

@trejjam trejjam commented Feb 10, 2018

  • bug fix? yes
  • new feature? yes
  • BC break? no

Pull request for #162. Solving possible call stack overflow.

@trejjam trejjam force-pushed the feature/loader-max-nesting branch 2 times, most recently from cd28d01 to 8bbb795 Compare Feb 10, 2018
@trejjam
Copy link
Contributor Author

@trejjam trejjam commented Feb 11, 2018

For code style error created issue https://github.com/nette/coding-standard/issues/28

@dg
Copy link
Member

@dg dg commented Feb 11, 2018

Does it make sense to include one file more than once (nested)? Ie. has sense to have INCLUDES_MAX_DEPTH larger than 1?

@trejjam
Copy link
Contributor Author

@trejjam trejjam commented Feb 11, 2018

I was thinking about it and it is possible that someone use config like:

config.neon:

includes:
  - console.extension.neon
  - config.extensionRequiresConsole.neon

config.extensionRequiresConsole.neon:

extensions:
  vendor.name: Vendor\Name\DI\Extension
includes:
  - console.extension.neon

It is probably easy to remove this 'mess' from config, but I think it is basically not wrong.

@dg
Copy link
Member

@dg dg commented Feb 11, 2018

I think it's better to add and remove files in the $loadedFiles and then only test the presence.

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

Successfully merging this pull request may close these issues.

None yet

2 participants