VSCode-Anywhere
  • Introduction
  • Installation
    • Requirements
      • Windows requirements
      • Linux requirements
      • MacOS requirements
    • Quickstart
    • Advanced
      • Windows installation
      • Linux installation
      • MacOS installation
  • Modules
    • Module installation
    • Module update
    • Module settings
      • Global settings
        • brew settings
        • chocolatey settings
        • env settings
        • msys2 settings
        • nix settings
        • scoop settings
        • vscode settings
        • zeal settings
    • Modules list
      • Ansible
      • Bash
      • C / C++
      • C#
      • Custom
      • Deepcode
      • Docker
      • Fonts
      • Git
      • Go
      • HTML
      • Java
      • JavaScript / TypeScript
      • Markdown
      • Perl
      • PHP
      • Platformio
      • PowerShell
      • Puppet
      • Python2
      • Python3
      • Remote
      • Rest
      • ReStructuredText
      • Ruby
      • Saltstack
      • VSCode
    • Custom modules
  • Structure
    • apps
    • conf
      • saltstack
        • conf-offline
        • conf
        • pillar
        • states
    • tools
      • env
      • install
      • link
      • update
      • vscode
      • vscode-anywhere
  • Tutorials
    • Youtube tutorials
  • Release notes
    • V2
      • V2.0.0
    • V1
  • FAQ
Powered by GitBook
On this page
  • About
  • Installation
  • Requirements
  • VSCode
  • VSCode extensions
  • VSCode settings
  • VSCode keybindings
  • Software
  • Windows software
  • Linux software
  • MacOS software
  • Documentation
  • VSCode-Anywhere
  • Environment
  • Specific settings

Was this helpful?

  1. Modules
  2. Modules list

PHP

PreviousPerlNextPlatformio

Last updated 4 years ago

Was this helpful?

About

is a popular general-purpose scripting language that is especially suited to web development.

Installation

vscode-anywhere:
    php:
        enabled: True

Requirements

No requirements.

VSCode

VSCode extensions

bmewburn.vscode-intelephense-client

felixfbecker.php-debug

junstyle.php-cs-fixer

ikappas.phpcs

MehediDracula.php-namespace-resolver

brapifra.phpserver

ecodes.vscode-phpmd

recca0120.vscode-phpunit

VSCode settings

Global settings

{
    "php.suggest.basic": false,
    "[php]": {
        "editor.defaultFormatter": "bmewburn.vscode-intelephense-client"
    }
}

Windows settings

{
    "php.validate.executablePath": "C:\\VSCode-Anywhere\\apps\\scoop\\apps\\php\\current\\php.exe",
    "phpserver.phpPath": "C:\\VSCode-Anywhere\\apps\\scoop\\apps\\php\\current\\php.exe",
    "php-cs-fixer.executablePathWindows": "C:\\VSCode-Anywhere\\apps\\scoop\\\persist\\composer\\install\\vendor\\bin\\php-cs-fixer.bat",
    "phpcs.executablePath": "C:\\VSCode-Anywhere\\apps\\scoop\\persist\\composer\\install\\vendor\\bin\\phpcs.bat",
    "phpunit.php": "C:\\VSCode-Anywhere\\apps\\scoop\\apps\\php\\current\\php.exe",
    "phpunit.phpunit": "C:\\VSCode-Anywhere\\apps\\scoop\\persist\\composer\\install\\vendor\\bin\\phpunit.bat"
}

Assuming you have installed in the default directory C:\VSCode-Anywhere.

Linux settings

{
    "php.validate.executablePath": "/home/linuxbrew/.linuxbrew/bin/php",
    "phpserver.phpPath": "/home/linuxbrew/.linuxbrew/bin/php",
    "php-cs-fixer.executablePath": "/home/myuser/VSCode-Anywhere/apps/vscode-anywhere/php/composer/install/vendor/bin/php-cs-fixer",
    "phpcs.executablePath": "/home/myuser/VSCode-Anywhere/apps/vscode-anywhere/php/composer/install/vendor/bin/phpcs",
    "phpunit.php": "/home/linuxbrew/.linuxbrew/bin/php",
    "phpunit.phpunit": "/home/myuser/VSCode-Anywhere/apps/vscode-anywhere/php/composer/install/vendor/bin/phpunit"
}

Assuming you have installed in the directory /home/myuser/VSCode-Anywhere.

VSCode keybindings

Software

Windows software

scoop

Linux software

nix

MacOS software

brew

Documentation

VSCode-Anywhere

Environment

Windows environment

PATH: C:\VSCode-Anywhere\apps\scoop\apps\composer\current\home\vendor\bin
COMPOSER_HOME: C:\VSCode-Anywhere\apps\scoop\persist\composer\home
PHP_INI_SCAN_DIR: C:\VSCode-Anywhere\apps\scoop\apps\php\current\cli;C:\VSCode-Anywhere\apps\scoop\apps\php\current\cli\conf.d

Assuming you have installed in the default directory C:\VSCode-Anywhere.

Linux environment

    PATH: /home/myuser/VSCode-Anywhere/apps/vscode-anywhere/php/composer/home/vendor/bin
    COMPOSER_HOME: /home/myuser/VSCode-Anywhere/apps/vscode-anywhere/php/composer/home

Assuming you have installed in the directory /home/myuser/VSCode-Anywhere.

Specific settings

extensions

This is a simple list of extensions to enable in PHP.

  • Windows

  vscode-anywhere:
    php:
      extensions:
        - openssl

