Skip to content

Commit

Permalink
Merge pull request #63 from veewee/php83
Browse files Browse the repository at this point in the history
PHP 8.3 Support
  • Loading branch information
veewee authored Nov 23, 2023
2 parents e84f554 + a0aa5c8 commit 78a4ba4
Show file tree
Hide file tree
Showing 136 changed files with 3,063 additions and 2,068 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/analyzers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
strategy:
matrix:
operating-system: [ubuntu-latest]
php-versions: ['8.1', '8.2']
php-versions: ['8.1', '8.2', '8.3']
fail-fast: false
name: PHP ${{ matrix.php-versions }} @ ${{ matrix.operating-system }}
steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/autoloader.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
strategy:
matrix:
operating-system: [ubuntu-latest]
php-versions: ['8.1', '8.2']
php-versions: ['8.1', '8.2', '8.3']
fail-fast: false
name: PHP ${{ matrix.php-versions }} @ ${{ matrix.operating-system }}
steps:
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/code-style.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
name: CodeStyle

on: [push, pull_request]

env:
PHP_CS_FIXER_IGNORE_ENV: 1

jobs:
run:
runs-on: ${{ matrix.operating-system }}
strategy:
matrix:
operating-system: [ubuntu-latest]
php-versions: ['8.1', '8.2']
php-versions: ['8.1', '8.2', '8.3']
fail-fast: false
name: PHP ${{ matrix.php-versions }} @ ${{ matrix.operating-system }}
steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/stress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
strategy:
matrix:
operating-system: [ubuntu-latest]
php-versions: ['8.1', '8.2']
php-versions: ['8.1', '8.2', '8.3']
fail-fast: false
name: PHP ${{ matrix.php-versions }} @ ${{ matrix.operating-system }}
steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
strategy:
matrix:
operating-system: [ubuntu-latest]
php-versions: ['8.1', '8.2']
php-versions: ['8.1', '8.2', '8.3']
experimental: [false]
fail-fast: false
name: PHP ${{ matrix.php-versions }} @ ${{ matrix.operating-system }}
Expand Down
6 changes: 3 additions & 3 deletions .phive/phars.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<phive xmlns="https://phar.io/phive">
<phar name="phpunit" version="^9.5.10" installed="9.5.27" location="./tools/phpunit.phar" copy="true"/>
<phar name="infection" version="^0.26" installed="0.26.16" location="./tools/infection.phar" copy="true"/>
<phar name="php-cs-fixer" version="^3.3.2" installed="3.13.0" location="./tools/php-cs-fixer.phar" copy="true"/>
<phar name="phpunit" version="^9.5.10" installed="9.6.13" location="./tools/phpunit.phar" copy="true"/>
<phar name="infection" version="^0.26" installed="0.26.21" location="./tools/infection.phar" copy="true"/>
<phar name="php-cs-fixer" version="^3.3.2" installed="3.39.0" location="./tools/php-cs-fixer.phar" copy="true"/>
</phive>
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
],
"type": "library",
"require": {
"php": "~8.1.0 || ~8.2.0",
"php": "~8.1.0 || ~8.2.0 || ~8.3.0",
"ext-dom": "*",
"ext-libxml": "*",
"ext-xml": "*",
Expand Down
2 changes: 1 addition & 1 deletion src/Xml/Dom/Builder/attribute.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
use DOMElement;

/**
* @return \Closure(DOMElement): DOMElement
* @return Closure(DOMElement): DOMElement
*/
function attribute(string $name, string $value): Closure
{
Expand Down
2 changes: 1 addition & 1 deletion src/Xml/Dom/Builder/attributes.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

/**
* @param array<string, string> $attributes
* @return \Closure(DOMElement): DOMElement
* @return Closure(DOMElement): DOMElement
*/
function attributes(array $attributes): Closure
{
Expand Down
2 changes: 1 addition & 1 deletion src/Xml/Dom/Builder/cdata.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
/**
* @param list<callable(DOMCdataSection): DOMCdataSection> $configurators
*
* @return \Closure(DOMNode): DOMCdataSection
* @return Closure(DOMNode): DOMCdataSection
*/
function cdata(string $data, ...$configurators): Closure
{
Expand Down
2 changes: 1 addition & 1 deletion src/Xml/Dom/Builder/element.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
/**
* @param list<callable(DOMElement): DOMElement> $configurators
*
* @return \Closure(DOMNode): DOMElement
* @return Closure(DOMNode): DOMElement
*/
function element(string $name, callable ...$configurators): Closure
{
Expand Down
2 changes: 1 addition & 1 deletion src/Xml/Dom/Builder/escaped_value.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
use DOMElement;

/**
* @return \Closure(DOMElement): DOMElement
* @return Closure(DOMElement): DOMElement
*/
function escaped_value(string $value): Closure
{
Expand Down
2 changes: 1 addition & 1 deletion src/Xml/Dom/Builder/namespaced_attribute.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
use function VeeWee\Xml\Assertion\assert_strict_prefixed_name;

/**
* @return \Closure(DOMElement): DOMElement
* @return Closure(DOMElement): DOMElement
*/
function namespaced_attribute(string $namespace, string $qualifiedName, string $value): Closure
{
Expand Down
2 changes: 1 addition & 1 deletion src/Xml/Dom/Builder/namespaced_attributes.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

/**
* @param array<string, string> $attributes
* @return \Closure(DOMElement): DOMElement
* @return Closure(DOMElement): DOMElement
*/
function namespaced_attributes(string $namespace, array $attributes): Closure
{
Expand Down
2 changes: 1 addition & 1 deletion src/Xml/Dom/Builder/namespaced_element.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
/**
* @param list<callable(DOMElement): DOMElement> $configurators
*
* @return \Closure(DOMNode): DOMElement
* @return Closure(DOMNode): DOMElement
*/
function namespaced_element(string $namespace, string $qualifiedName, callable ...$configurators): Closure
{
Expand Down
2 changes: 1 addition & 1 deletion src/Xml/Dom/Builder/nodes.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
/**
* @param list<callable(DOMDocument): (list<DOMNode>|DOMNode)> $builders
*
* @return \Closure(DOMDocument): list<DOMNode>
* @return Closure(DOMDocument): list<DOMNode>
*/
function nodes(callable ... $builders): Closure
{
Expand Down
2 changes: 1 addition & 1 deletion src/Xml/Dom/Builder/value.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
use DOMElement;

/**
* @return \Closure(DOMElement): DOMElement
* @return Closure(DOMElement): DOMElement
*/
function value(string $value): Closure
{
Expand Down
2 changes: 1 addition & 1 deletion src/Xml/Dom/Builder/xmlns_attribute.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
use function VeeWee\Xml\Assertion\assert_strict_prefixed_name;

/**
* @return \Closure(DOMElement): DOMElement
* @return Closure(DOMElement): DOMElement
*/
function xmlns_attribute(string $prefix, string $namespaceURI): Closure
{
Expand Down
2 changes: 1 addition & 1 deletion src/Xml/Dom/Builder/xmlns_attributes.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

/**
* @param array<string, string> $attributes - A map of namespace prefix with namespace URI
* @return \Closure(DOMElement): DOMElement
* @return Closure(DOMElement): DOMElement
*/
function xmlns_attributes(array $attributes): Closure
{
Expand Down
2 changes: 1 addition & 1 deletion src/Xml/Dom/Configurator/canonicalize.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
use function VeeWee\Xml\ErrorHandling\disallow_libxml_false_returns;

/**
* @return \Closure(DOMDocument): DOMDocument
* @return Closure(DOMDocument): DOMDocument
*/
function canonicalize(): Closure
{
Expand Down
2 changes: 1 addition & 1 deletion src/Xml/Dom/Configurator/comparable.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
use function VeeWee\Xml\Internal\configure;

/**
* @return \Closure(DOMDocument): DOMDocument
* @return Closure(DOMDocument): DOMDocument
*/
function comparable(): Closure
{
Expand Down
2 changes: 1 addition & 1 deletion src/Xml/Dom/Configurator/document_uri.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

/**
* @param non-empty-string $documentUri
* @return \Closure(DOMDocument): DOMDocument
* @return Closure(DOMDocument): DOMDocument
*/
function document_uri(string $documentUri): Closure
{
Expand Down
2 changes: 1 addition & 1 deletion src/Xml/Dom/Configurator/loader.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
/**
* @param callable(DOMDocument): void $loader
*
* @return \Closure(DOMDocument): DOMDocument
* @return Closure(DOMDocument): DOMDocument
*/
function loader(callable $loader): Closure
{
Expand Down
2 changes: 1 addition & 1 deletion src/Xml/Dom/Configurator/normalize.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
use DOMDocument;

/**
* @return \Closure(DOMDocument): DOMDocument
* @return Closure(DOMDocument): DOMDocument
*/
function normalize(): Closure
{
Expand Down
2 changes: 1 addition & 1 deletion src/Xml/Dom/Configurator/optimize_namespaces.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
use function VeeWee\Xml\Dom\Manipulator\Document\optimize_namespaces as optimize_namespaces_manipulator;

/**
* @return \Closure(DOMDocument): DOMDocument
* @return Closure(DOMDocument): DOMDocument
*/
function optimize_namespaces(string $prefix = 'ns'): Closure
{
Expand Down
2 changes: 1 addition & 1 deletion src/Xml/Dom/Configurator/pretty_print.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
use DOMDocument;

/**
* @return \Closure(DOMDocument): DOMDocument
* @return Closure(DOMDocument): DOMDocument
*/
function pretty_print(): Closure
{
Expand Down
2 changes: 1 addition & 1 deletion src/Xml/Dom/Configurator/traverse.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* @no-named-arguments
* @param list<Visitor> $visitors
*
* @return \Closure(DOMDocument): DOMDocument
* @return Closure(DOMDocument): DOMDocument
*/
function traverse(Visitor ... $visitors): Closure
{
Expand Down
2 changes: 1 addition & 1 deletion src/Xml/Dom/Configurator/trim_spaces.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
use DOMDocument;

/**
* @return \Closure(DOMDocument): DOMDocument
* @return Closure(DOMDocument): DOMDocument
*/
function trim_spaces(): Closure
{
Expand Down
2 changes: 1 addition & 1 deletion src/Xml/Dom/Configurator/utf8.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
use DOMDocument;

/**
* @return \Closure(DOMDocument): DOMDocument
* @return Closure(DOMDocument): DOMDocument
*/
function utf8(): Closure
{
Expand Down
2 changes: 1 addition & 1 deletion src/Xml/Dom/Configurator/validator.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
/**
* @param callable(DOMDocument): IssueCollection $validator
*
* @return \Closure(DOMDocument): DOMDocument
* @return Closure(DOMDocument): DOMDocument
*/
function validator(callable $validator, ?Level $minimumLevel = null): Closure
{
Expand Down
2 changes: 1 addition & 1 deletion src/Xml/Dom/Document.php
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ public function build(callable ... $builders): array
{
return Builder\nodes(...map(
$builders,
fn (callable $builder): Closure => $builder(...)
static fn (callable $builder): Closure => $builder(...)
))($this->document);
}

Expand Down
2 changes: 1 addition & 1 deletion src/Xml/Dom/Loader/xml_file_loader.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

/**
* @param int $options - bitmask of LIBXML_* constants https://www.php.net/manual/en/libxml.constants.php
* @return \Closure(DOMDocument): void
* @return Closure(DOMDocument): void
*/
function xml_file_loader(string $file, int $options = 0): Closure
{
Expand Down
2 changes: 1 addition & 1 deletion src/Xml/Dom/Loader/xml_node_loader.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
use function VeeWee\Xml\Dom\Manipulator\Node\append_external_node;

/**
* @return \Closure(DOMDocument): void
* @return Closure(DOMDocument): void
*/
function xml_node_loader(DOMNode $importedNode): Closure
{
Expand Down
2 changes: 1 addition & 1 deletion src/Xml/Dom/Loader/xml_string_loader.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
/**
* @param non-empty-string $xml
* @param int $options - bitmask of LIBXML_* constants https://www.php.net/manual/en/libxml.constants.php
* @return \Closure(DOMDocument): void
* @return Closure(DOMDocument): void
*/
function xml_string_loader(string $xml, int $options = 0): Closure
{
Expand Down
2 changes: 1 addition & 1 deletion src/Xml/Dom/Locator/document_element.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
use DOMElement;

/**
* @return \Closure(DOMDocument): DOMElement
* @return Closure(DOMDocument): DOMElement
*/
function document_element(): Closure
{
Expand Down
2 changes: 1 addition & 1 deletion src/Xml/Dom/Locator/elements_with_namespaced_tagname.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
use function VeeWee\Xml\Dom\Locator\Element\locate_by_namespaced_tag_name;

/**
* @return \Closure(DOMDocument): NodeList<DOMElement>
* @return Closure(DOMDocument): NodeList<DOMElement>
*/
function elements_with_namespaced_tagname(string $namespace, string $localTagName): Closure
{
Expand Down
2 changes: 1 addition & 1 deletion src/Xml/Dom/Locator/elements_with_tagname.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
use function VeeWee\Xml\Dom\Locator\Element\locate_by_tag_name;

/**
* @return \Closure(DOMDocument): NodeList<DOMElement>
* @return Closure(DOMDocument): NodeList<DOMElement>
*/
function elements_with_tagname(string $tagName): Closure
{
Expand Down
2 changes: 1 addition & 1 deletion src/Xml/Dom/Locator/root_namespace.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
use DOMDocument;

/**
* @return \Closure(DOMDocument): ?string
* @return Closure(DOMDocument): ?string
*/
function root_namespace_uri(): Closure
{
Expand Down
2 changes: 1 addition & 1 deletion src/Xml/Dom/Manipulator/append.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
/**
* @no-named-arguments
* @throws RuntimeException
* @return \Closure(DOMNode): DOMNode
* @return Closure(DOMNode): DOMNode
*/
function append(DOMNode ... $nodes): Closure
{
Expand Down
2 changes: 1 addition & 1 deletion src/Xml/Dom/Mapper/xml_string.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
use function VeeWee\Xml\ErrorHandling\disallow_libxml_false_returns;

/**
* @return \Closure(DOMNode): non-empty-string
* @return Closure(DOMNode): non-empty-string
*/
function xml_string(): Closure
{
Expand Down
2 changes: 1 addition & 1 deletion src/Xml/Dom/Mapper/xslt_template.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

/**
* @param list<callable(XSLTProcessor): XSLTProcessor> $configurators
* @return \Closure(DOMDocument): string
* @return Closure(DOMDocument): string
*/
function xslt_template(Document $template, callable ... $configurators): Closure
{
Expand Down
4 changes: 2 additions & 2 deletions src/Xml/Dom/Validator/internal_xsd_validator.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

/**
* @param list<callable(SchemaCollection): SchemaCollection> $schemaManipulators
* @return \Closure(DOMDocument): IssueCollection
* @return Closure(DOMDocument): IssueCollection
*/
function internal_xsd_validator(callable ... $schemaManipulators): Closure
{
Expand All @@ -24,7 +24,7 @@ function internal_xsd_validator(callable ... $schemaManipulators): Closure
return validator_chain(
...$schemas->map(
/**
* @return \Closure(DOMDocument): IssueCollection
* @return Closure(DOMDocument): IssueCollection
*/
static fn (Schema $schema): Closure => xsd_validator($schema->location())
)
Expand Down
Loading

0 comments on commit 78a4ba4

Please sign in to comment.