Skip to content

Commit cf5fcd6

Browse files
authored
Merge branch 'php:master' into ci/add-github-actions-coding-standards-
2 parents c9f82fe + 5d705c2 commit cf5fcd6

6 files changed

Lines changed: 36 additions & 38 deletions

File tree

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ jobs:
44
ubuntu:
55
strategy:
66
matrix:
7-
version: ['8.1', '8.2', '8.3']
7+
version: ['8.1', '8.2', '8.3', '8.4']
88
runs-on: ubuntu-latest
99
steps:
1010
- name: Checkout PhD
11-
uses: actions/checkout@v5
11+
uses: actions/checkout@v6
1212

1313
- name: Setup PHP
1414
uses: shivammathur/setup-php@v2

.github/workflows/full_render_doc-en_test.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,18 @@ jobs:
66
runs-on: ubuntu-latest
77
steps:
88
- name: Checkout PhD
9-
uses: actions/checkout@v5
9+
uses: actions/checkout@v6
1010
with:
1111
path: "phd"
1212

1313
- name: "Checkout php/doc-en"
14-
uses: "actions/checkout@v5"
14+
uses: "actions/checkout@v6"
1515
with:
1616
path: "en"
1717
repository: "php/doc-en"
1818

1919
- name: "Checkout php/doc-base"
20-
uses: "actions/checkout@v5"
20+
uses: "actions/checkout@v6"
2121
with:
2222
path: "doc-base"
2323
repository: "php/doc-base"

.github/workflows/test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ jobs:
55
name: test
66
strategy:
77
matrix:
8-
version: ['8.1', '8.2', '8.3']
8+
version: ['8.1', '8.2', '8.3', '8.4']
99
runs-on: ubuntu-latest
1010
steps:
1111
- name: Checkout PhD
12-
uses: actions/checkout@v5
12+
uses: actions/checkout@v6
1313

1414
- name: Setup PHP
1515
uses: shivammathur/setup-php@v2

phpdotnet/phd/ObjectStorage.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,20 @@
33

44
class ObjectStorage extends \SplObjectStorage
55
{
6-
public function attach(object $object, mixed $info = array()): void {
6+
public function attach(object $object, mixed $info = []): void {
77
if (!($object instanceof Format)) {
88
throw new \InvalidArgumentException(
99
'Only classess inheriting ' . __NAMESPACE__ . '\\Format supported'
1010
);
1111
}
1212
if (empty($info)) {
13-
$info = array(
13+
$info = [
1414
\XMLReader::ELEMENT => $object->getElementMap(),
1515
\XMLReader::TEXT => $object->getTextMap(),
16-
);
16+
];
1717
}
18-
parent::attach($object, $info);
18+
19+
$this->offsetSet($object, $info);
1920
}
2021
}
2122

phpdotnet/phd/Package/PEAR/XHTML.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -643,7 +643,7 @@ public function format_phd_pearapi($open, $name, $attrs, $props)
643643
if (count($arLinkend) == 1) {
644644
//link to class
645645
$linktpl = '{$package}/docs/latest/{$package}/{$class}.html';
646-
} else if ($arLinkend[1]{0} == '$') {
646+
} else if ($arLinkend[1][0] == '$') {
647647
//link to class variable
648648
$variable = $arLinkend[1];
649649
$linktpl = '{$package}/docs/latest/{$package}/{$class}.html#var{$variable}';

render.php

Lines changed: 23 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -81,30 +81,6 @@
8181
exit(0);
8282
}
8383

84-
function make_reader(Config $config, OutputHandler $outputHandler): Reader {
85-
//Partial Rendering
86-
$idlist = $config->renderIds + $config->skipIds;
87-
if (!empty($idlist)) {
88-
$outputHandler->v("Running partial build", VERBOSE_RENDER_STYLE);
89-
90-
$parents = [];
91-
if ($config->indexCache) {
92-
$parents = $config->indexCache->getParents($config->renderIds);
93-
}
94-
95-
$reader = new Reader_Partial(
96-
$outputHandler,
97-
$config->renderIds,
98-
$config->skipIds,
99-
$parents,
100-
);
101-
} else {
102-
$outputHandler->v("Running full build", VERBOSE_RENDER_STYLE);
103-
$reader = new Reader($outputHandler);
104-
}
105-
return $reader;
106-
}
107-
10884
$render = new Render();
10985

11086
// Set reader LIBXML options
@@ -135,7 +111,8 @@ function make_reader(Config $config, OutputHandler $outputHandler): Reader {
135111

136112
$render->attach($format);
137113

138-
$reader = make_reader($config, $outputHandler);
114+
$outputHandler->v("Running full build", VERBOSE_RENDER_STYLE);
115+
$reader = new Reader($outputHandler);
139116
$reader->open($config->xmlFile, NULL, $readerOpts);
140117
$render->execute($reader);
141118

@@ -160,8 +137,28 @@ function make_reader(Config $config, OutputHandler $outputHandler): Reader {
160137
}
161138
}
162139

140+
//Partial Rendering
141+
$idlist = $config->renderIds + $config->skipIds;
142+
if (!empty($idlist)) {
143+
$outputHandler->v("Running partial build", VERBOSE_RENDER_STYLE);
144+
145+
$parents = [];
146+
if ($config->indexCache) {
147+
$parents = $config->indexCache->getParents($config->renderIds);
148+
}
149+
150+
$reader = new Reader_Partial(
151+
$outputHandler,
152+
$config->renderIds,
153+
$config->skipIds,
154+
$parents,
155+
);
156+
} else {
157+
$outputHandler->v("Running full build", VERBOSE_RENDER_STYLE);
158+
$reader = new Reader($outputHandler);
159+
}
160+
163161
// Render formats
164-
$reader = make_reader($config, $outputHandler);
165162
$reader->open($config->xmlFile, NULL, $readerOpts);
166163
foreach($render as $format) {
167164
$format->notify(Render::VERBOSE, true);

0 commit comments

Comments
 (0)