2017 © Pedro Peláez
 

silverstripe-vendormodule ideannotator

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

image

silverleague/ideannotator

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

  • Saturday, July 7, 2018
  • by axyr
  • Repository
  • 2 Watchers
  • 34 Stars
  • 5,651 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 14 Forks
  • 3 Open issues
  • 28 Versions
  • 24 % Grown

The README.md

silverstripe-ideannotator

Scrutinizer Travis codecov Packagist Packagist Packagist Pre Release, (*1)

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., (*2)

The docblocks can be generated/updated with each dev/build and with a DataObjectAnnotatorTask per module or classname., (*3)

Requirements

SilverStripe Framework and possible custom code., (*4)

By default, mysite and app are enabled "modules"., (*5)

Version ^2:

SilverStripe 3.x framework, (*6)

Version ^3:

SilverStripe 4.x+, (*7)

Installation

{
  "require-dev": {
    "silverleague/ideannotator": "3.x-dev"
  }
}

Please note, this example omitted any possible modules you require yourself!, (*8)

Example result

<?php

/**
 * Class NewsItem
 *
 * @property string $Title
 * @property int $Sort
 * @property int $Version
 * @property int $AuthorID
 * @method \SilverStripe\Security\Member Author()
 * @method \SilverStripe\ORM\DataList|Category[] Categories()
 * @method \SilverStripe\ORM\ManyManyList|Tag[] Tags()
 * @mixin Versioned
 */
class NewsItem extends \SilverStripe\ORM\DataObject
{
    private static $db = array(
        'Title' => 'Varchar(255)',
        'Sort'  => 'Int'
    );

    private static $has_one = array(
        'Author' => Member::class
    );

    private static $has_many = array(
        'Categories' => Category::class
    );

    private static $many_many = array(
        'Tags' => Tag::class
    );
}

Further information

For installation, see installation, (*9)

For the Code of Conduct, see CodeOfConduct, (*10)

For contributing, see Contributing, (*11)

For further documentation information, see the docs, (*12)

A word of caution

This module changes the content of your files and currently there is no backup functionality. PHPStorm has a Local history for files and of course you have your code version controlled... I tried to add complete UnitTests, but I can't garantuee every situation is covered., (*13)

Windows users should be aware that the PHP Docs are generated with PSR in mind and use \n for line endings rather than Window's \r\n, some editors may have a hard time with these line endings., (*14)

This module should never be installed on a production environment., (*15)

The Versions

07/07 2018

dev-master

9999999-dev

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

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

by Martijn van Nieuwenhoven

orm database docblock annotations silverstripe ide

07/07 2018

3.0.0

3.0.0.0

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

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

by Martijn van Nieuwenhoven

orm database docblock annotations silverstripe ide

27/05 2018

dev-support_short_names

dev-support_short_names

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

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

by Martijn van Nieuwenhoven

orm database docblock annotations silverstripe ide

30/01 2018

3.0-rc1

3.0.0.0-RC1

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

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

by Martijn van Nieuwenhoven

orm database docblock annotations silverstripe ide

30/01 2018

dev-use-moduleloader

dev-use-moduleloader

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

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

by Martijn van Nieuwenhoven

orm database docblock annotations silverstripe ide

23/10 2017

dev-pulls/3.0/build-badges-in-readme

dev-pulls/3.0/build-badges-in-readme

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

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

by Martijn van Nieuwenhoven

orm database docblock annotations silverstripe ide

22/10 2017

dev-fix/code-coverage

dev-fix/code-coverage

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

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

by Martijn van Nieuwenhoven

orm database docblock annotations silverstripe ide

15/10 2017

dev-fix-badges-readme

dev-fix-badges-readme

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

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

by Martijn van Nieuwenhoven

orm database docblock annotations silverstripe ide

15/10 2017

3.x-dev

3.9999999.9999999.9999999-dev

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

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

by Martijn van Nieuwenhoven

orm database docblock annotations silverstripe ide

15/10 2017

dev-fix-includes

dev-fix-includes

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

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

by Martijn van Nieuwenhoven

orm database docblock annotations silverstripe ide

08/10 2017

3.0-beta1

3.0.0.0-beta1

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

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

by Martijn van Nieuwenhoven

orm database docblock annotations silverstripe ide

15/05 2017

3.0

3.0.0.0

Generate PHP DocBlock annotations for DataObject and DataExtension database fields and relation methods

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

by Martijn van Nieuwenhoven

orm database docblock annotations silverstripe ide

29/04 2017

3.0.0-alpha1

3.0.0.0-alpha1

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

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

by Martijn van Nieuwenhoven

orm database docblock annotations silverstripe ide

13/07 2016

2.0.7

2.0.7.0

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

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

by Martijn van Nieuwenhoven

orm database docblock annotations silverstripe ide

13/05 2016

dev-ss-4

dev-ss-4

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

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

by Martijn van Nieuwenhoven

orm database docblock annotations silverstripe ide

12/05 2016

2.0.6

2.0.6.0

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

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

by Martijn van Nieuwenhoven

orm database docblock annotations silverstripe ide

03/05 2016

2.0.5

2.0.5.0

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

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

by Martijn van Nieuwenhoven

orm database docblock annotations silverstripe ide

29/04 2016

2.0.4

2.0.4.0

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

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

by Martijn van Nieuwenhoven

orm database docblock annotations silverstripe ide

21/04 2016

2.0.3

2.0.3.0

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

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

by Martijn van Nieuwenhoven

orm database docblock annotations silverstripe ide

19/04 2016

2.0.2

2.0.2.0

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

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

by Martijn van Nieuwenhoven

orm database docblock annotations silverstripe ide

17/04 2016

2.0.1

2.0.1.0

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

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

by Martijn van Nieuwenhoven

orm database docblock annotations silverstripe ide

14/04 2016

2.0.0

2.0.0.0

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

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

by Martijn van Nieuwenhoven

orm database docblock annotations silverstripe ide

04/04 2016

1.0.4

1.0.4.0

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

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

by Martijn van Nieuwenhoven

orm database docblock annotations silverstripe ide

03/04 2016

1.0.3

1.0.3.0

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

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

by Martijn van Nieuwenhoven

orm database docblock annotations silverstripe ide

30/03 2016

1.0.2

1.0.2.0

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

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

by Martijn van Nieuwenhoven

orm database docblock annotations silverstripe ide

28/03 2016

1.0

1.0.0.0

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

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

by Martijn van Nieuwenhoven

orm database docblock annotations silverstripe ide

28/03 2016

1.0.1

1.0.1.0

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

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

by Martijn van Nieuwenhoven

orm database docblock annotations silverstripe ide

25/10 2015

0.8

0.8.0.0

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

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

by Martijn van Nieuwenhoven

orm database docblock annotations silverstripe ide