Big day, the newest version of PHP has been released. It means we should update our local, stage, and production environments. I will present how we can install PHP 8 easily on Mac OS and switch between different versions. Let’s start!
Continue reading “PHP 8 on macOS – installation guide”Take away: Test-Driven Development: By Example – Kent Beck
I’ve just finished reading “Test-Driven Development: By Example” written by Kent Beck. It’s a second time when I read this book, a few years ago on the Kindle, today as a paper-book.
If you need the recommendation to read it, you have mine. I could say that book is perfect for:
- entry-level developers,
- highly experienced developers who are afraid to write tests.
I’m sharing with you my notes, which I wrote during reading.
Continue reading “Take away: Test-Driven Development: By Example – Kent Beck”[Newsletter] You don’t need server to run PHP website
I know you’re swamped, so I’ll be brief. Three amazing articles to read while drinking a coffee.
https://pilsniak.com/aws-serverless-php – You don’t need any server to run PHP, it’s possible on AWS’s serverless infrastructure, for free!
https://pilsniak.com/aws-fargate-and-symfony – You will find here how to deploy Symfony to AWS Fargete. Docker inside!
https://pilsniak.com/aws-pattern-laravel – Protect your microservices from accidental internal DDOS.
If you have any questions or thoughts feel free to reach me anytime.
[Newsletter] Save money on AWS and speed up your PHP websites
I have two links for you, both of them make PHP much faster (and cheaper) on AWS.
https://pilsniak.com/aws-speedup-php – Did you know that Amazon/AWS contributes to PHP source code? Look this: “WordPress provides up to 34% better price/performance” – they do that.
https://pilsniak.com/async-aws – Async doesn’t stop your application during connection to AWS services. You can do much more operations in one sec!
If you have any questions or thoughts feel free to reach me anytime.
Brew on macOS Explained In 1 Post
What is a brew/homebrew?
If you used a Linux before, you had to meet apt-get on Debian/Ubuntu system or yum on Centos/Red Hat. Brew as well as these tools is a package manager that allows you to install (most of) Linux ‘s libs and tools on your Mac! You can also create your own packages to easily install them on other Macs.
Continue reading “Brew on macOS Explained In 1 Post”Using Composer inside Docker on Mac In 2 Minutes (without brew)
I’m using Docker on Mac since 3 years and same as you, I was using it only to run project. It was always simple running “docker-compose up -d”.
It looked exactly like Vagrant or simple image runned on VirtualBox. There were benefits of using Docker on production, Docker on Linux environment. On MacOs, however, it gave me more problems than solutions.
Since always, I have installed Composer on my Mac. Ages ago, I run “brew install composer” and it was there always. Till now. I’ve removed brew and all libraries managed by brew.
Continue reading “Using Composer inside Docker on Mac In 2 Minutes (without brew)”5 useful methods of using Composer with Docker on macOS [WIP]
[UML][PHP] The game of Life [WIP]
A few days ago John Horton Conway passed away, it inspired me to take a look at his Game of Life. I have it in my mind for years, since I heard about this cellular automaton on conferences. They were talking, it’s as a good challenge for Software Developers. Something like Kata to practice your skills using different approaches, libraries, toolsets.
I wanted to use it, to practice my UML skillset and the PlantUML tool. As an addition, I wrote PHP 7.3 code to demonstrate implantation. It’s far away from perfection. I didn’t use Composer, no Unit Tests, no framework, just vanilla PHP. Today, I wanted to make UML diagrams.
Continue reading “[UML][PHP] The game of Life [WIP]”Composer – Things you (I) didn’t know
If we try to look at tools that change the PHP environment and community, for sure we will find there the Composer. It’s the tool that allows us to manage dependencies in our projects. We don’t have to download zip files and store vendors in our repositories. We got two files (composer.json
and composer.lock
), which describe what is needed to run our software and the Composer manages fetching and installing dependencies for us.
When I look at my experience with the Composer, I use it every day. But, my using it usually finish to use composer require
or composer update
. If you are not familiar with the Composer, the first command allows you to add a (dev)dependency to your project, the second one allows you to update a dependency when maintainers release the newest version of their library.
Prooph: CQRS+ES in PHP. How to use.
Pattern CQRS and Event Sourcing become more and more popular every day in PHP community. You can easily find lot libraries to store events, to execute commands, to manage repositories, etc. The leader there doesn’t exist yet, but prooph as the most complex solution is close to that position. They have only one problem, documentation.
Ok, they have two problems. Documentation and many not to updated examples in their GitHub repository. Because of that and because prooph is de facto five not related components running everything out-of-the-box is really a pain. Even if some examples contain Docker on board or especially then because a tree of dependencies grows fast.