PHPackages                             aipng/open-graph - 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. aipng/open-graph

ActiveLibrary

aipng/open-graph
================

Simple library for generating basic Open Graph tags

1.3.0(3y ago)0107↓100%MITPHPPHP &gt;= 8.1

Since Mar 18Pushed 3y ago1 watchersCompare

[ Source](https://github.com/aipng/open-graph)[ Packagist](https://packagist.org/packages/aipng/open-graph)[ RSS](/packages/aipng-open-graph/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (6)Versions (6)Used By (0)

OpenGraph
=========

[](#opengraph)

[![Build Status](https://camo.githubusercontent.com/3407b0326525b3a6599740894b074bcee1d860c481ae34d641e43a37cce675df/68747470733a2f2f7472617669732d63692e6f72672f6169706e672f6f70656e2d67726170682e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/aipng/open-graph)[![Latest Stable Version](https://camo.githubusercontent.com/2269b6c190130c46544a4dddbceca6f021c6e72cc38305fab78f812138975743/68747470733a2f2f706f7365722e707567782e6f72672f6169706e672f6f70656e2d67726170682f76657273696f6e)](https://packagist.org/packages/aipng/open-graph)[![License](https://camo.githubusercontent.com/3c79faec91f51844e689e430f3e6e282d5dddae4fe7f6aadc41ddedacf64e42c/68747470733a2f2f706f7365722e707567782e6f72672f6169706e672f6f70656e2d67726170682f6c6963656e7365)](https://packagist.org/packages/aipng/open-graph)

OpenGraph is an extra simple library for generating basic set of [Open Graph](https://ogp.me/) meta tags, inspired by Chris Konnertz's [Open Graph Builder](https://github.com/aipng/open-graph).

Example of usage:

Base
----

[](#base)

```
use AipNg\OpenGraph\OpenGraph;
use AipNg\OpenGraph\MetaTags;
use AipNg\OpenGraph\MetaType;
use AipNg\ValueObjects\Web\Url;

$og = new OpenGraph;

$og
	->title('title')
	->type(MetaType::WEBSITE)
	->url(Url::from('https://site.com'))
	->image(Url::from('https://site.com/image.jpg'), 100, 200, 'image/jpg')
	->description('description')
	->siteName('site name');

var_dump($og->hasTag(MetaTags::OG_TITLE)); // true

$og->toArray();
```

Article
-------

[](#article)

```
use AipNg\OpenGraph\OpenGraph;

$og = new OpenGraph;

$og->article('title', new \DateTimeImmutable('2020-01-02 12:13:14'), 'section', ['tag-1', 'tag-2']);

$og->toArray();

/**
[
    'og:title' => 'title',
    'og:type' => 'article',
    'article:published_time' => '2020-01-02T12:13:14+0100',
    'article:section' => 'section',
    'article:tag' => [
        'tag-1',
        'tag-2',
    ],
];
*/
```

###  Health Score

29

—

LowBetter than 62% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity68

Established project with proven stability

 Bus Factor1

Top contributor holds 100% 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 ~270 days

Total

5

Last Release

1115d ago

PHP version history (3 changes)1.0PHP &gt;= 7.3

1.2.0PHP &gt;= 7.4

1.3.0PHP &gt;= 8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/35b41cd5d99fc8f0371a422b7ad64c164a21115a0598f97a74f8ff321f4dcee6?d=identicon)[aipng](/maintainers/aipng)

---

Top Contributors

[![khorsky](https://avatars.githubusercontent.com/u/160295?v=4)](https://github.com/khorsky "khorsky (5 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/aipng-open-graph/health.svg)

```
[![Health](https://phpackages.com/badges/aipng-open-graph/health.svg)](https://phpackages.com/packages/aipng-open-graph)
```

###  Alternatives

[nette/schema

📐 Nette Schema: validating data structures against a given Schema.

1.0k326.0M109](/packages/nette-schema)[nette/php-generator

🐘 Nette PHP Generator: generates neat PHP code for you. Supports new PHP 8.5 features.

2.2k61.5M513](/packages/nette-php-generator)[nette/robot-loader

🍀 Nette RobotLoader: high performance and comfortable autoloader that will search and autoload classes within your application.

89151.7M301](/packages/nette-robot-loader)[nette/di

💎 Nette Dependency Injection Container: Flexible, compiled and full-featured DIC with perfectly usable autowiring and support for all new PHP features.

92240.1M1.3k](/packages/nette-di)[nette/bootstrap

🅱 Nette Bootstrap: the simple way to configure and bootstrap your Nette application.

68435.0M559](/packages/nette-bootstrap)[nette/http

🌐 Nette Http: abstraction for HTTP request, response and session. Provides careful data sanitization and utility for URL and cookies manipulation.

48618.8M506](/packages/nette-http)

PHPackages © 2026

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