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)2288.6k↓36%6[1 issues](https://github.com/aalaap/faker-youtube/issues)WTFPLPHPPHP ^7.1 || ^8.0

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 1mo 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

40

—

FairBetter than 88% of packages

Maintenance19

Infrequent updates — may be unmaintained

Popularity41

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

2019d 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://www.gravatar.com/avatar/26e0b948d745b972288dc6e735a9fbfe6906a7f665095042036859b26f457a91?d=identicon)[aalaap](/maintainers/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

[mbezhanov/faker-provider-collection

A collection of custom providers for the Faker library

2138.6M24](/packages/mbezhanov-faker-provider-collection)[mmo/faker-images

Different images provider for Faker

59370.3k6](/packages/mmo-faker-images)[pelmered/fake-car

Fake-Car is a Faker provider that generates fake car data for you.

1271.2M2](/packages/pelmered-fake-car)[bluemmb/faker-picsum-photos-provider

picsum.photos provider for Faker

31225.7k1](/packages/bluemmb-faker-picsum-photos-provider)[smknstd/fakerphp-picsum-images

Alternative image provider for fakerphp using picsum.photos

45218.1k3](/packages/smknstd-fakerphp-picsum-images)[emanueleminotto/faker-placehold-it-provider

placehold.it provider for Faker

1423.5k1](/packages/emanueleminotto-faker-placehold-it-provider)

PHPackages © 2026

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