PHPackages                             dunglas/php-property-info - 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. [Database &amp; ORM](/categories/database)
4. /
5. dunglas/php-property-info

Abandoned → [symfony/property-info](/?search=symfony%2Fproperty-info)ArchivedLibrary[Database &amp; ORM](/categories/database)

dunglas/php-property-info
=========================

Retrieve type and description of PHP properties using various sources

v0.2.3(10y ago)28229.8k↓20%2[1 PRs](https://github.com/dunglas/php-property-info/pulls)1MITPHPPHP &gt;=5.4

Since Feb 16Pushed 10y agoCompare

[ Source](https://github.com/dunglas/php-property-info)[ Packagist](https://packagist.org/packages/dunglas/php-property-info)[ Docs](http://dunglas.fr)[ RSS](/packages/dunglas-php-property-info/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (3)Dependencies (3)Versions (7)Used By (1)

PHP Property Info
=================

[](#php-property-info)

**Deprecated**: This library has been merged into the Symfony Framework. Please use and contribute to the [Symfony PropertyInfo Component](http://symfony.com/blog/new-in-symfony-2-8-propertyinfo-component).

PHP doesn't support explicit type definition. This is annoying, especially when doing meta programming. Various libraries including but not limited to Doctrine ORM and the Symfony Validator provide their own type managing system. This library extracts various information including the type and documentation from PHP class property from metadata of popular sources:

- Setter method with type hint
- PHPDoc DocBlock
- Doctrine ORM mapping (annotation, XML, YML or custom format)
- PHP 7 scalar typehint and return type
- Hack (hacklang) types

[![Build Status](https://camo.githubusercontent.com/ce8968a6e4c4a3c7fa635c50b2abc00b6ce781a9c7ab8fc6ed3c5e81bada5a47/68747470733a2f2f7472617669732d63692e6f72672f64756e676c61732f7068702d70726f70657274792d696e666f2e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/dunglas/php-property-info)[![SensioLabsInsight](https://camo.githubusercontent.com/549f9615b920c3354e38c6d5907ef037d18f77e106bd4832c2ccbc5b48ff4aba/68747470733a2f2f696e73696768742e73656e73696f6c6162732e636f6d2f70726f6a656374732f32396238343563662d313036642d343562342d393961662d3237316632646333663764352f6d696e692e706e67)](https://insight.sensiolabs.com/projects/29b845cf-106d-45b4-99af-271f2dc3f7d5)

PHP Property info is part of the [API Platform](http://api-platform.com) framework.

Installation
------------

[](#installation)

Use [Composer](http://getcomposer.org) to install the library:

```
composer require dunglas/php-property-info

```

To use the PHPDoc extractor, install the [phpDocumentator's Reflection](https://github.com/phpDocumentor/Reflection) library. To use the Doctrine extractor, install the [Doctrine ORM](http://www.doctrine-project.org/projects/orm.html).

Usage
-----

[](#usage)

```
