So here is nice chain of docker errors and its solution.
1. Docker has reached its maximum of created networks and errors like this:
ERROR: could not find an available, non-overlapping IPv4 address pool among the defaults to assign to the network
The easiest (and most brute though) solution to this is to prune all networks, as suggested here on SO.
docker network prune
This will delete all networks that are not connected to currently active containers. But this also means it will delete all networks of your not runnning dev projects. (Which might be numerous as in my case.)
You might encounter this deprecation message after your upgrade to symfony 5.1 in your symfony project:
Since symfony/dotenv 5.1: Passing a boolean to the constructor of “Symfony\Component\Dotenv\Dotenv” is deprecated, use “Dotenv::usePutenv()
To fix this, go to config/bootstrap.php and remove the false from the Dotenv constructor: (new Dotenv(false))->loadEnv(dirname(DIR).'/.env'); to (new Dotenv())->loadEnv(dirname(DIR).'/.env'); See: https://github.com/symfony/symfony/issues/37195
Actually the file config/bootstrap.php has been removed from symfony 5.1 and was replaced in public/index.php.
But since the project was updated from an symfony 4 version the bootrap file is still present.
So another option would be to remove the boostrap file and update the project entirely to symfony 5.1 recipe. This is not trivial though as you can see in this corresponfing PullRequest.
Calculating European VAT Rates with PHP – the easy way.
Disclaimer: No legal advice, just a little experience report.
If you sell digital things (services, digital goods etc.) to EU countries, you might have to calculate the VAT at the rate of the customer’s country (and even pay it there afterwards). The latter is even the more inconvenient part, but at least the first part can be done quite easily with good old PHP.
v3 now uses symfony3 components
Silex 1.3 supports symfony3 so lets use it :)
Note: as symfony3 doesnt support php5.4 anymore, we dont either!
the one from knplabs that was used before seems to be unmaintained and wasnt matching the dependencies anymore.
So i decided to take it over and renew it a bit. Check it out!
I started to use Docker as dev enviroment for my projects, so i added dev & prod Docker support.
For the sake of simplicity it uses a single container with Apache and PHP7.
If you have Docker and docker-compose on your machine just spin it up with docker-compose up and check on localhost:8088.
Actually i was a fan of YAML regarding the configuration files of Symfony2. This was probably because i was used to it since symfony 1.4 and i also thought its better readable. Its partly still true, but my Netbeans Editor has some problems with using @ in YAML and this breaks my highlighting. So the better readability vanished to nirvana.
So i checked out XML configuration. Its also widely used by the community. Pros and Cons (mostly Pros) you can read in this post by Fabien.