-
Notifications
You must be signed in to change notification settings - Fork 329
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Docs] Migrate phpstorm docs page #208
base: main
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for moodledevdocs ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
⚡️ Lighthouse report for the deploy preview of this PR
|
bc583c5
to
7984d72
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few, mostly minor, changes here I think.
- PhpStorm | ||
- Tools | ||
--- | ||
<!-- markdownlint-disable MD029 --> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's this for?
title: Setting up PhpStorm | ||
tags: | ||
- PhpStorm | ||
- Tools |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggest adding 'IDE' and/or 'Editor' to the list of tags
- Use `/** @var admin_root $ADMIN */` to autofill $ADMIN->... | ||
- Remove SQL syntax inspection errors for Moodle tables surrounded by curly brackets (like: `SELECT * FROM {user}`) by adding `\{(\w+)\}` to Tools > Databases > user parameters | ||
(more info: https://blog.jetbrains.com/phpstorm/2014/11/database-language-injection-configuration/ , and a "feature request" to improve it: https://youtrack.jetbrains.com/issue/WI-4123 ) | ||
- You can deactivate warnings for specific exceptions (in particular the coding_exception, which is unlikely to be catched in your code) by going to Settings > PHP and add them to 'Unchecked Exceptions' under the 'Analysis' tab |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- You can deactivate warnings for specific exceptions (in particular the coding_exception, which is unlikely to be catched in your code) by going to Settings > PHP and add them to 'Unchecked Exceptions' under the 'Analysis' tab | |
- You can deactivate warnings for specific exceptions (in particular the `coding_exception`, which is unlikely to be caught in your code) by going to Settings > PHP and add them to 'Unchecked Exceptions' under the 'Analysis' tab |
@@ -72,6 +74,7 @@ calculatedmulti | |||
calculatedsimple | |||
capabilityname | |||
captype | |||
catched |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not a word :) You're after caught
catched |
@@ -211,6 +211,7 @@ const sidebars = { | |||
'development/tools/mdk', | |||
'development/tools/phpcs', | |||
'development/tools/nodejs', | |||
'development/tools/phpstorm', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd suggest maybe creadting a sub-category for IDEs here?
```php | ||
XDEBUG_CONFIG: | ||
idekey=phpstorm | ||
remote_enable=1 | ||
remote_mode=req | ||
remote_port=9000 | ||
remote_host=host.docker.internal | ||
remote_connect_back=0 | ||
PHP_IDE_CONFIG: | ||
serverName=moodle-local | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
```php | |
XDEBUG_CONFIG: | |
idekey=phpstorm | |
remote_enable=1 | |
remote_mode=req | |
remote_port=9000 | |
remote_host=host.docker.internal | |
remote_connect_back=0 | |
PHP_IDE_CONFIG: | |
serverName=moodle-local | |
``` | |
```yaml | |
XDEBUG_CONFIG: | |
idekey=phpstorm | |
remote_enable=1 | |
remote_mode=req | |
remote_port=9000 | |
remote_host=host.docker.internal | |
remote_connect_back=0 | |
PHP_IDE_CONFIG: | |
serverName=moodle-local |
```php | ||
webserver: | ||
image: "moodlehq/moodle-php-apache:${MOODLE_DOCKER_PHP_VERSION}" | ||
depends_on: | ||
- db | ||
volumes: | ||
- "${MOODLE_DOCKER_WWWROOT}:/var/www/html" | ||
- "${ASSETDIR}/web/apache2_faildumps.conf:/etc/apache2/conf-enabled/apache2_faildumps.conf" | ||
environment: | ||
MOODLE_DOCKER_DBTYPE: pgsql | ||
MOODLE_DOCKER_DBNAME: moodle | ||
MOODLE_DOCKER_DBUSER: moodle | ||
MOODLE_DOCKER_DBPASS: "m@0dl3ing" | ||
MOODLE_DOCKER_BROWSER: firefox | ||
MOODLE_DOCKER_WEB_HOST: "${MOODLE_DOCKER_WEB_HOST}" | ||
XDEBUG_CONFIG: | ||
idekey=phpstorm | ||
remote_enable=1 | ||
remote_mode=req | ||
remote_port=9000 | ||
remote_host=host.docker.internal | ||
remote_connect_back=0 | ||
PHP_IDE_CONFIG: | ||
serverName=moodle-local | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
```php | |
webserver: | |
image: "moodlehq/moodle-php-apache:${MOODLE_DOCKER_PHP_VERSION}" | |
depends_on: | |
- db | |
volumes: | |
- "${MOODLE_DOCKER_WWWROOT}:/var/www/html" | |
- "${ASSETDIR}/web/apache2_faildumps.conf:/etc/apache2/conf-enabled/apache2_faildumps.conf" | |
environment: | |
MOODLE_DOCKER_DBTYPE: pgsql | |
MOODLE_DOCKER_DBNAME: moodle | |
MOODLE_DOCKER_DBUSER: moodle | |
MOODLE_DOCKER_DBPASS: "m@0dl3ing" | |
MOODLE_DOCKER_BROWSER: firefox | |
MOODLE_DOCKER_WEB_HOST: "${MOODLE_DOCKER_WEB_HOST}" | |
XDEBUG_CONFIG: | |
idekey=phpstorm | |
remote_enable=1 | |
remote_mode=req | |
remote_port=9000 | |
remote_host=host.docker.internal | |
remote_connect_back=0 | |
PHP_IDE_CONFIG: | |
serverName=moodle-local | |
``` | |
```yaml | |
webserver: | |
image: "moodlehq/moodle-php-apache:${MOODLE_DOCKER_PHP_VERSION}" | |
depends_on: | |
- db | |
volumes: | |
- "${MOODLE_DOCKER_WWWROOT}:/var/www/html" | |
- "${ASSETDIR}/web/apache2_faildumps.conf:/etc/apache2/conf-enabled/apache2_faildumps.conf" | |
environment: | |
MOODLE_DOCKER_DBTYPE: pgsql | |
MOODLE_DOCKER_DBNAME: moodle | |
MOODLE_DOCKER_DBUSER: moodle | |
MOODLE_DOCKER_DBPASS: "m@0dl3ing" | |
MOODLE_DOCKER_BROWSER: firefox | |
MOODLE_DOCKER_WEB_HOST: "${MOODLE_DOCKER_WEB_HOST}" | |
XDEBUG_CONFIG: | |
idekey=phpstorm | |
remote_enable=1 | |
remote_mode=req | |
remote_port=9000 | |
remote_host=host.docker.internal | |
remote_connect_back=0 | |
PHP_IDE_CONFIG: | |
serverName=moodle-local |
1. Only if you're using Docker on linux: From a PhpStorm terminal, run: `docker exec -it moodledocker_webserver_1 ./add-host.docker.internal-to-etc-hosts`. You have to see how packages are installed. | ||
1. In any type of host (Mac, Windows or linux): Check that `/etc/hosts</syntaxhighlight> has a line with <syntaxhighlight lang="php">host.docker.internal</syntaxhighlight>. You can do that with the command <syntaxhighlight lang="php">docker exec -it moodledocker_webserver_1 cat /etc/hosts` (if you have a custom container name, use the name for the webserver container). The result should be something like this: | ||
|
||
```php |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure what type to put here, but not php. Text maybe?
```php |
172.20.0.1 host.docker.internal | ||
``` | ||
|
||
8. Go to your PhpStorm and go to `Run -> Edit configurations</syntaxhighlight> and select new <syntaxhighlight lang="php">PHP Remove Debug` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few more syntaxhighlight
occurrences
|
||
You can work on JavaScript development by add Grunt configuration: | ||
|
||
1. Install Watchman - https://facebook.github.io/watchman/docs/install.html |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1. Install Watchman - https://facebook.github.io/watchman/docs/install.html | |
1. Install [Watchman](https://facebook.github.io/watchman/docs/install.html) |
I've converted this PR to a draft. Please send back to review when ready. |
Trying to migrate my first new Moodle Dev Doc