Composer Dependency Changed PHP 8.x PR-5.3-dev Pending

User tests: Successful: Unsuccessful:

avatar richard67
richard67
2 Feb 2025

Pull Request for Issue # .

Summary of Changes

This pull request updates the debug bar from version 1.23.0 to version 2.1.0 and adjust the CMS to the rename of the package from "maximebf/debugbar" to "php-debugbar/php-debugbar", which happened with version 2.0.0.

This will also fix the PHP 8.4 deprecation currently caused by the debug bar. It would have been sufficient to update to version 1.23.5 for that, but then we would stick with that during the complete life time of Joomla 5.3, that's why I think this update has to be made now to the current version for the upcoming 5.3.0-beta1.

Due to the rename, the location of the package in the "libraries/vendor" folder has changed, but there were no classes renamed, so the code is fully b/c.

In detail this PR makes following changes:

  • composer remove maximebf/debugbar
  • composer require php-debugbar/php-debugbar
  • Adapt the build/build-modules-js/init/cleanup-media.mjs script to the changed location of debugbar resources.
  • Removed obsolete clean up of developer artifacts from the build/build.php script.
  • Add files and folders of the old location to the lists of files and folders to be deleted on update in the administrator/components/com_admin/script.php script.

All changes of the package from 1.23.0 to 2.1.0: php-debugbar/php-debugbar@v1.23.0...v2.1.0

Release notes:

Testing Instructions

Test 1: Check that the debug bar works as before

The best way to check if everything continues to work as before is to have 2 testing sites, one current 5.3-dev branch or nightly build, and another one with this PR applied. For the latter you can make a new installation using the patched package created by Drone for this PR, which can be found here https://artifacts.joomla.org/drone/joomla/joomla-cms/5.3-dev/44806/downloads/81802/ .

Then you can use both sites in 2 browser windows and compare the debug bar behaviour.

Enable "Debug System" in Global Configuration and set "Error Reporting" to "Maximum".

Then use all features of the debug bar.

Change some option of the "System - Debug" plugin, e.g. enable previously disabled options or vice versa, and check the result in the debug bar.

Always have an eye on the browser console in your browser's development tools to see that no new javascript errors are introduced by this PR.

Test 2: Update CMS with enabled debug bar

Have a current 5.3-dev branch or nightly build or 5.3.0-alpha3 or any older Joomla site without this PR applied.

If you have executed Test 1 before, you can the first mentioned site of that test which doesn't have this PR applied.

Make sure that "Debug System" is enabled in Global Configuration, and "Error Reporting" is set to "Maximum"

Now update that site to the patched package created by Drone for this PR, either by downloading the patched package and using "Upload & Update" or by using the custom update URL provided by Drone, which can be found here https://artifacts.joomla.org/drone/joomla/joomla-cms/5.3-dev/44806/downloads/81802/ .

Make sure that during the update no errors happen.

After the update, the debug bur continues to work.

Check that the libraries/vendor/maximebf folder has been deleted.

Actual result BEFORE applying this Pull Request

The debug bar works, possibly with some issues, but it uses an outdated package dependency so it will not receive any updates.

Expected result AFTER applying this Pull Request

The debug bar works as before, possibly with the same issues if they are caused by the code of our debug plugin or haven't been fixed upstream.

The dependency has been changed to the new package name so we will be able to update it in future.

When updating from a current 5.3-dev branch or nightly build or 5.3.0-alpha3 or older to the patched package for this PR, the files and folders of the old package are deleted.

When during that update the debug bar is enabled, it continues to work, there is no glitch.

Link to documentations

Please select:

  • Documentation link for docs.joomla.org:

  • No documentation changes for docs.joomla.org needed

  • Pull Request link for manual.joomla.org:

  • No documentation changes for manual.joomla.org needed

avatar richard67 richard67 - open - 2 Feb 2025
avatar richard67 richard67 - change - 2 Feb 2025
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 2 Feb 2025
Category Administration com_admin JavaScript Repository External Library Composer Change
avatar richard67 richard67 - change - 2 Feb 2025
The description was changed
avatar richard67 richard67 - edited - 2 Feb 2025
avatar richard67 richard67 - change - 2 Feb 2025
The description was changed
avatar richard67 richard67 - edited - 2 Feb 2025
avatar richard67 richard67 - change - 2 Feb 2025
The description was changed
avatar richard67 richard67 - edited - 2 Feb 2025
avatar richard67 richard67 - change - 2 Feb 2025
The description was changed
avatar richard67 richard67 - edited - 2 Feb 2025
avatar richard67 richard67 - change - 2 Feb 2025
The description was changed
avatar richard67 richard67 - edited - 2 Feb 2025
avatar richard67 richard67 - change - 2 Feb 2025
The description was changed
avatar richard67 richard67 - edited - 2 Feb 2025
avatar richard67 richard67 - change - 2 Feb 2025
The description was changed
avatar richard67 richard67 - edited - 2 Feb 2025
avatar richard67 richard67 - change - 2 Feb 2025
The description was changed
avatar richard67 richard67 - edited - 2 Feb 2025
avatar richard67 richard67 - change - 3 Feb 2025
Labels Added: Composer Dependency Changed PHP 8.x PR-5.3-dev
avatar richard67 richard67 - change - 3 Feb 2025
The description was changed
avatar richard67 richard67 - edited - 3 Feb 2025
avatar richard67 richard67 - change - 3 Feb 2025
The description was changed
avatar richard67 richard67 - edited - 3 Feb 2025
avatar laoneo laoneo - change - 3 Feb 2025
Status Pending Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2025-02-03 16:05:59
Closed_By laoneo
avatar laoneo laoneo - close - 3 Feb 2025
avatar laoneo laoneo - merge - 3 Feb 2025
avatar laoneo
laoneo - comment - 3 Feb 2025

Thanks!

Add a Comment

Login with GitHub to post a comment