PHPackages                             sohophp/schema-org - 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. sohophp/schema-org

ActiveLibrary

sohophp/schema-org
==================

schema.org php library

v4.1.2(1y ago)3293↓100%MITPHPPHP ^8.1.0

Since Nov 27Pushed 1y ago2 watchersCompare

[ Source](https://github.com/sohophp/schemaorg)[ Packagist](https://packagist.org/packages/sohophp/schema-org)[ Docs](https://www.sohophp.app)[ RSS](/packages/sohophp-schema-org/feed)WikiDiscussions master Synced 1mo ago

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

phpschemaorg
============

[](#phpschemaorg)

### schema.org PHP library

[](#schemaorg-php-library)

- @since 2025/03/10 v4.0.0 v28.1/schemaorg-all-https.jsonld
- @since 2021/12/23 v3.0.0 升级至 PHP8.1
- @since 2020/03/12 v1.5.0 加入 set 和 get 方法
- @since 2019/08/13 updated 3.9 , 800 classes

特点:
---

[](#特点)

- 支持自动生成类目PHP类文件,现schema.org版本v3.4有598个类,877个属性,136个其它
- 强类型检查
- 自定命名空间
- PHP CS Fixer 代码格式化符合PSR标准
- IDE中类与方法可自动完成.

安装方法 / installation:
--------------------

[](#安装方法--installation)

#### Composer:

[](#composer)

```
$ composer require sohophp/schema-org
```

#### Git:

[](#git)

```
$ git clone https://github.com/sohophp/schemaorg.git
```

使用方法 / Usage:
-------------

[](#使用方法--usage)

```
use Sohophp\SchemaOrg\Thing\CreativeWork\WebPage;
$Page = new WebPage();
$Page->name("test one")->text('content');
$script = $Page->toScript();
echo $script;
```

输出结果 / output:
--------------

[](#输出结果--output)

```

{
    "@context": "https:\/\/schema.org",
    "@type": "WebPage",
    "name": "test one",
    "text": "content"
}

```

###  Health Score

42

—

FairBetter than 89% of packages

Maintenance47

Moderate activity, may be stable

Popularity15

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity82

Battle-tested with a long release history

 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 ~56 days

Recently: every ~0 days

Total

42

Last Release

424d ago

Major Versions

v1.5.0 → v2.0.02021-12-22

v2.0.0 → v3.1.02021-12-22

v3.2.1 → v4.0.02025-03-09

v3.3.1 → v4.1.02025-03-10

PHP version history (5 changes)v1.1.1PHP &gt;7.2

v1.1.4PHP ^7.2

v1.1.6PHP &gt;=7.2.0

v1.5.0PHP ^7.2.0

v2.0.0PHP ^8.1.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/0066452c6da8ec15a53c67d4e3594c3d5af27f675357decf05a486ad7cee61d7?d=identicon)[sohophp](/maintainers/sohophp)

---

Top Contributors

[![sohophp](https://avatars.githubusercontent.com/u/18595011?v=4)](https://github.com/sohophp "sohophp (46 commits)")

---

Tags

schema.orgstructural data

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/sohophp-schema-org/health.svg)

```
[![Health](https://phpackages.com/badges/sohophp-schema-org/health.svg)](https://phpackages.com/packages/sohophp-schema-org)
```

###  Alternatives

[api-platform/schema-generator

Various tools to generate a data model based on Schema.org vocables

4714.2M7](/packages/api-platform-schema-generator)[melbahja/seo

SEO library for PHP is a simple PHP library to help developers 🍻 do better on-page SEO optimizations.

355143.7k4](/packages/melbahja-seo)[brotkrueml/schema

Embedding schema.org vocabulary - API and view helpers for schema.org markup

33584.6k13](/packages/brotkrueml-schema)[brick/schema

Schema.org library for PHP

5163.7k1](/packages/brick-schema)[crwlr/schema-org

Extract schema.org structured data from HTML documents.

1519.9k1](/packages/crwlr-schema-org)

PHPackages © 2026

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