Download the PHP package edhrendal-sf-tools/phpstan-edhrendal without Composer

On this page you can find all versions of the php package edhrendal-sf-tools/phpstan-edhrendal. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package phpstan-edhrendal

phpstan-edhrendal

PHPStan extension providing custom static analysis rules for Edhrendal projects.

Rules are opt-in — none are active by default. Include only the ones you need.

Requirements

Version
PHP >= 8.5
phpstan/phpstan ~2.1.0

Installation

Important — use a dedicated quality tools project

This package should not be installed as a dev dependency of your application. QA tools (PHPStan, PHP CS Fixer, etc.) belong in a separate Composer project, isolated from your application's dependency tree. This avoids version conflicts, keeps your application's composer.lock clean, and makes tool upgrades independent from application releases.

A common convention is a tools/ directory at the root of your repository with its own composer.json, or a dedicated repository shared across multiple projects.

Usage

extension.neon defines the full configuration schema and default values for all rules. How it gets loaded depends on your setup.

Standard setup (PHPStan in the same vendor as the project)

PHPStan auto-loads extension.neon via extra.phpstan.includes in composer.json. You do not need to include it manually — just include the rules you want:

Separate tools directory

When PHPStan is installed in a dedicated directory (e.g. tools/), its auto-discovery does not cover that vendor tree. You must include extension.neon explicitly, the same way you would for phpstan-symfony or phpstan-doctrine:

All parameters have sensible defaults. Override only what differs from the defaults:

Available Rules


NoRepositoryMagicMethodRule — Doctrine

Forbids the use of generic and magic Doctrine repository methods in favor of explicit, named methods declared directly in the repository class.

Always reported:

Call Reason
$repo->findBy(['field' => $value]) Generic criteria array — create a named method
$repo->findOneBy(['field' => $value]) Generic criteria array — create a named method
$repo->findByFoo(…) Magic method via __call, not declared in the class
$repo->findOneByFoo(…) Magic method via __call, not declared in the class

Also reported in strict mode:

Call
$repo->find($id)
$repo->findAll()

Include:

Strict mode (optional):

Example — before / after:


ControllerInvokableRule — Symfony

Enforces structural and naming conventions on Symfony controllers.

Always reported:

Violation Description
Bad naming Class name does not follow {Domain}{HttpMethod}Controller (e.g. PeriodeCalculGetController)
Missing __invoke() Controller does not declare a __invoke() method
Public non-magic method Controller declares a public method other than magic ones (those starting with __)
Root placement Controller sits directly under the Controller namespace segment without a sub-namespace

Recognised HTTP methods: Get, Post, Put, Patch, Delete, Head, Options, Connect, Trace, Any.

Include:

Parameters (optional):

The excludedClassesFile is a PHP file that returns an array of fully-qualified class names to skip entirely. Changes (additions, removals) are picked up on the next PHPStan run without recompilation:

Example — before / after:


NamedArgumentsRule — PHP

Enforces named argument conventions on all function, method, static-method, and constructor calls.

Always reported:

Violation Description
Wrong order Named arguments are not in the same order as declared in the signature
Missing name An argument is passed positionally when named syntax is required

The order error includes both the expected and actual orderings:

The missing-name error is reported at the argument's line and names the corresponding parameter:

Calls to functions or methods that do not support named arguments (some C-extension functions) are silently skipped.

Include:

Parameters (optional):

Parameter Default Description
forceNamed true Require named arguments on all calls. When false, only the order check is active.
forceSingleRequired false When true, removes the exemption for callables that have only one required parameter (e.g. setTitle('foo') must become setTitle(title: 'foo')).

Example — before / after:


All versions of phpstan-edhrendal with dependencies

PHP Build Version
Package Version
Requires php Version >=8.5
ext-ctype Version *
phpstan/phpstan Version ~2.1.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package edhrendal-sf-tools/phpstan-edhrendal contains the following files

Loading the files please wait ...