Skip to content

Commit 3ee2b60

Browse files
committed
Attempted fix CI
1 parent 2eddd6c commit 3ee2b60

8 files changed

Lines changed: 97 additions & 32 deletions

File tree

.github/workflows/php.yml

Lines changed: 37 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,6 @@ on: # yamllint disable-line rule:truthy
1212
paths-ignore:
1313
- '**.md'
1414

15-
env:
16-
COMPOSER_ROOT_VERSION: dev-${{ github.ref_name }}
17-
1815
jobs:
1916
phplinter:
2017
name: 'PHP-Linter'
@@ -82,6 +79,15 @@ jobs:
8279
- name: Get composer cache directory
8380
run: echo COMPOSER_CACHE="$(composer config cache-files-dir)" >> "$GITHUB_ENV"
8481

82+
- name: Get COMPOSER_ROOT_VERSION from composer.json branch alias
83+
run: |
84+
ROOT_VERSION=$(composer config extra.branch-alias.dev-master)
85+
if [ -z "$ROOT_VERSION" ]; then
86+
echo "Could not read extra.branch-alias.dev-master from composer.json" >&2
87+
exit 1
88+
fi
89+
echo "COMPOSER_ROOT_VERSION=$ROOT_VERSION" >> "$GITHUB_ENV"
90+
8591
- name: Cache composer dependencies
8692
uses: actions/cache@v4
8793
with:
@@ -144,6 +150,16 @@ jobs:
144150
- name: Get composer cache directory
145151
run: echo COMPOSER_CACHE="$(composer config cache-files-dir)" >> "$env:GITHUB_ENV"
146152

153+
- name: Get COMPOSER_ROOT_VERSION from composer.json branch alias
154+
shell: bash
155+
run: |
156+
ROOT_VERSION=$(composer config extra.branch-alias.dev-master)
157+
if [ -z "$ROOT_VERSION" ]; then
158+
echo "Could not read extra.branch-alias.dev-master from composer.json" >&2
159+
exit 1
160+
fi
161+
echo "COMPOSER_ROOT_VERSION=$ROOT_VERSION" >> "$env:GITHUB_ENV"
162+
147163
- name: Cache composer dependencies
148164
uses: actions/cache@v4
149165
with:
@@ -187,6 +203,15 @@ jobs:
187203
- name: Get composer cache directory
188204
run: echo COMPOSER_CACHE="$(composer config cache-files-dir)" >> "$GITHUB_ENV"
189205

206+
- name: Get COMPOSER_ROOT_VERSION from composer.json branch alias
207+
run: |
208+
ROOT_VERSION=$(composer config extra.branch-alias.dev-master)
209+
if [ -z "$ROOT_VERSION" ]; then
210+
echo "Could not read extra.branch-alias.dev-master from composer.json" >&2
211+
exit 1
212+
fi
213+
echo "COMPOSER_ROOT_VERSION=$ROOT_VERSION" >> "$GITHUB_ENV"
214+
190215
- name: Cache composer dependencies
191216
uses: actions/cache@v4
192217
with:
@@ -247,6 +272,15 @@ jobs:
247272
- name: Get composer cache directory
248273
run: echo COMPOSER_CACHE="$(composer config cache-files-dir)" >> "$GITHUB_ENV"
249274

275+
- name: Get COMPOSER_ROOT_VERSION from composer.json branch alias
276+
run: |
277+
ROOT_VERSION=$(composer config extra.branch-alias.dev-master)
278+
if [ -z "$ROOT_VERSION" ]; then
279+
echo "Could not read extra.branch-alias.dev-master from composer.json" >&2
280+
exit 1
281+
fi
282+
echo "COMPOSER_ROOT_VERSION=$ROOT_VERSION" >> "$GITHUB_ENV"
283+
250284
- name: Cache composer dependencies
251285
uses: actions/cache@v4
252286
with:

1

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# This is a combination of 2 commits.
2+
# This is the 1st commit message:
3+
4+
Attempted fix CI
5+
6+
# This is the commit message #2:
7+
8+
#ttempted fix CI
9+
10+
# Please enter the commit message for your changes. Lines starting
11+
# with '#' will be ignored, and an empty message aborts the commit.
12+
#
13+
# Date: Fri Apr 10 09:52:08 2026 +0200
14+
#
15+
# interactive rebase in progress; onto 2eddd6ca1
16+
# Last commands done (2 commands done):
17+
# pick b24478e63 Attempted fix CI
18+
# squash b2fba221d Attempted fix CI
19+
# No commands remaining.
20+
# You are currently rebasing branch 'saml2v5_metadata' on '2eddd6ca1'.
21+
#
22+
# Changes to be committed:
23+
# modified: .github/workflows/php.yml
24+
# modified: composer.json
25+
# modified: composer.lock
26+
# modified: modules/saml/src/IdP/SAML2.php
27+
# modified: tests/modules/saml/src/IdP/SAML2Test.php
28+
# modified: tests/modules/saml/src/MetadataBuilderTest.php
29+
#

