The post has been translated automatically. Original language: Russian
OpenIDE has released version 0.9.3 of the PHP for OpenIDE plugin, which expands the capabilities of the environment for PHP development.The update focuses on code analysis, remote debugging, working with types, and formatting.One of the main changes concerns the configuration of external code analyzers.PHPStan, Psalm, Mago, PHP_CodeSniffer, and PHP CS Fixer now have separate settings pages.For each tool, you can select the launch method, verification parameters, operating mode, and files or directories to exclude.
This makes it easier to use the same analysis rules within the development team.The analyzer design settings can now be stored in Git along with the rest of the project configuration.At the same time, the personal paths and the chosen PHP interpreter remain local and do not interfere with the settings of other developers.Analyzers can be run through the project interpreter, including when working with Docker and WSL.Checking the entire project launches all the included tools and takes into account changes in their configurations.
The remote debugging of PHP applications has also been significantly improved.DBGp proxy support is designed for teams where multiple developers can simultaneously work with one remote server.The proxy directs the required debugging session to a specific developer's IDE using the IDE key.This reduces the likelihood of conflicts when debugging the same environment in parallel.Separately, the mapping of local files to paths on remote servers and inside containers has been improved.
The mechanism works when running regular scripts, an embedded web server, and PHP Remote Debug.If the path is not found according to the first rule, the debugger checks the following options and, if unsuccessful, outputs the problematic path to the console.The IDE has become more accurate in defining variable types, taking into account the context of the PHP code.After the assert($x instanceof A) construct, the editor can propose methods of class A.Foreach and catch take into account the types of collection elements, keys, and exceptions.
Reassigning a value should also no longer leave the variable with an obsolete type.Auto-completion is now able to suggest a property name based on its type.The formatter has received minor improvements, for example, it automatically adds a space after converting the type to (int) $x.Together, the changes make working with PHP projects more convenient both for local development and when using remote environments and containers.For PHP developers, the OpenIDE update is primarily interesting for improved code diagnostics, more predictable debugging, and more accurate hints directly during program writing.
В OpenIDE вышла версия 0.9.3 плагина PHP for OpenIDE, которая расширяет возможности среды для PHP-разработки.Обновление сосредоточено на анализе кода, удалённой отладке, работе с типами и форматировании.Одно из основных изменений касается настройки внешних анализаторов кода.PHPStan, Psalm, Mago, PHP_CodeSniffer и PHP CS Fixer теперь получили отдельные страницы настроек.Для каждого инструмента можно выбрать способ запуска, параметры проверки, режим работы и исключаемые файлы или каталоги.
Это упрощает использование одинаковых правил анализа внутри команды разработки.Проектные настройки анализаторов теперь можно хранить в Git вместе с остальной конфигурацией проекта.При этом личные пути и выбранный PHP-интерпретатор остаются локальными и не мешают настройкам других разработчиков.Анализаторы можно запускать через интерпретатор проекта, в том числе при работе с Docker и WSL.Проверка всего проекта запускает все включённые инструменты и учитывает изменения в их конфигурациях.
Значительно доработана и удалённая отладка PHP-приложений.Поддержка DBGp-прокси рассчитана на команды, где несколько разработчиков могут одновременно работать с одним удалённым сервером.Прокси направляет нужную отладочную сессию в IDE конкретного разработчика с помощью IDE key.Это снижает вероятность конфликтов при параллельной отладке одного окружения.Отдельно улучшено сопоставление локальных файлов с путями на удалённых серверах и внутри контейнеров.
Механизм работает при запуске обычных скриптов, встроенного веб-сервера и PHP Remote Debug.Если путь не найден по первому правилу, отладчик проверяет следующие варианты и при неудаче выводит проблемный путь в консоль.IDE стала точнее определять типы переменных с учётом контекста PHP-кода.После конструкции assert($x instanceof A) редактор может предлагать методы класса A.В foreach и catch учитываются типы элементов коллекций, ключей и исключений.
Повторное присваивание значения также больше не должно оставлять у переменной устаревший тип.Автодополнение теперь способно предлагать имя свойства на основе его типа.Форматтер получил небольшие улучшения, например автоматически добавляет пробел после приведения типа в конструкции (int) $x.В совокупности изменения делают работу с PHP-проектами удобнее как при локальной разработке, так и при использовании удалённых окружений и контейнеров.Для PHP-разработчиков обновление OpenIDE прежде всего интересно улучшенной диагностикой кода, более предсказуемой отладкой и более точными подсказками непосредственно во время написания программы.