Docker simplifies the administration of software in containers. Docker Compose is a tool that simplifies working with multiple containers.
This is about docker-lamp and specifically how special domains are created. docker-lamp is a software that provides prebuilt images, containers and scripts to help you develop on a web server. In this part I document my configuration of Visual Studio Code.
Requirements
Besides Docker, Docker Compose is necessary. If you have followed this set so far, everything is fine.
Visual Studio Code
Installation
Installiert habe ich Visual Studio Code.
-
Ich habe die Installationsdatei von der Homepage kopiert.
-
Dann habe ich diese via
sudo apt install ./<file>.deb
installiert.
sudo apt install ./<file>.deb
Wer eine grafische Benutzeroberfläche bevorzugt, öffnet Ubuntu Software, sucht nach "Visual Studio Code" und installiert die Anwendung per klick auf die angebotenecd Schalftläche.
Extensions
PHP-Debug
felixfbecker.php-debug. Debug-Unterstützung für PHP mit XDebug.
Voraussetzungen im Browser Mozilla Firefox
Ich füge zu Firefox hinzu.
PHP Debug von Felix Becker installieren und konfigurieren
Die Standardkonfiguration passt bis auf eine Ausnahme, der port
muss auf 10000
abgeändert werden.
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Listen for XDebug",
"type": "php",
"request": "launch",
"port": 10000
},
{
"name": "Launch currently open script",
"type": "php",
"request": "launch",
"program": "${file}",
"cwd": "${fileDirname}",
"port": 10000
}
]
}
Mit PHP Debug von Felix Becker in Visual Studio Code debuggen
Mögliche Fehler
Listen EACCES: permission denied` on any port
phpcs
ikappas.phpcs. PHP CodeSniffer für Visual Studio Code.
PHP Intelephense
bmewburn.vscode-intelephense-client. PHP-Code-Intelligenz für Visual Studio Code.
PHPUnit
emallin.phpunit. Führen Sie PHPUnit-Tests von VSCode aus.
php cs-fixer
Visual Studio Code Erweiterung
junstyle.php-cs-fixer: Für den Fall, dass Sie sich für den PSR-2: Coding Style Guide) entscheiden. PHP CS Fixer Erweiterung für VS Code, php formatter, php code beautify tool, format html.
PHP Phan
(Analyzer) tysonandre.php-phan. Phan - statischer Analyzer für PHP, minimiert falsch-positive Ergebnisse.
phpmd
linyang95.phpmd. VS Code-Erweiterung für PHP, die phpmd verwendet.
EditorConfig für VS Code
editorconfig.editorconfig EditorConfig-Unterstützung für Visual Studio Code
Joomla Snippets
anibalsanchez.vs-code-joomla-snippets. Snippets für Joomla. Einschließlich Joomla 3.x und Joomla 4 Snippets.
PHP Getter & Setter
phproberto.vscode-php-getters-setters. Erstellen von PHP-Gettern und -Settern aus Klasseneigenschaften.
Comments