Windows republishes assets differently than Mac/Linux dev env, causing unintentional file modifications
Package
filament/filament
Package Version
v3.2.98
Laravel Version
v11.20.0
Livewire Version
v3.5.4
PHP Version
PHP 8.3.11
Problem description
When I composer install a Filament project in a WIndows environment, the php artisan filament:upgrade command that runs (set inside composer.json) republishes assets as expected, but it results in a bunch of versioned file changes of the public assets. In a Mac environment this doesn't happen. You shouldn't have to deal with code changes when just doing a composer install (think of devex environments like Codespaces). Then if you commit the changes from Windows, the next time a Mac env does a composer install now the assets are all changed again. So the republishing of assets causes this constant change set between different environments Mac vs Windows, which is annoying to deal with especially in the context of PR reviews etc.
Expected behavior
When you composer install for a project that is already setup for Filament, it should not change any files. When you do this from a Mac env there are not any file changes (as expected). When you do this from a Windows env, it's modifying assets which are already published (unexpected). These public assets should only be modified if Filament is actually upgraded to a new release version like in a composer update.
Steps to reproduce
In a Windows dev environment (either Herd or otherwise):
git clone https://github.com/filamentphp/demo.gitcd demo/composer install --ignore-platform-reqsgit status- notice all the unintentional file modifications in
public/js/filament/
Reproduction repository (issue will be closed if this is not valid)
https://github.com/filamentphp/demo.git
Relevant log output
modified: public/css/filament/forms/forms.css
modified: public/js/filament/filament/app.js
modified: public/js/filament/filament/echo.js
modified: public/js/filament/forms/components/color-picker.js
modified: public/js/filament/forms/components/date-time-picker.js
modified: public/js/filament/forms/components/file-upload.js
modified: public/js/filament/forms/components/key-value.js
modified: public/js/filament/forms/components/markdown-editor.js
modified: public/js/filament/forms/components/rich-editor.js
modified: public/js/filament/forms/components/select.js
modified: public/js/filament/forms/components/tags-input.js
modified: public/js/filament/forms/components/textarea.js
modified: public/js/filament/notifications/notifications.js
modified: public/js/filament/support/async-alpine.js
modified: public/js/filament/support/support.js
modified: public/js/filament/tables/components/table.js
modified: public/js/filament/widgets/components/chart.js
modified: public/js/filament/widgets/components/stats-overview/stat/chart.js
Donate 💰 to fund this issue
- You can donate funding to this issue. We receive the money once the issue is completed & confirmed by you.
- 100% of the funding will be distributed between the Filament core team to run all aspects of the project.
- Thank you in advance for helping us make maintenance sustainable!
Some people choose to .gitignore the assets, which is why we publish them on install. What are the file modifications that happen, do they contain valid changes?
Please let me know if my comment above does not solve the issue and I can reopen