Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

bernhardh's avatar

Packages and assets - how to keep it up to date?

I want to create a package, which is basically some kind of admin panel for my projects. This package will be handled by composer and used in multiple projects.

How to deal with the assets/vuejs files? I know, that I can publish these files to the current project and then customize them to the current needs.

But how to handle updates to these files? When I find an error in a package vue file, I will need to manually fix it in every project, where I use it?

0 likes
2 replies
ChristophHarms's avatar

When you find an error in a package vue file, you fix it in the package, draft a new release and run composer update vendorname/packagename in your projects.

EDIT: Ah, nvm, I overlooked the part where you publish the assets. Those of course won't update when you update the vendor package. Hmm... i think there is no way to easily achieve that. I guess you'll just have to make sure your package is ready and without bugs before using it.

alanholmes's avatar

With Nova, it provides a command to publish its assets, which (I think) just replaces them.

If this is something that you are just including in your views, then that should be fine.

If its something that the user has to import into their app.js, then they would need to also rebuild their JS.

Please or to participate in this conversation.