Nicolas Lemoine

Results 75 comments of Nicolas Lemoine

> I would just have an index.php file that calls Hierarchy pass the resolved templates to Timber. You don't [even need an `index.php` file](https://github.com/Brain-WP/Hierarchy#template-resolution-example) if you hook in `template_redirect`.

@mindfullsilence Thanks for your detailed issue and solution proposals. I stumbled upon an issue myself with the `final` keyword myself but found a way around. I would still add a...

Thanks for your feedback @mindfullsilence. Now that you provided some details about your stack, I'm guessing your problem lied in things like: ```php $container->make(Timber\Post:class, [ 'post' => $post, ]); ```...

> But no idea how to solve that Using `debug_backtrace()` ;) Sorry, I didn't dig that topic much, I trust you guys on this 👍

I have mixed feelings about this. The fact that Twig evaluate an empty collection to `true` isn't technically wrong. It would be the same on the PHP side and this...

The return type doesn't actually change. An empty array is still of iterable type.

@montagmorgens Can you provide more details on your use case? The factory is just meant to make post queries, I'd like to have more context before considering making `factory` protected.

Thank you @Levdbas! I'll post this issue I wrote some years ago and never posted. While reading it again, I feel that it's still relevant and can provide a starter...

PHPStan is right, the `$curent`variable might not be defined. @phasdev can you fix this?

Thing is, static return type [has been introduced in PHP 8.0](https://php.watch/versions/8.0/static-return-type). Unfortunately, we're still supporting PHP 7.4.