GithubHelp home page GithubHelp logo

srbrunoferreira / docker-php-dev-container Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 35 KB

This repository provides a simple and fast development environment based in VS Code for WHMCS and WordPress.

License: MIT License

PHP 100.00%
dev-container docker microsoft php vscode visual-studio-code addon plugin whmcs wordpress

docker-php-dev-container's Introduction

docker-php-dev-container

This repository provides a simple and fast env setup for WHMCS or WordPress

Use this to develop your WHMCS module or gateway.

Use this to code your WordPress plugin.

Features

  • PHP linting and formatting with Intelephense and php-cs-fixer
  • JavaScript linting and formatting with ESlint and Standard style
  • WordPress autocompletion with Intelephense

Setups

First, you need to install the following items:

For WordPress development

  1. In devcontainer.json, change the key php-cs-fixer.config to .php-cs-fixer-wp.php and then delete the file php-cs-fixer.php.

  2. Make sure that in devcontainer.json the key intelephense.stubs has "WordPress" in its value.

  3. Remove unecessary configs for WordPress development such as:

    1. aswinkumar863.smarty-template-support in devcontainer.json
  4. Delete .git and start your own repository.

  5. Place your files in /src.

  6. Press CTRL + Shift + P and select Rebuild Container Without.

  7. Finally, start coding.

For WHMCS development

  1. In devcontainer.json, change the key php-cs-fixer.config to .php-cs-fixer.php and then delete the file php-cs-fixer-wp.php.
  2. Remove "WordPres" stub from devcontainer.json -> intelephense.stubs.
  3. Place your files in /src.
  4. Press CTRL + Shift + P and select Rebuild Container Without.
  5. Finally, start coding.

Recommended extensions

Take a look at extensions.json and search these extensions in VS Code markteplace.

How to change PHP version

  1. In .devcontainer/devcontainer.json, the image: key refers to the PHP image version. You must change this to change the PHP version of the container.

  2. Also in devcontainer.json, set the PHP version for the Intelephense suggestions in the intelephense.environment.phpVersion key.

docker-php-dev-container's People

Contributors

srbrunoferreira avatar

Stargazers

 avatar

Watchers

 avatar

docker-php-dev-container's Issues

Personal experience

  • High CPU usage.
  • High average CPU temperatures (70º-80º).
  • Containers disconnects from Docker (apparently when swap memory gets full..?).

So, in my experience, performance and efficient resources usage are the main problems of working with Dev Container and Docker.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.