PHPackages                             aalaap/faker-youtube - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. aalaap/faker-youtube

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

aalaap/faker-youtube
====================

Faker provider for generating fake YouTube video URLs

2.0.3(5y ago)2294.1k↓18.8%7[1 issues](https://github.com/aalaap/faker-youtube/issues)[1 PRs](https://github.com/aalaap/faker-youtube/pulls)WTFPLPHPPHP ^7.1 || ^8.0CI failing

Since Feb 15Pushed 5y ago1 watchersCompare

[ Source](https://github.com/aalaap/faker-youtube)[ Packagist](https://packagist.org/packages/aalaap/faker-youtube)[ RSS](/packages/aalaap-faker-youtube/feed)WikiDiscussions master Synced 2w ago

READMEChangelog (4)Dependencies (2)Versions (7)Used By (0)

YouTube Provider for Faker
--------------------------

[](#youtube-provider-for-faker)

This package will allow [Faker](https://github.com/FakerPHP/Faker) to generate fake, but technically valid, YouTube URLs in various formats as well as an embed HTML.

YouTube's hashing algorithm ensures that the possibility of collisions is really low, so the chances of a random URI generated by this packge being a real video is also really low, but not impossible.

[![Build Status](https://camo.githubusercontent.com/6de6e390d24c6e2575350fcf91d2792ca48c4bc9253c48d38747215b2f13a24f/68747470733a2f2f7472617669732d63692e6f72672f61616c6161702f66616b65722d796f75747562652e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/aalaap/faker-youtube)

Upgrading to the new Faker?
---------------------------

[](#upgrading-to-the-new-faker)

Since the [original Faker](https://github.com/fzaninotto/Faker) was [sunsetted](https://marmelab.com/blog/2020/10/21/sunsetting-faker.html), this package was updated to 2.0 to work with the new Faker, bringing along updated version requirements, which now apply to this package as well.

- `php`: ^7.1 || ^8.0
- `phpunit/phpunit`: ^7.5.20 || ^8.5.8 || ^9.4.2

If you are still using the original Faker, you can continue to use versions 1.x of this package.

Install
-------

[](#install)

To install, use composer:

```
composer require aalaap/faker-youtube
```

Use
---

[](#use)

```
# When installed via composer
require_once 'vendor/autoload.php';

$faker = \Faker\Factory::create();
$faker->addProvider(new \Faker\Provider\Youtube($faker));
```

```
echo $faker->youtubeUri();
// https://www.youtube.com/watch?v=KyXYWQ-B3zO

echo $faker->youtubeShortUri();
// https://youtu.be/watch?v=rsPyiZSzj3g

echo $faker->youtubeEmbedUri();
// https://www.youtube.com/embed/aUgKvcNS6en

echo $faker->youtubeEmbedCode();
//

echo $faker->youtubeRandomUri();
// https://youtu.be/watch?v=lctkDb05MKT

```

License
-------

[](#license)

This package is under the WTFPL license. Do whatever you want with it.

[LICENSE](https://github.com/aalaap/faker-youtube/LICENSE)

Reporting an issue or a feature request
---------------------------------------

[](#reporting-an-issue-or-a-feature-request)

Fork it, send a PR. Issues and feature requests are tracked in the [GitHub issue tracker](https://github.com/aalaap/faker-youtube/issues).

###  Health Score

41

—

FairBetter than 87% of packages

Maintenance19

Infrequent updates — may be unmaintained

Popularity42

Moderate usage in the ecosystem

Community12

Small or concentrated contributor base

Maturity72

Established project with proven stability

 Bus Factor1

Top contributor holds 96.3% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~199 days

Recently: every ~249 days

Total

6

Last Release

2110d ago

Major Versions

1.2.1 → 2.0.02020-11-07

PHP version history (2 changes)1.2.0PHP ^5.6 || ^7.0

2.0.0PHP ^7.1 || ^8.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/79404?v=4)[Aalaap Ghag](/maintainers/aalaap)[@aalaap](https://github.com/aalaap)

---

Top Contributors

[![aalaap](https://avatars.githubusercontent.com/u/79404?v=4)](https://github.com/aalaap "aalaap (26 commits)")[![IggsGrey](https://avatars.githubusercontent.com/u/41928390?v=4)](https://github.com/IggsGrey "IggsGrey (1 commits)")

---

Tags

fakeryoutubeprovider

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/aalaap-faker-youtube/health.svg)

```
[![Health](https://phpackages.com/badges/aalaap-faker-youtube/health.svg)](https://phpackages.com/packages/aalaap-faker-youtube)
```

###  Alternatives

[verbb/formie

The most user-friendly forms plugin for Craft.

101400.6k78](/packages/verbb-formie)[solspace/craft-freeform

The most flexible and user-friendly form building plugin!

54686.7k25](/packages/solspace-craft-freeform)[bluemmb/faker-picsum-photos-provider

picsum.photos provider for Faker

30250.8k3](/packages/bluemmb-faker-picsum-photos-provider)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

265.2k](/packages/aedart-athenaeum)[xvladqt/faker-lorem-flickr

loremflickr.com provider for Faker

1588.7k1](/packages/xvladqt-faker-lorem-flickr)[directorytree/dummy

4310.9k](/packages/directorytree-dummy)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
