Sublime Text can be an efficient PHP editor when language services and project commands are configured deliberately.
This guide focuses on a plain PHP workflow and can be adapted to framework-based projects where the same tools apply.
Install and open a project folder
Install Sublime Text from its official distribution and open the project root as a folder. Use a project file when you need workspace-specific settings. Confirm that the system terminal resolves to the intended PHP 8.4 executable.
Add language tooling selectively
Use Package Control to discover PHP-related packages for syntax, completion, navigation, or formatting. Check package maintenance, compatibility, publisher information, and documentation. Avoid installing several packages that provide the same language-server feature.
Configure linting and formatting
Use the project’s PHP linter and formatter from the command line or through a maintained package integration. Keep the formatter configuration in the repository so every developer and CI job applies the same rules. Test formatting on a small set of files before running it across the codebase.
Run Composer and tests
Use Sublime’s build-system features or an external terminal to run composer validate, composer install, and the project’s PHPUnit command. Ensure the working directory is the project root and the build system uses the intended PHP executable.
Know the trade-offs
A lightweight editor may require more manual setup for refactoring, deep project indexing, and integrated debugging than a PHP-focused IDE. If those capabilities are essential, compare the effort of maintaining packages with the integrated workflow offered by an IDE.
Practical verification checklist
- Confirm the editor uses the intended PHP 8.4 executable.
- Open the repository root and verify Composer dependencies.
- Run PHP linting and the project’s automated tests.
- Check that editor diagnostics match command-line results.
- Keep local credentials and production data out of the workspace.
Conclusion
Sublime Text works best when the developer values speed and a focused interface and is comfortable relying on external tools for some PHP workflows. Keep project checks reproducible outside the editor.