Skip to content

Can disallow attributes

Compare
Choose a tag to compare
@spaze spaze released this 24 Apr 14:04
· 119 commits to main since this release
ad3a6d0

Can disallow attributes (#183)

This feature was sponsored by @ruudk @TicketSwap, thank you!

Can even re-allow them back with a config similar to re-allowing method calls (with allowIn, allowParamsAnywhereAnyValue, allowInMethods etc.).

This may be most useful in the following cases:

  1. You don't want to use some attributes in your project for whatever reason you may have
  2. You want to use attributes but only with some parameters specified, for example you'd like all Doctrine\ORM\Mapping\Entity attributes to have repositoryClass specified
  3. You want an attribute to be used only in some class

Attributes are available starting with PHP 8.0.

Smaller changes

  • Update dev dependencies, support PHPUnit 10 (#181)

I've also added a sponsorship button so you can buy me a ☕ or a 🍺 if this extension helps you in any way (#182)