Skip to content

Commit 61e48d6

Browse files
author
ole
authored
Merge pull request #136 from cedric-anne/bugfix/fix-depreacated-braces
Fix usage of deprecated braces for array and string offset access
2 parents 61e1be9 + fa15c8b commit 61e48d6

30 files changed

Lines changed: 509 additions & 454 deletions

.travis.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ php:
66
- 7.0
77
- 7.1
88
- 7.2
9+
- 7.3
10+
- 7.4
911

1012
only_commits:
1113
files:

.vscode/launch.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"type": "php",
77
"request": "launch",
88
"port": 9000,
9-
"preLaunchTask": "${defaultBuildTask}",
9+
"preLaunchTask": "Run PHP Server",
1010
"xdebugSettings": {
1111
"max_depth": 3
1212
}
@@ -21,7 +21,8 @@
2121
},
2222
"pathMappings": {
2323
"/var/www/html": "${workspaceRoot}"
24-
}
24+
},
25+
"preLaunchTask": "Run Docker"
2526
},
2627
{
2728
"name": "Launch currently open script",

.vscode/tasks.json

Lines changed: 45 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,56 @@
77
"label": "Run PHP Server",
88
"type": "shell",
99
"command": "php",
10+
"isBackground": true,
1011
"group": "build",
1112
"args": [
1213
"-S",
1314
"localhost:5000"
1415
],
15-
"problemMatcher": []
16+
"problemMatcher": [
17+
{
18+
"pattern": [
19+
{
20+
"regexp": ".",
21+
"file": 1,
22+
"location": 2,
23+
"message": 3
24+
}
25+
],
26+
"background": {
27+
"activeOnStart": true,
28+
"beginsPattern": ".",
29+
"endsPattern": ".",
30+
}
31+
}
32+
]
33+
},
34+
{
35+
"label": "Run Docker",
36+
"type": "shell",
37+
"command": "docker-compose",
38+
"isBackground": true,
39+
"group": "build",
40+
"args": [
41+
"up"
42+
],
43+
"problemMatcher": [
44+
{
45+
"pattern": [
46+
{
47+
"regexp": ".",
48+
"file": 1,
49+
"location": 2,
50+
"message": 3
51+
}
52+
],
53+
"background": {
54+
"activeOnStart": true,
55+
"beginsPattern": ".",
56+
"endsPattern": ".",
57+
}
58+
}
59+
]
1660
}
1761
]
1862
}

CONTRIBUTE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Alternatively, you can use docker to populate the website incl. xdebug
2121

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

2626
## Debugging with Visual Studio Code
2727

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM php:7.1-cli
1+
FROM php:7.4-cli
22

33
RUN docker-php-ext-install -j$(nproc) bcmath
44
RUN pecl install xdebug && docker-php-ext-enable xdebug

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ For more details on how to use `composer` please refer to the documentation - ht
6363
include 'src/Cezpdf.php'; // Or use 'vendor/autoload.php' when installed through composer
6464

6565
// Initialize a ROS PDF class object using DIN-A4, with background color gray
66-
$pdf = new Cezpdf('a4','portrait','color',array(0.8,0.8,0.8));
66+
$pdf = new Cezpdf('a4','portrait','color',[0.8,0.8,0.8]);
6767
// Set pdf Bleedbox
6868
$pdf->ezSetMargins(20,20,20,20);
6969
// Use one of the pdf core fonts
@@ -76,9 +76,9 @@ $size=12;
7676
$pdf->openHere('Fit');
7777

7878
// Output some colored text by using text directives and justify it to the right of the document
79-
$pdf->ezText("PDF with some <c:color:1,0,0>blue</c:color> <c:color:0,1,0>red</c:color> and <c:color:0,0,1>green</c:color> colours", $size, array('justification'=>'right'));
79+
$pdf->ezText("PDF with some <c:color:1,0,0>blue</c:color> <c:color:0,1,0>red</c:color> and <c:color:0,0,1>green</c:color> colours", $size, ['justification'=>'right']);
8080
// Output the pdf as stream, but uncompress
81-
$pdf->ezStream(array('compress'=>0));
81+
$pdf->ezStream(['compress'=>0]);
8282
?>
8383
```
8484

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
]
3939
},
4040
"require": {
41-
"php": ">=5.4.0"
41+
"php": ">=5.6.0"
4242
},
4343
"require-dev": {
4444
"squizlabs/php_codesniffer": "2.*",

0 commit comments

Comments
 (0)