Files Not Updating Properly After Git Pull

I'm working with a Laravel application that uses Filament and several packages like filament-shield and filament-exceptions. Everything works fine in my local development environment, but when I commit the changes to GitHub and pull them on the production server, some files don’t update correctly. For instance, my PanelAdminProvider file wasn't updated as expected, even though it works fine locally. Here are the steps I’m following: 1. I commit all my changes from the local environment to GitHub. 2. On the production server, I run git pull. 3. I execute composer install to make sure all dependencies are updated. Despite this, some changes don’t reflect properly. I suspect it might have something to do with files in /public/vendor not being updated as well. Also, here’s my .gitignore for reference:
/.phpunit.cache
/node_modules
/public/build
/public/hot
/public/storage
/storage/*.key
/storage
/vendor
.env
.env.backup
.env.production
.phpactor.json
.phpunit.result.cache
Homestead.json
Homestead.yaml
auth.json
npm-debug.log
yarn-error.log
/.fleet
/.idea
/.vscode
/.phpunit.cache
/node_modules
/public/build
/public/hot
/public/storage
/storage/*.key
/storage
/vendor
.env
.env.backup
.env.production
.phpactor.json
.phpunit.result.cache
Homestead.json
Homestead.yaml
auth.json
npm-debug.log
yarn-error.log
/.fleet
/.idea
/.vscode
Is there anything I'm missing in the deployment process, especially with regard to the /public/vendor folder or file permissions? What additional steps should I take to ensure all changes are properly deployed and reflected on the production server? Also, my local ambient is Windows but my production server is in Linux
Solution:
ok. got it it was the filament cache php artisan filament:clear-cache-components < made it work...
Jump to solution
15 Replies
toeknee
toeknee2mo ago
Check it was committed on github Check you restart php-fpm if in use check the file was changed on the server
Fabio Carvalho
Fabio CarvalhoOP2mo ago
The files that didn't changed like inside vendor isn't updated on our File Manager
toeknee
toeknee2mo ago
So vendor shouldn't changer ever. It sounds like you are not updating composer which would change your vendor files.
Fabio Carvalho
Fabio CarvalhoOP2mo ago
How I should update the composer? I mean I used "composer install" after the git pull As example: I've changed the "AdminPanelProvider"... After the "composer install" it should transmit the changes to the server right? Or i need to change the file of composer.json to fix something?
toeknee
toeknee2mo ago
Did you change the AdminPanelProvider in the /app/Providers/Filament/
Fabio Carvalho
Fabio CarvalhoOP2mo ago
Yep
toeknee
toeknee2mo ago
and the server runs: git fetch origin git pull origin main assuming you are using remote git 'origin' and branch 'main'
Fabio Carvalho
Fabio CarvalhoOP2mo ago
Yes, look
* branch main -> FETCH_HEAD
Already up to date.
* branch main -> FETCH_HEAD
Already up to date.
toeknee
toeknee2mo ago
and then you are pulling it in?
Fabio Carvalho
Fabio CarvalhoOP2mo ago
What you mean?
toeknee
toeknee2mo ago
Thats the fetch then to merge the code you run git pull origin main
Fabio Carvalho
Fabio CarvalhoOP2mo ago
It was the git pull rn I tried to pull again and it said that it's already up to date
toeknee
toeknee2mo ago
Check it's on git...
Fabio Carvalho
Fabio CarvalhoOP2mo ago
It's updated on github The file in Github, in localhost and in my server is correct, tho it isn't working
Solution
Fabio Carvalho
Fabio Carvalho2mo ago
ok. got it it was the filament cache php artisan filament:clear-cache-components < made it work
Want results from more Discord servers?
Add your server