magnASCII.io Simone Magnaschi
Senior Full Stack Web Dev
Bookmarks tagged with #php.
Show all

Building a Better PHP Project: What Tools Should I Not Miss?

I've just been handed a PHP project that's a bit of a blank slate – no static analysis, linters, coding standards, or tests have been used so far. N
Saved on: 2023-12-15

Design Patterns in PHP 8 Series' Articles - DEV Community

View Design Patterns in PHP 8 Series' Articles on DEV Community 👩‍💻👨‍💻
Saved on: 2023-09-08

PHP Fibers: A practical example

PHP 8.1 introduced Fibers as a new feature of the language. I often see many people refer to fibers as threads, which is not accurate and I think gives some people the idea that PHP is somehow now multi-threaded.
Tags: #php
Saved on: 2023-08-22

(4) PHP doesn't suck (anymore) - YouTube

PHP in 2023 is very different than PHP in 2012. Let's run through some of the changes! Looking for PHP jobs or looking to hire PHP devs? Check out Larajobs: https://larajobs.com/?partner=108 00:00 Intro 01:16 Traits 01:34 Short array syntax 01:47 Array destructuring 02:05 Variadic functions 02:12
Tags: #php #video
Saved on: 2023-08-17

Route Binding in Laravel - Ahmed Ash

In your Laravel projects, how do you go about setting up routes for a particular resource? Do you do it in the following manner? Then, do you implement it like this in your ArticlesController?
Tags: #laravel #php
Saved on: 2023-08-08

Testing without mocking frameworks.

Over the years, my coding practices have changed a lot. From hacking away until it works to TDD/BDD/DDD and everything in between. One of the biggest changes in my developer career has been when, why, and how I test my code. In particular, my view on mocking frameworks has changed a lot.
Saved on: 2023-03-28

Steve vs Matt — How two developers approach the same problem | Laravel News

It's very common to see two programmers who code the same feature differently. But it's much less common for those two programmers to see eye-to-eye and remain friendly.
Saved on: 2022-12-21

Effective Eloquent | Laravel News

Get ready to level up your Laravel skills with this tutorial on eloquent queries! You'll learn everything you need to know, from beginner to advanced techniques. To begin with, let's take a step back and think about what Eloquent is.
Tags: #laravel #php
Saved on: 2022-12-21

Modern PHP features explained - PHP 8.0 and 8.1 | Laravel News

Since its release in late 2020, PHP 8 has been a game changer. In this tutorial, I will walk through all the latest features with real-world examples of when I might choose to use them.
Tags: #php
Saved on: 2022-10-28

DDD, Hexagonal, Onion, Clean, CQRS, … How I put it all together – @hgraca

This post is part of The Software Architecture Chronicles, a series of posts about Software Architecture. In them, I write about what I’ve learned about Software Architecture, how I think of it, and how I use that knowledge.
Saved on: 2022-08-17

PHP-FPM Process Caluculator

Tags: #php #tools
Saved on: 2022-01-05

Symfony Demo meets Modular, Microservice-ready Architecture

Hi guys. I've created a Symfony 6 based Application that can serve as an Enterprise Architecture reference for anyone who's planning to build Large Scale Applications with Symfony. It uses a similar 'Blog' theme as the official Symfony Demo and can be found here. 
Saved on: 2021-12-09

Modern PHP Cheat Sheet - Front Line PHP

Every file that's loaded in the preload script will be preloaded into memory until server restart.
Saved on: 2021-11-26

What’s New in PHP 8.1: Enums, First-Class Callables, Fibers, Readonly Prope

Brent Roose, Nikita Popov, Larry Garfield, Dmitry Stogov, Matthieu Napoli, and Aaron Piotrowski talk about all the new features in PHP 8.1. https://php.net/releases/8.1/en.php 00:00 Intro 00:18 Enums 02:30 Readonly properties 03:18 Fibers 04:54 New in initializers 05:42 Performance improvements 06
Tags: #php
Saved on: 2021-11-26

Recommendations for productivity tools/libraries?

Hi, just curious what are the tools/libraries/techniques/etc that save you the most time developing web apps on a daily basis? Thanks
Saved on: 2021-11-06

Using the Symfony Messenger component

When developing a large scale application the software often needs to do a lot of different tasks. These tasks can consume a lot of time. Because you want your application to be fast and offer a great user experience you don’t want to process these tasks immediately.
Saved on: 2021-10-10

