Subscribe! Enter your email address below:

NO SPAM: We absolutely hate spam. We will not share, rent, or give away your email address to anyone.You can unsubscribe at any time. Easily!

March 7, 2024

Hi everyone,

It's the last month of the first quarter of the year, and here I am wondering where the time went. This time however, is another instalment of your weekly dose of PHP news. This week we have a couple of deep dives in our Reading section, one for creating and displaying custom post types in Wordpress and another on testing private and protected methods in PHP. We also have an article on Laravel Middleware to Format requests. In our Articles section, Vlad Reshetylo listed 5 outdated Optimisation 'tricks' that he says you should stop using. There's also an exploration into the new routing configuration in Laravel 11, as well as a post on the danger of PHP's eval() function. Finally, our Podcast section has new episodes from PHP Architect on empathy coding, Laracast Snippet on the topic of stories we tell ourselves, while No Compromises asks the question of whether you should change application code to support a test. We have all that and more, so we do hope you enjoy this week's newsletter. If you're a student or developer on the move and want the latest PHP news and updates in one place, then subscribe to PHPWeekly.

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 [email protected].

Do follow us on our social media channels on Twitter and Facebook

All the best,

Please help us by clicking to our sponsor:

encrypt php scriptsGet 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.


Understanding Laravel Traits
Traits, similar to PHP classes, encapsulate methods and properties. However, unlike classes, they cannot be instantiated directly. Instead, traits serve as reusable building blocks that can be "used" by multiple classes, enabling them to inherit the defined functionalities.

Building a Server Dashboard with a Single PHP File
In the realm of web development and server management, having quick access to key system metrics is crucial for monitoring server health and performance.

PHP: Basic Loops Vs. Built-In Array Helpers vs. Readability
PHP has built-in helpers to make all kinds of sorting and filtering with arrays, but is it always the best solution?

Getting started with asynchronous PHP using ReactPHP
What if I told you that there’s an alternative solution that doesn’t involve a queue server?

The Danger of PHP Eval():
PHP’s eval() function, often dubbed as one of the most controversial features in web development, serves as a double-edged sword.

Stop Using These 5 Outdated Optimization Tricks in PHP
It seems for me that love for “performance tricks” often happens with developers with 10+ years of experience.

New Routing in Laravel 11: A Guide to Advanced Configuration
This article explores the new routing configuration in Laravel 11, focusing on the incorporation of API routes and the customization options available for advanced use cases like API versioning and prefixing.


Web Scraping Specialists Wanted
If you're a skilled Web Scraping Specialist with a knack for creative problem-solving, join our remote team to gather data from e-commerce websites and enhance our data-driven solutions. Embrace challenging projects, overcome blocking technologies, and collaborate with a diverse global team in a flexible, fast-paced environment.

Junior PHP/Python Developer - Remote
We're looking for Full-Stack Developers to join our dynamic remote international team. As a developer, you'll work on a range of projects, including Business Intelligence systems, Legal SaaS, and cutting-edge online projects. You'll be responsible for improving legacy systems, monitoring technical systems, and delivering high-quality solutions. You should be proficient in front-end and back-end development, have strong problem-solving skills, and experience with Python, PHP, Postgres, MongoDB, and Linux servers. If you're a self-motivated team player, apply now.

Technical Support Manager - Remote
Are you interested in programming but don't have the experience yet to be a skilled developer? Join our team as a Technical Support Manager and be part of our SaaS company's success. You'll work closely with our customers to provide timely solutions, troubleshoot technical issues, and contribute to feature development. Using your skills, you'll quickly identify and resolve issues, while also working closely with our team to deliver an exceptional customer experience. You don't need to have programming experience to succeed in this role, but you should have a passion for technology and a desire to learn. You will help us enhance our products and deliver an outstanding customer experience.

Tutorials and Talks

Phone Number Formatting, Validation, and Model Casts in Laravel
The Laravel-Phone package makes working with phone numbers in PHP and Laravel a breeze, offering validation rules, attribute casting, utility helpers, and more.

Custom Role-Based Access Control (RBAC) in Laravel Nova: a handy implementation example
In this comprehensive guide, we’ll delve into the process of implementing a custom RBAC system using Laravel’s policies, with a focus on restricting actions within Laravel Nova, a powerful administration panel.

