JetBrains / phpstorm-workshop

Code for the PhpStorm workshop
https://www.jetbrains.com/phpstorm
Apache License 2.0
294 stars 71 forks source link
exercise php phpstorm phpstorm-workshop workshop-materials

official JetBrains project Latest Stable Version Total Downloads License

PhpStorm Workshop

In these materials, you'll learn about many of the features and productivity tools available in PhpStorm. Examples are navigation, editing, inspections, live templates, refactoring, tools like Composer and the HTTP client, and many more. It's virtually impossible to cover every option and feature in PhpStorm, but we're providing a number of practical exercises on how we can do our daily work as PHP developers.

We'll also cover a vast amount of keyboard shortcuts to make working with PhpStorm more efficient. Other IntelliJ-based IDE's use the same keyboard shortcuts, so if you know how to work with PhpStorm, you'll know how to work with WebStorm, RubyMine, PyCharm, IntelliJ IDEA and more. A cheat sheet is available online and is also included in the workshop download.

This workshop is self-paced, meaning you can work your way through exercises on your own, whenever and wherever you want. Exercises come as a PhpStorm project in which every file is a new exercise that may contain code and tips to get things done.

Prerequisites

Getting the Project

There are several ways to get started with the PhpStorm workshop materials:

Getting Started

Most exercises not related to the code editor require having Docker containers running.

Before you start:

  1. Open Settings/Preferences | Build, Execution, Deployment | Docker and select how to connect to the Docker daemon:

    • Windows:

      • Select TCP socket.
      • Set Engine API URL to tcp://localhost:2375.
      • Leave the Certificates folder field empty.

      Make sure to enable Expose daemon on tcp://localhost:2375 without TLS in the General section of Docker for Windows settings.

    • macOS:

      • Select Docker for Mac
    • Linux:

      • Select Unix socket
  2. Update XDEBUG_CONFIG variable in docker-compose.yml with the value depending on your operating system. This is necessary for Web Debugging.

    • Windows/macOS: use host.docker.internal, which will automatically resolve to the internal address of the host Docker is running on.
    • Linux: execute hostname in Terminal and use the returned value.
  3. Uncomment an appropriate line for sftp service in the same docker-compose.yml. This is necessary for Deployment to work correctly.

  4. In the same docker-compose.yml, click the Run icon next to services: in the editor gutter to start all required Docker containers. Alternatively, you can open the built-in PhpStorm terminal from View | Tool Windows | Terminal and execute the docker-compose up command.

There are some things to know about the project:

Open Source and Contribution

The workshop is Open Source, licensed under the Apache 2 license. If you would like to contribute to the workshop materials, please feel free to fork the repo and send us a pull request. Or if you have a comment, question, or suggestion for improvements, please raise an issue.