Skip to content

Commit

Permalink
Add deprecation message for libxml_disable_entity_loader
Browse files Browse the repository at this point in the history
Co-authored-by: Niels Dossche <7771979+nielsdos@users.noreply.github.com>
  • Loading branch information
TimWolla and nielsdos committed Jul 8, 2024
1 parent d3a7a69 commit d5af2de
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 7 deletions.
2 changes: 1 addition & 1 deletion ext/libxml/libxml.stub.php
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ function libxml_get_errors(): array {}

function libxml_clear_errors(): void {}

#[\Deprecated(since: '8.0')]
#[\Deprecated(message: 'as external entity loading is disabled by default', since: '8.0')]
function libxml_disable_entity_loader(bool $disable = true): bool {}

function libxml_set_external_entity_loader(?callable $resolver_function): bool {}
Expand Down
13 changes: 9 additions & 4 deletions ext/libxml/libxml_arginfo.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion ext/libxml/tests/libxml_disable_entity_loader.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ echo "Done\n";
--EXPECTF--
bool(true)

Deprecated: Function libxml_disable_entity_loader() is deprecated since 8.0 in %s on line %d
Deprecated: Function libxml_disable_entity_loader() is deprecated since 8.0, as external entity loading is disabled by default in %s on line %d
bool(false)

Warning: DOMDocument::loadXML(): I/O warning : failed to load external entity "%s" in %s on line %d
Expand Down
2 changes: 1 addition & 1 deletion ext/libxml/tests/libxml_disable_entity_loader_2.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ echo "Done\n";
--EXPECTF--
bool(true)

Deprecated: Function libxml_disable_entity_loader() is deprecated since 8.0 in %s on line %d
Deprecated: Function libxml_disable_entity_loader() is deprecated since 8.0, as external entity loading is disabled by default in %s on line %d
bool(false)

Warning: DOMDocument::loadXML(): %Sfailed to load external entity "%s" in %s on line %d
Expand Down

0 comments on commit d5af2de

Please sign in to comment.