Skip to content

Commit

Permalink
Updated docker and vscode files to properly debug on php7.4
Browse files Browse the repository at this point in the history
  • Loading branch information
ole1986 committed Feb 10, 2020
1 parent 15e6c38 commit 90ba6e9
Show file tree
Hide file tree
Showing 7 changed files with 55 additions and 6 deletions.
5 changes: 3 additions & 2 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"type": "php",
"request": "launch",
"port": 9000,
"preLaunchTask": "${defaultBuildTask}",
"preLaunchTask": "Run PHP Server",
"xdebugSettings": {
"max_depth": 3
}
Expand All @@ -21,7 +21,8 @@
},
"pathMappings": {
"/var/www/html": "${workspaceRoot}"
}
},
"preLaunchTask": "Run Docker"
},
{
"name": "Launch currently open script",
Expand Down
46 changes: 45 additions & 1 deletion .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,56 @@
"label": "Run PHP Server",
"type": "shell",
"command": "php",
"isBackground": true,
"group": "build",
"args": [
"-S",
"localhost:5000"
],
"problemMatcher": []
"problemMatcher": [
{
"pattern": [
{
"regexp": ".",
"file": 1,
"location": 2,
"message": 3
}
],
"background": {
"activeOnStart": true,
"beginsPattern": ".",
"endsPattern": ".",
}
}
]
},
{
"label": "Run Docker",
"type": "shell",
"command": "docker-compose",
"isBackground": true,
"group": "build",
"args": [
"up"
],
"problemMatcher": [
{
"pattern": [
{
"regexp": ".",
"file": 1,
"location": 2,
"message": 3
}
],
"background": {
"activeOnStart": true,
"beginsPattern": ".",
"endsPattern": ".",
}
}
]
}
]
}
2 changes: 1 addition & 1 deletion CONTRIBUTE.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Alternatively, you can use docker to populate the website incl. xdebug

- Install [docker](https://www.docker.com/products/docker-desktop)
- Execute `docker-compose up` to run the container
- Open the URL <a href="http://localhost:8000">http://localhost:8000</a>
- Open the URL <a href="http://localhost:5000">http://localhost:5000 (through port mapping)</a>

## Debugging with Visual Studio Code

Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM php:7.1-cli
FROM php:7.4-cli

RUN docker-php-ext-install -j$(nproc) bcmath
RUN pecl install xdebug && docker-php-ext-enable xdebug
Expand Down
3 changes: 3 additions & 0 deletions data.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ Note that this document was generated using the demo script 'readme.php' which c

1<Changelog>

3<0.12.60>
- compatibility for php 7.4

3<0.12.58>

- Recovered $test option in addText() method #128
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ services:
volumes:
- ./:/var/www/html
ports:
- "8000:8000"
- "5000:8000"
1 change: 1 addition & 0 deletions readme.php
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ public function dots($info)
$pdf->ezText("Native PDF document creation with PHP\n", 20, ['justification' => 'centre']);
$pdf->ezText("released under the terms of the MIT license\n\n<c:alink:https://github.com/rospdf/pdf-php/graphs/contributors>Contributors</c:alink>\n", 14, ['justification' => 'centre']);
$pdf->ezText($project_version, 12, ['justification' => 'centre']);
$pdf->ezText('php ' . phpversion(), 12, ['justification' => 'centre']);
$pdf->ezSetDy(-150);
// modified to use the local file if it can
$pdf->ezText("FORK ON GITHUB.COM", 12, ['justification' => 'right']);
Expand Down

0 comments on commit 90ba6e9

Please sign in to comment.