Download the PHP package jeffersongoncalves/filament-widget-configuration without Composer

On this page you can find all versions of the php package jeffersongoncalves/filament-widget-configuration. 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 filament-widget-configuration

![Filament Widget Configuration](https://raw.githubusercontent.com/jeffersongoncalves/filament-widget-configuration/3.x/art/jeffersongoncalves-filament-widget-configuration.png)

Filament Widget Configuration

Buy Me A Coffee

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

Configure Filament's widget polling interval and lazy-loading default once, globally, without editing every widget class by hand — while never touching a widget that already customizes either property itself.

Why this plugin exists

Filament hardcodes a default polling interval on every polling-capable widget (protected ?string $pollingInterval = '5s';) with no built-in way to change that default across an entire application. A PR adding a global Widget::configureUsing() hook for this was closed by the Filament maintainer, danharrin, because baking a global configureUsing() callback into core would silently override any widget's own customized $pollingInterval, with no clean way to preserve precedence.

This plugin solves the same problem from outside core, as an opt-in third-party plugin, with a precedence rule that never overrides a widget that has customized the behavior itself — the exact guarantee the upstream PR couldn't offer.

In a large project, changing the default polling interval or lazy-loading behavior otherwise means opening every single widget class by hand. This plugin lets you set both once, in config or in AppServiceProvider, and every widget that hasn't customized its own behavior inherits the new default automatically.

How the precedence rule works

Before overriding a property, the plugin checks — via ReflectionProperty::getDeclaringClass() — whether that property still comes from Filament's own base class/trait (Filament\Widgets\*, Filament\Support\*). If it does, it's safe to override. If a widget subclass has redeclared the property itself, its declaring class is that subclass, and the plugin leaves it untouched.

On Filament 5, $isLazy (CanBeLazy) is still a static property, so it's overridden once, at boot time, on Filament's base Widget class — every subclass that hasn't redeclared it inherits the new default for free. $pollingInterval (CanPoll), however, is a non-static instance property, so it can't be pre-set for an entire class hierarchy; instead, the plugin registers a Livewire ComponentHook that applies the resolved default to each widget instance individually, on mount/hydrate, using the same declaring-class check per instance.

Compatibility

Branch Filament
1.x 3.x
2.x 4.x
3.x 5.x

Installation

You can install the package via composer:

Optionally publish the config file:

Usage

By default the plugin auto-applies on every request using config/filament-widget-configuration.php — no panel wiring required.

Set polling_interval to null to disable polling by default across the app.

If you prefer to configure it in code, use WidgetConfigurationPlugin fluently — e.g. from AppServiceProvider::boot(), registered on your panel:

Fluent values always win over the config file. Either way, a widget that already sets its own $pollingInterval or $isLazy keeps its own value.

Testing

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.


All versions of filament-widget-configuration with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
filament/filament Version ^5.0
spatie/laravel-package-tools Version ^1.16
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 jeffersongoncalves/filament-widget-configuration contains the following files

Loading the files please wait ...