PHPackages                             silverleague/ideannotator - 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. [Testing &amp; Quality](/categories/testing)
4. /
5. silverleague/ideannotator

ActiveSilverstripe-vendormodule[Testing &amp; Quality](/categories/testing)

silverleague/ideannotator
=========================

Generate PHP DocBlock annotations for DataObject and DataExtension databasefields and relation methods

4.0.1(2mo ago)4768.0k—4.5%26[1 PRs](https://github.com/silverleague/silverstripe-ideannotator/pulls)20BSD-3-ClausePHPPHP ^8.0CI passing

Since Oct 25Pushed 2mo ago6 watchersCompare

[ Source](https://github.com/silverleague/silverstripe-ideannotator)[ Packagist](https://packagist.org/packages/silverleague/ideannotator)[ RSS](/packages/silverleague-ideannotator/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (10)Versions (46)Used By (20)

silverstripe-ideannotator
=========================

[](#silverstripe-ideannotator)

[![Build Status](https://github.com/silverleague/silverstripe-ideannotator/actions/workflows/ci.yml/badge.svg)](https://github.com/silverleague/silverstripe-ideannotator/actions/workflows/ci.yml/badge.svg)[![Scrutinizer](https://camo.githubusercontent.com/b396fb65dad01026214b1a7e1dadfb303ef06ba578374e38d2dc0a6ea346a468/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f73696c7665726c65616775652f73696c7665727374726970652d696465616e6e6f7461746f722e737667)](https://scrutinizer-ci.com/g/silverleague/silverstripe-ideannotator/)[![codecov](https://camo.githubusercontent.com/1e71db861cf6d731dbe627acb945b944efd890dd9515d73caaaf217cbb7443b5/68747470733a2f2f636f6465636f762e696f2f67682f73696c7665726c65616775652f73696c7665727374726970652d696465616e6e6f7461746f722f6272616e63682f6d61737465722f67726170682f62616467652e737667)](https://codecov.io/gh/silverleague/silverstripe-ideannotator)[![Packagist](https://camo.githubusercontent.com/b0cec56bfd69f2d698e96dc49b6e91120f20ed20c34e33516bfa36127cd1d710/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f73696c7665726c65616775652f696465616e6e6f7461746f722e737667)](https://packagist.org/packages/silverleague/ideannotator)[![Packagist](https://camo.githubusercontent.com/49e9f522264cee98e10c65e3d25b21439e1e2c1fef1406c2fd34044b3d839455/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f73696c7665726c65616775652f696465616e6e6f7461746f722e737667)](https://packagist.org/packages/silverleague/ideannotator)[![Packagist Pre Release](https://camo.githubusercontent.com/844c2b4c3031c4e37da9fff2a756b579188faaa524848537b219b235ade97cec/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f767072652f73696c7665726c65616775652f696465616e6e6f7461746f722e737667)](https://packagist.org/packages/silverleague/ideannotator)

This module generates @property, @method and @mixin tags for DataObjects, PageControllers and (Data)Extensions, so ide's like PHPStorm recognize the database and relations that are set in the $db, $has\_one, $has\_many and $many\_many arrays.

The docblocks can be generated/updated with each dev/build and with a DataObjectAnnotatorTask per module or classname.

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

[](#requirements)

SilverStripe Framework and possible custom code.

By default, `mysite` and `app` are enabled "modules".

### Version ^2:

[](#version-2)

SilverStripe 3.x framework

### Version ^3:

[](#version-3)

Silverstripe 4.x, 5,x

### Version ^4:

[](#version-4)

Silverstripe 6.x+

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

[](#installation)

```
{
  "require-dev": {
    "silverleague/ideannotator": "^4"
  }
}
```

Please note, this example omitted any possible modules you require yourself!

Example result
--------------

[](#example-result)

```