Send, validate, and store Base64 files with Laravel
Laravel makes it easy to send and upload files, at least when it comes to handling binary files.

Getting Symfony app ready for Swoole, RoadRunner, and FrankenPHP (no AI involved)
I will use a simple Symfony 7.0 application in this post, but all the concepts apply to any PHP codebase.

A Practical Approach to Renaming a Model in Laravel
Code is messy, language is messy, and sometimes you want to rename a model in a codebase that a team has sunk years into...for consistency's sake.

How to deploy a Filament app
For this guide we're assuming you already have PHP, Composer and GIT installed on your computer and that you're familiar with terminal commands.

Building an HTML email form – Frontend and Backend
The following tutorial covers methods that include server-side scripting. And I added a special section to ensure that any sensitive information is encrypted and transmitted securely.

PHP with Vite and Vue — simple implementation
I was looking for a simple Vite and PHP implementation on the internet, but unfortunately I found nothing that fits my needs. So, I decided to create one myself and I’d like to share it with you!

News and Announcements

Improvements: Fixed Hash::insert() and paths containing {s} and conditions, and data where all values after {s} are not arrays.

Symfony 7.0.5 released
Symfony 7.0.5 has just been released. Here is the list of the most important changes since 7.0.4.

A Week of Symfony #896 (26 February - 3 March 2024)
This week, Symfony 5.4.36, 6.4.4 and 7.0.4 maintenance versions were released. Meanwhile, the upcoming Symfony 7.1 version focused on finishing some minor new features.

Save the date: Laracon US is coming to Dallas TX Aug 27-28, 2024
Laracon is back for 2024. The flagship Laravel event of the year and the largest PHP conference in the United States is heading to Deep Ellum, Dallas, for two days of learning and networking with the Laravel community.

Laravel Live Denmark: A Two-Day Event in Copenhagen, Denmark on August 22-23, 2024
Laravel Live Denmark is a two-day Laravel conference that will take place in Copenhagen, Denmark, on August 22-23, 2024. This event will be the first Laravel conference in the Nordic countries, where more than 300 Laravel and PHP enthusiasts worldwide will gather for two days of talks, learning, and networking.

Podcasts and Vlogs

PHP Ugly: 374: Sevi Land the Ticket
This week on the podcast, Eric and John talk about The big php[tek] Ticket Giveaway, new php[tek] sponsors, is AI killing coding sooner than we thought, battlesnake, devilbox dead, last year attendee shares their story, and more...

Laravel News Podcast: October in February, new terminals, and modularized Laravel
Jake and Michael discuss all the latest Laravel releases, tutorials, and happenings in the community.

The Stack Overflow: Chunking express: An expert breaks down how to build your RAG system
This is part two of our conversation with Roie Schwaber-Cohen, Staff Developer Advocate at Pinecone, about retrieval-augmented generation (RAG) and why it’s crucial for the success of your AI initiatives.

No Compromises Podcast: Should you change application code to support a test?
When you're writing a test it can be so tempting to just "tweak" some app code to make it easier to write that test, but we discuss why that might not be a good idea. ...

Maintainable Podcast: Kyle Daigle - Scaling Up with AI: A New Era of Code Maintenance
Robby has a chat with Kyle Daigle, the Chief Operating Officer at GitHub. They dive into the evolution of software development from the perspective of maintaining and scaling software within large organizations like GitHub.

Software Engineering Radio: SE Radio 605: Yingjun Wu on Streaming Databases
Yingjun Wu, founder of RisingWave Labs and previously a software engineer at Amazon Web Services and researcher at IBM Almaden Research Center, speaks with SE Radio host Brijesh Ammanath about streaming databases.

Developer Tea: Stat Series: What Statistical Measure Are You Overusing? (And What to Do About It), Part Two
In this episode we continue our discussion about the most overused statistical measurement. We'll talk about a few more counterintuitive properties of the average, and how you might be underserving your colleagues as a result of thinking in averages.

Shoptalk Show: Jim Nielsen on Subversive URLs, Blogging + AI, and Design Engineers
Jim Nielsen joins us to about URLs and linking as the new subversive way to maintain the web, paying for news in Canada, should content creators be worried about AI, the case for design engineers, RSS in HTML, and the state of state and UI.

WP Builds: 363 – No Script Show, Episode 5 – What is component based web design?
This week, it’s all about something called ‘component based web design’.