PHP 8.0: How to Get Started & The Most Interesting New Features - Wizeline

PHP 8 is a major update to the PHP programming language, released on November 26, 2020. According to the official page, this most recent version contains several new features and optimizations.
Tags: #php
Saved on: 2021-09-24

Laravel vs. Symfony: A Side by Side Comparison

When facing the start of a brand new PHP application, there is one decision that can’t be overlooked: which framework should you use? Theoretically, you could start with none, but assuming the project at hand is anything but trivial, that’d probably be a bad idea.
Saved on: 2021-07-30

[Common mistake] Sharing session across multiple Laravel subdomain - DEV Co

To Share session across domain and it's multiple especially when you have large ecosystem were multiple applications communicate with one database So when a user authenticates any of these apps, they will be logged in everywhere. For example, when a user AUTH into http://mywebsite.
Tags: #laravel #php
Saved on: 2021-06-17

Writing better Regular Expressions in PHP • PHP.Watch

Regular Expressions are powerful, PHP but they are not known to be readable, and more often than not, maintaining a regular expression is not a straight-forward task. PHP uses PCRE (PCRE2 since PHP 7.
Saved on: 2021-06-16

What it means to run a monolith on AWS Lambda

Let’s talk about the elephant monolith in the room. It’s easy to associate monoliths with legacy, weird, outdated, insecure code. A beast developed for decades that nobody wants to touch because they’ll break it and it is impossible to wrap your head around everything.
Saved on: 2021-05-31

Beyond Design Patterns - Nomad PHP

SPONSORS
Tags: #php
Saved on: 2021-03-29

Deploy Your PHP App with Docker - Nomad PHP

SPONSORS
Tags: #php #video
Saved on: 2021-03-29

Setup Step Debugging in PHP with Xdebug 3 and Docker Compose - Matthew Sett

Docker Essentials for PHP Developers I'm creating a new book and course to teach you how to go from development to deployed with Docker. Want to learn the essentials knowledge, commands, and configuration values?.
Tags: #php #xdebug
Saved on: 2021-03-11

Code analysis tools to help with upgrading an app to a newer PHP version? :

Of course, I'll need to review my application code to identify portions that will need to be updated (due to reverse-incompatible changes between the PHP versions).
Saved on: 2021-03-03

Testing your controllers when you have a decoupled core — Matthias Noback -

A lot can happen in 9 years. Back then I was still advocating that you should unit-test your controllers and that setter injection is very helpful when replacing controller dependencies with test doubles.
Saved on: 2021-03-02

A monorepo approach to larger modules in Laravel and Lambda

I work with a large enterprise application that’s broken down into a few teams, languages and modules.
Saved on: 2021-03-01

When to use empty in PHP? I’d say never — beberlei.de

Sign up for my newsletter to get notified when I post new content on this blog and with the occasional exclusive content only for subscribers.
Tags: #php
Saved on: 2021-02-19

Unit testing tips by examples in PHP

I just created a repository on Github with examples of good unit testing in PHP. I still work on these tips. I will also try to write more about some of these topics, but in separate articles.
Saved on: 2021-02-19

Identify All the Things With UUIDs! - Nomad PHP

SPONSORS
Tags: #php
Saved on: 2021-02-18

Should we use a framework? — Matthias Noback - Blog

Since I've been writing a lot about decoupled application development it made sense that one of my readers asked the following question: "Why should we use a framework?" The quick answer is: because you need it. A summary of the reasons: So, yes, you/we need a framework.
Saved on: 2021-02-17

PHP Internals News podcast :: Globals, and Phasing Out Serializable

Derick Rethans 0:14 Hi I'm Derick. Welcome to PHP internals news, a podcast dedicated to explain the latest developments in the PHP language. This is Episode 75. In this episode, I'm talking with Nikita Popov about a few RFCs that he has been working on over the past few months.
Tags: #php
Saved on: 2021-02-16

Symfony Lock and Messenger component - Happyr developer blog

The lock component have saved me so many times. It helps me with race conditions, it makes my code simpler and my application more reliable. I’m using it to fix all kinds of problems and I’ve noticed that I use a few different methods.
Tags: #php #symfony
Saved on: 2021-02-15

An Ode to Slim

My framework of choice for building PHP web applications is Slim. It's small and unobtrusive, staying out of my way and letting me structure the application however I want. When I do run up against it, it adheres to a bunch of PHP Standards Recommendations (PSR), specifically PSR-7 and PSR-15.
Saved on: 2021-02-03

Build your own PSR-4 autoloader

If you're anything like me, you've probably wondered before: "What kind of magic makes Composer go?" - You look at the source code of vendor/autoload.php and see it links to yet another autoloader that's called autoload_real.
Tags: #php
Saved on: 2021-01-26

Welcome

Saved on: 2021-01-18

Gitbar - Il podcast dei developer italiani

Conversazioni sullo sviluppo software fatte davanti a una birra.
Saved on: 2021-01-15

It’s not legacy code — it’s PHP. Vimeo has been using PHP in production… |

In the last year, Vimeo developers have written backend code in lots of languages — PHP, Go, Ruby, Python, NodeJS, Java, C, C++, and a bit of Rust. In 2004, we started with just one: PHP. It was an ideal language for brand-new startups like Vimeo.
Saved on: 2021-01-15

Tools for better programming

Share and discover the latest news about the PHP ecosystem and its community. Please respect r/php's rules. Recently I discovered these tools that have helped me to control the quality of my code.
Saved on: 2021-01-13

Modernizing PHP » Blog

How many times have we seen it, where an application does HR, payroll, shipping, billing, makes coffee, sweeps the floors, etc.? Too many times to count for me. The truth is that applications like this, these monoliths, are too large for their own good.
Tags: #php
Saved on: 2020-12-28

An alternative way to organize the Laravel directory structure // Stefan Ba

In this article, I would like to show you an alternative way to organize your Laravel directory structure. I think the default structure is fine for the most projects. But when it comes down to larger projects I was looking for a different structure.
Saved on: 2020-12-02

Testing Spaghetti - Nomad PHP

SPONSORS
Tags: #php #tdd
Saved on: 2020-11-12

PHP Internals News podcast :: Short Functions

Derick Rethans 0:15 Hi, I'm Derick, and this is PHP internals news, a weekly podcast dedicated to demystifying the development of the PHP language. Derick Rethans 0:24 Hello, this is Episode 69. Today I'm talking with Larry Garfield, about an RFC that he's just announced called short functions.
Tags: #php
Saved on: 2020-11-06

Union types - What's new in PHP 8

Login to track your progress
Tags: #php #video
Saved on: 2020-10-29

Object Oriented Done Right

Alan Kay, the inventor of the term “object-oriented programming”, told a story once during a talk more than 20 years ago. You can build a dog house using only a hammer, nails, planks, and just a little bit of skill. I figure even I would be able to build it given enough time.
Tags: #oop #php
Saved on: 2020-10-29

Unconventional Autoloaders (Talk) - Liam Hammett

This is an old post! This post was written over 2 years ago, so its content may not be completely up-to-date. Please take this into consideration when reading it.
Tags: #php #video
Saved on: 2020-10-28

PHP 8 - try out all new features - Marcel Pociot's blog about Laravel, PHP

PHP 8 is already in it's release candidate stage, with RC 3 being released on October 29th, and the general availability release targeted for November 26th. So it is time to take a look at all the new and upcoming features of PHP 8. You can take a look at PHP 8's release schedule here.
Tags: #php
Saved on: 2020-10-27

How to run over 30k tests in under 5 minutes | by Daan van Marsbergen | Sep

When I started my professional career I had no idea what a unit test looked like. I think I skipped that part on W3Schools. It didn’t matter, because my first employer was not using tests.
Tags: #php #testing
Saved on: 2020-10-09

Step-debugging linked composer dependencies with PhpStorm – Rob Allen's Dev

One project I’m working on has multiple separate parts in different git repositories that are brought into the main project using linked composer directories. I needed to get step debugging working in PhpStorm and this is the approach I took.
Tags: #php #phpstorm
Saved on: 2020-10-08

Writing Effective PHP - Forum PHP 2019 - Afup - Association française des u

PHP has evolved massively since its first days, and it's on the road to a full-featured language. However, at the same time, there is a lot of outdated information and libraries with poorly written code. This talk is about writing PHP Code that is: safe, robust, and maintainable.
Tags: #php #video
Saved on: 2020-10-06

Apache2 and php fpm performance optimization — Step-by-step guide | by Seba

I had to handle high traffic loads in my career and I fought with down-time, not used memory and a lot of trouble in my past. In this article I want to give a step-by-step guide to apache2 performance settings, which is a concentrated result of a lot of reading and trying.
Saved on: 2020-09-29

Dynamically changing the log level in Symfony apps — Matthias Noback - Blog

This is just a quick post sharing something I was able to figure out after doing some research. The situation: our application throws exceptions by means of "talking back to the user". As developer we don't want to be notified about all these exceptions.
Tags: #php #symfony
Saved on: 2020-09-29

Serverless PHP Applications - Nomad PHP

SPONSORS
Saved on: 2020-09-29

Web Scraping with PHP

You might have seen one of our other tutorials on how to scrape websites, for example with Ruby, JavaScript or Python, and wondered: what about the most widely used server-side programming language for websites, which, at the same time, is the one of the most dreaded? Wonder no more - today it's tim
Tags: #php
Saved on: 2020-09-24

How to run over 30k tests in under 5 minutes | by Daan van Marsbergen | Sep

When I started my professional career I had no idea what a unit test looked like. I think I skipped that part on W3Schools. It didn’t matter, because my first employer was not using tests.
Tags: #php #testing
Saved on: 2020-09-04

Legacy to Laravel: How to Modernize an Aging PHP Application | Tighten

Here at Tighten, we love Laravel and get excited about staying up to date with the latest and greatest features our framework of choice has to offer.
Saved on: 2020-09-02

Turbocharged PHP Development with Xdebug, Docker & PHPStorm - Jump24

Quite the controversial “hot-take” from Derick, and while it certainly caused quite the stir (that it was probably designed to), it made me think. I thought, ‘Do I need to revisit Xdebug?’, and I realised that I’d fallen into Derick’s trap. But think I did.
Tags: #docker #php
Saved on: 2020-08-26

I have built MVC Framework from scratch using PHP for only education purposes

Share and discover the latest news about the PHP ecosystem and its community. Please respect r/php's rules. The following video series might help you to better understand how PHP frameworks work behind.
Tags: #learning #php
Saved on: 2020-08-20

Modernize a Legacy PHP Application

Recently, I had the chance occasion to work on numerous legacy PHP applications. I spotted common anti-patterns that I had to fix.
Tags: #php
Saved on: 2020-08-11

Enhancements to PHP code coverage in 2020

In 2003, with the release of Xdebug 1.2, Derick Rethans introduced the ability to collect code coverage data to the PHP ecosystem for the first time.
Tags: #php #testing
Saved on: 2020-08-01

PHP 8: before and after - stitcher.io

Scout APM helps PHP developers pinpoint N+1 queries, memory leaks & more so you can troubleshoot fast & get back to coding faster. Start your free 14-day trial today. It's only a few months before PHP 8 will be released, and honestly there are so many good features.
Tags: #php
Saved on: 2020-07-20

PHP Insights

Analysis of code quality and coding style. Beautiful overview of code architecture and it's complexity. Designed to work out-of-the-box with Laravel, Symfony, Yii, WordPress, Magento2, and more.
Saved on: 2020-06-27

Samuel Štancl su Twitter: "✨ In this thread I'll list tactics you can use t

✨ In this thread I'll list tactics you can use to write cleaner code in Laravel. As you use them repeatedly, you'll develop a sense for what's good code and what's bad code. I'll also sprinkle some general Laravel code advice in between these tactics. THRE
Tags: #php #tips
Saved on: 2020-06-16

How do you build your (production) docker images ?

I'd like to start a discussion about docker images for php projects. For example, I see a lot of basic example using the apache versions of php image but that's not what most of us are using in a production environment.
Saved on: 2020-06-13

LessQL

LessQL is a lightweight and performant alternative to Object-Relational Mapping for PHP. If you are looking for an SQL-based approach superior to raw PDO, check out DOP as an alternative.
Saved on: 2020-05-10

Smooth deploy of a loaded PHP web application with php-fpm and nginx, without downtime or errors

Added the cachetool option, thanks to reddit users ds11 and SevereHeight for mentioning it.
Tags: #php
Saved on: 2020-05-10

How to Migrate Spaghetti to 304 Symfony 5 Controllers Over Weekend | Tomas

During Easter weekend, usually, people take a break and have a rest. Instead, we used these 4 days of holiday to migrate the 304-controller application. At least that was the goal on Friday. Me in my colleague in the migrated project accepted the challenge. We got into many minds and code-traps.
Tags: #php
Saved on: 2020-04-19

Quick Start

Start using Ecotone
Tags: #ddd #php
Saved on: 2020-04-15

Part 1 - How to use TDD to build a REST API in Laravel 6 - YouTube

Hello. I’m Reval Govender, and this is “How to use TDD to build a REST API in Laravel”. In this course we are going to build a RESTful API using the popular Laravel framework. Most importantly, we are going to write our code using Test Driven Development. Our goal: is to learn how to practic
Saved on: 2020-04-08

aggregate.stitcher.io

Please refer to the issue list for any questions or remarks. Please refer to LICENSE.txt.
Saved on: 2020-03-13

Behind the scenes of Flare (or How to structure big Laravel applications) -

At Laracon AU, I gave a talk on how you can structure a big Laravel application. The codebases of both Flare and Oh Dear served as examples. By watching this talk you'll gain some valuable insights that could be applicable to your projects as well. Enjoy!
Saved on: 2020-03-07

Clean Code and Object Calisthenics Rules I try to Follow — beberlei.de

My natural tendency is towards action over planning, so I tend to find arguments over coding style are a waste of time if sufficient standards exist that you can just adopt.
Saved on: 2020-03-03

Introducing Stripe payment into your PHP projects

Full working code repository here (with cart simulation) Simple example on how to implement Stripe PaymentIntent (SCA compliant) into your project to enable payment.
Tags: #php #stripe
Saved on: 2020-03-01

What is the recommended way to deploy php in containers ? (using "php-pfm

NGINX in one container, and then PHP-FPM in another, then connect them together via FastCGI over TCP. Having them both in individual containers means that Docker is only managing a single process per container, which is generally how it's intended.
Saved on: 2020-02-18

Tuning dynamic php-fpm settings - Chris Morrell | Chris Morrell

This is as much a note to self than anything else. Each time I need to change my php-fpm settings, I need to Google “php-fpm dynamic tuning” or something similar. With a little luck, next time I Google it, I'll find this page :)
Tags: #php #server
Saved on: 2020-02-16

Redux in 30 lines of PHP

The official website calls Redux “a predictable state container for JS Apps”. The main benefit of Redux is that it shines a light on your global application state, allowing you to trace when, where, why, and how your application’s state changed.
Saved on: 2020-02-09

JoliCode - Battle log: a deep dive in Symfony stack in search of optimizati

Lecture : 8 min. My team and I are working on a big project that is becoming bigger and bigger. Split in micro services, each end-user call generates an increasing number of HTTP API calls.
Saved on: 2020-01-20

DarkGhostHunter/Preloader: Preloader helper to create a PHP-ready preload s

Get the best options to keep your application fast as ever, with just one line. This package generates a PHP preloading script from your Opcache statistics automatically. No need to hack your way in.
Saved on: 2020-01-15

Tutorial - Creating a PHP Reverse Proxy - UA1 Labs

I spent so much time researching how to create a reverse proxy in PHP so that I could solve a problem. No matter what your reason, if you need a reverse proxy for PHP here is a simple one you can implement.
Tags: #php
Saved on: 2020-01-07

Handling Plugins In PHP

A common problem that developers face when building applications is how to allow the application to be “plug-able” at runtime. Meaning, to allow non-core code to modify the way an application is processed at runtime.
Saved on: 2019-12-30

Guide to PhpStorm code quality checks via PhpCS | Damian Mąsior

We will configure PhpStorm to use dockerized php-cli. To do so, we need its image. Just pull it using: Next, add a new interpreter in PhpStorm. Open configuration window: Preferences -> Languages & Frameworks -> PHP. You should see something similar to:
Tags: #php
Saved on: 2019-12-30

Routing in Slim 4 – Rob Allen's DevNotes

Routing in Slim 4 works pretty much exactly the same as in Slim 3. They are used to map a URL that the browser requests to a specific handler that executes the code for that particular page or API endpoint. You can also attach middleware that will only be run when that route is matched.
Saved on: 2019-12-19

Having fun with Kubernetes #0 – Martin Pham

Kubernetes (aka k8s – well, because there are 8 characters between K and S) was always on my Checklist for a long time. Since I wanted to learn more about DevOps to improve our delivery process at work.
Saved on: 2019-12-19
❤️
</>
2024