PHPackages                             tohyo/open-graph-bundle - 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. [API Development](/categories/api)
4. /
5. tohyo/open-graph-bundle

ActiveSymfony-bundle[API Development](/categories/api)

tohyo/open-graph-bundle
=======================

Symfony bundle to retrieve open graph data

1.0.0(2y ago)033MITPHPPHP ^8.2

Since Jun 14Pushed 1y ago1 watchersCompare

[ Source](https://github.com/Tohyo/open-graph-bundle)[ Packagist](https://packagist.org/packages/tohyo/open-graph-bundle)[ RSS](/packages/tohyo-open-graph-bundle/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (10)Versions (2)Used By (0)

Open Graph Bundle for Symfony
=============================

[](#open-graph-bundle-for-symfony)

Description
===========

[](#description)

This bundle provide a simple service that will take a url and then return a object containing the open graph data for this url/

Requirements
------------

[](#requirements)

This bundle works with `php 8.2`

Installation
============

[](#installation)

Make sure Composer is installed globally, as explained in the [installation chapter](https://getcomposer.org/doc/00-intro.md)of the Composer documentation.

Applications that use Symfony Flex
----------------------------------

[](#applications-that-use-symfony-flex)

Open a command console, enter your project directory and execute:

```
$ composer require tohyo/open-graph-bundle
```

Applications that don't use Symfony Flex
----------------------------------------

[](#applications-that-dont-use-symfony-flex)

### Step 1: Download the Bundle

[](#step-1-download-the-bundle)

Open a command console, enter your project directory and execute the following command to download the latest stable version of this bundle:

```
$ composer require tohyo/open-graph-bundle
```

### Step 2: Enable the Bundle

[](#step-2-enable-the-bundle)

Then, enable the bundle by adding it to the list of registered bundles in the `config/bundles.php` file of your project:

```
// config/bundles.php

return [
    Tohyo\OpenGraphBundle\TohyoOpenGraphBundle::class => ['all' => true],
];
```

Usage
=====

[](#usage)

Example
-------

[](#example)

You can see below a example of how to use the service:

```
public function index(OpenGraph $openGraph): Response
{
    dd($openGraph->getData('https://symfony.com'));
}
```

And this call will return this kind of object:

```
Tohyo\OpenGraphBundle\Dto\OpenGraphData {#12498 ▼
  +title: "Symfony, High Performance PHP Framework for Web Development"
  +url: null
  +type: "website"
  +image: Tohyo\OpenGraphBundle\Dto\OpenGraphImageData {#13207 ▶
    +url: "https://symfony.com/images/opengraph/symfony.png"
    +secureUrl: null
    +type: null
    +width: ""
    +height: ""
    +alt: ""
  }
  +video: Tohyo\OpenGraphBundle\Dto\OpenGraphVideoData {#12615 ▶
    +url: null
    +secureUrl: null
    +type: null
    +width: ""
    +height: ""
    +alt: ""
  }
  +audio: Tohyo\OpenGraphBundle\Dto\OpenGraphAudioData {#12534 ▶
    +url: null
    +secureUrl: null
    +type: null
  }
  +description: "Symfony is a set of reusable PHP components and a PHP framework to build web applications, APIs, microservices and web services."
  +locale: null
  +determiner: null
  +siteName: null
}
```

Options
-------

[](#options)

By default the Data returned is not validated, you can activate it by a config parameters

```
tohyo_open_graph:
    validate_graph_data: true
```

When this parameters is activated property that does not pass validation will be set to `null`

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance30

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 95% 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

Unknown

Total

1

Last Release

1068d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/d75a540c0b23337e93e0cb19a5291089ec854f65c8e787a920db52a43dcced1c?d=identicon)[Tohyo](/maintainers/Tohyo)

---

Top Contributors

[![Tohyo](https://avatars.githubusercontent.com/u/3950637?v=4)](https://github.com/Tohyo "Tohyo (19 commits)")[![KevinCodekraft](https://avatars.githubusercontent.com/u/137310039?v=4)](https://github.com/KevinCodekraft "KevinCodekraft (1 commits)")

### Embed Badge

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

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

###  Alternatives

[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M651](/packages/sylius-sylius)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.3M152](/packages/sulu-sulu)[prestashop/prestashop

PrestaShop is an Open Source e-commerce platform, committed to providing the best shopping cart experience for both merchants and customers.

9.0k15.4k](/packages/prestashop-prestashop)[shopware/platform

The Shopware e-commerce core

3.3k1.5M3](/packages/shopware-platform)[easycorp/easyadmin-bundle

Admin generator for Symfony applications

4.3k16.7M310](/packages/easycorp-easyadmin-bundle)[contao/core-bundle

Contao Open Source CMS

1231.6M2.4k](/packages/contao-core-bundle)

PHPackages © 2026

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