
Need to authenticate requests to a server? Learn what JWTs are and how to use them instead of sessions to authenticate your users via API calls.
Need to authenticate requests to a server? Learn what JWTs are and how to use them instead of sessions to authenticate your users via API calls.
Need to collect data through a web form? Learn the basics of how to set up PHP to collect user-submitted data that you can then store or send via email.
Learn about Insphpect, a tool that scans your PHP code for object-oriented programming techniques that hinder code reusability and flexibility.
Tonino and Narayan show how to use PHPMailer - a dead simple email sending library for PHP. Send email from your local machine or an SMTP relay easily!
Rhiana Heath looks at Bootstrap accessibility issues with Bootstrap 4, showing how developers can test for problems and what can be done to fix them.
Cloud deployment SaaS compared: Runcloud vs ServerPilot vs Laravel Forge - who's cheapest? Who's simplest? Who's got the features?
Kirk presents a way to get going quickly with Zend Expressive, setting up an enterprise-ready application bootstrap in under 10 minutes. Awesome!
Christopher Pitt is back with another esoteric use case in PHP land - building custom compilers! Here he builds one which can process ReactJS code in PHP!
Heard of bitwise operators? Let's explore their practical application in storing and checking for user permissions, and whether this makes sense!
Sharoze asks some prominent community members about their development workflow - some answers are predictable, others will surprise. What can you relate to?
Let's take a fresh look at PHPUnit - the de-facto TDD tool for PHP. We'll explain TDD on an example, implement code coverage, and more!
Chris writes test watchers: auto-compiling PHP from Preprocess files, and auto-testing after every file-change. No need to manually run PHPUnit ever again!
Christopher presents Eloquent's polymorphic relationships in a human-friendly way - come learn what they're all about and master this awesome ORM!
What is the theory of constraints, and can be it be applied to PHP application development? The answer to the latter is oh yes, and for the former, dive in!
Take a look at this list of 8 PHP Quality Assurance tools - absolute essentials in your passion projects
Bert introduces us to the concept of poka yoke - hyper defensive programming by forcing some checks and safeguards that make our code robust and sturdy.
Chris explains what snapshot testing is on some ReactJS code, before applying it to PHP and giving you something to think about when you close this tab!
In this sourcehunt, we present PHP machine learning, a CRM that helps you track personal relationships, a wrapper to make Guzzle usable again, and more!
Marcello Duarte explains how we can use functional programming to build a JSON parser from scratch in PHP! Join us in exploring advanced PHP!
Scott explains how we can have a secure, encrypted, and hack-proof database, but still use normal SELECT and search queries on it. Interesting stuff!
What's the difference between technical and visual debt in code? Which one is more important, more dangerous? Let's discuss their balance in this editorial.
Claudio re-introduces a tool that most revolutionized the way we develop PHP apps: Composer, PHP's dependency manager. Still unfamiliar with it? Dive in!
Younes explores PDS-Skeleton, a new idea in the PHP world aiming to standardize file and folder layouts of packages and apps. No more "where's that class?"!
In this in-depth tutorial, we'll look at all the various cloud hosting providers for PHP, and deploy the same app on ALL of them. It's really not hard!
We focus on Behat now to further extend Sylius in true TDD fashion. We write stories, we test against them, and then we develop features to make them pass!
Deji extends the core of Sylius by adding some back end features via true TDD: writing PhpSpec tests first, seeing that they fail, and then making them pass
Marcello Duarte of Inviqa shares some functional programming insight with us by teaching us how to build Parser combinations with Phunkie! Hardcore!
After we published Francesco's Laravel Package development workflow a month ago, Younes chimes in with his own Laravel Package development approach!
Younes sets up a CI pipeline on SemaphoreCI and makes sure it invokes Deployer or Laravel Envoy to deploy the app after a successful commit / test.
Bert discusses an interesting approach to creating arrays and collections that automatically enforce certain types - both scalar and fully custom
Thomas explains the most recent version of pthreads targeting PHP 7+ and demonstrates all the new features it brought along. Get started with parallelism!
This sourcehunt, we've found a lot of Laravel and/or JSON focused packages. It's an interesting combo which led us to our newest "app idea of the month"!
Francesco tells us about his workflow for building Laravel packages - from PSR-4 baby steps to Facades, Francesco justifies and explains the steps he takes.
Younes Rafie shows us how to add 2FA to a Laravel app - make sure your users can log in securely by adding an SMS layer!
Younes looks at Fractal - a PHP League package for formatting and transforming JSON, YAML, and other data formats to something consistent. APIs rejoice!
We look at Sylius - a fully tested and super-robuts e-commerce platform/framework, and use it to learn some proper Test Driven Development!
Viraj demonstrates Laravel Dusk - a browser testing tool designed for testing your apps in full - including UI and JavaScript!
Sourcehunt Feb, apart from promoting really interesting open source repos, now also features an app idea of the month, worth a fortune. Check it out!
Eugene explains Forwarding Decorators: a crazy concept for approaching modularity in apps - wrapping them in other classes and recompiling everything.
Let's take a look at Peridot - a testing suite with a different approach. Can we BDD test our units? Should we?
Alex Bilbie looks at Jenkins' newest feature: pipelines. With it, we configure Laravel's auto-testing procedure, and make sure our builds stay alive!
In this "next level Laravel" post, Younes explains an interesting approach to designing relationships with Eloquent: polymorphic relations.
Chris adds a password-less login procedure on top of the typical username/password login in Laravel - let's kill the password!
Chris explains what event sourcing is, how to use it, when to apply it, and why. Check out this advanced DDD pattern in an easy to learn format!
Younes presents Eloquent Observers - a method of subscribing to changed on models and having those models notify all subscribers of changes. Check it out!
Christopher Thomas shows us the full process of implementing 2FA - two factor authentication - in Laravel, using Google Authenticator!
Ahmed Khan gives us a brief overview of the new exception and error classes in PHP 7, and how they can impact your future, current, and past code!
Matthew Setter takes an introductory look at atoum - an alternative to PHPUnit with an interesting twist
Claudio takes a look at Atlas - a new type of ORM that doesn't oversell. If you're dying for a breath of fresh ORM air, check it out!
In this primer about PSR-7, Deji Akala explains where it came from, what the PSR means, how it changed the PHP landscape, and what's next.
Deji Akala shows us that it's possible to have single-file Symfony apps - with the help of a new 2.8/3.0 feature: the MicroKernelTrait!
Claudio introduces us to a new PHPCS standard - PhpCompatibility. This standard checks your code for compatibility with past and present versions of PHP!
After Larry voiced his opinion, Paul Jones chimes in with his stances and suggestions about PHP-FIG and its options going forward.
What are proxies? How can we use them? And what kind of advanced use cases can we think of? Let's perform some RESTful remote miracles with ProxyManager!
Crunz is a framework-agnostic library for scheduling and defining cronjobs wholly in PHP. Commit them to VCS, edit without server access, and more!
A couple of helper methods for quickly and effectively passing larger numbers of variables to views from your controllers
Super-caching, optimization, customization, comments, and much more you simply MUST do for your Grav installation
Here's a quick way to get rid of filesystem troubles (cleanup anyone?) when practicing TDD - virtual file systems!
Is it possible to have static type hints in PHP 5 without PHP 7 or HHVM? Yes - with the Augmented Types extension from Box!
Tobias looks at the process of refactoring code to make it cleaner - more readable, more intuitive. Do you think it's worth the time and effort?
Andrew explains how to perform database-related tests in a Symfony app much faster - with a disposable in-memory SQLite database, avoiding any bulky mocks
We build a basic framework with a new dependency injection container called Disco, explaining all the confusing concepts along the way. Join us!
Danny teaches you how to build Doctrine-style PHP annotations for your own custom projects!
Francesco introduces Laravel Doctrine, and builds a sample app with it - come learn about this powerful ORM + Framework mix!
Daniel shows us how we can apply the ELK stack to WordPress for advanced monitoring and error logging - never stare at confusing logs again!
Nitpick CI is a service with a singular purpose - making sure your Github PRs respect the PSR-2 code standard. In this post, we'll put it to the test
Daniel Berman explains what the ELK stack is, how to install it, and how to make it analyze the logs of the typical LAMP stack
Chris Pitt starts developing a new PHP package with TDD practices in mind - using PhpUnit and Mockery all the way. Check it out!
In this edition of sourcehunt, we look at cron managers for PHP, a Laravel Hackathon starter kit, a PHP-GUI package that lets you do desktop-PHP, and more
Younes explains the concept of transducers and demonstrates their use in PHP with Michael Dowling's library
Jeroen Moons offers advice and lessons learned on how to get a legacy codebase under control and bring it to a new level of maturity.
Younes demonstrates Deployer, a tool for deploying PHP applications to live, development, or staging servers with just a few lines of PHP code.
Parham dives into Vagga - a lightweight alternative to Docker useful for containerized development environments - and builds a PHP environment!
Continuing the series on Drupal entity validation and typed data, Danny now teaches us how to extend this system with custom constraints and violations
Francesco builds an AngularJS app to consume a previously built Laravel API application for making book wishlists. JSON web token authentication in action!
Francesco builds an entire API-only application with the Laravel API Boilerplate project (JWT edition) for creating and editing book wishlists!
Andrew Carter builds a Dependency Injection container from scratch, showing you how that rocket science is really just fireworks strapped to lego figures!
Learn how to use the Github web UI to sync a fork with the original repo quickly and easily, all without the use of a CLI
Vitalij Mik goes through a from-scratch UseCase implementation to demonstrate Clean Code Architecture and Test Driven Development on a Guestbook app!
Zack Wallace covers three SQL join approaches which can aid you in filtering your data. If you're an SQL newbie, this post will teach you valuable things!
Andrew Cairns explains Commands and Command Buses, demonstrating their use with Tactician, a popular Command Bus package for PHP
Jeff Smith expands on his previous "Defensive programming" post by offering more tips on making sure your apps do what they're supposed to. Check it out!
Zack Wallace walks us through a paradigm-shifting new template engine, Transphporm, which uses CSS selectors to alter template content. Intrigued? Come see!
Ever wondered how to quickly add that "Xmas mode" or holiday promotion to your site? Feature toggling to the rescue! Check out Qandidate's Toggle!
Danny, our Drupal expert, explains and demonstrates a Drupal 8 queue, implementing a queue handler that can be both triggered manually, or via Cron.
Daniel Berman presents a dead easy way of doing continuous delivery (integration + deployment) with the power of ContinuousPHP and Zend Server
Andrew Cairns explains the Aggregate pattern and implements it on top of Laravel's Eloquent. Feeling the pro thirst? Give this advanced tutorial a go!
M. Reza explains how Laravel's facades work and shows you how to reimplement them in any non-Laravel project! Facades in Silex? Yes please!
Learn how to set up a cron job in your Laravel application, and the difference between basic and advanced scheduling.
Andrew Carter explains the Flyweight Design Pattern - a relatively unknown pattern in PHP land - using the familiar example of a FileFactory and enums.
PuliPHP is a new paradigm-shifting tool, designed to re-revolutionize PHP package development by making it extra easy to track and share resource files.
Christopher Pitt goes through the process of building an extremely fast asynchronous PHP application server with Icicle and some League libraries - amazing!
Christopher Pitt introduces event loops - non-blocking async calls in PHP code, akin to Javascript. Can event loops breathe new life into PHP's performance?
Danny explains the Symfony-powered request-response flow in Drupal, showing you exactly what goes on under the hood when your app is run
In this introduction, Bruno Skvorc introduces BDD in Laravel by installing and using Behat and PhpSpec to develop a simple testable feature.
Nicola Pietroluongo explains the concept of Chain of Responsibility in a down-to-earth manner, backing it up with examples.
Taylor Ren shows you how easy it is to build a custom Symfony2 Twig filter, all while using PHPUnit to respect TDD practices.
Jamie Shields dives into effective pagination techniques with jQuery and Ajax in PHP using the Silex framework for the sake of simplicity
Bruno Skvorc compiles a list of Composer tips and tricks for efficient workflows.
How can a product make what seem to be classic UX no-no's but still find extraordinary success? Byron investigates.