Sublime Forum

PHP Codeformatter error

#1

Hello,
When trying to use the PHP Codeformatter I’m getting an error, unfortunately I can’t select the error message to paste here but I did take a screenshot.

Using: sublime-text-4180-1.x86_64
OS: Fedora 39

I’ve tried removing and re-downloading the codeformatter using the instructions here:
https://packagecontrol.io/packages/CodeFormatter

This has not had any effect.

All others work such as HTML, CSS, etc.

Thanks for any help on this.

0 Likes

#2

Hi. It seems this package relies on phpF, which has this bug from php 7.2 and on

I’d kindly suggest you to use https://github.com/driade/phpfmt8, which I’m the current maintainer. It relies on the same original source as phpF but upgraded to make it work with even php 8.

0 Likes

#3

trying to install it, doesn’t seem to appear in the package control list … i downloaded it and unzipped it in /home/warren/.config/sublime-text-3/Packages/ … i have Sublime Text 4192 installed but I still have the sublime-text-3 folder in my home/.config … I don’t see any sublime-text-4 folder, but I did check and I’m running 4192… not sure how to upgrade this package correctly. Any pointers would be appreciated.
Thanks

0 Likes

#4

Sublime Text 4 has its own configuration folder (sublime-text) but if that is not present it will use the sublime-text-3 folder, which allows for an easier migration from ST3 to ST4; in particular, you will only see the newer folder name in a fresh install of ST4 on a machine where ST3 was not already installed (or where its configuration was removed first).

I don’t know anything about the package itself though. In theory if you use package control to remove the one that does not work, it sounds like the new one should appear in the list, but if not it sounds like you have the correct location for it at least.

0 Likes