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 February 10, 2018 19:58
@trejjam
Copy link
Contributor Author

trejjam commented Feb 11, 2018

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

@dg
Copy link
Member

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 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 commented Feb 11, 2018

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

@trejjam trejjam force-pushed the feature/loader-max-nesting branch from 4fbd76e to 5c0db20 Compare February 11, 2018 18:48
@dg dg changed the base branch from master to v2.4 March 26, 2018 13:04
@dg dg changed the base branch from v2.4 to master March 26, 2018 13:04
@dg dg closed this in 2d0da64 Mar 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants