Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Here's another way of loading Kint. This makes it use composer version if it's available and only loads Kint from ThirdParty folder if there is no composer version already loaded. This makes it possible to properly update Kint to latest version from composer when when ComposerScripts.php is not being executed fo example when composer's been added after getting zipped framework files and script is left out.
Additionally I've added some configurations for Kint to be obtained from Config\App. We might add additional Kint configurations there as well.
One important config to be set is
This make Kint to be displayed in place where it's called. Otherwise it goes to bottom as toolbar which creates conflicts with debug toolbar.
This also handles the situation where there are Kint calls left out in production environment and Kint is not loaded via composer by always loading Kint classes and setting Kint as disabled. Otherwise the scripts will crash if there are Kint calls and environment is set to anything but production. With this it only skips Kint calls and the app does not crash anymore.
Ref #2373 and #2564
Checklist: