So much fuzz, crazy. Seen tons of sites going "dark" for a patch window. Kept my customer up and running all day. Minute after the patches came out our server was running 8.5.12. Big whoop, all for nothing. Feels way over-hyped.
We opted for Docker inside WSL. Even though production is not running Docker yet. It's our goal eventually. We want to be able to spin up containers for jobs, consumers, and fpm, all on different droplets (digitalocean). We're not quite there yet due to legacy infrastructure. But I feel like we'll never get there if we don't give it any thought at all.
Caddy for tls termination and proxy to fpm and varnish for caching, seperate droplets on digitalocean. Managed MySQL and redis from digitalocean. Digitalocean spaces as an S3 compatible storage and CDN solution. Bugsnag and newrelic for error reporting and monitoring. Whole range of api, website, backoffice and mobile apps runs on it all. I'm the only person managing it all for my customer
That's also possible, though with containers there might be some caveats. They have a remote binary now a days which the IDE can copy via ssh and run to do remote development if I understood it correct.
I am not sure what you mean? I develop using Docker containers all the time and it works perfectly fine in PHPStorm. Same for "remote" in WSL, also no issues. I even run containers on WSL as well.
I use systemd service template files for rabbitmq consumers and symfony messenger processes. Needing only two files to run and manage 10 different processes is quite nice.
But we have over 20+ different cronjobs (console commands) which all need a lot of different arguments. Service template files just won't cut it there. Crontab is a hell of a lot easier to manage in this regard.
Yes. Each pool of workers of a specific version can be configured to listen on a different port or socket file, allowing you to reverse proxy to it from different domains (based on version requirements).
While there definitely is room for fp in php, in my experience and opinion, php is not a language that serves fp in a great way. There is no signature overloading for starters, which I always found a blessing for fp. There are languages much better suited for full on fp. Erlang comes to mind (or elixer now a days). Scala/Haskell, etc. Php has made many great improvements for oop since it's 5.x days though.
Yes except that in this case, you would depend on an interface definition only. Like I said, the user picks the client implementation. In other words, the actual client implementation is never a direct dependency of your library. Only the interface definition is. Client implementations must be explicitly chosen and composer required/downloaded by the user.
Possible source of vulnerabilities after v1.0.0 is tagged, which means paying money out in our bug bounty program for no real win
Why would you have to pay for possible bugs in dependency libraries? The benefit of using for example httplug is that the user can inject the client implementation they want to use. This also means the user is fully responsible for said client.
Anything that's a one-off run, I'll just hack together.
The moment there is any indication I, or anyone else, will be using this repeatedly, I try to write everything in a manner that conforms to most conventions and explains itself entirely.
Actually, we did implement a feature in Composer fairly recently, which enables Composer to "restart" itself without xdebug loaded. If you self-update using the --snapshot flag you can already make use of this. This will likely be included in the 1.3 release.
Adding Composer dependency management and autoloading to legacy applications is often seen as an impossible task, not worth the effort. But this is definitely not the case, or least it has not been in my experience, and I have gone through the same-ish story several times on several projects at clients.
While it may not immediately bring your application from the 90's back into the 21st century, it does make it easier to gradually improve it.
Sharing "success" stories like these helps serve as a reminder that it is definitely possible :-)
Seems you are right. Not sure why. I just scribbled this up quickly. Will have a peek later :-)
Edit: took a quick stab at it. Seems that it simply doesn't play nice with a weight of 1. If you use 0, 10, 10, 10 for example, it will distribute much more evenly. Not sure why..
Ah, your reasoning is flawless. Indeed, that must be the case.
So much fuzz, crazy. Seen tons of sites going "dark" for a patch window. Kept my customer up and running all day. Minute after the patches came out our server was running 8.5.12. Big whoop, all for nothing. Feels way over-hyped.
We opted for Docker inside WSL. Even though production is not running Docker yet. It's our goal eventually. We want to be able to spin up containers for jobs, consumers, and fpm, all on different droplets (digitalocean). We're not quite there yet due to legacy infrastructure. But I feel like we'll never get there if we don't give it any thought at all.
Caddy for tls termination and proxy to fpm and varnish for caching, seperate droplets on digitalocean. Managed MySQL and redis from digitalocean. Digitalocean spaces as an S3 compatible storage and CDN solution. Bugsnag and newrelic for error reporting and monitoring. Whole range of api, website, backoffice and mobile apps runs on it all. I'm the only person managing it all for my customer
That's also possible, though with containers there might be some caveats. They have a remote binary now a days which the IDE can copy via ssh and run to do remote development if I understood it correct.
I am not sure what you mean? I develop using Docker containers all the time and it works perfectly fine in PHPStorm. Same for "remote" in WSL, also no issues. I even run containers on WSL as well.
I might look into that, thanks for the suggestion.
I use systemd service template files for rabbitmq consumers and symfony messenger processes. Needing only two files to run and manage 10 different processes is quite nice.
But we have over 20+ different cronjobs (console commands) which all need a lot of different arguments. Service template files just won't cut it there. Crontab is a hell of a lot easier to manage in this regard.
Yes. Each pool of workers of a specific version can be configured to listen on a different port or socket file, allowing you to reverse proxy to it from different domains (based on version requirements).
While there definitely is room for fp in php, in my experience and opinion, php is not a language that serves fp in a great way. There is no signature overloading for starters, which I always found a blessing for fp. There are languages much better suited for full on fp. Erlang comes to mind (or elixer now a days). Scala/Haskell, etc. Php has made many great improvements for oop since it's 5.x days though.
Sorry, I'm a noob at reddit :<
You mean alcohol, not ethanol, which is me. I just thought I would share this gem. The joys of maintaining open source software and all that.
I would go with Symfony.
https://stovepipe.systems/post/migrating-your-project-to-symfony
Yes except that in this case, you would depend on an interface definition only. Like I said, the user picks the client implementation. In other words, the actual client implementation is never a direct dependency of your library. Only the interface definition is. Client implementations must be explicitly chosen and composer required/downloaded by the user.
Why would you have to pay for possible bugs in dependency libraries? The benefit of using for example
httplugis that the user can inject the client implementation they want to use. This also means the user is fully responsible for said client.Running different version on dev, ci, and production, then surprised if it blows up in your face.
lol?
Cannot reproduce;
Consistently produces (and that's not even using
truefor the$more_entropyargument):Silex used to be pretty popular. Development has stagnated a bit though (last I checked at least).
The new Microkernel approach from Symfony is also quite nice.
I second this.
Anything that's a one-off run, I'll just hack together.
The moment there is any indication I, or anyone else, will be using this repeatedly, I try to write everything in a manner that conforms to most conventions and explains itself entirely.
Actually, we did implement a feature in Composer fairly recently, which enables Composer to "restart" itself without xdebug loaded. If you self-update using the --snapshot flag you can already make use of this. This will likely be included in the 1.3 release.
https://github.com/composer/composer/pull/5580 https://github.com/composer/composer/pull/5698
Second this.
I think some people are missing the point a bit.
Adding Composer dependency management and autoloading to legacy applications is often seen as an impossible task, not worth the effort. But this is definitely not the case, or least it has not been in my experience, and I have gone through the same-ish story several times on several projects at clients.
While it may not immediately bring your application from the 90's back into the 21st century, it does make it easier to gradually improve it.
Sharing "success" stories like these helps serve as a reminder that it is definitely possible :-)
Seems you are right. Not sure why. I just scribbled this up quickly. Will have a peek later :-)
Edit: took a quick stab at it. Seems that it simply doesn't play nice with a weight of 1. If you use 0, 10, 10, 10 for example, it will distribute much more evenly. Not sure why..
See: https://3v4l.org/r5g49
Not sure I follow..?
https://3v4l.org/3uiKq
Something like..