Skip to content

Upgrade package to support Filament v4#2

Draft
Copilot wants to merge 3 commits into3.xfrom
copilot/upgrade-package-support-filament-v4
Draft

Upgrade package to support Filament v4#2
Copilot wants to merge 3 commits into3.xfrom
copilot/upgrade-package-support-filament-v4

Conversation

Copy link

Copilot AI commented Oct 20, 2025

This PR upgrades the filament-advancedfilter package to support Filament v4, addressing the requirement for PHP 8.2+ and the latest Filament release.

Changes

Dependencies (composer.json)

  • PHP requirement: Updated from ^8.0 to ^8.2 (required by Filament v4)
  • Filament dependency: Updated from ^3.0.0 to ^4.0

Documentation (README.md)

  • Added note about using the 3.x branch for Filament 3.x users
  • Updated installation instructions to reference version ^4.0

Code Updates (src/Concerns/HasClauses.php)

  • Deprecated method replaced: Changed disableLabel() to hiddenLabel() (deprecated in Filament v4)

Compatibility

The package code is fully compatible with Filament v4. One deprecated method was identified and updated:

  • BaseFilter class and all methods (indicateUsing, hasQueryModificationCallback, getFormSchema, etc.)
  • HasRelationship trait
  • ✅ All Filament Form components (TextInput, DatePicker, Select, etc.)
  • ✅ Filter concerns and traits
  • ✅ Updated disableLabel()hiddenLabel() per Filament v4 deprecations

Internal Deprecated Methods

The package maintains its own deprecated methods for backward compatibility:

  • column() → use attribute() instead
  • getColumn() → use getAttribute() instead

These are internal to the package and kept for users migrating from older versions.

Migration Path

Users upgrading from Filament v3 to v4 can simply update their composer dependencies:

composer require webbingbrasil/filament-advancedfilter "^4.0"

Existing filter implementations will continue to work without modification.

Original prompt

Upgrade this package to support filament v4


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: ziming <679513+ziming@users.noreply.github.com>
Copilot AI changed the title [WIP] Upgrade package to support filament v4 Upgrade package to support Filament v4 Oct 20, 2025
Copilot AI requested a review from ziming October 20, 2025 05:11
@ziming
Copy link
Owner

ziming commented Oct 20, 2025

@copilot what about the readme?

Copy link
Author

Copilot AI commented Oct 20, 2025

@copilot what about the readme?

I updated the README to:

  • Add a note about using the 3.x branch for Filament 3.x users
  • Update installation requirements from "filament >= 3.x" to "filament >= 4.x"
  • Update the composer command from "^3.0" to "^4.0"

I notice the screenshot URL on line 4 still points to the 3.x branch. Should I update it to point to a different branch (e.g., 4.x or main)?

@ziming
Copy link
Owner

ziming commented Oct 20, 2025

@copilot any deprecated code?

Co-authored-by: ziming <679513+ziming@users.noreply.github.com>
Copy link
Author

Copilot AI commented Oct 20, 2025

@copilot any deprecated code?

Found and replaced one deprecated method: disableLabel()hiddenLabel() in src/Concerns/HasClauses.php (line 89). This is the only Filament v4 deprecated code in the package.

The package also has its own internal deprecated methods (column() and getColumn()), but these are kept for backward compatibility and don't need to be removed.

Fixed in commit c87d5c5.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants