Skip to content

Commit fd26935

Browse files
Adam Jonestheseer
Adam Jones
authored andcommitted
PHP8.1 - sticking plaster fix : added some #[\ReturnTypeWillChange] (not sure what versions this should be compatible with so not added return types)
1 parent 18cfa19 commit fd26935

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

src/shared/FileInfo.php

+4
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ public function __toString(): string {
99
/**
1010
* @throws FileInfoException
1111
*/
12+
#[\ReturnTypeWillChange]
1213
public function getRealPath() {
1314
$path = parent::getRealPath();
1415

@@ -38,6 +39,7 @@ public function asFileUri(): string {
3839
return 'file://' . urlencode($result);
3940
}
4041

42+
#[\ReturnTypeWillChange]
4143
public function getPath() {
4244
return $this->toUnix(parent::getPath());
4345
}
@@ -70,6 +72,7 @@ public function getLinkTarget(): string {
7072
*
7173
* @throws FileInfoException
7274
*/
75+
#[\ReturnTypeWillChange]
7376
public function getFileInfo($class_name = null): void {
7477
throw new FileInfoException('getFileInfo not implemented', FileInfoException::NotImplemented);
7578
}
@@ -79,6 +82,7 @@ public function getFileInfo($class_name = null): void {
7982
*
8083
* @throws FileInfoException
8184
*/
85+
#[\ReturnTypeWillChange]
8286
public function getPathInfo($class_name = null): void {
8387
throw new FileInfoException('getPathInfo not implemented', FileInfoException::NotImplemented);
8488
}

src/xsl/fxsltprocessorbase.php

+2
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,7 @@ public function loadStylesheetFromXML($xml) {
149149
*
150150
* Extended version to throw exception on error
151151
*/
152+
#[\ReturnTypeWillChange]
152153
public function importStylesheet($stylesheet) {
153154
if ($stylesheet->documentElement->namespaceURI != 'http://www.w3.org/1999/XSL/Transform') {
154155
throw new fXSLTProcessorException(
@@ -164,6 +165,7 @@ public function importStylesheet($stylesheet) {
164165
*
165166
* Extended version to enforce callability of fXSLProcessor::callbackHook and generally callable methods
166167
*/
168+
#[\ReturnTypeWillChange]
167169
public function registerPHPFunctions($restrict = NULL) {
168170
if (is_string($restrict)) {
169171
$restrict = array($restrict);

0 commit comments

Comments
 (0)