Skip to content

Commit a641198

Browse files
authored
Merge pull request #556 from ampproject/chore/maintenance
2 parents 6e9b726 + 098b4d4 commit a641198

27 files changed

+77
-129
lines changed

.github/dependabot.yml

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,18 @@
11
version: 2
22
updates:
33
- package-ecosystem: composer
4-
directory: "/"
4+
directory: '/'
55
schedule:
6-
interval: daily
7-
time: "12:00"
8-
timezone: America/Los_Angeles
6+
interval: monthly
97
open-pull-requests-limit: 10
8+
- package-ecosystem: github-actions
9+
directory: '/'
10+
schedule:
11+
interval: monthly
12+
open-pull-requests-limit: 10
13+
labels:
14+
- Dependencies
15+
groups:
16+
github-actions:
17+
patterns:
18+
- '*'

.github/workflows/sync-local-fallback-files.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
2727

2828
- name: Configure Composer cache
29-
uses: actions/cache@v2
29+
uses: actions/cache@v4
3030
with:
3131
path: ${{ steps.composer-cache.outputs.dir }}
3232
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}

.github/workflows/sync-spec-test-suite.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
2727

2828
- name: Configure Composer cache
29-
uses: actions/cache@v2
29+
uses: actions/cache@v4
3030
with:
3131
path: ${{ steps.composer-cache.outputs.dir }}
3232
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}

.github/workflows/test.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ jobs:
1616
coverage: [false]
1717
random: [false]
1818
include:
19-
- php: '8.2'
19+
- php: '8.4'
2020
coverage: true
21-
- php: '8.2'
22-
random: true
2321
- php: '8.4'
22+
random: true
23+
- php: '8.5'
2424
experimental: true
2525

2626
steps:
@@ -41,7 +41,7 @@ jobs:
4141
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
4242

4343
- name: Configure Composer cache
44-
uses: actions/cache@v2
44+
uses: actions/cache@v4
4545
with:
4646
path: ${{ steps.composer-cache.outputs.dir }}
4747
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
@@ -98,7 +98,7 @@ jobs:
9898
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
9999

100100
- name: Configure Composer cache
101-
uses: actions/cache@v2
101+
uses: actions/cache@v4
102102
with:
103103
path: ${{ steps.composer-cache.outputs.dir }}
104104
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
@@ -137,7 +137,7 @@ jobs:
137137
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
138138

139139
- name: Configure Composer cache
140-
uses: actions/cache@v2
140+
uses: actions/cache@v4
141141
with:
142142
path: ${{ steps.composer-cache.outputs.dir }}
143143
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}

composer.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
},
1414
"require-dev": {
1515
"ext-zip": "*",
16-
"civicrm/composer-downloads-plugin": "^2.1 || ^3.0",
16+
"civicrm/composer-downloads-plugin": "^4.0",
1717
"dealerdirect/phpcodesniffer-composer-installer": "^0.7.1 || ^1.0.0",
1818
"mikey179/vfsstream": "^1.6",
1919
"php-parallel-lint/php-parallel-lint": "^1.2",
@@ -22,7 +22,7 @@
2222
"roave/security-advisories": "dev-master",
2323
"sirbrillig/phpcs-variable-analysis": "^2.11.2",
2424
"squizlabs/php_codesniffer": "^3",
25-
"wp-coding-standards/wpcs": "^2.3",
25+
"wp-coding-standards/wpcs": "^3.2",
2626
"yoast/phpunit-polyfills": "^0.2.0 || ^1.0.0"
2727
},
2828
"suggest": {
@@ -81,8 +81,8 @@
8181
"sync-fallback-files": "bin/sync-amp-runtime-local-fallback-resources.php",
8282
"sync-test-specs": "rm -rf tests/spec && bin/sync-amp-toolbox-test-suite.php",
8383
"sync": [
84-
"sync-fallback-files",
85-
"sync-test-specs"
84+
"@sync-fallback-files",
85+
"@sync-test-specs"
8686
]
8787
}
8888
}

phpstan.neon.dist

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,13 @@ includes:
44
parameters:
55
level: 5
66
inferPrivatePropertyTypeFromConstructor: true
7+
treatPhpDocTypesAsCertain: false
78
paths:
89
- include/
910
- src/
1011
ignoreErrors:
1112
- '#^PHPDoc tag @throws with type AmpProject\\Exception\\FailedRemoteRequest is not subtype of Throwable$#'
1213
- '#^Parameter \#1 (\$exception_handler|\$callback) of function set_exception_handler expects#'
13-
14-
# @see https://github.com/phpstan/phpstan/issues/5655
15-
- '#^PHPDoc tag @var for constant (?:.*) with type array(?:.*) is not subtype of value array(?:.*)\.$#'
1614
excludePaths:
1715
analyse:
1816
- src/FakeEnum.php
@@ -22,3 +20,4 @@ parameters:
2220
- src/Validator/ValidationErrorCollection.php
2321
- src/Validator/ValidationHandler.php
2422
- src/Validator/ValidatorRules.php
23+
- src/Validator/Spec

resources/local_fallback/rtv/metadata

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/Cli/AmpExecutable.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ protected function setup(Options $options)
3838
{
3939
foreach (self::COMMAND_CLASSES as $commandClass) {
4040
/** @var Command $command */
41+
// @phpstan-ignore varTag.nativeType
4142
$command = new $commandClass($this);
4243

4344
$command->register($options);

src/Cli/Options.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -542,8 +542,6 @@ private function readPHPArgv()
542542
}
543543

544544
if (
545-
is_array($_SERVER)
546-
&&
547545
array_key_exists('argv', $_SERVER)
548546
&&
549547
is_array($_SERVER['argv'])

src/CssLength.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ public function validate($allowAuto, $allowFluid)
111111
$pattern = '/^(?<numeral>\d+(?:\.\d+)?)(?<unit>px|em|rem|vh|vw|vmin|vmax)?$/';
112112
if (preg_match($pattern, $this->attrValue, $match)) {
113113
$this->isValid = true;
114-
$this->numeral = isset($match['numeral']) ? (float)$match['numeral'] : $this->numeral;
114+
$this->numeral = (float)$match['numeral'];
115115
$this->unit = $match['unit'] ?? $this->unit;
116116
}
117117
}

0 commit comments

Comments
 (0)