composer.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@
102102
"gettext/php-scanner": "~2.0",
103103
"mikey179/vfsstream": "~1.6",
104104
"predis/predis": "~3.3",
105-
"simplesamlphp/simplesamlphp-test-framework": "~1.11 || dev-master",
105+
"simplesamlphp/simplesamlphp-test-framework": "~1.11.5 || dev-master",
106106
"symfony/translation": "~7.4"
107107
},
108108
"suggest": {
@@ -131,7 +131,8 @@
131131
},
132132
"extra": {
133133
"branch-alias": {
134-
"dev-master": "2.6.0.x-dev"
134+
"dev-master": "2.5.x-dev",
135+
"dev-simplesamlphp-2.5": "2.5.x-dev"
135136
}
136137
},
137138
"scripts": {

composer.lock

Lines changed: 14 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

modules/saml/src/IdP/SAML2.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -990,8 +990,8 @@ public static function getHostedMetadata(string $entityid, ?MetaDataStorageHandl
990990
$email = $globalConfig->getOptionalString('technicalcontact_email', 'na@example.org');
991991
if (!empty($email) && $email !== 'na@example.org') {
992992
$contact = [
993-
'emailAddress' => $email,
994-
'givenName' => $globalConfig->getOptionalString('technicalcontact_name', null),
993+
'EmailAddress' => $email,
994+
'GivenName' => $globalConfig->getOptionalString('technicalcontact_name', null),
995995
'contactType' => 'technical',
996996
];
997997
$metadata['contacts'][] = Utils\Config\Metadata::getContact($contact);

modules/saml/src/MetadataBuilder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -492,7 +492,7 @@ private function getContactPerson(): array
492492
$contacts = [];
493493

494494
foreach ($this->metadata->getOptionalArray('contacts', []) as $contact) {
495-
if (array_key_exists('ContactType', $contact) && array_key_exists('EmailAddress', $contact)) {
495+
if (array_key_exists('contactType', $contact) && array_key_exists('EmailAddress', $contact)) {
496496
$contacts[] = ContactPerson::fromArray($contact);
497497
}
498498
}

tests/modules/saml/src/IdP/SAML2Test.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -766,9 +766,9 @@ public function testMetadataHostedContactsIncludesGlobalTechContact(): void
766766
$config = ['contacts' => [
767767
[
768768
'contactType' => 'technical',
769-
'emailAddress' => 'j.doe@example.edu',
770-
'givenName' => 'Jane',
771-
'surName' => 'Doe',
769+
'EmailAddress' => 'j.doe@example.edu',
770+
'GivenName' => 'Jane',
771+
'SurName' => 'Doe',
772772
],
773773
]];
774774
$md = $this->idpMetadataHandlerHelper($config, $globalConfig);
@@ -815,7 +815,7 @@ public function testMetadataHostedContactsSkipsNAGlobalTechContact(): void
815815
$md = $this->idpMetadataHandlerHelper($config, $globalConfig);
816816

817817
$this->assertCount(1, $md['contacts']);
818-
$this->assertEquals('j.doe@example.edu', $md['contacts'][0]['emailAddress']);
818+
$this->assertEquals('j.doe@example.edu', $md['contacts'][0]['EmailAddress']);
819819
}
820820

821821

tests/modules/saml/src/MetadataBuilderTest.php

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -131,10 +131,10 @@ public function testContacts(): void
131131
'contacts' => [
132132
[
133133
'contactType' => 'other',
134-
'emailAddress' => ['mailto:csirt@example.com'],
135-
'surName' => 'CSIRT',
136-
'telephoneNumber' => ['+31SECOPS'],
137-
'company' => 'Acme Inc',
134+
'EmailAddress' => ['mailto:csirt@example.com'],
135+
'SurName' => 'CSIRT',
136+
'TelephoneNumber' => ['+31SECOPS'],
137+
'Company' => 'Acme Inc',
138138
'attributes' => [
139139
[
140140
'namespaceURI' => 'http://refeds.org/metadata',
@@ -146,9 +146,9 @@ public function testContacts(): void
146146
],
147147
[
148148
'contactType' => 'administrative',
149-
'emailAddress' => ['mailto:j.doe@example.edu'],
150-
'givenName' => 'Jane',
151-
'surName' => 'Doe',
149+
'EmailAddress' => ['mailto:j.doe@example.edu'],
150+
'GivenName' => 'Jane',
151+
'SurName' => 'Doe',
152152
],
153153
],
154154
];
@@ -230,7 +230,6 @@ public function testExtensions(): void
230230

231231
$entityDescriptor = $this->getEntityDescriptor($info, $metadata);
232232
$roleDescriptors = $entityDescriptor->getRoleDescriptor();
233-
var_dump($roleDescriptors[0]);
234233
$this->assertCount(1, $roleDescriptors);
235234
$spSSODescriptor = $roleDescriptors[0];
236235
$extensions = $spSSODescriptor->getExtensions();

0 commit comments

Comments
 (0)