Skip to content

1.0.0

Choose a tag to compare

@janedbal janedbal released this 08 Apr 11:00
· 81 commits to master since this release
Immutable release. Only release title and notes can be modified.
dd909a6

Stable version!

  • Detection of all dead members is implemented and stable!
    • Dead methods, constants, enum cases and properties
  • Thus, no more BC breaks in extension points are expected
  • It took ~4 years of development

Performance improvements

  • Result cache offloaded to own cache (#319)
    • Analysis reusing cache:
      • up to ~40% less memory
      • up to ~40% faster
    • Result cache size: decreased by ~55%

New features:

  • Fully new Laravel support (#294)
    • Route registration — Route::get(), post(), put(), patch(), delete(), any(), match(), resource(), apiResource()
      • Callable array syntax: [Controller::class, 'method']
      • Legacy string syntax: 'Controller@method'
      • Invokable controllers: Controller::class
    • Event listeners — Event::listen(), Event::subscribe()
    • Auto-discovered event listeners — classes with handle* methods whose first parameter has a class type
    • Scheduled jobs — Schedule::job()
    • Gate definitions — Gate::define() (callable + invokable), Gate::policy()
    • Policy resolution — $this->authorize() calls resolve policy class via Laravel's namespace convention (Models\Policies\)
    • Console commands — __construct, handle on Illuminate\Console\Command subclasses
    • Jobs — __construct, handle, failed, middleware, retryUntil, uniqueId, tags, backoff, uniqueVia, displayName on ShouldQueue / Dispatchable classes
    • Service providers — __construct, register, boot
    • Middleware — handle, terminate, __construct (detected by first parameter type Illuminate\Http\Request)
    • Notifications — via, toMail, toArray, toDatabase, toBroadcast, toVonage, toSlack
    • Form requests — authorize, rules, messages, attributes, prepareForValidation, passedValidation, failedValidation, failedAuthorization
    • Policies — before, viewAny, view, create, update, delete, restore, forceDelete (heuristic via \Policies\ namespace + Policy suffix)
    • Mailables — build, content, envelope, attachments, headers
    • Broadcast events — broadcastWith, broadcastAs, broadcastWhen
    • JSON resources — paginationInformation
    • Notifiable routing — routeNotificationFor* methods
    • Eloquent features:
      • Model methods — constructor, boot, booted, casts, newFactory
      • Query scopes — scope* methods
      • Relationships — methods returning Illuminate\Database\Eloquent\Relations\*
      • Attribute accessors — methods returning Illuminate\Database\Eloquent\Casts\Attribute
      • Legacy accessors/mutators — get*Attribute() / set*Attribute()
      • Observers — Model::observe() calls + #[ObservedBy] attribute (all observer event methods)
      • Factories — definition, configure
      • Seeders — run
      • Migrations — up, down
  • Symfony improvements
    • #[Autoconfigure(constructor:, calls:)], #[AutowireCallable], #[TaggedIterator], #[TaggedLocator], #[Required] on properties, #[AsSchedule], #[AsCronTask], #[AsPeriodicTask], !php/enum references in config yamls (#317)
    • Allow explicit containerXmlPaths configuration - no need for phpstan/phpstan-doctrine for DIC calls analysis (#325)
    • Symfony UX support: #[AsTwigComponent]/#[AsLiveComponent] (constructor, mount()), #[LiveProp], #[LiveAction], #[LiveListener], lifecycle hooks (#329)
  • Reflection improvements
    • support member constructors like new ReflectionMethod(Class, 'method') (#313)

Dependencies:

  • Requires PHP ^8.1 (was ^7.4) (#296)
  • Requires phpstan/phpstan ^2.1.41, (was ^2.1.23) (#297)