PHP Weekly - December 19th 2024

Curated news all about PHP.  Here's the latest edition Is this email not displaying correctly?
View it in your browser.
PHP Weekly 20th December 2024

Hi everyone,

The holiday season is upon us, and with it comes the frenzied rush that comes with it. We hope that throughout the mad dash for deadlines before the break, you all find time to take a step back and take a breather. This week have new releases from CakePHP Laravel 11 and Symfony 7.2.1. We also have an announcement of the release of Inertia 2.0 in our News section. In our Articles section we have a post on the importance of writing high quality tests, Optimistic Locking without having to download third party packages, and designing scalable repository structure in Laravel with queryFi. In podcasts we have a new episode from Laravel News on Fluent requests, whispering to AI, while PHP Architect tackles Load balancers, Quantum computing and Ethics in tech. Finally in our Reading section, we have an article on the recent SymfonyCon Vienna and one attendee's experience, Practical and creative enum use cases, and how CQRS can transform transaction-heavy systems.    

We have all that and more, so we do hope you enjoy this week's newsletter. If you have an article, tutorial or podcast that you would like to be featured in our newsletter, feel free to reach out to us at articles@phpweekly.com.

All the best,
Adrian


Please help us by clicking to our sponsors:

Sponsor Logo

Get Reliable, Fast & Quality Proxies, Without the Tradeoffs
Scrape or crawl any amount of data, without having to worry, settle or break the bank. Buy HTTP, SOCKS & UDP proxies you can set and forget.


Articles


Laravel: Optimistic Locking in one line
Laravel’s Eloquent ORM has all the necessary tools to implement Optimistic Locking without having to download third party packages or even change our Eloquent Models to a point of becomes a hindrance to maintain.

Writing High Quality Tests
Unfortunately, tests still do not get the attention they would deserve in many organizations. Sometimes it feels like developers feel guilty if they are not writing any tests, and at the same time test code is often not properly reviewed. 

Unlock the Power of Easy Model: Features You’ll Love!
Switching between Query Builder and Eloquent Builder has never been easier. With just one simple syntax, you can seamlessly move between them within Easy Model.

Designing a Scalable Repository Structure in Laravel with queryFi
In this article, we'll focus on this issue. I'll share my preferred structure to cover my use cases, along with some best practices, and explain how to integrate queryFi.

PHP: Skip the boring part & press Tab!
Phpstorm is a fantastic IDE for PHP developers. While it's not free, you get pretty cool features, such as Live Templates.

Laravel /FilamentPHP : Auto Submit Prevention!
Okay, so I was working on an admin panel for a PHP application, and I came across something interesting that I wanted to share.

Tutorials and Talks


Using withoutWrapping to flatten API responses
Laravel's API resources wrap responses in a 'data' key by default. While useful for many scenarios, sometimes a flatter response structure is needed and you can disable resource wrapping like this.

Customize the Truncation of HTTP Client Request Exceptions
Have you ever received a bug report or looked in Sentry only to find a truncated HTTP client exception you couldn't read? By default, HTTP responses are truncated, which could potentially leave off important clues as to why a request failed or what happened.

Laravel whenLoaded - Performance Optimization via Conditional Relationship Loading
Laravel's API Resources feature whenLoaded() to conditionally include relationship data in API responses, optimizing performance by preventing unnecessary database queries.

Lazy Loading and Circular References
Lazy loading is a design pattern that defers the initialization of objects until they are actually needed. 

Integrate Swagger UI with Codeigniter4
Swagger is a widely used API documentation and testing tool that seamlessly integrates with popular web frameworks like Laravel, Spring Boot, CodeIgniter, and ExpressJS. In this article, we will focus on integrating Swagger with CodeIgniter.

Running WordPress locally on your computer
Running WordPress locally on your computer is a great way to develop and test your site before making it live. Here's a step-by-step guide.

Guide to PHP 8.4 new DOM Selector Feature
In this article, we'll take an in-depth look at the new DOM selector functionality in PHP 8.4, its syntax, use cases, and how it simplifies working with DOM elements.

Fine-Tuning HTTP Client Error Messages in Laravel
Fine-tune your HTTP client error messages in Laravel with new exception truncation controls. These bootstrap configurations give you precise control over how request exceptions are displayed.

Selenium in PHP for Web Scraping
In this guide, I’ll walk you through how to get started with Selenium and PHP for web scraping.

Deploy Symfony Application on VPS Step By Step Guide
In this article, we’ll walk you through a step-by-step guide on deploying a Symfony application on a VPS.

News and Announcements


Announcing Inertia 2.0: Redefining Frontend Development for Laravel
We're excited to announce the stable release of Inertia 2.0, bringing significant improvements to how you build software with Laravel.

URI Parsing and Mutation in Laravel 11.35
This week, the Laravel team released v11.35, which includes URI parsing and mutation, the ability to disable HTTP client exception response truncation, transforming an HTTP response to a Fluent instance, and more.

