diff -Nru phpunit-object-reflector-1.1.1/build.xml phpunit-object-reflector-2.0.4/build.xml --- phpunit-object-reflector-1.1.1/build.xml 2017-03-29 09:07:27.000000000 +0000 +++ phpunit-object-reflector-2.0.4/build.xml 2020-12-20 19:09:06.000000000 +0000 @@ -1,21 +1,30 @@ - + - - + + - - - + + + + + + + + + + + + diff -Nru phpunit-object-reflector-1.1.1/ChangeLog.md phpunit-object-reflector-2.0.4/ChangeLog.md --- phpunit-object-reflector-1.1.1/ChangeLog.md 2017-03-29 09:07:27.000000000 +0000 +++ phpunit-object-reflector-2.0.4/ChangeLog.md 2020-12-20 19:09:06.000000000 +0000 @@ -2,11 +2,41 @@ All notable changes to `sebastianbergmann/object-reflector` are documented in this file using the [Keep a CHANGELOG](http://keepachangelog.com/) principles. -## 1.1.1 - 2017-03-29 +## [2.0.4] - 2020-10-26 -* Fixed [#1](https://github.com/sebastianbergmann/object-reflector/issues/1): Attributes that with non-string names are not handled correctly +### Fixed -## 1.1.0 - 2017-03-16 +* `SebastianBergmann\ObjectReflector\Exception` now correctly extends `\Throwable` + +## [2.0.3] - 2020-09-28 + +### Changed + +* Changed PHP version constraint in `composer.json` from `^7.3 || ^8.0` to `>=7.3` + +## [2.0.2] - 2020-06-26 + +### Added + +* This component is now supported on PHP 8 + +## [2.0.1] - 2020-06-15 + +### Changed + +* Tests etc. are now ignored for archive exports + +## [2.0.0] - 2020-02-07 + +### Removed + +* This component is no longer supported on PHP 7.0, PHP 7.1, and PHP 7.2 + +## [1.1.1] - 2017-03-29 + +* Fixed [#1](https://github.com/sebastianbergmann/object-reflector/issues/1): Attributes with non-string names are not handled correctly + +## [1.1.0] - 2017-03-16 ### Changed @@ -16,5 +46,10 @@ * Initial release -[1.1.1]: https://github.com/sebastianbergmann/object-enumerator/compare/1.1.0...1.1.1 -[1.1.0]: https://github.com/sebastianbergmann/object-enumerator/compare/1.0.0...1.1.0 +[2.0.4]: https://github.com/sebastianbergmann/object-reflector/compare/2.0.3...2.0.4 +[2.0.3]: https://github.com/sebastianbergmann/object-reflector/compare/2.0.2...2.0.3 +[2.0.2]: https://github.com/sebastianbergmann/object-reflector/compare/2.0.1...2.0.2 +[2.0.1]: https://github.com/sebastianbergmann/object-reflector/compare/2.0.0...2.0.1 +[2.0.0]: https://github.com/sebastianbergmann/object-reflector/compare/1.1.1...2.0.0 +[1.1.1]: https://github.com/sebastianbergmann/object-reflector/compare/1.1.0...1.1.1 +[1.1.0]: https://github.com/sebastianbergmann/object-reflector/compare/1.0.0...1.1.0 diff -Nru phpunit-object-reflector-1.1.1/composer.json phpunit-object-reflector-2.0.4/composer.json --- phpunit-object-reflector-1.1.1/composer.json 2017-03-29 09:07:27.000000000 +0000 +++ phpunit-object-reflector-2.0.4/composer.json 2020-12-20 19:09:06.000000000 +0000 @@ -9,11 +9,19 @@ "email": "sebastian@phpunit.de" } ], + "prefer-stable": true, + "config": { + "platform": { + "php": "7.3.0" + }, + "optimize-autoloader": true, + "sort-packages": true + }, "require": { - "php": "^7.0" + "php": ">=7.3" }, "require-dev": { - "phpunit/phpunit": "^6.0" + "phpunit/phpunit": "^9.3" }, "autoload": { "classmap": [ @@ -27,7 +35,7 @@ }, "extra": { "branch-alias": { - "dev-master": "1.1-dev" + "dev-master": "2.0-dev" } } } diff -Nru phpunit-object-reflector-1.1.1/debian/changelog phpunit-object-reflector-2.0.4/debian/changelog --- phpunit-object-reflector-1.1.1/debian/changelog 2019-08-24 20:56:39.000000000 +0000 +++ phpunit-object-reflector-2.0.4/debian/changelog 2020-12-20 19:10:19.000000000 +0000 @@ -1,3 +1,60 @@ +phpunit-object-reflector (2.0.4-1) unstable; urgency=medium + + * Upload to unstable in sync with PHPUnit 9 + + [ Sebastian Bergmann ] + * Prepare release + + [ David Prévot ] + * Update watch file format version to 4. + * Update Standards-Version to 4.5.1 + + -- David Prévot Sun, 20 Dec 2020 15:10:19 -0400 + +phpunit-object-reflector (2.0.3-1) experimental; urgency=medium + + [ Sebastian Bergmann ] + * Prepare release + + [ David Prévot ] + * Rename main branch to debian/latest (DEP-14) + * Set Rules-Requires-Root: no. + + -- David Prévot Wed, 30 Sep 2020 13:04:39 -0400 + +phpunit-object-reflector (2.0.2-1) experimental; urgency=medium + + [ Sebastian Bergmann ] + * Ignore tests etc. from archive exports + * Support PHP 8 for https://github.com/sebastianbergmann/phpunit/issues/4325 + * Prepare release + + [ David Prévot ] + * Document gbp import-ref usage + * Use debhelper-compat 13 + * Simplify override_dh_auto_test + + -- David Prévot Sun, 28 Jun 2020 10:57:27 -1000 + +phpunit-object-reflector (2.0.0-1) experimental; urgency=medium + + * Upload version compatible with PHPUnit 9 to experimental + + [ Sebastian Bergmann ] + * Bump copyright year + * Drop support for PHP 7.0, PHP 7.1, and PHP 7.2 + * Prepare release + + [ David Prévot ] + * debian/copyright: Update copyright (years) + * debian/upstream/metadata: + set fields Bug-Database, Bug-Submit, Repository, Repository-Browse + * debian/control: + + Drop versioned dependency satisfied in (old)stable + + Update standards version to 4.5.0 + + -- David Prévot Fri, 07 Feb 2020 19:14:46 -1000 + phpunit-object-reflector (1.1.1-3) unstable; urgency=medium * Compatibility with recent PHPUnit (8) diff -Nru phpunit-object-reflector-1.1.1/debian/control phpunit-object-reflector-2.0.4/debian/control --- phpunit-object-reflector-1.1.1/debian/control 2019-08-24 20:56:09.000000000 +0000 +++ phpunit-object-reflector-2.0.4/debian/control 2020-12-20 19:09:41.000000000 +0000 @@ -4,15 +4,12 @@ Maintainer: Debian PHP PEAR Maintainers Uploaders: David Prévot , Prach Pongpanich -Build-Depends: ant, - debhelper-compat (= 12), - phpab, - phpunit, - pkg-php-tools (>= 1.32) -Standards-Version: 4.4.0 +Build-Depends: ant, debhelper-compat (= 13), phpab, phpunit, pkg-php-tools +Standards-Version: 4.5.1 Homepage: https://github.com/sebastianbergmann/object-reflector -Vcs-Git: https://salsa.debian.org/php-team/pear/phpunit-object-reflector.git +Vcs-Git: https://salsa.debian.org/php-team/pear/phpunit-object-reflector.git -b debian/latest Vcs-Browser: https://salsa.debian.org/php-team/pear/phpunit-object-reflector +Rules-Requires-Root: no Package: phpunit-object-reflector Architecture: all diff -Nru phpunit-object-reflector-1.1.1/debian/copyright phpunit-object-reflector-2.0.4/debian/copyright --- phpunit-object-reflector-1.1.1/debian/copyright 2019-08-24 20:55:18.000000000 +0000 +++ phpunit-object-reflector-2.0.4/debian/copyright 2020-12-20 19:09:30.000000000 +0000 @@ -4,7 +4,7 @@ Source: https://github.com/sebastianbergmann/object-reflector Files: * -Copyright: 2017, Sebastian Bergmann +Copyright: 2017-2020, Sebastian Bergmann License: BSD-3-clause Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions diff -Nru phpunit-object-reflector-1.1.1/debian/gbp.conf phpunit-object-reflector-2.0.4/debian/gbp.conf --- phpunit-object-reflector-1.1.1/debian/gbp.conf 1970-01-01 00:00:00.000000000 +0000 +++ phpunit-object-reflector-2.0.4/debian/gbp.conf 2020-12-20 19:09:12.000000000 +0000 @@ -0,0 +1,9 @@ +[DEFAULT] +debian-branch = debian/latest +pristine-tar = True +pristine-tar-commit = True + +## Once --filter support gets added to gbp import-ref, we should be able +## to simplify the workflow and ignore the upstream branch. +# filter = [ '.gitattributes' ] +# upstream-tag = %(version%~%-)s diff -Nru phpunit-object-reflector-1.1.1/debian/patches/0001-Compatibility-with-recent-PHPUnit-8.patch phpunit-object-reflector-2.0.4/debian/patches/0001-Compatibility-with-recent-PHPUnit-8.patch --- phpunit-object-reflector-1.1.1/debian/patches/0001-Compatibility-with-recent-PHPUnit-8.patch 2019-08-24 20:51:02.000000000 +0000 +++ phpunit-object-reflector-2.0.4/debian/patches/0001-Compatibility-with-recent-PHPUnit-8.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,21 +0,0 @@ -From: =?utf-8?q?David_Pr=C3=A9vot?= -Date: Sat, 24 Aug 2019 10:50:58 -1000 -Subject: Compatibility with recent PHPUnit (8) - ---- - tests/ObjectReflectorTest.php | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/tests/ObjectReflectorTest.php b/tests/ObjectReflectorTest.php -index ba0d97f..4c71288 100644 ---- a/tests/ObjectReflectorTest.php -+++ b/tests/ObjectReflectorTest.php -@@ -26,7 +26,7 @@ class ObjectReflectorTest extends TestCase - */ - private $objectReflector; - -- protected function setUp()/*: void */ -+ protected function setUp(): void - { - $this->objectReflector = new ObjectReflector; - } diff -Nru phpunit-object-reflector-1.1.1/debian/patches/series phpunit-object-reflector-2.0.4/debian/patches/series --- phpunit-object-reflector-1.1.1/debian/patches/series 2019-08-24 20:51:02.000000000 +0000 +++ phpunit-object-reflector-2.0.4/debian/patches/series 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -0001-Compatibility-with-recent-PHPUnit-8.patch diff -Nru phpunit-object-reflector-1.1.1/debian/README.source phpunit-object-reflector-2.0.4/debian/README.source --- phpunit-object-reflector-1.1.1/debian/README.source 1970-01-01 00:00:00.000000000 +0000 +++ phpunit-object-reflector-2.0.4/debian/README.source 2020-12-20 19:09:12.000000000 +0000 @@ -0,0 +1,8 @@ +Starting with 2.0.2, we are merging the signed upstream tags as +upstream, instead of using the tarball that doesn’t ship tests. + +# Example to import upstream 2.0.3 version +version=2.0.3 +# We still use the upstream branch to drop the .gitattributes file from upstream +gbp import-ref --upstream-tag=%\(version%~%-\)s -u$version --debian-branch=upstream +gbp import-ref --upstream-tree=BRANCH -u$version diff -Nru phpunit-object-reflector-1.1.1/debian/rules phpunit-object-reflector-2.0.4/debian/rules --- phpunit-object-reflector-1.1.1/debian/rules 2019-08-24 20:55:18.000000000 +0000 +++ phpunit-object-reflector-2.0.4/debian/rules 2020-12-20 19:09:12.000000000 +0000 @@ -12,8 +12,4 @@ tests/_fixture/ override_dh_auto_test: -ifeq (,$(findstring nocheck, $(DEB_BUILD_OPTIONS))) phpunit -else - @echo "** tests disabled" -endif diff -Nru phpunit-object-reflector-1.1.1/debian/upstream/metadata phpunit-object-reflector-2.0.4/debian/upstream/metadata --- phpunit-object-reflector-1.1.1/debian/upstream/metadata 1970-01-01 00:00:00.000000000 +0000 +++ phpunit-object-reflector-2.0.4/debian/upstream/metadata 2020-12-20 19:09:12.000000000 +0000 @@ -0,0 +1,4 @@ +Bug-Database: https://github.com/sebastianbergmann/object-reflector/issues +Bug-Submit: https://github.com/sebastianbergmann/object-reflector/issues/new +Repository: https://github.com/sebastianbergmann/object-reflector.git +Repository-Browse: https://github.com/sebastianbergmann/object-reflector diff -Nru phpunit-object-reflector-1.1.1/debian/watch phpunit-object-reflector-2.0.4/debian/watch --- phpunit-object-reflector-1.1.1/debian/watch 2019-08-24 20:48:11.000000000 +0000 +++ phpunit-object-reflector-2.0.4/debian/watch 2020-12-20 19:09:29.000000000 +0000 @@ -1,2 +1,2 @@ -version=3 +version=4 https://github.com/sebastianbergmann/object-reflector/releases .*/archive/v?([\d\.]+)\.tar.gz diff -Nru phpunit-object-reflector-1.1.1/.github/FUNDING.yml phpunit-object-reflector-2.0.4/.github/FUNDING.yml --- phpunit-object-reflector-1.1.1/.github/FUNDING.yml 1970-01-01 00:00:00.000000000 +0000 +++ phpunit-object-reflector-2.0.4/.github/FUNDING.yml 2020-12-20 19:09:06.000000000 +0000 @@ -0,0 +1 @@ +github: sebastianbergmann diff -Nru phpunit-object-reflector-1.1.1/.github/workflows/ci.yml phpunit-object-reflector-2.0.4/.github/workflows/ci.yml --- phpunit-object-reflector-1.1.1/.github/workflows/ci.yml 1970-01-01 00:00:00.000000000 +0000 +++ phpunit-object-reflector-2.0.4/.github/workflows/ci.yml 2020-12-20 19:09:06.000000000 +0000 @@ -0,0 +1,101 @@ +# https://help.github.com/en/categories/automating-your-workflow-with-github-actions + +on: + - "pull_request" + - "push" + +name: "CI" + +jobs: + coding-guidelines: + name: "Coding Guidelines" + + runs-on: "ubuntu-latest" + + steps: + - name: "Checkout" + uses: "actions/checkout@v2" + + - name: "Run friendsofphp/php-cs-fixer" + run: "php7.4 ./tools/php-cs-fixer fix --diff-format=udiff --dry-run --show-progress=dots --using-cache=no --verbose" + + type-checker: + name: "Type Checker" + + runs-on: "ubuntu-latest" + + steps: + - name: "Checkout" + uses: "actions/checkout@v2" + + - name: "Update dependencies with composer" + run: "php7.4 ./tools/composer update --no-ansi --no-interaction --no-progress" + + - name: "Run vimeo/psalm" + run: "php7.4 ./tools/psalm --config=.psalm/config.xml --no-progress --shepherd --show-info=false --stats" + + backward-compatibility: + name: Backward Compatibility + + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - name: Fetch tags + run: git fetch --depth=1 origin +refs/tags/*:refs/tags/* + + - name: Install PHP with extensions + uses: shivammathur/setup-php@v2 + with: + php-version: 7.4 + coverage: none + extensions: intl + + - name: Run roave/backward-compatibility-check + run: ./tools/roave-backward-compatibility-check --from=2.0.4 + + tests: + name: "Tests" + + runs-on: "ubuntu-latest" + + strategy: + fail-fast: false + matrix: + php-version: + - "7.3" + - "7.4" + - "8.0" + - "8.1" + + steps: + - name: "Checkout" + uses: "actions/checkout@v2" + + - name: "Install PHP with extensions" + uses: "shivammathur/setup-php@v2" + with: + php-version: "${{ matrix.php-version }}" + coverage: "pcov" + + - name: "Cache dependencies installed with composer" + uses: "actions/cache@v1" + with: + path: "~/.composer/cache" + key: "php${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-${{ hashFiles('**/composer.json') }}" + restore-keys: "php${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-" + + - name: "Install dependencies with composer" + run: "./tools/composer update --no-ansi --no-interaction --no-progress" + + - name: "Run tests with phpunit/phpunit" + run: "vendor/bin/phpunit --coverage-clover=coverage.xml" + + - name: "Send code coverage report to Codecov.io" + env: + CODECOV_TOKEN: "${{ secrets.CODECOV_TOKEN }}" + run: "bash <(curl -s https://codecov.io/bash) || true" diff -Nru phpunit-object-reflector-1.1.1/.gitignore phpunit-object-reflector-2.0.4/.gitignore --- phpunit-object-reflector-1.1.1/.gitignore 2017-03-29 09:07:27.000000000 +0000 +++ phpunit-object-reflector-2.0.4/.gitignore 2020-12-20 19:09:06.000000000 +0000 @@ -1,4 +1,6 @@ /.idea +/.php_cs /.php_cs.cache +/.phpunit.result.cache /composer.lock /vendor diff -Nru phpunit-object-reflector-1.1.1/LICENSE phpunit-object-reflector-2.0.4/LICENSE --- phpunit-object-reflector-1.1.1/LICENSE 2017-03-29 09:07:27.000000000 +0000 +++ phpunit-object-reflector-2.0.4/LICENSE 2020-12-20 19:09:06.000000000 +0000 @@ -1,6 +1,6 @@ Object Reflector -Copyright (c) 2017, Sebastian Bergmann . +Copyright (c) 2017-2020, Sebastian Bergmann . All rights reserved. Redistribution and use in source and binary forms, with or without diff -Nru phpunit-object-reflector-1.1.1/.phive/phars.xml phpunit-object-reflector-2.0.4/.phive/phars.xml --- phpunit-object-reflector-1.1.1/.phive/phars.xml 1970-01-01 00:00:00.000000000 +0000 +++ phpunit-object-reflector-2.0.4/.phive/phars.xml 2020-12-20 19:09:06.000000000 +0000 @@ -0,0 +1,6 @@ + + + + + + diff -Nru phpunit-object-reflector-1.1.1/.php_cs phpunit-object-reflector-2.0.4/.php_cs --- phpunit-object-reflector-1.1.1/.php_cs 2017-03-29 09:07:27.000000000 +0000 +++ phpunit-object-reflector-2.0.4/.php_cs 1970-01-01 00:00:00.000000000 +0000 @@ -1,79 +0,0 @@ - - -For the full copyright and license information, please view the LICENSE -file that was distributed with this source code. -EOF; - -return PhpCsFixer\Config::create() - ->setRiskyAllowed(true) - ->setRules( - [ - 'array_syntax' => ['syntax' => 'short'], - 'binary_operator_spaces' => [ - 'align_double_arrow' => true, - 'align_equals' => true - ], - 'blank_line_after_namespace' => true, - 'blank_line_before_return' => true, - 'braces' => true, - 'cast_spaces' => true, - 'concat_space' => ['spacing' => 'one'], - 'declare_strict_types' => true, - 'elseif' => true, - 'encoding' => true, - 'full_opening_tag' => true, - 'function_declaration' => true, - #'header_comment' => ['header' => $header, 'separate' => 'none'], - 'indentation_type' => true, - 'line_ending' => true, - 'lowercase_constants' => true, - 'lowercase_keywords' => true, - 'method_argument_space' => true, - 'no_alias_functions' => true, - 'no_blank_lines_after_class_opening' => true, - 'no_blank_lines_after_phpdoc' => true, - 'no_closing_tag' => true, - 'no_empty_phpdoc' => true, - 'no_empty_statement' => true, - 'no_extra_consecutive_blank_lines' => true, - 'no_leading_namespace_whitespace' => true, - 'no_singleline_whitespace_before_semicolons' => true, - 'no_spaces_after_function_name' => true, - 'no_spaces_inside_parenthesis' => true, - 'no_trailing_comma_in_list_call' => true, - 'no_trailing_whitespace' => true, - 'no_unused_imports' => true, - 'no_whitespace_in_blank_line' => true, - 'phpdoc_align' => true, - 'phpdoc_indent' => true, - 'phpdoc_no_access' => true, - 'phpdoc_no_empty_return' => true, - 'phpdoc_no_package' => true, - 'phpdoc_scalar' => true, - 'phpdoc_separation' => true, - 'phpdoc_to_comment' => true, - 'phpdoc_trim' => true, - 'phpdoc_types' => true, - 'phpdoc_var_without_name' => true, - 'self_accessor' => true, - 'simplified_null_return' => true, - 'single_blank_line_at_eof' => true, - 'single_import_per_statement' => true, - 'single_line_after_imports' => true, - 'single_quote' => true, - 'ternary_operator_spaces' => true, - 'trim_array_spaces' => true, - 'visibility_required' => true, - ] - ) - ->setFinder( - PhpCsFixer\Finder::create() - ->files() - ->in(__DIR__ . '/src') - ->in(__DIR__ . '/tests') - ->name('*.php') - ); diff -Nru phpunit-object-reflector-1.1.1/.php_cs.dist phpunit-object-reflector-2.0.4/.php_cs.dist --- phpunit-object-reflector-1.1.1/.php_cs.dist 1970-01-01 00:00:00.000000000 +0000 +++ phpunit-object-reflector-2.0.4/.php_cs.dist 2020-12-20 19:09:06.000000000 +0000 @@ -0,0 +1,213 @@ + + +For the full copyright and license information, please view the LICENSE +file that was distributed with this source code. +EOF; + +$finder = PhpCsFixer\Finder::create() + ->files() + ->in(__DIR__ . '/src') + ->in(__DIR__ . '/tests'); + +return PhpCsFixer\Config::create() + ->setFinder($finder) + ->setRiskyAllowed(true) + ->setRules([ + 'align_multiline_comment' => true, + 'array_indentation' => true, + 'array_syntax' => ['syntax' => 'short'], + 'binary_operator_spaces' => [ + 'operators' => [ + '=' => 'align', + '=>' => 'align', + ], + ], + 'blank_line_after_namespace' => true, + 'blank_line_before_statement' => [ + 'statements' => [ + 'break', + 'continue', + 'declare', + 'do', + 'for', + 'foreach', + 'if', + 'include', + 'include_once', + 'require', + 'require_once', + 'return', + 'switch', + 'throw', + 'try', + 'while', + 'yield', + ], + ], + 'braces' => true, + 'cast_spaces' => true, + 'class_attributes_separation' => ['elements' => ['const', 'method', 'property']], + 'combine_consecutive_issets' => true, + 'combine_consecutive_unsets' => true, + 'compact_nullable_typehint' => true, + 'concat_space' => ['spacing' => 'one'], + 'declare_equal_normalize' => ['space' => 'none'], + 'declare_strict_types' => true, + 'dir_constant' => true, + 'elseif' => true, + 'encoding' => true, + 'full_opening_tag' => true, + 'function_declaration' => true, + 'global_namespace_import' => [ + 'import_classes' => true, + 'import_constants' => true, + 'import_functions' => true, + ], + 'header_comment' => ['header' => $header, 'separate' => 'none'], + 'indentation_type' => true, + 'is_null' => true, + 'line_ending' => true, + 'list_syntax' => ['syntax' => 'short'], + 'logical_operators' => true, + 'lowercase_cast' => true, + 'lowercase_constants' => true, + 'lowercase_keywords' => true, + 'lowercase_static_reference' => true, + 'magic_constant_casing' => true, + 'method_argument_space' => ['ensure_fully_multiline' => true], + 'modernize_types_casting' => true, + 'multiline_comment_opening_closing' => true, + 'multiline_whitespace_before_semicolons' => true, + 'native_constant_invocation' => false, + 'native_function_casing' => false, + 'native_function_invocation' => false, + 'new_with_braces' => false, + 'no_alias_functions' => true, + 'no_alternative_syntax' => true, + 'no_blank_lines_after_class_opening' => true, + 'no_blank_lines_after_phpdoc' => true, + 'no_blank_lines_before_namespace' => true, + 'no_closing_tag' => true, + 'no_empty_comment' => true, + 'no_empty_phpdoc' => true, + 'no_empty_statement' => true, + 'no_extra_blank_lines' => true, + 'no_homoglyph_names' => true, + 'no_leading_import_slash' => true, + 'no_leading_namespace_whitespace' => true, + 'no_mixed_echo_print' => ['use' => 'print'], + 'no_multiline_whitespace_around_double_arrow' => true, + 'no_null_property_initialization' => true, + 'no_php4_constructor' => true, + 'no_short_bool_cast' => true, + 'no_short_echo_tag' => true, + 'no_singleline_whitespace_before_semicolons' => true, + 'no_spaces_after_function_name' => true, + 'no_spaces_inside_parenthesis' => true, + 'no_superfluous_elseif' => true, + 'no_superfluous_phpdoc_tags' => [ + 'allow_mixed' => true, + ], + 'no_trailing_comma_in_list_call' => true, + 'no_trailing_comma_in_singleline_array' => true, + 'no_trailing_whitespace' => true, + 'no_trailing_whitespace_in_comment' => true, + 'no_unneeded_control_parentheses' => true, + 'no_unneeded_curly_braces' => true, + 'no_unneeded_final_method' => true, + 'no_unreachable_default_argument_value' => true, + 'no_unset_on_property' => true, + 'no_unused_imports' => true, + 'no_useless_else' => true, + 'no_useless_return' => true, + 'no_whitespace_before_comma_in_array' => true, + 'no_whitespace_in_blank_line' => true, + 'non_printable_character' => true, + 'normalize_index_brace' => true, + 'object_operator_without_whitespace' => true, + 'ordered_class_elements' => [ + 'order' => [ + 'use_trait', + 'constant_public', + 'constant_protected', + 'constant_private', + 'property_public_static', + 'property_protected_static', + 'property_private_static', + 'property_public', + 'property_protected', + 'property_private', + 'method_public_static', + 'construct', + 'destruct', + 'magic', + 'phpunit', + 'method_public', + 'method_protected', + 'method_private', + 'method_protected_static', + 'method_private_static', + ], + ], + 'ordered_imports' => [ + 'imports_order' => [ + PhpCsFixer\Fixer\Import\OrderedImportsFixer::IMPORT_TYPE_CONST, + PhpCsFixer\Fixer\Import\OrderedImportsFixer::IMPORT_TYPE_FUNCTION, + PhpCsFixer\Fixer\Import\OrderedImportsFixer::IMPORT_TYPE_CLASS, + ] + ], + 'ordered_interfaces' => [ + 'direction' => 'ascend', + 'order' => 'alpha', + ], + 'phpdoc_add_missing_param_annotation' => false, + 'phpdoc_align' => true, + 'phpdoc_annotation_without_dot' => true, + 'phpdoc_indent' => true, + 'phpdoc_no_access' => true, + 'phpdoc_no_empty_return' => true, + 'phpdoc_no_package' => true, + 'phpdoc_order' => true, + 'phpdoc_return_self_reference' => true, + 'phpdoc_scalar' => true, + 'phpdoc_separation' => true, + 'phpdoc_single_line_var_spacing' => true, + 'phpdoc_summary' => true, + 'phpdoc_to_comment' => true, + 'phpdoc_trim' => true, + 'phpdoc_trim_consecutive_blank_line_separation' => true, + 'phpdoc_types' => ['groups' => ['simple', 'meta']], + 'phpdoc_types_order' => true, + 'phpdoc_var_without_name' => true, + 'pow_to_exponentiation' => true, + 'protected_to_private' => true, + 'return_assignment' => true, + 'return_type_declaration' => ['space_before' => 'none'], + 'self_accessor' => true, + 'semicolon_after_instruction' => true, + 'set_type_to_cast' => true, + 'short_scalar_cast' => true, + 'simplified_null_return' => false, + 'single_blank_line_at_eof' => true, + 'single_import_per_statement' => true, + 'single_line_after_imports' => true, + 'single_quote' => true, + 'standardize_not_equals' => true, + 'ternary_to_null_coalescing' => true, + 'trailing_comma_in_multiline_array' => true, + 'trim_array_spaces' => true, + 'unary_operator_spaces' => true, + 'visibility_required' => [ + 'elements' => [ + 'const', + 'method', + 'property', + ], + ], + 'void_return' => true, + 'whitespace_after_comma_in_array' => true, + ]); diff -Nru phpunit-object-reflector-1.1.1/phpunit.xml phpunit-object-reflector-2.0.4/phpunit.xml --- phpunit-object-reflector-1.1.1/phpunit.xml 2017-03-29 09:07:27.000000000 +0000 +++ phpunit-object-reflector-2.0.4/phpunit.xml 2020-12-20 19:09:06.000000000 +0000 @@ -1,19 +1,24 @@ - - tests - + + + tests + + - - + + src - - + + diff -Nru phpunit-object-reflector-1.1.1/.psalm/baseline.xml phpunit-object-reflector-2.0.4/.psalm/baseline.xml --- phpunit-object-reflector-1.1.1/.psalm/baseline.xml 1970-01-01 00:00:00.000000000 +0000 +++ phpunit-object-reflector-2.0.4/.psalm/baseline.xml 2020-12-20 19:09:06.000000000 +0000 @@ -0,0 +1,8 @@ + + + + + is_object($object) + + + diff -Nru phpunit-object-reflector-1.1.1/.psalm/config.xml phpunit-object-reflector-2.0.4/.psalm/config.xml --- phpunit-object-reflector-1.1.1/.psalm/config.xml 1970-01-01 00:00:00.000000000 +0000 +++ phpunit-object-reflector-2.0.4/.psalm/config.xml 2020-12-20 19:09:06.000000000 +0000 @@ -0,0 +1,16 @@ + + + + + + + + + diff -Nru phpunit-object-reflector-1.1.1/README.md phpunit-object-reflector-2.0.4/README.md --- phpunit-object-reflector-1.1.1/README.md 2017-03-29 09:07:27.000000000 +0000 +++ phpunit-object-reflector-2.0.4/README.md 2020-12-20 19:09:06.000000000 +0000 @@ -1,4 +1,7 @@ -# Object Reflector +# sebastian/object-reflector + +[![CI Status](https://github.com/sebastianbergmann/object-reflector/workflows/CI/badge.svg)](https://github.com/sebastianbergmann/object-reflector/actions) +[![Type Coverage](https://shepherd.dev/github/sebastianbergmann/object-reflector/coverage.svg)](https://shepherd.dev/github/sebastianbergmann/object-reflector) Allows reflection of object attributes, including inherited and non-public ones. @@ -6,9 +9,12 @@ You can add this library as a local, per-project dependency to your project using [Composer](https://getcomposer.org/): - composer require sebastian/object-reflector +``` +composer require sebastian/object-reflector +``` If you only need this library during development, for instance to run your project's test suite, then you should add it as a development-time dependency: - composer require --dev sebastian/object-reflector - +``` +composer require --dev sebastian/object-reflector +``` diff -Nru phpunit-object-reflector-1.1.1/src/Exception.php phpunit-object-reflector-2.0.4/src/Exception.php --- phpunit-object-reflector-1.1.1/src/Exception.php 2017-03-29 09:07:27.000000000 +0000 +++ phpunit-object-reflector-2.0.4/src/Exception.php 2020-12-20 19:09:06.000000000 +0000 @@ -1,17 +1,16 @@ - * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ - -declare(strict_types=1); - namespace SebastianBergmann\ObjectReflector; -interface Exception +use Throwable; + +interface Exception extends Throwable { } diff -Nru phpunit-object-reflector-1.1.1/src/InvalidArgumentException.php phpunit-object-reflector-2.0.4/src/InvalidArgumentException.php --- phpunit-object-reflector-1.1.1/src/InvalidArgumentException.php 2017-03-29 09:07:27.000000000 +0000 +++ phpunit-object-reflector-2.0.4/src/InvalidArgumentException.php 2020-12-20 19:09:06.000000000 +0000 @@ -1,15 +1,12 @@ - * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ - -declare(strict_types=1); - namespace SebastianBergmann\ObjectReflector; class InvalidArgumentException extends \InvalidArgumentException implements Exception diff -Nru phpunit-object-reflector-1.1.1/src/ObjectReflector.php phpunit-object-reflector-2.0.4/src/ObjectReflector.php --- phpunit-object-reflector-1.1.1/src/ObjectReflector.php 2017-03-29 09:07:27.000000000 +0000 +++ phpunit-object-reflector-2.0.4/src/ObjectReflector.php 2020-12-20 19:09:06.000000000 +0000 @@ -1,24 +1,24 @@ - * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ - -declare(strict_types=1); - namespace SebastianBergmann\ObjectReflector; +use function count; +use function explode; +use function get_class; +use function is_object; + class ObjectReflector { /** * @param object $object * - * @return array - * * @throws InvalidArgumentException */ public function getAttributes($object): array diff -Nru phpunit-object-reflector-1.1.1/tests/_fixture/ChildClass.php phpunit-object-reflector-2.0.4/tests/_fixture/ChildClass.php --- phpunit-object-reflector-1.1.1/tests/_fixture/ChildClass.php 2017-03-29 09:07:27.000000000 +0000 +++ phpunit-object-reflector-2.0.4/tests/_fixture/ChildClass.php 2020-12-20 19:09:06.000000000 +0000 @@ -1,21 +1,20 @@ - * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ - -declare(strict_types=1); - namespace SebastianBergmann\ObjectReflector\TestFixture; class ChildClass extends ParentClass { private $privateInChild = 'private'; + private $protectedInChild = 'protected'; + private $publicInChild = 'public'; public function __construct() diff -Nru phpunit-object-reflector-1.1.1/tests/_fixture/ClassWithIntegerAttributeName.php phpunit-object-reflector-2.0.4/tests/_fixture/ClassWithIntegerAttributeName.php --- phpunit-object-reflector-1.1.1/tests/_fixture/ClassWithIntegerAttributeName.php 2017-03-29 09:07:27.000000000 +0000 +++ phpunit-object-reflector-2.0.4/tests/_fixture/ClassWithIntegerAttributeName.php 2020-12-20 19:09:06.000000000 +0000 @@ -1,15 +1,12 @@ - * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ - -declare(strict_types=1); - namespace SebastianBergmann\ObjectReflector\TestFixture; class ClassWithIntegerAttributeName diff -Nru phpunit-object-reflector-1.1.1/tests/_fixture/ParentClass.php phpunit-object-reflector-2.0.4/tests/_fixture/ParentClass.php --- phpunit-object-reflector-1.1.1/tests/_fixture/ParentClass.php 2017-03-29 09:07:27.000000000 +0000 +++ phpunit-object-reflector-2.0.4/tests/_fixture/ParentClass.php 2020-12-20 19:09:06.000000000 +0000 @@ -1,20 +1,19 @@ - * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ - -declare(strict_types=1); - namespace SebastianBergmann\ObjectReflector\TestFixture; class ParentClass { private $privateInParent = 'private'; + private $protectedInParent = 'protected'; + private $publicInParent = 'public'; } diff -Nru phpunit-object-reflector-1.1.1/tests/ObjectReflectorTest.php phpunit-object-reflector-2.0.4/tests/ObjectReflectorTest.php --- phpunit-object-reflector-1.1.1/tests/ObjectReflectorTest.php 2017-03-29 09:07:27.000000000 +0000 +++ phpunit-object-reflector-2.0.4/tests/ObjectReflectorTest.php 2020-12-20 19:09:06.000000000 +0000 @@ -1,15 +1,12 @@ - * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ - -declare(strict_types=1); - namespace SebastianBergmann\ObjectReflector; use PHPUnit\Framework\TestCase; @@ -17,51 +14,51 @@ use SebastianBergmann\ObjectReflector\TestFixture\ClassWithIntegerAttributeName; /** - * @covers SebastianBergmann\ObjectReflector\ObjectReflector + * @covers \SebastianBergmann\ObjectReflector\ObjectReflector */ -class ObjectReflectorTest extends TestCase +final class ObjectReflectorTest extends TestCase { /** * @var ObjectReflector */ private $objectReflector; - protected function setUp()/*: void */ + protected function setUp(): void { $this->objectReflector = new ObjectReflector; } - public function testReflectsAttributesOfObject()/*: void */ + public function testReflectsAttributesOfObject(): void { $o = new ChildClass; $this->assertEquals( [ - 'privateInChild' => 'private', - 'protectedInChild' => 'protected', - 'publicInChild' => 'public', - 'undeclared' => 'undeclared', - 'SebastianBergmann\ObjectReflector\TestFixture\ParentClass::privateInParent' => 'private', + 'privateInChild' => 'private', + 'protectedInChild' => 'protected', + 'publicInChild' => 'public', + 'undeclared' => 'undeclared', + 'SebastianBergmann\ObjectReflector\TestFixture\ParentClass::privateInParent' => 'private', 'SebastianBergmann\ObjectReflector\TestFixture\ParentClass::protectedInParent' => 'protected', - 'SebastianBergmann\ObjectReflector\TestFixture\ParentClass::publicInParent' => 'public', + 'SebastianBergmann\ObjectReflector\TestFixture\ParentClass::publicInParent' => 'public', ], $this->objectReflector->getAttributes($o) ); } - public function testReflectsAttributeWithIntegerName()/*: void */ + public function testReflectsAttributeWithIntegerName(): void { $o = new ClassWithIntegerAttributeName; $this->assertEquals( [ - 1 => 2 + 1 => 2, ], $this->objectReflector->getAttributes($o) ); } - public function testRaisesExceptionWhenPassedArgumentIsNotAnObject()/*: void */ + public function testRaisesExceptionWhenPassedArgumentIsNotAnObject(): void { $this->expectException(InvalidArgumentException::class); diff -Nru phpunit-object-reflector-1.1.1/.travis.yml phpunit-object-reflector-2.0.4/.travis.yml --- phpunit-object-reflector-1.1.1/.travis.yml 2017-03-29 09:07:27.000000000 +0000 +++ phpunit-object-reflector-2.0.4/.travis.yml 1970-01-01 00:00:00.000000000 +0000 @@ -1,26 +0,0 @@ -language: php - -php: - - 7.0 - - 7.0snapshot - - 7.1 - - 7.1snapshot - - master - -sudo: false - -before_install: - - composer self-update - - composer clear-cache - -install: - - travis_retry composer update --no-interaction --no-ansi --no-progress --no-suggest --optimize-autoloader --prefer-stable - -script: - - ./vendor/bin/phpunit --coverage-clover=coverage.xml - -after_success: - - bash <(curl -s https://codecov.io/bash) - -notifications: - email: false