2017 © Pedro Peláez
 

library silverstripe-phpstan

PHPStan for Silverstripe

image

silbinarywolf/silverstripe-phpstan

PHPStan for Silverstripe

  • Saturday, June 9, 2018
  • by SilbinaryWolf
  • Repository
  • 2 Watchers
  • 4 Stars
  • 1,474 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 3 Forks
  • 6 Open issues
  • 19 Versions
  • 149 % Grown

The README.md

PHPStan for Silverstripe

Build Status Latest Stable Version Latest Unstable Version Total Downloads License, (*1)

An extension for PHPStan to allow it to reason about SilverStripe functionality., (*2)

Features:, (*3)

  • Support for DataObject::get(), ie. it understands you have a DataList of iterable SiteTree records.
  • Support for DataObject db, has_one, has_many and many_many magic properties and methods, ie. it knows SiteTree::Title is a string, that SiteTree::ParentID is an integer and that SiteTree::Parent() is a SiteTree record.
  • Support for singleton('SiteTree') and Injector::inst()->get('SiteTree'), ie. it knows these will return "SiteTree". If you override these with the injector, it'll also know what class you're actually using.

This PHPStan module is able to reason about extensions installed specific to your project as it bootstraps the SilverStripe config system. So if you've added an extension to your Page object that adds an additional db field, PHPStan will be able to reason about it., (*4)

Composer Install

SilverStripe 3.X, (*5)

composer require --dev symbiote/silverstripe-phpstan:1.0.0 phpstan/phpstan-shim:0.9.2

SilverStripe 4.X, (*6)

composer require --dev symbiote/silverstripe-phpstan:2.0.0 phpstan/phpstan-shim:0.9.2

NOTE: We recommend installing the phpstan-shim as currently in SilverStripe 3.X, the QueuedJobs module's dependence on superclosure forces the PHP-Parser dependency of PHPStan to be at a very outdated version., (*7)

Requirements

  • SilverStripe 3.1+

Documentation

Known Limitations

  • The type of the owner property can't be reasoned about for extensions. You must use getOwner(). Related Issues: #1043 and #1044

Credits

  • Ondřej Mirtes for his amazing work on the PHPStan library
  • Grant Lucas for his contribution to this library by upgrading it to PHPStan 0.9

The Versions

09/06 2018

dev-master

9999999-dev

PHPStan for Silverstripe

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

by Jake Bentvelzen

php silverstripe static analysis scrutinizer phpstan

09/06 2018

2.0.1

2.0.1.0

PHPStan for Silverstripe

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

by Jake Bentvelzen

php silverstripe static analysis scrutinizer phpstan

09/06 2018

dev-dev-ss4

dev-dev-ss4

PHPStan for Silverstripe

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

by Jake Bentvelzen

php silverstripe static analysis scrutinizer phpstan

20/05 2018

dev-dev-ss4-final

dev-dev-ss4-final

PHPStan for Silverstripe

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

by Jake Bentvelzen

php silverstripe static analysis scrutinizer phpstan

20/05 2018

2.0.0

2.0.0.0

PHPStan for Silverstripe

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

by Jake Bentvelzen

php silverstripe static analysis scrutinizer phpstan

20/05 2018

1.0.x-dev

1.0.9999999.9999999-dev

PHPStan for Silverstripe

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

by Jake Bentvelzen

php silverstripe static analysis scrutinizer phpstan

20/05 2018

1.x-dev

1.9999999.9999999.9999999-dev

PHPStan for Silverstripe

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

by Jake Bentvelzen

php silverstripe static analysis scrutinizer phpstan

20/05 2018

dev-dev-final

dev-dev-final

PHPStan for Silverstripe

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

by Jake Bentvelzen

php silverstripe static analysis scrutinizer phpstan

20/05 2018

1.0.0

1.0.0.0

PHPStan for Silverstripe

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

by Jake Bentvelzen

php silverstripe static analysis scrutinizer phpstan

20/05 2018

dev-dev

dev-dev

PHPStan for Silverstripe

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

by Jake Bentvelzen

php silverstripe static analysis scrutinizer phpstan

05/05 2018

0.5.1

0.5.1.0

PHPStan for Silverstripe

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

by Jake Bentvelzen

php silverstripe static analysis scrutinizer phpstan

29/04 2018

0.5.0

0.5.0.0

PHPStan for Silverstripe

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

by Jake Bentvelzen

php silverstripe static analysis scrutinizer phpstan

29/04 2018

dev-dev-fieldlist

dev-dev-fieldlist

PHPStan for Silverstripe

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

by Jake Bentvelzen

php silverstripe static analysis scrutinizer phpstan

25/04 2018

0.4.0

0.4.0.0

PHPStan for Silverstripe

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

by Jake Bentvelzen

php silverstripe static analysis scrutinizer phpstan

21/04 2018

0.3.0

0.3.0.0

PHPStan for Silverstripe

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

by Jake Bentvelzen

php silverstripe static analysis scrutinizer phpstan

21/04 2018

dev-dev-fix-chaining

dev-dev-fix-chaining

PHPStan for Silverstripe

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

by Jake Bentvelzen

php silverstripe static analysis scrutinizer phpstan

19/04 2018

0.2

0.2.0.0

PHPStan for Silverstripe

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

by Jake Bentvelzen

php silverstripe static analysis scrutinizer phpstan

25/10 2017

0.1.0

0.1.0.0

PHPStan for Silverstripe

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

by Jake Bentvelzen

php silverstripe static analysis scrutinizer phpstan

10/10 2017

dev-experiment-has-method-rule

dev-experiment-has-method-rule

PHPStan for Silverstripe

  Sources   Download

BSD-3-Clause

The Requires

 

by Jake Bentvelzen

silverstripe