WP Briefing: Episode 74: Kickstart (Or Level-Up) Your Contributor Journey
Explore the impact you can make on WordPress without coding in this WordPress Briefing episode hosted by Executive Director Josepha Haden Chomphosy.

Laracast Snippet: The Stories We Tell Ourselves
Tell me what you think of this. We all have certain stories about ourselves that we repeat, like mantras. "I am the type of person who is X, therefore..." But, for all the reps, I'm not sure these are doing us any good at all.

PHP Architect: Community Corner: Interview With April Wensel of Compassionate Coding
In this episode, Scott talks to April Wensel from Compassionate Coding about empathy in coding and her keynote at php[tek] 2024.

Mostly Technical: 26: Indie Tycoon
Ian & Aaron discuss config files in Laravel 11, having ambitious goals, the merits of checking vs. not checking your bag, & more.

Over Engineered: Do we really need sprints? w/ John Drexler, Bogdan Kharchenko, and Skyler Katz
What are the best processes for small software development teams with high trust? In today's episode the InterNACHI software development team sits down with John Rudolph Drexler to talk about whether or not we need to estimate tickets or even bother with sprints…

Syntax: The LoFi Movement: Building Local First Apps
This episode covers the concept of local first web development, where apps work offline first and then sync data in the background. The ideals, principles, tools, and sample projects around this concept are explored.

The Changelog: Apple backs off killing EU web apps
Apple backs off killing web apps (but the fight continues), Luka Kladaric writes about how to ship quality software in hostile environments, Deno’s new package registry is an npm superset, Martin Fowler on the value of periodic face-to-face & Eugene Ghanizadeh wants us to get more decentralized than the Fediverse.

Reading and Viewing

Add Architecture Tests to Saloon API Integrations with Lawman
Lawman is a Pest PHP plugin that makes adding arch tests to your application for your API integrations easy, with a set of Saloon Expectations!

Custom Role-Based Access Control (RBAC) in Laravel Nova: a handy implementation example
In this comprehensive guide, we’ll delve into the process of implementing a custom RBAC system using Laravel’s policies, with a focus on restricting actions within Laravel Nova, a powerful administration panel.

A Comprehensive Guide to Creating and Displaying Custom Post Types in WordPress
Whether you're a developer or a site owner, this guide will equip you with the knowledge you need to expand your website's functionality and present your content in a tailored manner.

Integrating PHP Applications with Ecotone and RabbitMQ
In this Article we will be focusing on the integration using Message Broker and more precisely RabbitMQ.

Middleware as a means to format request in a laravel project
Laravel middlewares provide a convenient mechanism for inspecting and filtering through HTTP requests that enter the application. They act as a bridge between a request and reaction.

Redefining Task Scheduling: Moving Beyond Traditional CRON Jobs
In this article, we will delve into the challenges faced when relying on conventional CRON jobs and explore alternative open-source tools that provide more flexibility, control, and scalability for task scheduling.

PHP Session Poisoning using LFI
PHP session poisoning is a type of security vulnerability that occurs when an attacker manipulates or exploits the session management mechanisms in PHP applications to gain unauthorized access or perform malicious actions.

A Deep Dive into Testing Private and Protected Methods in PHP
As you can see in the snippet below, we have a method with private or protected access level that we want to test in PHP Unit or outside the class scope in PHP.

Interesting Projects, Tools and Libraries

Client and Server-side React rendering.

A laravel package for lock and unlock user account when reached the max login attempt

PHP Library. Contact as a Service.

Twig template engine adapter for Aimeos e-commerce components.

Interfaces that aim to increase interoperability of value objects.

Quickly install WordPress through Composer and WP-CLI.

placetopay integration for magento2.

PHP LetsEncrypt client library for ACME v2.

A module providing various layouts for Drupal's Layout API.

Simplifies and standardizes seeding from JSON files named to match the table they will be populating.

Please help us by clicking to our sponsor:

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

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 | update subscription preferences 

Subscribe! Enter your email address below:

NO SPAM: We absolutely hate spam. We will not share, rent, or give away your email address to anyone.You can unsubscribe at any time. Easily!

Talk to us!

If you have some news, want to share a link with us or chat with us feel free to email us.

And we also have an RSS feed that you can use.

Like us on FacebookFollow us on Twitter

Copyright ©