-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Allow to deprecate WebAssets #40385
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow to deprecate WebAssets #40385
Conversation
|
Just checking that this shows up in the debug plugin - as we're already in the renderer. |
|
Should be there, at least was in my test :) |
|
We already have a use case for this PR. When it will be merged, we would have to add the deprecated flag and string to the 2 assets here: https://github.com/joomla/joomla-cms/blob/4.3-dev/build/media_source/com_templates/joomla.asset.json#L8-L31 They had been restored with my PR #39431 in the 4.3-dev branch, and in 5.0-dev they have will deleted when my PR #40302 gets merged, so the deprecation message would be for 5.0, or for 6.0 if my PR gets postponed until 6.0. Maybe it would make sense to add that deprecation for the 2 assets to this PR here, so it can be tested with that use case? |
|
Added :) |
|
@Fedik A question regarding dependencies: Does the |
|
Ignore that dependency. In this case all |
|
@Fedik But just for my understanding: Which one depends on which other one in that case? |
It is vice versa, But, in current case they work each "stand alone", no real dependency. The depndency here means when User use |
|
@Fedik So with your change users of old and new browsers both will cause the deprecated message in the log? |
|
Only When we delete But yes, both users wil see that message. |
|
I have tested this item ✅ successfully on 37c8839 I've created an override in the Atum template for the "administrator/components/com_templates/tmpl/template/default.php" file. Then I have added a line Then with the PR applied I have verified that whenever I open the file editor view of the template manager, the deprecated message added by this PR to the asset is correctly logged in the "administrator/logs/deprecated.php" and also shown in the "Deprecated" tab of the debug bar if debug is enabled. Finally I have verified that the new deprecated log does not happen when "Log deprecated" is switched off. This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/40385. |
|
Thanks! |
Summary of Changes
Add a posibility to mark asset as Deprecated, with optional description
See joomla/schemas#15
Testing Instructions
Apply patch.
Edit
media/system/joomla.asset.json, add to "core" asset:Enable Debug, and deprecation loging.
Open any page, and check the logs.
Actual result BEFORE applying this Pull Request
Nothing
Expected result AFTER applying this Pull Request
There should be an message of deprecated asset "core"
Link to documentations
Please select: