Skip to content

Commit 4cad6ae

Browse files
committed
bump phpstan, fix analysis, drop symfony/process 3.4
1 parent 2d04ced commit 4cad6ae

4 files changed

Lines changed: 12 additions & 15 deletions

File tree

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
fail-fast: false
1010
matrix:
1111
php: [7.3, 7.4, "8.0", 8.1, 8.2]
12-
symfony_process: [3.4, 4.0, 5.0, 6.0]
12+
symfony_process: [4.0, 5.0, 6.0]
1313
exclude:
1414
- php: 7.3
1515
symfony_process: 6

Dockerfile

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,27 +3,24 @@ FROM php:$PHP_VERSION-cli-alpine
33

44
RUN apk add git zip unzip autoconf make g++
55

6-
# apparently newer xdebug needs these now?
7-
RUN apk add --update linux-headers
8-
9-
RUN if [ -z "${PHP_VERSION##7\.*}" ]; then \
10-
pecl install xdebug-2.9.8 && docker-php-ext-enable xdebug; \
11-
else \
12-
pecl install xdebug && docker-php-ext-enable xdebug; \
13-
fi;
14-
156
RUN curl -sS https://getcomposer.org/installer | php \
167
&& mv composer.phar /usr/local/bin/composer
178

189
WORKDIR /package
1910

20-
COPY composer.json ./
11+
RUN adduser -D -g '' dev
12+
13+
RUN chown dev -R /package
14+
15+
USER dev
16+
17+
COPY --chown=dev composer.json ./
2118

2219
ARG SYMFONY_PROCESS=5
2320
RUN composer require symfony/process ^$SYMFONY_PROCESS.0
2421

2522
RUN composer install
2623

27-
COPY . .
24+
COPY --chown=dev . .
2825

2926
RUN composer test

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
},
2323
"require-dev": {
2424
"phpunit/phpunit": "^9.0",
25-
"phpstan/phpstan": "^0.12.83"
25+
"phpstan/phpstan": "^1.9"
2626
},
2727
"scripts": {
2828
"test": [

src/Chrome.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,12 +139,12 @@ private function getCommandFlags(): array
139139
$opts[] = "--no-displayHeaderFooter";
140140
}
141141
if ($this->getHeader()) {
142-
$headerFile = $this->getFileForString($this->getHeader() ?: '');
142+
$headerFile = $this->getFileForString($this->getHeader());
143143
$opts[] = "--headerTemplate";
144144
$opts[] = $headerFile;
145145
}
146146
if ($this->getFooter()) {
147-
$footerFile = $this->getFileForString($this->getFooter() ?: '');
147+
$footerFile = $this->getFileForString($this->getFooter());
148148
$opts[] = "--footerTemplate";
149149
$opts[] = $footerFile;
150150
}

0 commit comments

Comments
 (0)