Write a Composer Package With Me
If you'd like to come along for the ride, I need to build a small package for Laracasts to handle the loading and processing of a transcripts file. The ultimate goal is to provide a pretty slide-out panel to quickly scan and read the full transcript for a given lesson. Even better, when you click any relevant sentence, it will take you to the exact portion of the video where that line is spoken.
In this series, we'll use test-driven development to drive the backend PHP portion of this new feature.
Series episodes
Terms, Package Configuration, and the First Test
9m 45sInitialize Composer, install PHPUnit, configure your package, and write your first test to kickstart reliable PHP package development.
Load the Transcript as an Array
13m 53sConvert a transcript into an array with a lines() method—organize, iterate, and manipulate dialogue entries for cleaner, testable code.
Introduce a Line Object
8m 18sExtract a Line class to encapsulate dialogue-line behavior and manipulation, improving code organization and testability.
Render a Transcript as HTML
12m 12sRender a transcript as interactive HTML with clickable timestamp links—learn a practical implementation to display and navigate transcript content.
Final Squint Test Before Publishing
17m 47sPerform one last squint test and quick refactors to polish your code before publishing the package to Packagist.
Tag and Publish to Packagist
3m 59sLearn how to tag your first 0.1.0 release, push code to GitHub, and publish your package on Packagist.org for easy sharing and version control.
Prepare a Minor Release
15m 1sFix small issues and add features to your package, then learn how to tag and prepare a smooth minor release for easy distribution and updates.




