Skip to content

Commit

Permalink
Merge branch 'main' into bugfix/testdox-printer
Browse files Browse the repository at this point in the history
  • Loading branch information
ghostwriter authored Oct 28, 2023
2 parents 3dd2be3 + 95e7930 commit 451adb1
Show file tree
Hide file tree
Showing 392 changed files with 2,796 additions and 3,171 deletions.
5 changes: 1 addition & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
name: CI

env:
COMPOSER_ROOT_VERSION: "10.5-dev"
COMPOSER_ROOT_VERSION: "11.0-dev"

permissions:
contents: read
Expand Down Expand Up @@ -76,7 +76,6 @@ jobs:
- windows-latest

php-version:
- "8.1"
- "8.2"
- "8.3"
- "8.4"
Expand Down Expand Up @@ -123,7 +122,6 @@ jobs:
- windows-latest

php-version:
- "8.1"
- "8.2"
- "8.3"
- "8.4"
Expand Down Expand Up @@ -243,7 +241,6 @@ jobs:
fail-fast: false
matrix:
php-version:
- "8.1"
- "8.2"
- "8.3"
- "8.4"
Expand Down
4 changes: 2 additions & 2 deletions .phive/phars.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<phive xmlns="https://phar.io/phive">
<phar name="phpab" version="^1.25" installed="1.29.0" location="./tools/phpab" copy="true"/>
<phar name="php-cs-fixer" version="^3.0" installed="3.34.1" location="./tools/php-cs-fixer" copy="true"/>
<phar name="php-cs-fixer" version="^3.0" installed="3.35.1" location="./tools/php-cs-fixer" copy="true"/>
<phar name="psalm" version="^5.0" installed="5.15.0" location="./tools/psalm" copy="true"/>
<phar name="humbug/php-scoper" version="^0.18.1" installed="0.18.3" location="./tools/php-scoper" copy="true"/>
<phar name="humbug/php-scoper" version="^0.18.1" installed="0.18.4" location="./tools/php-scoper" copy="true"/>
<phar name="composer" version="^2.0.3" installed="2.6.5" location="./tools/composer" copy="true"/>
</phive>
30 changes: 15 additions & 15 deletions .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,19 +29,15 @@
'backtick_to_shell_exec' => true,
'binary_operator_spaces' => [
'operators' => [
'=' => 'align_single_space_minimal',
'*=' => 'align_single_space_minimal',
'+=' => 'align_single_space_minimal',
'-=' => 'align_single_space_minimal',
'*=' => 'align_single_space_minimal',
'/=' => 'align_single_space_minimal',
'=' => 'align_single_space_minimal',
'=>' => 'align_single_space_minimal',
],
],
'blank_line_after_namespace' => true,
'blank_lines_before_namespace' => [
'max_line_breaks' => 1,
'min_line_breaks' => 0,
],
'blank_line_before_statement' => [
'statements' => [
'break',
Expand Down Expand Up @@ -69,6 +65,14 @@
'yield_from',
],
],
'blank_lines_before_namespace' => [
'max_line_breaks' => 1,
'min_line_breaks' => 0,
],
'braces_position' => [
'anonymous_classes_opening_brace' => 'next_line_unless_newline_at_signature_end',
'anonymous_functions_opening_brace' => 'next_line_unless_newline_at_signature_end',
],
'cast_spaces' => true,
'class_attributes_separation' => [
'elements' => [
Expand All @@ -82,15 +86,11 @@
'combine_consecutive_issets' => true,
'combine_consecutive_unsets' => true,
'combine_nested_dirname' => true,
'compact_nullable_typehint' => true,
'compact_nullable_type_declaration' => true,
'concat_space' => ['spacing' => 'one'],
'constant_case' => true,
'control_structure_braces' => true,
'control_structure_continuation_position' => true,
'curly_braces_position' => [
'anonymous_functions_opening_brace' => 'next_line_unless_newline_at_signature_end',
'anonymous_classes_opening_brace' => 'next_line_unless_newline_at_signature_end',
],
'declare_equal_normalize' => ['space' => 'none'],
'declare_parentheses' => true,
'declare_strict_types' => true,
Expand Down Expand Up @@ -146,10 +146,10 @@
'@internal',
],
],
'native_function_type_declaration_casing' => true,
'new_with_braces' => [
'named_class' => false,
'native_type_declaration_casing' => true,
'new_with_parentheses' => [
'anonymous_class' => false,
'named_class' => false,
],
'no_alias_functions' => true,
'no_alias_language_construct_call' => true,
Expand Down Expand Up @@ -184,8 +184,8 @@
'no_trailing_whitespace' => true,
'no_trailing_whitespace_in_comment' => true,
'no_trailing_whitespace_in_string' => true,
'no_unneeded_braces' => true,
'no_unneeded_control_parentheses' => true,
'no_unneeded_curly_braces' => true,
'no_unneeded_final_method' => true,
'no_unneeded_import_alias' => true,
'no_unreachable_default_argument_value' => true,
Expand Down
60 changes: 8 additions & 52 deletions .psalm/baseline.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@
<code>$message</code>
<code>$message</code>
</ArgumentTypeCoercion>
<RedundantCondition>
<code>assert($test instanceof TestMethod)</code>
</RedundantCondition>
<TooManyArguments>
<code>toString</code>
<code>toString</code>
Expand Down Expand Up @@ -123,9 +126,6 @@
</PropertyTypeCoercion>
</file>
<file src="src/Event/Value/Test/TestData/TestDataCollection.php">
<ArgumentTypeCoercion>
<code>$data</code>
</ArgumentTypeCoercion>
<PropertyTypeCoercion>
<code>$data</code>
</PropertyTypeCoercion>
Expand Down Expand Up @@ -469,6 +469,9 @@
<PossiblyInvalidArgument>
<code><![CDATA[$e->getCode()]]></code>
</PossiblyInvalidArgument>
<RedundantCast>
<code>(int) $matches[0][1]</code>
</RedundantCast>
</file>
<file src="src/Metadata/Api/Dependencies.php">
<RedundantCondition>
Expand Down Expand Up @@ -502,16 +505,6 @@
<code>assert($metadata instanceof RequiresSetting)</code>
</RedundantCondition>
</file>
<file src="src/Metadata/Metadata.php">
<DeprecatedClass>
<code>IgnoreClassForCodeCoverage</code>
<code>IgnoreFunctionForCodeCoverage</code>
<code>IgnoreMethodForCodeCoverage</code>
<code>new IgnoreClassForCodeCoverage(self::CLASS_LEVEL, $className)</code>
<code>new IgnoreFunctionForCodeCoverage(self::CLASS_LEVEL, $functionName)</code>
<code>new IgnoreMethodForCodeCoverage(self::CLASS_LEVEL, $className, $methodName)</code>
</DeprecatedClass>
</file>
<file src="src/Metadata/MetadataCollection.php">
<PropertyTypeCoercion>
<code>$metadata</code>
Expand Down Expand Up @@ -555,15 +548,10 @@
</file>
<file src="src/Metadata/Parser/AnnotationParser.php">
<ArgumentTypeCoercion>
<code>$className</code>
<code>$className</code>
<code>$className</code>
<code>$className</code>
<code>$className</code>
<code>$className</code>
<code>$_className</code>
<code>$_className</code>
<code>$function</code>
<code>$function</code>
<code>$methodName</code>
<code>$pieces[0]</code>
<code>$pieces[0]</code>
<code>$pieces[1]</code>
Expand All @@ -580,13 +568,6 @@
<code>trim($tmp[1])</code>
</ArgumentTypeCoercion>
</file>
<file src="src/Metadata/Parser/AttributeParser.php">
<DeprecatedClass>
<code>IgnoreClassForCodeCoverage::class</code>
<code>IgnoreFunctionForCodeCoverage::class</code>
<code>IgnoreMethodForCodeCoverage::class</code>
</DeprecatedClass>
</file>
<file src="src/Metadata/Version/Requirement.php">
<ArgumentTypeCoercion>
<code><![CDATA[!empty($matches['operator']) ? $matches['operator'] : '>=']]></code>
Expand Down Expand Up @@ -763,10 +744,6 @@
</ArgumentTypeCoercion>
</file>
<file src="src/TextUI/Configuration/Cli/Configuration.php">
<DeprecatedMethod>
<code>hasCacheResultFile</code>
<code>hasCoverageCacheDirectory</code>
</DeprecatedMethod>
<InvalidNullableReturnType>
<code>bool</code>
<code>string</code>
Expand Down Expand Up @@ -797,17 +774,6 @@
</PossiblyInvalidPropertyAssignmentValue>
</file>
<file src="src/TextUI/Configuration/Merger.php">
<DeprecatedMethod>
<code>cacheDirectory</code>
<code>cacheResultFile</code>
<code>cacheResultFile</code>
<code>coverageCacheDirectory</code>
<code>coverageCacheDirectory</code>
<code>hasCacheDirectory</code>
<code>hasCacheResultFile</code>
<code>hasCacheResultFile</code>
<code>hasCoverageCacheDirectory</code>
</DeprecatedMethod>
<MissingThrowsDocblock>
<code>baseline</code>
<code>detect</code>
Expand Down Expand Up @@ -888,11 +854,6 @@
<code>$variables</code>
</PropertyTypeCoercion>
</file>
<file src="src/TextUI/Configuration/Xml/CodeCoverage/CodeCoverage.php">
<DeprecatedMethod>
<code>hasCacheDirectory</code>
</DeprecatedMethod>
</file>
<file src="src/TextUI/Configuration/Xml/Loader.php">
<ArgumentTypeCoercion>
<code><![CDATA[$bootstrap->getAttribute('class')]]></code>
Expand Down Expand Up @@ -945,11 +906,6 @@
<code>removeChild</code>
</PossiblyNullReference>
</file>
<file src="src/TextUI/Configuration/Xml/PHPUnit.php">
<DeprecatedMethod>
<code>hasCacheResultFile</code>
</DeprecatedMethod>
</file>
<file src="src/TextUI/Help.php">
<PossiblyUndefinedArrayOffset>
<code><![CDATA[$option['desc']]]></code>
Expand Down
7 changes: 0 additions & 7 deletions ChangeLog-10.5.md

This file was deleted.

48 changes: 48 additions & 0 deletions ChangeLog-11.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Changes in PHPUnit 11.0

All notable changes of the PHPUnit 11.0 release series are documented in this file using the [Keep a CHANGELOG](https://keepachangelog.com/) principles.

## [11.0.0] - 2024-02-02

### Changed

* [#5213](https://github.com/sebastianbergmann/phpunit/issues/5213): Make `TestCase` methods `protected` that should have been `protected` all along
* [#5254](https://github.com/sebastianbergmann/phpunit/issues/5254): Make `TestCase` methods `final` that should have been `final` all along

### Deprecated

* [#4505](https://github.com/sebastianbergmann/phpunit/issues/4505): Support for metadata in doc-comments
* [#5214](https://github.com/sebastianbergmann/phpunit/issues/5214): `TestCase::iniSet()` (this method was already [soft-deprecated](https://phpunit.de/backward-compatibility.html#soft-deprecation) in PHPUnit 10)
* [#5216](https://github.com/sebastianbergmann/phpunit/issues/5216): `TestCase::setLocale()` (this method was already [soft-deprecated](https://phpunit.de/backward-compatibility.html#soft-deprecation) in PHPUnit 10)
* [#5240](https://github.com/sebastianbergmann/phpunit/issues/5240): `TestCase::createTestProxy()` (this method was already [soft-deprecated](https://phpunit.de/backward-compatibility.html#soft-deprecation) in PHPUnit 10)
* [#5241](https://github.com/sebastianbergmann/phpunit/issues/5241): `TestCase::getMockForAbstractClass()` (this method was already [soft-deprecated](https://phpunit.de/backward-compatibility.html#soft-deprecation) in PHPUnit 10)
* [#5242](https://github.com/sebastianbergmann/phpunit/issues/5242): `TestCase::getMockFromWsdl()` (this method was already [soft-deprecated](https://phpunit.de/backward-compatibility.html#soft-deprecation) in PHPUnit 10)
* [#5243](https://github.com/sebastianbergmann/phpunit/issues/5243): `TestCase::getMockForTrait()` (this method was already [soft-deprecated](https://phpunit.de/backward-compatibility.html#soft-deprecation) in PHPUnit 10)
* [#5244](https://github.com/sebastianbergmann/phpunit/issues/5244): `TestCase::getObjectForTrait()` (this method was already [soft-deprecated](https://phpunit.de/backward-compatibility.html#soft-deprecation) in PHPUnit 10)
* [#5305](https://github.com/sebastianbergmann/phpunit/issues/5305): `MockBuilder::getMockForAbstractClass()` (this method was already [soft-deprecated](https://phpunit.de/backward-compatibility.html#soft-deprecation) in PHPUnit 10)
* [#5306](https://github.com/sebastianbergmann/phpunit/issues/5306): `MockBuilder::getMockForTrait()` (this method was already [soft-deprecated](https://phpunit.de/backward-compatibility.html#soft-deprecation) in PHPUnit 10)
* [#5307](https://github.com/sebastianbergmann/phpunit/issues/5307): `MockBuilder::enableProxyingToOriginalMethods()`, `MockBuilder::disableProxyingToOriginalMethods()`, and `MockBuilder::setProxyTarget()` (these methods were already [soft-deprecated](https://phpunit.de/backward-compatibility.html#soft-deprecation) in PHPUnit 10)
* [#5308](https://github.com/sebastianbergmann/phpunit/issues/5308): `MockBuilder::allowMockingUnknownTypes()` and `MockBuilder::disallowMockingUnknownTypes()` (these methods were already [soft-deprecated](https://phpunit.de/backward-compatibility.html#soft-deprecation) in PHPUnit 10)
* [#5309](https://github.com/sebastianbergmann/phpunit/issues/5309): `MockBuilder::enableAutoload()` and `MockBuilder::disableAutoload()` (these methods were already [soft-deprecated](https://phpunit.de/backward-compatibility.html#soft-deprecation) in PHPUnit 10)
* [#5315](https://github.com/sebastianbergmann/phpunit/issues/5315): `MockBuilder::enableArgumentCloning()` and `MockBuilder::disableArgumentCloning()` (these methods were already [soft-deprecated](https://phpunit.de/backward-compatibility.html#soft-deprecation) in PHPUnit 10)
* [#5320](https://github.com/sebastianbergmann/phpunit/issues/5320): `MockBuilder::addMethods()` (this method was already [soft-deprecated](https://phpunit.de/backward-compatibility.html#soft-deprecation) in PHPUnit 10)
* [#5415](https://github.com/sebastianbergmann/phpunit/issues/5415): Support for doubling interfaces (or classes) that have a method named `method`
* [#5421](https://github.com/sebastianbergmann/phpunit/issues/5421): `MockBuilder::enableAutoReturnValueGeneration()` and `MockBuilder::disableAutoReturnValueGeneration()` (these methods were already [soft-deprecated](https://phpunit.de/backward-compatibility.html#soft-deprecation) in PHPUnit 10)
* [#5423](https://github.com/sebastianbergmann/phpunit/issues/5423): `TestCase::returnValue()`, `TestCase::onConsecutiveCalls()`, `TestCase::returnValueMap()`, `TestCase::returnArgument()`, `TestCase::returnSelf()`, and `TestCase::returnCallback()` (these methods were already [soft-deprecated](https://phpunit.de/backward-compatibility.html#soft-deprecation) in PHPUnit 10)
* [#5472](https://github.com/sebastianbergmann/phpunit/issues/5472): `assertStringNotMatchesFormat()` and `assertStringNotMatchesFormatFile()` (these methods were already [soft-deprecated](https://phpunit.de/backward-compatibility.html#soft-deprecation) in PHPUnit 10)
* [#5535](https://github.com/sebastianbergmann/phpunit/issues/5535): Configuring expectations using `expects()` on test stubs

### Removed

* [#4600](https://github.com/sebastianbergmann/phpunit/issues/4600): Support for old cache configuration
* [#4604](https://github.com/sebastianbergmann/phpunit/issues/4604): Support for `backupStaticAttributes` attribute in XML configuration file
* [#4779](https://github.com/sebastianbergmann/phpunit/issues/4779): Support for `forceCoversAnnotation` and `beStrictAboutCoversAnnotation` attributes in XML configuration file
* [#5100](https://github.com/sebastianbergmann/phpunit/issues/5100): Support for non-static data provider methods, non-public data provider methods, and data provider methods that declare parameters
* [#5101](https://github.com/sebastianbergmann/phpunit/issues/5101): Support for PHP 8.1
* [#5272](https://github.com/sebastianbergmann/phpunit/issues/5272): Optional parameters of `PHPUnit\Framework\Constraint\IsEqual::__construct()`
* [#5329](https://github.com/sebastianbergmann/phpunit/issues/5329): Support for configuring include/exclude list for code coverage using the `<coverage>` element
* [#5482](https://github.com/sebastianbergmann/phpunit/issues/5482): `dataSet` attribute for `testCaseMethod` elements in the XML document generated by `--list-tests-xml`
* [#5514](https://github.com/sebastianbergmann/phpunit/issues/5514:) `IgnoreClassForCodeCoverage`, `IgnoreMethodForCodeCoverage`, and `IgnoreFunctionForCodeCoverage` attributes
* `CodeCoverageIgnore` attribute

[11.0.0]: https://github.com/sebastianbergmann/phpunit/compare/10.5...main
Loading

0 comments on commit 451adb1

Please sign in to comment.