Amazing PHP
9.32K subscribers
11 photos
84 links
Welcome to the Amazing PHP Channel! Here you can find a lot of interesting articles/news about PHP, frameworks, tools and development.

Support the channel: https://www.paypal.com/donate?hosted_button_id=FAYP5QJH5LVRL
Download Telegram
10 Common Software Architectural Patterns in a nutshell
Ever wondered how large enterprise scale systems are designed? Before major software development starts, we have to choose a suitable architecture that will provide us with the desired functionality and quality attributes. Hence, we should understand different architectures, before applying them to our design.
Hiding API fields dynamicallyβ€Šβ€”β€ŠLaravel 5.5
I recently saw a question on Laravel Brasil community that turned out to be a lot more interesting than it looks. Imagine you have a UsersResource with the following implementation:
Some humor
Advanced Multi-Model Forms in Yii2
Consider a Product model that has a single Parcel model related, which represents a parcel that belongs to the product. In the form you want to enter information for the product and the parcel at the same time, and each one should validate according to the model rules.
Protecting passwords with Argon2 in PHP 7.2
PHP 7.2 will be released later this year (2017). This version contains some interesting additions, including two new security features: support of the Argon2 password hash algorithm, and the ext/sodium extension wrapping the libsodium library.
Goodbye controllers, hello request handlers
A lot has changed in the PHP landscape over the past years. We started using more design patterns and things like the DRY and SOLID principles. But why are we still using controllers?
​​Elegant background jobs in PHP
For a long time, I was looking for some elegant solutions to create and run background jobs in PHP.
I joined a company which used Laravel massively and Laravel ships with an awesome Queue system. Suddenly, I forgot how tedious and troublesome it used to be for me to write queues in PHP.
​​Symfony Console Beyond the Basics – Helpers and Other Tools
It’s undeniable how useful console commands can be when developing software. Not too long ago we re-introduced the Symfony Console component.
​​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.
​​Properly passing data from outer layers of a PHP application to the use case layer
Lately, I've been digging a lot in different ways of improving software architecture. Mainly subjects like Clean Architecture, Domain Driven Design, and such.
Injectables vs. Newables
Many projects I join - even those that claim to already do dependency injection - suffer from issues that result from mixing injectable and newable classes. Keeping these two appart seems to be challenging for many developers so that I try to give them a handy guide with Do's and Dont's in this blog post.
​​How to Optimize MySQL: Indexes, Slow Queries, Configuration
MySQL is still the world’s most popular relational database, and yet, it’s still the most unoptimized – many people leave it at default values, not bothering to investigate further. In this article, we’ll look at some MySQL optimization tips we’ve covered previously, and combine them with novelties that came out since.
​​The Repositories Pattern in Lumen
The repositories pattern is widely used pattern whose main point is that the application does not have to know data is implemented. This makes it easier to switch to another data source or implement structural changes to the existing data source.
The Magic Behind Async PHP
Async PHP allows a massive speedup of applications by leveraging non-blocking I/O. It allows making multiple HTTP requests in parallel or any other way of I/O multiplexing. But what’s the magic behind it? How does it actually work?
How to Read Big Files with PHP (Without Killing Your Server)
It’s not often that we, as PHP developers, need to worry about memory management. The PHP engine does a stellar job of cleaning up after us, and the web server model of short-lived execution contexts means even the sloppiest code has no long-lasting effects.
Extending ReactPHP's Child Processes Part Two
react/child-process is very flexible and can work a lot of ways but sometimes you don't want to be bothered with the details of how it works and just want a simpler API to do that.
PHP 7.2's "switch" optimisations
PHP 7.2 is around the corner soon, and comes with many optimisations. Many new optimisations are implemented in opcache, but some others are implemented in PHP itself. One optimisation that falls in the latter category is an optimisation of the switch/case construct.
How to Deploy With Deployer
Automated workflow for deployment is a great tool that every software development team must have. The release process, when it is fast, secure and fault tolerant, can save time for developing more great things. And the good news that there are many great tools for creating an automated release cycle.