Title: Fatal error: Cannot declare class WPConfigTransformer
Last modified: March 28, 2024

---

# Fatal error: Cannot declare class WPConfigTransformer

 *  Resolved [alexandernitsche](https://wordpress.org/support/users/alexandernitsche/)
 * (@alexandernitsche)
 * [2 years, 4 months ago](https://wordpress.org/support/topic/fatal-error-cannot-declare-class-wpconfigtransformer/)
 * Hi guys, thanks for your efforts. I want to give your plugin a try but the first
   thing i get is a fatal error, when using your plugin along with WP-CLI, and running
   some WP-CLI command like
   $ wp plugin listFatal error: Cannot declare class WPConfigTransformer,
   because the name is already in use in /opt/wordpress/wp-content/plugins/disable-
   automatic-updates-and-theme-editors/library/wp-config-transformer/src/WPConfigTransformer.
   php on line 6As you are loading a local copy of the WPConfigTransformer class
   in the global namespace, it probably conflicts with the WPConfigTransformer class
   of the WP-CLI. Maybe it would be better, to move your class to a specific namespace?

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Author [SaffireTech](https://wordpress.org/support/users/saffiretech/)
 * (@saffiretech)
 * [2 years, 4 months ago](https://wordpress.org/support/topic/fatal-error-cannot-declare-class-wpconfigtransformer/#post-17537946)
 * Hello [alexandernitsche](https://wordpress.org/support/users/alexandernitsche/),
 * Thank you for bringing this issue to our attention.
 * We have investigated the conflict between our plugin and WP-CLI, and we’ve resolved
   the problem by moving the WPConfigTransformer class to a specific namespace to
   avoid any future conflicts.
 * Please update to the latest version of our plugin, and the issue should be resolved.
   If you encounter any further problems or have any questions, please don’t hesitate
   to reach out.
 *  Plugin Author [SaffireTech](https://wordpress.org/support/users/saffiretech/)
 * (@saffiretech)
 * [2 years, 3 months ago](https://wordpress.org/support/topic/fatal-error-cannot-declare-class-wpconfigtransformer/#post-17684069)
 * Hi [alexandernitsche](https://wordpress.org/support/users/alexandernitsche/),
 * We are reaching out to confirm that the issue regarding WP-CLI has been resolved
   with the latest update we provided. We hope the solution has met your expectations
   and that everything is functioning smoothly.
 * Unless there are any further issues or additional questions, we will consider
   this ticket closed. However, if you encounter any related problems in the future
   or have any new inquiries, please do not hesitate to contact us. Our team is 
   always here to assist you.
 * Thank you for your cooperation and using our plugin!

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Fatal error: Cannot declare class WPConfigTransformer’ is closed to new
replies.

 * ![](https://ps.w.org/disable-automatic-updates-and-theme-editors/assets/icon-
   256x256.png?rev=2773428)
 * [Disable All WordPress Updates and Theme Editors](https://wordpress.org/plugins/disable-automatic-updates-and-theme-editors/)
 * [Support Threads](https://wordpress.org/support/plugin/disable-automatic-updates-and-theme-editors/)
 * [Active Topics](https://wordpress.org/support/plugin/disable-automatic-updates-and-theme-editors/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/disable-automatic-updates-and-theme-editors/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/disable-automatic-updates-and-theme-editors/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [SaffireTech](https://wordpress.org/support/users/saffiretech/)
 * Last activity: [2 years, 3 months ago](https://wordpress.org/support/topic/fatal-error-cannot-declare-class-wpconfigtransformer/#post-17684069)
 * Status: resolved