CakePHP 5.1.4 RELEASED
Client\Request no longer mangles the Content-Type header for JSON and XML requests with array data. Fixed off-by-one error on stackframe offests in ErrorTrap::handleError() + a whole lot more!

Laravel VS Code Extension Public Beta
The new Laravel VS Code extension is set to enhance your development workflow by providing a suite of helpful features. 

Symfony 7.2.1 released
Symfony 7.2.1 has just been released. Here is the list of the most important changes since 7.2.0.

A Week of Symfony #937 (9-15 December 2024)
This week, Symfony 7.2.1 was released as the first maintenance version of the 7.2 branch. Meanwhile, the upcoming Symfony 7.3 version introduced a new JsonEncoder component that is 10 times faster than the Serializer component and also supports streaming payloads.

Podcasts and Vlogs


Laravel News Podcast: Fluent requests, whispering to AI, and tutorials for days
Jake and Michael discuss all the latest Laravel releases, tutorials, and happenings in the community.

The Stack Overflow: Legal advice from an AI is illegal 
Mark Doble, CEO of Alexi, an AI-powered litigation platform, joins Ben to talk about GenAI’s transformative effect on the legal world. 

Software Engineering Radio: Praveen Gujar on Gen AI for Digital Ad Tech Platforms
Praveen Gujar, Director of Product at LinkedIn, joins SE Radio host Kanchan Shringi for a discussion on how generative AI (GenAI) is transforming digital advertising technology platforms. 

Developer Tea: Better Low-Information Estimates - Putting the "Scientific" in SWAG
How can you create better scientific wild a** guesses when the work is not well defined? We discuss a few strategies in this episode. 

Shoptalk Show: Hard Code & Soft Skills
The employees of the startup RAPPTR (Quinn Pine, Blaze Lightyear, Astra Q, and Eddit Kit) find themselves in quite a pickle as a rogue investor tries to take over the company while CEO Chad is recovering in his napping pod. Join us on a workplace-themed role playing adventure created by Dave Rupert.

WP Builds: 402 – Exploring eCommerce payment solutions with Aaron Bowie 
Today, I’m joined by Aaron Bowie, a seasoned WordPress developer based in Aberdeen, Scotland. He’s here to talk about his WooCommerce payment gateway plugins, emphasising customer-centric development and the advantages of traditional payment gateways like Barclaycard over Stripe and PayPal. 

PHP Architect: 2024.12.12 
This week on the php podcast, Eric and John talk about Load Balancers, Ethics in Tech, Quantum Computing, and more…

Mostly Technical: 63: Unreliable Narrator
Ian and Aaron discuss Aaron's TUI app, what it's like being a founder over 40, "the drones", and so much more.

Syntax: Local Data: Sqlite, LocalStorage, Session, Cookies and IndexDB
Discussion on different ways to store data locally in the browser for things like user preferences, allowing app usage before signup, faster data access, privacy, persisting data on refresh, and storing auth tokens.

The Changelog: The code, prose & pods that shaped 2024
This episodes diverges from our traditional fare. I’ve reviewed the 50 previous editions and picked (IMHO) the coolest code, best prose & my favorite podcast episode from each month!

Reading and Viewing


SymfonyCon Vienna 2024: Recap of our Experience
This conference wasn't just a technical event for me, it was a heartwarming return to the PHP community that has evolved tremendously over the years.

PHP Design Patterns: Page Controller
The Page Controller design pattern is a common architectural approach used in web-based systems. It organizes the flow of control by dedicating a specific controller to handle the logic for an individual page or request. 

Use Twig Components as Controllers in Symfony
Recently I saw someone online complaining about the impossibility to render Live Components directly from controllers, mentionning that it forces you to create useless templates which often are nothing more than a wrapper around your components…

Practical and Creative Enum Use Cases in Laravel
In this article, we’ll explore some practical techniques and use cases to unlock their full potential.

Revitalizing Transaction-Heavy Systems by Applying the CQRS
In this article, we’ll explore how CQRS can transform transaction-heavy systems, including practical implementation in PHP, key architectural decisions, and examples of defining interfaces, events, and event listeners.

How I Made My Brain Addicted to Coding in 7 Steps
Have you ever wondered how some people can sit for hours, fully immersed in lines of code, while others find it overwhelming? 

Interesting Projects, Tools and Libraries


inteve/types
Value objects and helpers for PHP.

christophlehmann/httpbasicauth
HTTP Basic Auth for TYPO3 9.5+

balajidharma/laravel-attributes
Laravel form builder.

markwalet/laravel-changelog
A Laravel package that prevents merge conflicts on your changelog file.

darling/php-json-utilities
The PHPJsonUtilities library provides classes for working with json in php.

didslm/file-upload-wrapper
This wrapper makes file uploading easier to use.

thecodingcompany/php-mastodon
Mastodon PHP library oAuth and API.

halilcosdu/laravel-command-banner
Laravel Command Banner: Prevents Commands from Running in Defined Environments.

rask/wp-test-framework
Extracted library from WordPress PHPUnit framework to aid in integration testing of plugins and themes.