composer

  • pkgs: name of the packages to install

    • enabled: True to enable, False to skip (default to False)

    • version: the version of the composer package

  • opts

opts is not mandatory but allows to pass additional arguments.

Global opts packages settings:

  • composer:pkgs:opts:global: allow passing arguments to all composer packages when installing, updating, or uninstalling a package

  • composer:pkgs:opts:uninstall: not yet implemented

Specific opts packages settings:

  • composer:pkgs:<mypkg>:opts:global: allow passing arguments to <mypkg> composer package when installing, updating, or uninstalling the package

  • composer:pkgs:<mypkg>:opts:uninstall: not yet implemented

  • global:

vscode-anywhere:
  php:
    enabled: True
    composer:
      opts:
        global: {}
        install: {}
        update: {}
      pkgs:
        squizlabs/php_codesniffer:
          enabled: True
          version: '@stable'
        phpunit/phpunit:
          enabled: True
          version: '@stable'
        friendsofphp/php-cs-fixer:
          enabled: True
          version: '@stable'
  • Windows:

vscode-anywhere:
  php:
    enabled: True
    composer:
      json: C:\VSCode-Anywhere\apps\scoop\persist\composer\install\composer.json
      opts:
        global:
          php: C:\VSCode-Anywhere\apps\scoop\scoop\apps\php\current\php.exe
          composer: C:\VSCode-Anywhere\apps\scoop\apps\composer\current\composer.phar
          composer_home: C:\VSCode-Anywhere\apps\scoop\persist\composer\home
          env:
            - PHP_INI_SCAN_DIR: C:\VSCode-Anywhere\apps\scoop\apps\php\current\cli;C:\VSCode-Anywhere\apps\scoop\apps\php\current\cli\conf.d
        install: {}
        update: {}

Assuming you have installed in the default directory C:\VSCode-Anywhere.

  • Linux:

vscode-anywhere:
  php:
    composer:
      json: /home/myuser/VSCode-Anywhere/apps/vscode-anywhere/php/composer/install/composer.json
      opts:
        global:
          composer: /home/linuxbrew/.linuxbrew/bin/composer
          composer_home: /home/myuser/VSCode-Anywhere/apps/vscode-anywhere/php/composer/home
        install: {}
        update: {}

Assuming you have installed in the directory /home/myuser/VSCode-Anywhere.

pecl

  • pkgs: name of the extension to install

    • enabled: True to enable, False to skip (default to False)

    • version: the version of the pecl extension

  • opts

opts is not mandatory but allows to pass additional arguments.

Global opts packages settings:

  • pecl:pkgs:opts:global: allow passing arguments to all pecl packages when installing, updating, or uninstalling a package

  • pecl:pkgs:opts:update: not yet implemented

  • pecl:pkgs:opts:uninstall: not yet implemented

Specific opts packages settings:

  • pecl:pkgs:<mypkg>:opts:global: allow passing arguments to <mypkg> pecl package when installing, updating, or uninstalling the package

  • pecl:pkgs:<mypkg>:opts:update: not yet implemented

  • pecl:pkgs:<mypkg>:opts:uninstall: not yet implemented

Replace <mypkg> by the name of the package to install.

  • global:

vscode-anywhere:
  php:
    enabled: True
    pecl:
      opts:
        global: {}
        install: {}
        update: {}
      pkgs: {}
  • Linux:

vscode-anywhere:
  php:
    enabled: True
    pecl:
      pkgs:
        xdebug:
          enabled: True
          version: null
          opts:
            install: {}
            update: {}
            uninstall: {}

Change enable from False to True in the php section (cf ).

You can also take a look at the .

For more details read the .

This provides PHP IntelliSense for Visual Studio Code.

This is a PHP debugger adapter for Visual Studio Code.

This provides command.

This extension permits to the PHP code.

This is a linter plugin for Visual Studio Code that provides an interface to .

can import and expand your class. You can also sort your imported classes by line length or in alphabetical order.

This allows starting / stopping a PHP server in your current workspace (or subfolder).

This analyzes your PHP source code on save with PHP mess detector.

This allows to run PHP tests.

No .

Allow to manage in file.

Allow installing packages with .

Extra args can be arguments described in the or can be .

pm:pkgs:opts:install: allow passing arguments to all composer packages when installing a package (cf )

composer:pkgs:opts:update: allow passing arguments to all composer packages when updating a package (cf )

composer:pkgs:<mypkg>:opts:install: allow to pass arguments to <mypkg> composer packages when installing the package (cf )

composer:pkgs:<mypkg>:opts:update: allow to pass arguments to <mypkg> composer packages when updating the package (cf )

allows to install php extensions.

Extra args can be arguments described in the or can be .

pm:pkgs:opts:install: allow passing arguments to all pecl packages when installing a package (cf )

pecl:pkgs:<mypkg>:opts:install: allow passing arguments to <mypkg> pecl packages when installing the package (cf )

module installation
VSCode-Anywhere php module configuration
official documentation
extension
extension
extension
PHP CS Fixer
format
extension
phpcs
PHP Namespace Resolver
extension
extension
extension
keybindings
php
php-xdebug
composer
nixpkgs.dotnetPackages.NUnitConsole
nixpkgs.dotnet-sdk_3
make
gcc
php
composer
PHP
PHP extensions
php.ini
composer
Saltstack composer states
global Saltstack arguments
states.composer.installed
states.composer.update
states.composer.installed
states.composer.update
PECL
Saltstack pecl states
global Saltstack arguments
states.pecl.installed
states.pecl.installed
PHP