WEBVTT

NOTE Created by CaptionSync from Automatic Sync Technologies www.automaticsync.com

00:00:01.016 --> 00:00:05.636 align:middle
We've seen a bunch of ways to contribute:
triaging issues &amp; pull requests,

00:00:05.776 --> 00:00:08.756 align:middle
creating pull requests and
contributing to the documentation.

00:00:09.316 --> 00:00:11.276 align:middle
But there's so much more!

00:00:11.916 --> 00:00:16.596 align:middle
The Symfony ecosystem is a lot bigger
than just these two repositories.

00:00:16.596 --> 00:00:21.976 align:middle
For example, go to github.com/symfony.

00:00:21.976 --> 00:00:27.986 align:middle
Woh! There are 118 repositories under Symfony!

00:00:28.486 --> 00:00:31.276 align:middle
Click on, for example, dom-crawler.

00:00:33.236 --> 00:00:37.436 align:middle
This repository is what's
called a "subtree split".

00:00:38.076 --> 00:00:38.966 align:middle
Cool name, right?

00:00:39.646 --> 00:00:44.386 align:middle
The DomCrawler component actually
lives and is managed inside

00:00:44.386 --> 00:00:48.756 align:middle
of the main symfony/symfony
repository that we've been working in.

00:00:49.316 --> 00:00:55.346 align:middle
I'll show you: open that repository and
navigate to src/Symfony, DomCrawler.

00:00:59.136 --> 00:01:01.466 align:middle
This is the DomCrawler component.

00:01:02.216 --> 00:01:07.656 align:middle
An automated process splits this
directory into its own repository

00:01:07.956 --> 00:01:10.346 align:middle
so that people can use it independently.

00:01:10.346 --> 00:01:15.926 align:middle
If you want to contribute to DomCrawler,
you'll do it in symfony/symfony.

00:01:16.546 --> 00:01:19.586 align:middle
The sub-tree split is read-only.

00:01:20.346 --> 00:01:23.436 align:middle
How can you know if a repository
is a sub-tree split?

00:01:23.846 --> 00:01:26.996 align:middle
You'll notice that the "Issues"
tab has been disabled.

00:01:28.046 --> 00:01:33.376 align:middle
Many of those 118 repositories
under Symfony are subtree splits.

00:01:33.996 --> 00:01:36.896 align:middle
And so, you contribute to them in the main repo.

00:01:37.686 --> 00:01:43.786 align:middle
But a lot of them are normal repositories
that you can contribute to directly.

00:01:43.786 --> 00:01:46.436 align:middle
For example, recipes.

00:01:47.096 --> 00:01:50.046 align:middle
This is one of the coolest
ways that you can help Symfony.

00:01:50.046 --> 00:01:55.176 align:middle
If you install a bundle or library
and it doesn't have a good recipe,

00:01:55.616 --> 00:02:00.296 align:middle
or doesn't have a recipe at all, you
should totally add or improve it!

00:02:01.186 --> 00:02:06.646 align:middle
You can create a recipe here, or on
the less-stringent recipes-contrib.

00:02:07.936 --> 00:02:09.796 align:middle
We're going to improve a recipe in a minute.

00:02:10.106 --> 00:02:14.326 align:middle
But, first, I want to point
out a few other repositories.

00:02:14.916 --> 00:02:16.296 align:middle
Search for "flex".

00:02:17.406 --> 00:02:20.516 align:middle
This is the Composer plugin
that powers the recipe system.

00:02:21.486 --> 00:02:22.356 align:middle
Search for "maker".

00:02:23.476 --> 00:02:25.786 align:middle
MakerBundle is all about code generation.

00:02:26.646 --> 00:02:32.886 align:middle
Try "encore": this is a library written
in Node that helps make Webpack easy.

00:02:33.316 --> 00:02:40.256 align:middle
And, one more: panther a new library that
allows you to functionally test your pages,

00:02:40.546 --> 00:02:43.256 align:middle
including the JavaScript on those pages.

00:02:43.856 --> 00:02:47.796 align:middle
And there are a lot more - like MonologBundle.

00:02:48.576 --> 00:02:54.296 align:middle
The point is: each of these needs help
triaging issues and reviewing pull requests.

00:02:54.916 --> 00:02:58.836 align:middle
And actually, because these
independent libraries get less traffic,

00:02:59.066 --> 00:03:02.686 align:middle
you can make an even bigger
difference in a short amount of time.

00:03:03.816 --> 00:03:06.576 align:middle
Let's make one small contribution
to the recipes.

00:03:07.056 --> 00:03:09.366 align:middle
Go back to the main recipes repository.

00:03:10.446 --> 00:03:16.646 align:middle
One of the recipes is for the twig/extensions
library: a standalone PHP library.

00:03:17.876 --> 00:03:20.876 align:middle
When you install that package,
its recipe gives you a new

00:03:21.036 --> 00:03:24.986 align:middle
config/packages/twig_extension.yaml file.

00:03:25.776 --> 00:03:29.596 align:middle
These are the four classes
provided by that library.

00:03:30.446 --> 00:03:35.416 align:middle
After installing the library, you just
need to uncomment the ones that you want.

00:03:36.626 --> 00:03:41.076 align:middle
Let's make this even more obvious by
adding a comment above to describe that.

00:03:42.216 --> 00:03:46.506 align:middle
To do that, go back to main
recipes page and copy the clone URL.

00:03:48.736 --> 00:03:52.386 align:middle
Hopefully, this process is
starting to feel boring...

00:03:52.386 --> 00:03:53.366 align:middle
and repetitive.

00:03:54.456 --> 00:03:57.606 align:middle
At your terminal, move back
into the contributing/ directory

