Skip to content

Commit

Permalink
Merge pull request #136 from cedric-anne/bugfix/fix-depreacated-braces
Browse files Browse the repository at this point in the history
Fix usage of deprecated braces for array and string offset access
  • Loading branch information
ole authored Feb 10, 2020
2 parents 61e1be9 + fa15c8b commit 61e48d6
Show file tree
Hide file tree
Showing 30 changed files with 509 additions and 454 deletions.
2 changes: 2 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ php:
- 7.0
- 7.1
- 7.2
- 7.3
- 7.4

only_commits:
files:
Expand Down
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
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ For more details on how to use `composer` please refer to the documentation - ht
include 'src/Cezpdf.php'; // Or use 'vendor/autoload.php' when installed through composer

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

// Output some colored text by using text directives and justify it to the right of the document
$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'));
$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']);
// Output the pdf as stream, but uncompress
$pdf->ezStream(array('compress'=>0));
$pdf->ezStream(['compress'=>0]);
?>
```

Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
]
},
"require": {
"php": ">=5.4.0"
"php": ">=5.6.0"
},
"require-dev": {
"squizlabs/php_codesniffer": "2.*",
Expand Down
Loading

0 comments on commit 61e48d6

Please sign in to comment.