PHPackages                             struggle-for-php/sfp-psalm-dont-operation-inside-constructor-plugin - 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. struggle-for-php/sfp-psalm-dont-operation-inside-constructor-plugin

ActivePsalm-plugin

struggle-for-php/sfp-psalm-dont-operation-inside-constructor-plugin
===================================================================

Dont' operation inside constructor

0.1.0(3y ago)21331[2 PRs](https://github.com/struggle-for-php/sfp-psalm-dont-operation-inside-constructor-plugin/pulls)MITPHPPHP ~8.1.0 || ~8.2.0

Since Mar 18Pushed 2y ago1 watchersCompare

[ Source](https://github.com/struggle-for-php/sfp-psalm-dont-operation-inside-constructor-plugin)[ Packagist](https://packagist.org/packages/struggle-for-php/sfp-psalm-dont-operation-inside-constructor-plugin)[ RSS](/packages/struggle-for-php-sfp-psalm-dont-operation-inside-constructor-plugin/feed)WikiDiscussions 0.2.x Synced 1mo ago

READMEChangelog (1)Dependencies (8)Versions (5)Used By (0)

Don't operation inside constructor!
===================================

[](#dont-operation-inside-constructor)

```
$ ./vendor/bin/psalm
Scanning files...
Analyzing files...

░░░░░░░░░░░░░

ERROR: MethodOperationInsideConstructorIssue - src/app/Controllers/BlogController.php:15:9 - 'SplFileInfo::openfile' not allowed inside __construct()
        $log->openFile('w+');

ERROR: MethodOperationInsideConstructorIssue - src/app/models/Model.php:26:13 - 'PDO::query' not allowed inside __construct()
            $this->pdo->query($query);

------------------------------
2 errors found
------------------------------

```

Features
--------

[](#features)

- check operation **resources**
    - resource operation function list is provided by [struggle-for-php/resource-operations](https://github.com/struggle-for-php/resource-operations)
    - fork of [sebastianbergmann/resource-operations](https://github.com/sebastianbergmann/resource-operations)

Todo
----

[](#todo)

- support flexible setting xml to mark vendor libraries

Disclaimer
----------

[](#disclaimer)

this plugin is very experimental status.

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

[](#installation)

```
$ composer require --dev struggle-for-php/sfp-psalm-dont-operation-inside-constructor-plugin:dev-master
$ vendor/bin/psalm-plugin enable struggle-for-php/sfp-psalm-dont-operation-inside-constructor-plugin

```

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 89.5% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

3

Last Release

1151d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/4eed2726ad1fce689a99672d965d8b4a387f030f08290e00708b66e4621139d2?d=identicon)[sasezaki](/maintainers/sasezaki)

---

Top Contributors

[![sasezaki](https://avatars.githubusercontent.com/u/42755?v=4)](https://github.com/sasezaki "sasezaki (17 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (2 commits)")

---

Tags

static analysispsalmpsalm-plugin

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/struggle-for-php-sfp-psalm-dont-operation-inside-constructor-plugin/health.svg)

```
[![Health](https://phpackages.com/badges/struggle-for-php-sfp-psalm-dont-operation-inside-constructor-plugin/health.svg)](https://phpackages.com/packages/struggle-for-php-sfp-psalm-dont-operation-inside-constructor-plugin)
```

###  Alternatives

[vimeo/psalm

A static analysis tool for finding errors in PHP applications

5.8k77.5M6.7k](/packages/vimeo-psalm)[psalm/plugin-laravel

Psalm plugin for Laravel

3274.9M308](/packages/psalm-plugin-laravel)[weirdan/doctrine-psalm-plugin

Stubs to let Psalm understand Doctrine better

876.9M50](/packages/weirdan-doctrine-psalm-plugin)[maglnet/composer-require-checker

CLI tool to analyze composer dependencies and verify that no unknown symbols are used in the sources of a package

99810.9M671](/packages/maglnet-composer-require-checker)[lctrs/psalm-psr-container-plugin

Let Psalm understand better psr11 containers

17648.1k13](/packages/lctrs-psalm-psr-container-plugin)[laraveldaily/filacheck

Static analysis for Filament projects - detect deprecated patterns and code issues

9016.5k](/packages/laraveldaily-filacheck)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
