Skip to content

Commit 41bc902

Browse files
committed
Update github workflow and dataProviders with static.
1 parent 03607d1 commit 41bc902

File tree

9 files changed

+34
-14
lines changed

9 files changed

+34
-14
lines changed

.github/workflows/testing.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -89,10 +89,11 @@ jobs:
8989
composer --no-interaction run-script drupal-phpunit-upgrade
9090
composer config --no-plugins allow-plugins.phpstan/extension-installer true
9191
92+
# Revisit - check for latest release of dependent modules.
9293
- name: Install GraphQL dependencies
9394
run: |
9495
composer --no-interaction --no-progress require \
95-
webonyx/graphql-php:^14.8 \
96+
webonyx/graphql-php:^15.12 \
9697
drupal/typed_data:^1.0 \
9798
drupal/redirect:^1.0
9899
@@ -109,11 +110,11 @@ jobs:
109110
run: |
110111
composer --no-interaction --no-progress require \
111112
phpstan/phpstan:^1.11.2 \
112-
mglaman/phpstan-drupal:^1.1.2 \
113-
phpstan/phpstan-deprecation-rules:^1.0.0 \
113+
mglaman/phpstan-drupal:^1.2.11 \
114+
phpstan/phpstan-deprecation-rules:^1.2.0 \
114115
jangregor/phpstan-prophecy:^1.0.0 \
115-
phpstan/phpstan-phpunit:^1.0.0 \
116-
phpstan/extension-installer:^1.0
116+
phpstan/phpstan-phpunit:^1.4 \
117+
phpstan/extension-installer:^1.4
117118
composer --no-interaction --no-progress --with-all-dependencies upgrade drupal/coder:8.3.24
118119
119120
- name: Run PHPStan

1

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
Update github workflow to ready for drupal next minor and major version.
2+
3+
# Please enter the commit message for your changes. Lines starting
4+
# with '#' will be ignored, and an empty message aborts the commit.
5+
#
6+
# Author: Ankit Pathak <[email protected]>
7+
#
8+
# interactive rebase in progress; onto 75dd0a4
9+
# Last commands done (2 commands done):
10+
# pick 6515b02 Drupal 11 readiness.
11+
# pick 8c2bcaf Update github workflow to ready for drupal next minor and major version.
12+
# Next commands to do (2 remaining commands):
13+
# pick 14bba39 Update github workflow and dataProviders with static.
14+
# pick c456f77 Adding minimum php version 8.0 and included typed_data module.
15+
# You are currently rebasing branch '8.x-4.x' on '75dd0a4'.
16+
#
17+
# Changes to be committed:
18+
# modified: .github/workflows/testing.yml
19+
#

tests/src/Kernel/DataProducer/EntityReferenceTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ public function testEmptyResults(string $data_producer, array $contexts): void {
136136
/**
137137
* Data provider for testEmptyResults().
138138
*/
139-
public function emptyResultsProvider(): array {
139+
public static function emptyResultsProvider(): array {
140140
return [
141141
// Test that an empty reference field returns an empty array.
142142
['entity_reference', [

tests/src/Kernel/DataProducer/Images/ImageResourceUrlTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public function testImageResourceUrl(array $input, string $expected): void {
2727
/**
2828
* Provider for testImageResourceUrl().
2929
*/
30-
public function imageResourceUrlProvider(): array {
30+
public static function imageResourceUrlProvider(): array {
3131
return [
3232
[
3333
['url' => 'http://localhost/test_image.jpg'],

tests/src/Kernel/DataProducer/SeekTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public function testSeek(array $input, int $position, $expected): void {
3737
*
3838
* @return array
3939
*/
40-
public function seekProvider(): array {
40+
public static function seekProvider(): array {
4141
return [
4242
[
4343
[1, 2, 3],

tests/src/Kernel/DataProducer/StringTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public function testUppercase(string $input, string $expected): void {
2727
/**
2828
* Tests the upper case data producer.
2929
*/
30-
public function uppercaseProvider(): array {
30+
public static function uppercaseProvider(): array {
3131
return [
3232
['test', 'TEST'],
3333
['123 ..!!', '123 ..!!'],

tests/src/Kernel/Framework/CsrfTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ public function testEvilOrigin(string $content_type): void {
6464
/**
6565
* Data provider for testContentTypeCsrf().
6666
*/
67-
public function provideSimpleContentTypes(): array {
67+
public static function provideSimpleContentTypes(): array {
6868
// Three content types that can be sent with simple no-cors POST requests.
6969
return [
7070
['text/plain'],
@@ -115,7 +115,7 @@ public function testAllowedJsonRequests(array $headers): void {
115115
/**
116116
* Data provider for testAllowedJsonRequests().
117117
*/
118-
public function provideAllowedJsonHeaders(): array {
118+
public static function provideAllowedJsonHeaders(): array {
119119
return [
120120
[['CONTENT_TYPE' => 'application/json']],
121121
[['CONTENT_TYPE' => 'application/graphql']],
@@ -149,7 +149,7 @@ public function testAllowedFormRequests(array $headers, array $allowedDomains =
149149
/**
150150
* Data provider for testAllowedFormRequests().
151151
*/
152-
public function provideAllowedFormRequests(): array {
152+
public static function provideAllowedFormRequests(): array {
153153
return [
154154
// Omitting the Origin and Apollo-Require-Preflight is allowed.
155155
[['CONTENT_TYPE' => 'multipart/form-data']],

tests/src/Kernel/Framework/PersistedQueriesTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ public function testPersistedQueries(array $instanceIds, string $queryId, array
7575
/**
7676
* Data provider for testPersistedQueries().
7777
*/
78-
public function persistedQueriesDataProvider(): array {
78+
public static function persistedQueriesDataProvider(): array {
7979
return [
8080
// This is the most usual case, all the three plugins are enabled.
8181
[

tests/src/Kernel/ResolverBuilderTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ public function testBuilderProducing($input, $expected): void {
6262
/**
6363
* @return array
6464
*/
65-
public function builderProducingProvider(): array {
65+
public static function builderProducingProvider(): array {
6666
return [
6767
['entity_load', ResolverInterface::class],
6868
['entity_id', ResolverInterface::class],

0 commit comments

Comments
 (0)