gorriecoe/silverstripe-sreg
Simple tokenizer that allows you to use .ss template like variables in a dataobjects string.

Jobs

 ------
Do you have a position that you would like to fill? PHP Weekly is ideal for targeting developers and the cost is only $75/week for an advert.

 



Please let me know if you are interested by emailing me at articles@phpweekly.com

Please help us by clicking to our sponsor:

 

encrypt php scriptsProtect your PHP Code
Why not try SourceGuardian 15. Click here to download a 14 Day Trial copy. Protect your code using Windows, Linux or Mac and run everywhere with our free Loaders.



Sponsor this newsletter

So, how did you like this issue?

Like us on FacebookFollow us on Twitter
We are still trying to grow our list. If you find PHP Weekly useful please tweet about us! Thanks
Also, if you have a site or blog related to PHP then please link through to our site.
unsubscribe from this list  
 

Protect your PHP code with SourceGuardian 15. Free trial.

Copyright © 2024 PHP Weekly, All rights reserved.
Because you signed for it!
Our mailing address is:
PHP Weekly
Rotterdam House
116 Quayside
Newcastle Upon Tyne, NE1 3DY
United Kingdom
 

 

Older messages

PHPWeekly December 12th 2024

Thursday, December 19, 2024

Curated news all about PHP. Here's the latest edition Is this email not displaying correctly? View it in your browser. PHP Weekly 12th December 2024 Hi everyone, Wherever you are in the world, we

PHPWeekly December 5th 2024

Tuesday, December 10, 2024

Curated news all about PHP. Here's the latest edition Is this email not displaying correctly? View it in your browser. PHP Weekly 5th December 2024 Hi everyone, It's the first newsletter for

PHPWeekly November 28th 2024

Thursday, November 28, 2024

Curated news all about PHP. Here's the latest edition Is this email not displaying correctly? View it in your browser. PHP Weekly 28th November 2024 Hi everyone, It's Thanksgiving and Black

PHPWeekly November 21st 2024

Thursday, November 21, 2024

Curated news all about PHP. Here's the latest edition Is this email not displaying correctly? View it in your browser. PHP Weekly 21st November 2024 Hi everyone, PHP 8.4 id due for a release today,

PHPWeekly November 14th 2024

Friday, November 15, 2024

Curated news all about PHP. Here's the latest edition Is this email not displaying correctly? View it in your browser. PHP Weekly 14th November 2024 Hi everyone, We're one week before the

You Might Also Like

Data Science Weekly - Issue 578

Thursday, December 19, 2024

Curated news, articles and jobs related to Data Science, AI, & Machine Learning ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏ ͏

💎 Issue 448 - Ruby Video – On a mission to index all Ruby conferences

Thursday, December 19, 2024

This week's Awesome Ruby Newsletter Read this email on the Web The Awesome Ruby Newsletter Issue » 448 Release Date Dec 19, 2024 Your weekly report of the most popular Ruby news, articles and

💻 Issue 448 - State of JavaScript 2024

Thursday, December 19, 2024

This week's Awesome JavaScript Weekly Read this email on the Web The Awesome JavaScript Weekly Issue » 448 Release Date Dec 19, 2024 Your weekly report of the most popular JavaScript news, articles

📱 Issue 442 - Trying to Recreate iOS on the Web

Thursday, December 19, 2024

This week's Awesome iOS Weekly Read this email on the Web The Awesome iOS Weekly Issue » 442 Release Date Dec 19, 2024 Your weekly report of the most popular iOS news, articles and projects Popular

💻 Issue 441 - GitHub Copilot now has a free tier.

Thursday, December 19, 2024

This week's Awesome .NET Weekly Read this email on the Web The Awesome .NET Weekly Issue » 441 Release Date Dec 19, 2024 Your weekly report of the most popular .NET news, articles and projects

💻 Issue 448 - 🦸 Supercharge your debugging skills with the console.trace

Thursday, December 19, 2024

This week's Awesome Node.js Weekly Read this email on the Web The Awesome Node.js Weekly Issue » 448 Release Date Dec 19, 2024 Your weekly report of the most popular Node.js news, articles and

📱 Issue 445 - Swift Language focus areas heading into 2025

Thursday, December 19, 2024

This week's Awesome Swift Weekly Read this email on the Web The Awesome Swift Weekly Issue » 445 Release Date Dec 19, 2024 Your weekly report of the most popular Swift news, articles and projects

💻 Issue 443 - Thoughts on Rust Hashing

Thursday, December 19, 2024

This week's Awesome Rust Weekly Read this email on the Web The Awesome Rust Weekly Issue » 443 Release Date Dec 19, 2024 Your weekly report of the most popular Rust news, articles and projects

💻 Issue 366 - Windshield pitting incidents in Washington reach fever pitch on April 15, 1954 (2003)

Thursday, December 19, 2024

This week's Awesome React Weekly Read this email on the Web The Awesome React Weekly Issue » 366 Release Date Dec 19, 2024 Your weekly report of the most popular React news, articles and projects