پی اچ پی

Write a Composer Package With Me

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.

سطح متوسط 7 جلسه آموزشی 01:40:00 ساعت
01
قسمت 1

Terms, Package Configuration, and the First Test

To get the ball rolling, let's initalize Composer, pull in PHPUnit, and then prepare the configuration for the project. We'll then finish up the lesson by writing the first simple test we can think of.

02
قسمت 2

Load the Transcript as an Array

Next up, it would be useful if we could organize the transcript into a list, or array. With that in mind, let's introduce a new lines() method.

03
قسمت 3

Introduce a Line Object

In this episode, we'll extract a Line class that can be responsible for all behavior and manipulation that is specifically related to a single line of dialogue.

04
قسمت 4

Render a Transcript as HTML

It might be useful to offer the ability to render the loaded transcript as HTML, including clickable links to each timestamp. Let's play around with a possible implementation in this video.

05
قسمت 5

Final Squint Test Before Publishing

I think we're just about ready to push this up to Packagist. But before we do, let's do one last squint test and perform any lingering refactorings. I think I can see a few places where we might improve the structure of the code.

06
قسمت 6

Tag and Publish to Packagist

I think we're now ready to tag our first 0.1.0 release. In this lesson, we'll create a new GitHub repository, push our code up to it, and then add it to Packagist.org.

07
قسمت 7

Prepare a Minor Release

At this point, our package is available to anyone in the world - including me. As I've been working with it behind the scenes, I've come across a few small snags that need to be ironed out. In this episode, we'll add a couple small features and then tag a new minor release.

دوره در حال اجرا

این دوره هنوز به پایان نرسیده است و در آینده درس های دیگری به آن افزوده خواهد شد.