Introduction to TOML Configuration in PHP
TOML is a configuration file format language that is intended to be minimal and easy to read. TOML stands for βTomβs Obvious, Minimal Language,β which refers to the creator Tom Preston-Werner.
TOML is a configuration file format language that is intended to be minimal and easy to read. TOML stands for βTomβs Obvious, Minimal Language,β which refers to the creator Tom Preston-Werner.
Setting up PhpStorm with Xdebug for local development on Docker
In the second part of this tutorial series on developing PHP on Docker we're taking a good hard look at PhpStorm, Xdebug and how to run and debug scripts from within PhpStorm on Docker.
In the second part of this tutorial series on developing PHP on Docker we're taking a good hard look at PhpStorm, Xdebug and how to run and debug scripts from within PhpStorm on Docker.
Code Complexity is a Design Problem
As a designer, there is a scenario Iβve experienced far too many times. It goes like this: Everyone from the product team is gathered in a conference room. Design has just finished presenting a set of upcoming features, and there is a long, silent pause. Finally, a developer speaks up. βDo we really need to build this?β, she says, unsmiling. The room is filled with tension. Arms are crossed.
As a designer, there is a scenario Iβve experienced far too many times. It goes like this: Everyone from the product team is gathered in a conference room. Design has just finished presenting a set of upcoming features, and there is a long, silent pause. Finally, a developer speaks up. βDo we really need to build this?β, she says, unsmiling. The room is filled with tension. Arms are crossed.
Remote Code Execution on packagist.org
There was a remote code execution vulnerability on packagist.org, the default package server behind Composer, a PHP package manager. Packagist currently serves around 400 million package downloads per month.
There was a remote code execution vulnerability on packagist.org, the default package server behind Composer, a PHP package manager. Packagist currently serves around 400 million package downloads per month.
ββBuilding a Password Less Authentication System with Laravel Signed Routes
I've seen many moderns apps are offering passwordless authentication in their platform. A lot of social media, email platforms are also offering the login with their API system by providing limited data necessary for user registration.
A lot of modern webs, mobile apps using social login to give a great user experience while using their platforms.
Today in this blog post, I'm explaining the process of customizing to use own passwordless authentication system with the Laravel framework.
I've seen many moderns apps are offering passwordless authentication in their platform. A lot of social media, email platforms are also offering the login with their API system by providing limited data necessary for user registration.
A lot of modern webs, mobile apps using social login to give a great user experience while using their platforms.
Today in this blog post, I'm explaining the process of customizing to use own passwordless authentication system with the Laravel framework.
Fast Web Scraping With ReactPHP: Download All Images From a Website
Have you ever needed to grab some data from a site that doesnβt provide a public API? To solve this problem we can use web scraping and pull the required information out from the HTML. Of course, we can manually extract the required data from a website, but this process can become very tedious. So, it will be more efficient to automate it via the scraper.
Well, in this tutorial we are going to scrap cats images from Pexels. This website provides high quality and completely free stock photos. They have a public API but it has a limit of 200 requests per hour.
Have you ever needed to grab some data from a site that doesnβt provide a public API? To solve this problem we can use web scraping and pull the required information out from the HTML. Of course, we can manually extract the required data from a website, but this process can become very tedious. So, it will be more efficient to automate it via the scraper.
Well, in this tutorial we are going to scrap cats images from Pexels. This website provides high quality and completely free stock photos. They have a public API but it has a limit of 200 requests per hour.
Refactor Your PHP legacy Code (real projects examples)
Good developers are defined by the quality of their codes. In the software industry, writing good code means saving the money that may be invested in testing, updating, extending or fixing bugs. In this article, I will show you real-life examples of some techniques and ideas that will help you to clean up your legacy code and refactor it to make it more robust and modular. These techniques will not only help you to refactor your old code but will give you great ideas as to how to write clean code from now on.
Good developers are defined by the quality of their codes. In the software industry, writing good code means saving the money that may be invested in testing, updating, extending or fixing bugs. In this article, I will show you real-life examples of some techniques and ideas that will help you to clean up your legacy code and refactor it to make it more robust and modular. These techniques will not only help you to refactor your old code but will give you great ideas as to how to write clean code from now on.
What's new and changing in PHP 7.3
This is a live document (until PHP 7.3 is released as generally available) on changes and new features to expect in PHP 7.3, with code examples, relevant RFCs, and the rationale behind them, in their chronological order.
This is a live document (until PHP 7.3 is released as generally available) on changes and new features to expect in PHP 7.3, with code examples, relevant RFCs, and the rationale behind them, in their chronological order.
23 guidelines for writing readable code
Reading someone else's code can be quite confusing. Hours can go on issues that should have been fixed in minutes. In this article, I would like to share some advice on how to write code that will be easier to understand and maintain.
Reading someone else's code can be quite confusing. Hours can go on issues that should have been fixed in minutes. In this article, I would like to share some advice on how to write code that will be easier to understand and maintain.
How to Improve Your Debugging Skills
All of us write code that breaks at some point. That is part of the development process. When you run into an error, you may feel that you donβt know what to do. However, even the most seasoned developers introduce errors and bugs that break their code. We are humans after all.
All of us write code that breaks at some point. That is part of the development process. When you run into an error, you may feel that you donβt know what to do. However, even the most seasoned developers introduce errors and bugs that break their code. We are humans after all.
The Five Types of Test Doubles & How to Create Them in PHPUnit
Did you know that a Mock is only one type of a test double? Most of us use the word βmockβ to mean any kind of test double, but thereβs actually five different types. It really can help you understand what youβre trying to accomplish with your test if you know a little bit more what youβre doing with your test doubles, so this article will explain the kinds of test doubles, when you use them, how you use them and why.
Did you know that a Mock is only one type of a test double? Most of us use the word βmockβ to mean any kind of test double, but thereβs actually five different types. It really can help you understand what youβre trying to accomplish with your test if you know a little bit more what youβre doing with your test doubles, so this article will explain the kinds of test doubles, when you use them, how you use them and why.
Multi-user Authentication Using Guards in Laravel 5.6
User authentication in laravel is pretty much easy. Laravel ships with user authentication scaffolding out of the box. But how can we implement a multi user authentication? Letβs look into multi-user authentication using laravel guards.
User authentication in laravel is pretty much easy. Laravel ships with user authentication scaffolding out of the box. But how can we implement a multi user authentication? Letβs look into multi-user authentication using laravel guards.
DDD, Hexagonal, Onion, Clean, CQRS, β¦ How I put it all together
Fundamental blocks of the system
I start by recalling EBI and Ports & Adapters architectures. Both of them make an explicit separation of what code is internal to the application, what is external, and what is used for connecting internal and external code.
Fundamental blocks of the system
I start by recalling EBI and Ports & Adapters architectures. Both of them make an explicit separation of what code is internal to the application, what is external, and what is used for connecting internal and external code.
Dynamic relationships in Laravel using subqueries
Developers are typically pretty good at the first goal. We're aware of N+1 style problems, and use techniques like eager-loading to limit database queries. However, we're not always the best at the second goalβkeeping memory usage down. In fact, we sometimes do more harm than good trying to reduce database queries at the expense of memory usage.
Let me explain how this happens, and what you can do to satisfy both goals in your app.
Developers are typically pretty good at the first goal. We're aware of N+1 style problems, and use techniques like eager-loading to limit database queries. However, we're not always the best at the second goalβkeeping memory usage down. In fact, we sometimes do more harm than good trying to reduce database queries at the expense of memory usage.
Let me explain how this happens, and what you can do to satisfy both goals in your app.
Laravel features you may not know about
Here are some features from Laravel that you may not be aware of. They're not exactly anything advanced or hidden, but I don't really notice that these functions get used or referenced very often. (Maybe they are though, and I've just not noticed it.)
Here are some features from Laravel that you may not be aware of. They're not exactly anything advanced or hidden, but I don't really notice that these functions get used or referenced very often. (Maybe they are though, and I've just not noticed it.)
PSR-18: The PHP standard for HTTP clients
A couple of days ago, the PHP Framework Interoperability Group (PHP-FIG) approved the PSR-18 βHTTP Clientβ standard. This standard was the last missing piece to build applications that need to send HTTP requests to a server in an HTTP client agnostic way.
A couple of days ago, the PHP Framework Interoperability Group (PHP-FIG) approved the PSR-18 βHTTP Clientβ standard. This standard was the last missing piece to build applications that need to send HTTP requests to a server in an HTTP client agnostic way.