WEBVTT

NOTE Created by CaptionSync from Automatic Sync Technologies www.automaticsync.com

00:00:01.286 --> 00:00:04.466 align:middle
It looks like Colin did a great
job with this new feature.

00:00:04.826 --> 00:00:10.996 align:middle
But, we can give a merger much more confidence
by actually testing it in a real project!

00:00:10.996 --> 00:00:16.006 align:middle
In PhpStorm, I've already created
an empty contributing directory.

00:00:16.516 --> 00:00:19.836 align:middle
And, I already have a terminal
open to this same place.

00:00:21.206 --> 00:00:25.816 align:middle
To test the PR, let's literally
create a brand-new Symfony app:

00:00:26.776 --> 00:00:31.106 align:middle
composer create-project symfony/skeleton.

00:00:32.126 --> 00:00:38.966 align:middle
I'm using symfony/skeleton instead of the
larger symfony/website-skeleton to keep things

00:00:38.966 --> 00:00:41.176 align:middle
as small and focused as possible.

00:00:42.266 --> 00:00:45.386 align:middle
Grab the dev-master version of the skeleton.

00:00:46.716 --> 00:00:50.946 align:middle
Why? Colin's PR is against
Symfony's master branch.

00:00:51.276 --> 00:00:57.206 align:middle
So, to test it, I want to create an app
that's based on that same version of Symfony.

00:00:58.866 --> 00:01:04.756 align:middle
Finally, put this into a new
directory called triage_pr_28069:

00:01:10.836 --> 00:01:13.366 align:middle
When that finishes, move over and...

00:01:15.606 --> 00:01:18.046 align:middle
yea! Here's the new app.

00:01:18.856 --> 00:01:26.826 align:middle
Check out its composer.json file: it's using
version 4.2 of Symfony, which is the next,

00:01:26.976 --> 00:01:29.586 align:middle
unreleased, version of Symfony at this moment.

00:01:30.456 --> 00:01:34.206 align:middle
In other words, this code is
from Symfony's master branch.

00:01:34.996 --> 00:01:40.526 align:middle
We also have minimum-stability set to
dev, which means that Composer will try

00:01:40.526 --> 00:01:43.966 align:middle
to install new, unreleased version of libraries.

00:01:45.156 --> 00:01:50.296 align:middle
Look back at the PR: all of the changes
were to the Validator component.

00:01:51.936 --> 00:01:58.676 align:middle
Ok, let's get that installed: find your
terminal, move into the directory and run:

00:01:58.976 --> 00:02:05.986 align:middle
composer require validator This will install
the dev-master version of symfony/validator.

00:02:06.786 --> 00:02:10.446 align:middle
In other words, it will get the
code from Symfony's master branch.

00:02:11.046 --> 00:02:12.396 align:middle
But... hmm...

00:02:12.856 --> 00:02:19.216 align:middle
that's not quite what we want: we somehow
need to get the code from Colin's branch.

00:02:20.426 --> 00:02:21.276 align:middle
How can we do that?

00:02:21.916 --> 00:02:23.706 align:middle
Oh, it's super cool.

00:02:23.706 --> 00:02:26.956 align:middle
Go to your terminal and open a new tab.

00:02:28.276 --> 00:02:30.666 align:middle
Go back up to the contributing directory.

00:02:30.666 --> 00:02:36.376 align:middle
I'm going to clone the entire Symfony
project into a new directory here.

00:02:37.736 --> 00:02:42.286 align:middle
To do that, go back to your browser,
move to the repository's homepage,

00:02:43.636 --> 00:02:46.616 align:middle
click "Clone or download" and copy the URL.

00:02:47.946 --> 00:02:54.926 align:middle
Move back over, git clone and
paste: When that finishes,

00:02:55.226 --> 00:02:58.986 align:middle
we now have a symfony directory
right next to our app.

00:03:00.366 --> 00:03:03.396 align:middle
To get Colin's branch, we have a few options.

00:03:04.306 --> 00:03:07.746 align:middle
Move into the new symfony
directory and type: git remote

00:03:07.936 --> 00:03:14.656 align:middle
and git remote show origin Let's add
a second remote for Colin's fork.

00:03:15.506 --> 00:03:19.876 align:middle
Copy the Symfony URL, then
run git remote add and paste.

00:03:22.306 --> 00:03:28.756 align:middle
Copy Colin's username - colinodell, move
back, call the new remote colinodell,

00:03:29.026 --> 00:03:32.936 align:middle
and change the username part of the URL: Nice!

00:03:34.036 --> 00:03:37.206 align:middle
Grab his branches with: git
fetch colinodell Yep!

00:03:40.066 --> 00:03:42.206 align:middle
There's the branch:

00:03:42.436 --> 00:03:49.706 align:middle
feature/multiple-of-validator -
this is the one used for the PR.

00:03:49.706 --> 00:03:52.096 align:middle
To check out to that code, create a new branch:

00:03:52.686 --> 00:04:01.306 align:middle
git checkout -b feature/multiple-of-validator
colinodell/feature/multiple-of-validator Sweet!

00:04:02.676 --> 00:04:06.656 align:middle
To prove we've got the right
code, go back to PhpStorm,

00:04:07.446 --> 00:04:10.436 align:middle
press Shift+Shift, and search for the new file.

00:04:11.306 --> 00:04:12.136 align:middle
There it is!

00:04:13.076 --> 00:04:17.676 align:middle
We now have a test app and the
new code in our symfony directory.

00:04:18.146 --> 00:04:20.246 align:middle
But, they're not connected yet!

00:04:21.016 --> 00:04:22.006 align:middle
Let's do that next.