00:03:57.786 --> 00:04:03.306 align:middle
and clone that: Then, move inside.

00:04:04.786 --> 00:04:08.776 align:middle
To create a pull request, we will
eventually need our own fork.

00:04:09.376 --> 00:04:16.046 align:middle
I already have a fork, so I'll skip straight
to copying my URL, going back to the terminal,

00:04:16.336 --> 00:04:21.336 align:middle
and adding that remote: git
remote add weaverryan and paste.

00:04:22.606 --> 00:04:25.246 align:middle
Back in the editor, I'll close a few files.

00:04:29.376 --> 00:04:34.996 align:middle
Then open twig/extensions/1.0/config/packages
/twig_extensions.yaml.

00:04:36.656 --> 00:04:44.646 align:middle
Add the comment: Uncomment any lines below
to activate that Twig extension Brilliant!

00:04:45.176 --> 00:04:45.936 align:middle
Let's commit this!

00:04:46.946 --> 00:04:52.456 align:middle
The recipes repository is a bit
unique: it only has a master branch.

00:04:53.076 --> 00:04:55.466 align:middle
So, we'll create our new branch from it:

00:04:55.666 --> 00:05:06.806 align:middle
git checkout -b adding-twig-extensions-note
Then, add, commit and...

00:05:07.776 --> 00:05:14.456 align:middle
git push weaverryan adding-twig-extensions-note
Awesome!

00:05:15.176 --> 00:05:16.046 align:middle
Go back to GitHub!

00:05:17.836 --> 00:05:22.506 align:middle
Sweet! Here's the yellow bar:
click "Compare &amp; pull request".

00:05:24.756 --> 00:05:28.266 align:middle
Add a small note about why
we think this is a good idea.

00:05:29.016 --> 00:05:33.016 align:middle
And, make sure we don't have
any other "surprise" changes.

00:05:34.036 --> 00:05:34.496 align:middle
Looks good.

00:05:35.166 --> 00:05:36.646 align:middle
Hit "Create pull request".

00:05:38.276 --> 00:05:39.826 align:middle
This was a pretty simple change.

00:05:40.316 --> 00:05:43.926 align:middle
But, when your changes are bigger,
you'll probably want to be able

00:05:43.926 --> 00:05:49.206 align:middle
to test your recipe before it's merged:
to see how it works in the real world!

00:05:49.856 --> 00:05:51.946 align:middle
And... we can do that!

00:05:51.946 --> 00:05:56.676 align:middle
Almost immediately after posting the
PR, you'll hopefully see a message:

00:05:57.126 --> 00:05:58.956 align:middle
"Pull request passes validation".

00:05:59.716 --> 00:06:05.576 align:middle
This means that our changes passed a few rules
that are described in this repository's README.

00:06:06.656 --> 00:06:09.666 align:middle
Another spot says "View deployment".

00:06:10.546 --> 00:06:11.876 align:middle
Open that in a new tab.

00:06:13.236 --> 00:06:15.456 align:middle
This is really cool.

00:06:16.116 --> 00:06:19.486 align:middle
The Flex server just "deployed" our recipe.

00:06:19.976 --> 00:06:25.836 align:middle
And we can temporarily change our Flex
"endpoints" to use our new recipe...

00:06:26.446 --> 00:06:27.956 align:middle
even though it's not merged yet!

00:06:29.126 --> 00:06:33.276 align:middle
Copy the export line, find a terminal and paste.

00:06:34.576 --> 00:06:38.376 align:middle
We just set an environment
variable on this terminal tab only.

00:06:40.376 --> 00:06:46.416 align:middle
To test the recipe, let's just move into one
of our projects, like triage_issue_27901.

00:06:47.236 --> 00:06:55.516 align:middle
Then run: composer require twig/extensions
When we run that, it gives us a warning

00:06:55.516 --> 00:06:58.266 align:middle
that we're not using the
normal Symfony endpoint...

00:06:58.426 --> 00:07:00.246 align:middle
which is perfect.

00:07:02.236 --> 00:07:04.216 align:middle
And... it looks like it worked!

00:07:05.136 --> 00:07:10.226 align:middle
Go check it out: open
config/packages/twig_extensions.yaml.

00:07:11.166 --> 00:07:12.426 align:middle
We got it!

00:07:12.946 --> 00:07:14.946 align:middle
No surprise for this small tweak.

00:07:15.516 --> 00:07:18.736 align:middle
But for bigger changes, this is so useful.

00:07:19.746 --> 00:07:23.286 align:middle
When you're done playing with things,
be sure to unset that variable

00:07:23.466 --> 00:07:26.746 align:middle
so that you once again use
the real Symfony endpoint.

00:07:28.946 --> 00:07:30.816 align:middle
Ok people, that's it!

00:07:31.206 --> 00:07:35.306 align:middle
Oh, there is so much good stuff
to work on in the Symfony world.

00:07:35.646 --> 00:07:37.546 align:middle
And we need the help!

00:07:38.176 --> 00:07:42.636 align:middle
There's complex stuff, like working on
the main symfony/symfony repository.

00:07:43.186 --> 00:07:48.996 align:middle
But there are also many, many other ways to
contribute, like improving the documentation,

00:07:49.386 --> 00:07:55.066 align:middle
working on recipes or just finding that
third party library or bundle you love

00:07:55.336 --> 00:07:58.526 align:middle
and helping to improve it or its docs.

00:07:59.256 --> 00:08:05.046 align:middle
You are the person that can make a difference
by adding that feature or fixing that bug.

00:08:05.826 --> 00:08:09.726 align:middle
And if you have more questions on
contributing, ask them down in the comments!

00:08:09.916 --> 00:08:15.006 align:middle
We would love to help answer
them Ok people, seeya on GitHub!

