I’m interested in running #FrankenPHP (i.e., #Caddy) as the app server for a website. The website has multiple domains pointing to it, and I plan to run this in a #Kubernetes cluster. Can someone point to any docs or blog posts that show how others have set up similar configurations with Caddy or FrankenPHP, especially with regard to how Caddy magically configures HTTPS for the domains in this kind of setup?
@ramsey I'm afraid I can't offer any pointers or direction, but I'd just like to let you know that you have my most heartfelt condolences that this is a thing you have to experience. Best of luck!
So, I’m building a #php dependency-injection package, and it’s a lot of fun. I’ve gone a route that I don’t really see many, if any, following. I suspect it may be that a lot of the solutions out there are old, and while they have been updated, they’re still going to inherit certain approaches.
@Crell It's not that interesting really. It's mostly utilising attributes, and fluent builders, rather than having one gigantic mammoth container class.
@ramsey Ah, I'm doing something very similar, except I only allow bindings based on actual classes.
I also have named bindings, where you can bind more than one concrete to an abstract, but all but a default is specified by "name". You can also optionally have a discriminator attribute, which is typically just a wrapper for the named attribute with a particular attribute.
@ramsey And I also have qualified attributes. Essentially, you register a custom resolver, and an attribute. If a dependency has that attribute, the custom resolver is used.
A good example would be a built in one I have called DataStore, which is a key value store for primitives. Would also work with things like Laravel databases, where you'd use #[Database('mysql')], and it'd do the equivalent of Database::connection('mysql').
@ctietze not sure about Apache, but if switching to Nginx is an option, it supports auth subrequests. I don't know if there's a way to do it with Apache.
I need to remember that Mastodon exists! I’m currently writing a bunch of content to do with PHP and this would be the perfect place to talk about that.
I’m currently trying to decide whether #php#reflection is an interesting enough topic that people may like an in-depth course/series on it. It seems to be something a lot of people are vaguely aware of, but don’t really know the details.
It's interesting that you should mention modern PHP and PSRs, as I've long held that some of those could do with being updated, as I think they're bit a limiting at present. (also I think some of them could be improved) 😅
@alessandrolai interestingly, the container PSR is the one that I think is the most limiting, or needs improvement. Honestly, I'd probably create a dependency injection PSR that utilises it but adds some base indication for more advanced features, as well as some attributes for utilisation.
I think attributes are the future of PSRs as they'll let you hook into WAY more systems without making those systems adhere to specific contracts.
@alessandrolai I think it could be achieved without venturing into implementation.
It's super rough (I threw it together in the last 5–10 minutes), but here's a write-up that hopefully explains enough of it. It's concept I was going to explore anyway.