Skip to content

Releases: boundwize/structarmed

Released: StructArmed 0.15.0

Choose a tag to compare

@samsonasik samsonasik released this 19 Jul 05:17
0.15.0
f11addd

ci build PHPStan

This release introduces Boundwize\StructArmed\Rule\ExtendedClassAwareRuleInterface.

A marker that lets a rule know whether the class it's evaluating is extended by another scanned class, and applies it to Boundwize\StructArmed\Rule\Rules\Class_\MustBeFinalRule.

Using interface in custom rule:

use Boundwize\StructArmed\Analyser\ClassNode;
use Boundwize\StructArmed\Rule\ExtendedClassAwareRuleInterface;
use Boundwize\StructArmed\Rule\RuleViolation;

final readonly class MyRule implements ExtendedClassAwareRuleInterface
{
    public function appliesTo(ClassNode $classNode): bool
    {
        return $classNode->isClass();
    }

    public function evaluate(ClassNode $classNode): ?RuleViolation
    {
        // Skip classes that another scanned class extends.
        if ($classNode->isExtended) {
            return null;
        }

        // other check ...

        return new RuleViolation(
            ...
        );
    }
}

What's Changed

  • feat: add ExtendedClassAwareRuleInterface to detect extended classes by @samsonasik in #219

Full Changelog: 0.14.20...0.15.0

Released: StructArmed 0.14.20

Choose a tag to compare

@samsonasik samsonasik released this 19 Jul 03:02
0.14.20
11631b6

ci build PHPStan

What's Changed

  • fix: treat die and exit as aliases in MayNotUseLanguageConstructRule by @samsonasik in #218

Full Changelog: 0.14.19...0.14.20

Released: StructArmed 0.14.19

Choose a tag to compare

@samsonasik samsonasik released this 19 Jul 01:52
0.14.19
0e9f250

ci build PHPStan

What's Changed

  • fix: recognize define() as a PSR-1 constant symbol, not a side effect by @samsonasik in #217

Full Changelog: 0.14.18...0.14.19

Released: StructArmed 0.14.18

Choose a tag to compare

@samsonasik samsonasik released this 18 Jul 11:50
0.14.18
2f7c032

ci build PHPStan

What's Changed

  • fix(Psr1PhpTagsRule): add separator after <?php for short tags followed by code by @samsonasik in #216

Full Changelog: 0.14.17...0.14.18

Released: StructArmed 0.14.17

Choose a tag to compare

@samsonasik samsonasik released this 18 Jul 10:16
0.14.17
c0e0688

ci build PHPStan

What's Changed

  • Bump Pyrameter to ^0.5 by @samsonasik in #211
  • Add test for aggregate anonymous function complexity into parent class method by @samsonasik in #213
  • test: collect import used only in docblock as dependency by @samsonasik in #214
  • Fix missing PSR-12 and PSR-15 presets in CLI help by @samsonasik in #215

Full Changelog: 0.14.16...0.14.17

Released: StructArmed 0.14.16

Choose a tag to compare

@samsonasik samsonasik released this 14 Jul 12:42
0.14.16
7e5a00e

ci build PHPStan

What's Changed

  • [perf] Reduce runtime instanceof check on loop violations on Analyser by @samsonasik in #207
  • [perf] Memoize class methods in ClassCollector to avoid repeated AST scans by @samsonasik in #208
  • Fix false return-type violation for __destruct() by @samsonasik in #209

Full Changelog: 0.14.15...0.14.16

Released: StructArmed 0.14.15

Choose a tag to compare

@samsonasik samsonasik released this 11 Jul 08:46
0.14.15
14eb20f

ci build PHPStan

What's Changed

  • [psr1] Handle no space after <? on Psr1PhpTagsRule by @samsonasik in #206

Full Changelog: 0.14.14...0.14.15

Released: StructArmed 0.14.14

Choose a tag to compare

@samsonasik samsonasik released this 11 Jul 08:21
0.14.14
85849ac

ci build PHPStan

What's Changed

  • [psr1] Fix XML declarations misidentified as PHP short tags by @samsonasik in #205

Full Changelog: 0.14.13...0.14.14

Released: StructArmed 0.14.13

Choose a tag to compare

@samsonasik samsonasik released this 11 Jul 02:19
0.14.13
3239f42

ci build PHPStan

What's Changed

  • Fix short PHP tag line detection in multiline inline HTML by @samsonasik in #204

Full Changelog: 0.14.12...0.14.13

Released: StructArmed 0.14.12

Choose a tag to compare

@samsonasik samsonasik released this 10 Jul 18:33
0.14.12
4d6d95f

ci build PHPStan

What's Changed

Full Changelog: 0.14.11...0.14.12