Remove publishing of public assets #5619
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The commit removes the automatic publishing of Backpack's public assets during the
backpack:install -q -n
command. This change ensures that asset deployment is only handled by thebackpack:publish-header-metas
command, as intended. See #5552 (comment)WHY
BEFORE - What was wrong? What was happening before this PR?
Previously, when running the
backpack:install -q -n
command, public assets were automatically deployed to thepublic/
directory, even though this was not desired. This behavior led to unnecessary asset installation during the general installation process, which was redundant and could cause conflicts with other commands likebackpack:publish-header-metas
.AFTER - What is happening after this PR?
After this PR, the
backpack:install -q -n
command no longer deploys public assets by default. The responsibility for asset deployment now lies solely with thebackpack:publish-header-metas
command, giving developers more control over when and where assets are deployed.HOW
How did you achieve that, in technical terms?
I removed the logic responsible for publishing the public assets from the
backpack:install
command in theBackpackServiceProvider
class. This ensures that assets are no longer automatically published during the installation process.Is it a breaking change?
No, this is not a breaking change. The change simply prevents unwanted asset deployment during the installation process. The
backpack:publish-header-metas
command should be used for asset deployment instead.How can we test the before & after?
To test before the PR:
php artisan backpack:install -q -n
command.public/
directory and observe that public assets are automatically installed.To test after the PR:
php artisan backpack:install -q -n
command.public/
directory and confirm that no assets are installed.php artisan backpack:publish-header-metas
command.public/
directory.--
cc @pxpm