From 72f14b944d2fa365c0b211ca3f8983a63697df06 Mon Sep 17 00:00:00 2001 From: Chaoyi Zha Date: Sat, 13 Feb 2016 22:53:46 -0500 Subject: [PATCH] Attempt to fix tests css-selector --- .travis.yml | 3 +- composer.json | 5 +- composer.lock | 777 ++- tests/AuthTest.php | 18 + tests/ExampleTest.php | 15 - tests/IndexTest.php | 17 + tests/test_env | 2 +- vendor/composer/ClassLoader.php | 8 +- vendor/composer/autoload_classmap.php | 21 +- vendor/composer/autoload_files.php | 12 +- vendor/composer/autoload_namespaces.php | 1 - vendor/composer/autoload_psr4.php | 3 + vendor/composer/autoload_real.php | 12 +- vendor/composer/installed.json | 4435 +++++++++-------- vendor/doctrine/inflector/.travis.yml | 12 +- vendor/doctrine/inflector/LICENSE | 2 +- vendor/doctrine/inflector/composer.json | 2 +- .../Doctrine/Common/Inflector/Inflector.php | 83 +- .../Tests/Common/Inflector/InflectorTest.php | 187 +- vendor/illuminate/auth/Access/Gate.php | 10 +- .../illuminate/auth/AuthServiceProvider.php | 7 +- vendor/illuminate/auth/Guard.php | 6 +- .../auth/Passwords/PasswordBroker.php | 3 +- .../broadcasting/BroadcastManager.php | 12 +- .../Broadcasters/PusherBroadcaster.php | 10 + vendor/illuminate/bus/Dispatcher.php | 7 +- vendor/illuminate/cache/CacheManager.php | 12 +- vendor/illuminate/cache/DatabaseStore.php | 47 +- vendor/illuminate/cache/FileStore.php | 6 +- vendor/illuminate/cache/RedisTaggedCache.php | 4 +- vendor/illuminate/cache/Repository.php | 60 +- vendor/illuminate/cache/TagSet.php | 10 + vendor/illuminate/cache/TaggedCache.php | 181 +- vendor/illuminate/console/Application.php | 10 +- vendor/illuminate/console/Command.php | 10 +- .../illuminate/console/ConfirmableTrait.php | 4 +- .../illuminate/console/GeneratorCommand.php | 2 +- vendor/illuminate/console/Parser.php | 4 +- .../illuminate/console/Scheduling/Event.php | 17 +- vendor/illuminate/console/composer.json | 2 +- vendor/illuminate/container/Container.php | 4 + vendor/illuminate/cookie/CookieJar.php | 19 +- .../cookie/CookieServiceProvider.php | 2 +- .../cookie/Middleware/EncryptCookies.php | 4 +- .../database/Connectors/ConnectionFactory.php | 2 +- .../Console/Migrations/RefreshCommand.php | 8 +- .../Console/Migrations/StatusCommand.php | 30 +- .../database/DatabaseServiceProvider.php | 4 + .../database/DetectsLostConnections.php | 1 + .../illuminate/database/Eloquent/Builder.php | 30 +- .../database/Eloquent/Collection.php | 6 +- .../illuminate/database/Eloquent/Factory.php | 29 +- vendor/illuminate/database/Eloquent/Model.php | 95 +- .../Eloquent/Relations/BelongsToMany.php | 6 +- vendor/illuminate/database/Grammar.php | 4 +- vendor/illuminate/database/Query/Builder.php | 34 +- .../database/Query/Grammars/Grammar.php | 27 +- .../Query/Grammars/PostgresGrammar.php | 65 + .../Query/Grammars/SqlServerGrammar.php | 81 +- .../illuminate/database/Query/JoinClause.php | 72 +- .../illuminate/database/Schema/Blueprint.php | 19 +- .../database/Schema/Grammars/MySqlGrammar.php | 20 +- .../Schema/Grammars/PostgresGrammar.php | 18 +- .../Schema/Grammars/SQLiteGrammar.php | 14 +- .../Schema/Grammars/SqlServerGrammar.php | 8 + vendor/illuminate/database/composer.json | 3 +- vendor/illuminate/encryption/Encrypter.php | 14 +- .../illuminate/encryption/McryptEncrypter.php | 13 +- vendor/illuminate/encryption/composer.json | 2 +- vendor/illuminate/events/Dispatcher.php | 4 +- vendor/illuminate/filesystem/Filesystem.php | 2 +- .../filesystem/FilesystemAdapter.php | 6 +- .../filesystem/FilesystemManager.php | 54 +- .../filesystem/FilesystemServiceProvider.php | 4 +- .../hashing/HashServiceProvider.php | 4 +- vendor/illuminate/http/Request.php | 16 +- .../pagination/LengthAwarePaginator.php | 2 +- .../pagination/PaginationServiceProvider.php | 8 +- vendor/illuminate/pagination/Paginator.php | 2 +- .../queue/Connectors/SqsConnector.php | 25 +- .../queue/Console/ListFailedCommand.php | 2 +- .../illuminate/queue/Console/RetryCommand.php | 31 +- vendor/illuminate/queue/IronQueue.php | 2 +- vendor/illuminate/queue/SerializesModels.php | 4 +- vendor/illuminate/queue/SqsQueue.php | 19 +- vendor/illuminate/session/Store.php | 33 +- vendor/illuminate/support/Arr.php | 33 +- vendor/illuminate/support/ClassLoader.php | 2 +- vendor/illuminate/support/Collection.php | 51 +- vendor/illuminate/support/Debug/Dumper.php | 8 +- vendor/illuminate/support/Facades/Facade.php | 2 + vendor/illuminate/support/Pluralizer.php | 3 + vendor/illuminate/support/ViewErrorBag.php | 6 +- vendor/illuminate/support/composer.json | 4 +- vendor/illuminate/support/helpers.php | 19 +- vendor/illuminate/translation/Translator.php | 28 +- vendor/illuminate/validation/Validator.php | 47 +- vendor/illuminate/view/Factory.php | 14 + .../illuminate/view/ViewServiceProvider.php | 4 +- vendor/mtdowling/cron-expression/README.md | 13 +- .../mtdowling/cron-expression/composer.json | 2 +- .../cron-expression/phpunit.xml.dist | 17 - .../src/Cron/AbstractField.php | 39 + .../src/Cron/CronExpression.php | 60 +- .../src/Cron/DayOfWeekField.php | 5 +- .../cron-expression/src/Cron/HoursField.php | 50 +- .../cron-expression/src/Cron/MinutesField.php | 39 +- .../tests/Cron/CronExpressionTest.php | 36 + .../tests/Cron/HoursFieldTest.php | 36 + .../tests/Cron/MonthFieldTest.php | 19 + vendor/nesbot/carbon/.editorconfig | 14 - vendor/nesbot/carbon/composer.json | 15 +- vendor/nesbot/carbon/readme.md | 11 +- vendor/nesbot/carbon/src/Carbon/Carbon.php | 550 +- .../carbon/src/Carbon/CarbonInterval.php | 100 +- vendor/nesbot/carbon/src/Carbon/Lang/ar.php | 11 +- vendor/nesbot/carbon/src/Carbon/Lang/az.php | 3 +- vendor/nesbot/carbon/src/Carbon/Lang/bg.php | 1 - vendor/nesbot/carbon/src/Carbon/Lang/bn.php | 1 - vendor/nesbot/carbon/src/Carbon/Lang/ca.php | 1 - vendor/nesbot/carbon/src/Carbon/Lang/cs.php | 1 - vendor/nesbot/carbon/src/Carbon/Lang/da.php | 1 - vendor/nesbot/carbon/src/Carbon/Lang/de.php | 1 - vendor/nesbot/carbon/src/Carbon/Lang/el.php | 1 - vendor/nesbot/carbon/src/Carbon/Lang/en.php | 1 - vendor/nesbot/carbon/src/Carbon/Lang/eo.php | 1 - vendor/nesbot/carbon/src/Carbon/Lang/es.php | 5 +- vendor/nesbot/carbon/src/Carbon/Lang/eu.php | 1 - vendor/nesbot/carbon/src/Carbon/Lang/fa.php | 1 - vendor/nesbot/carbon/src/Carbon/Lang/fi.php | 1 - vendor/nesbot/carbon/src/Carbon/Lang/fo.php | 1 - vendor/nesbot/carbon/src/Carbon/Lang/fr.php | 1 - vendor/nesbot/carbon/src/Carbon/Lang/he.php | 1 - vendor/nesbot/carbon/src/Carbon/Lang/hr.php | 1 - vendor/nesbot/carbon/src/Carbon/Lang/hu.php | 1 - vendor/nesbot/carbon/src/Carbon/Lang/id.php | 1 - vendor/nesbot/carbon/src/Carbon/Lang/it.php | 1 - vendor/nesbot/carbon/src/Carbon/Lang/ja.php | 1 - vendor/nesbot/carbon/src/Carbon/Lang/ko.php | 1 - vendor/nesbot/carbon/src/Carbon/Lang/lt.php | 3 +- vendor/nesbot/carbon/src/Carbon/Lang/lv.php | 1 - vendor/nesbot/carbon/src/Carbon/Lang/ms.php | 1 - vendor/nesbot/carbon/src/Carbon/Lang/nl.php | 1 - vendor/nesbot/carbon/src/Carbon/Lang/no.php | 1 - vendor/nesbot/carbon/src/Carbon/Lang/pl.php | 1 - vendor/nesbot/carbon/src/Carbon/Lang/pt.php | 1 - .../nesbot/carbon/src/Carbon/Lang/pt_BR.php | 5 +- vendor/nesbot/carbon/src/Carbon/Lang/ro.php | 1 - vendor/nesbot/carbon/src/Carbon/Lang/ru.php | 1 - vendor/nesbot/carbon/src/Carbon/Lang/sk.php | 1 - vendor/nesbot/carbon/src/Carbon/Lang/sl.php | 37 +- vendor/nesbot/carbon/src/Carbon/Lang/sr.php | 1 - vendor/nesbot/carbon/src/Carbon/Lang/sv.php | 1 - vendor/nesbot/carbon/src/Carbon/Lang/th.php | 2 - vendor/nesbot/carbon/src/Carbon/Lang/tr.php | 1 - vendor/nesbot/carbon/src/Carbon/Lang/uk.php | 1 - vendor/nesbot/carbon/src/Carbon/Lang/uz.php | 1 - vendor/nesbot/carbon/src/Carbon/Lang/vi.php | 1 - .../nesbot/carbon/src/Carbon/Lang/zh-TW.php | 1 - vendor/nesbot/carbon/src/Carbon/Lang/zh.php | 1 - vendor/paragonie/random_compat/.gitignore | 4 - .../paragonie/random_compat/.scrutinizer.yml | 4 - vendor/paragonie/random_compat/.travis.yml | 26 - vendor/paragonie/random_compat/ERRATA.md | 2 +- vendor/paragonie/random_compat/README.md | 27 + vendor/paragonie/random_compat/composer.json | 3 + .../random_compat/lib/byte_safe_strings.php | 15 +- .../random_compat/lib/cast_to_int.php | 15 +- vendor/paragonie/random_compat/lib/random.php | 158 +- .../lib/random_bytes_com_dotnet.php | 6 +- .../lib/random_bytes_dev_urandom.php | 33 +- .../lib/random_bytes_libsodium.php | 4 +- .../random_compat/lib/random_bytes_mcrypt.php | 20 +- .../lib/random_bytes_openssl.php | 19 +- .../random_compat/lib/random_int.php | 6 + .../random_compat/tests/full/DieHardTest.php | 61 - .../random_compat/tests/full/StatTest.php | 52 - .../paragonie/random_compat/tests/phpunit.sh | 122 - .../random_compat/tests/specific/capicom.php | 7 - .../tests/specific/dev_urandom.php | 7 - .../tests/specific/libsodium.php | 7 - .../random_compat/tests/specific/mcrypt.php | 7 - .../random_compat/tests/specific/openssl.php | 7 - .../tests/unit/RandomBytesTest.php | 52 - .../tests/unit/RandomIntTest.php | 52 - .../random_compat/tests/unit/UtilityTest.php | 95 - vendor/phpunit/php-code-coverage/.gitignore | 1 + vendor/phpunit/php-code-coverage/.travis.yml | 4 - .../phpunit/php-code-coverage/CONTRIBUTING.md | 6 +- vendor/phpunit/php-code-coverage/README.md | 8 +- .../phpunit/php-code-coverage/composer.json | 9 +- .../php-code-coverage/scripts/auto_append.php | 5 - .../scripts/auto_prepend.php | 10 - .../php-code-coverage/src/CodeCoverage.php | 296 +- .../src/CodeCoverage/Driver/PHPDBG.php | 12 +- .../src/CodeCoverage/Driver/Xdebug.php | 8 +- .../src/CodeCoverage/Exception.php | 18 - .../Exception/UnintentionallyCoveredCode.php | 18 - .../src/CodeCoverage/Filter.php | 129 +- .../src/CodeCoverage/Report/Clover.php | 38 +- .../src/CodeCoverage/Report/Crap4j.php | 2 +- .../src/CodeCoverage/Report/Factory.php | 2 +- .../src/CodeCoverage/Report/HTML.php | 6 +- .../src/CodeCoverage/Report/HTML/Renderer.php | 14 +- .../Report/HTML/Renderer/Dashboard.php | 46 +- .../Report/HTML/Renderer/Directory.php | 8 +- .../Report/HTML/Renderer/File.php | 48 +- .../src/CodeCoverage/Report/Node.php | 2 +- .../CodeCoverage/Report/Node/Directory.php | 24 +- .../src/CodeCoverage/Report/Node/File.php | 94 +- .../src/CodeCoverage/Report/PHP.php | 2 - .../src/CodeCoverage/Report/Text.php | 20 +- .../src/CodeCoverage/Report/XML.php | 8 +- .../CodeCoverage/Report/XML/File/Coverage.php | 2 +- .../src/CodeCoverage/Report/XML/Tests.php | 4 +- .../src/CodeCoverage/Util.php | 8 +- .../Util/InvalidArgumentHelper.php | 39 - .../tests/PHP/CodeCoverage/FilterTest.php | 104 +- .../PHP/CodeCoverage/Report/CloverTest.php | 10 +- .../PHP/CodeCoverage/Report/FactoryTest.php | 146 +- .../tests/PHP/CodeCoverage/UtilTest.php | 2 + .../tests/PHP/CodeCoverageTest.php | 161 +- .../php-code-coverage/tests/TestCase.php | 147 +- .../tests/_files/BankAccount-clover.xml | 10 +- .../class-with-anonymous-function-clover.xml | 6 +- .../tests/_files/ignored-lines-clover.xml | 4 +- ...urce_with_class_and_anonymous_function.php | 2 +- .../phpunit/phpunit-mock-objects/.travis.yml | 4 - .../phpunit-mock-objects/CONTRIBUTING.md | 6 +- vendor/phpunit/phpunit-mock-objects/README.md | 2 +- .../phpunit-mock-objects/composer.json | 6 +- .../MockObject/Builder/InvocationMocker.php | 21 +- .../src/Framework/MockObject/Generator.php | 313 +- .../Generator/mocked_class.tpl.dist | 9 +- .../Generator/mocked_method.tpl.dist | 8 +- .../Generator/mocked_static_method.tpl.dist | 2 +- .../Generator/proxied_method.tpl.dist | 8 +- .../src/Framework/MockObject/Invocation.php | 4 + .../MockObject/Invocation/Object.php | 5 +- .../MockObject/Invocation/Static.php | 54 +- .../Framework/MockObject/InvocationMocker.php | 19 +- .../src/Framework/MockObject/Matcher.php | 4 +- .../Matcher/ConsecutiveParameters.php | 4 +- .../MockObject/Matcher/InvokedRecorder.php | 2 +- .../MockObject/Matcher/Parameters.php | 2 +- .../src/Framework/MockObject/MockBuilder.php | 4 +- .../src/Framework/MockObject/MockObject.php | 5 + .../Framework/MockObject/Stub/Exception.php | 9 +- .../tests/GeneratorTest.php | 103 +- .../tests/MockBuilderTest.php | 18 +- .../tests/MockObject/232.phpt | 31 +- .../MockObject/Invocation/ObjectTest.php | 39 +- .../MockObject/Invocation/StaticTest.php | 48 +- .../Matcher/ConsecutiveParametersTest.php | 16 +- .../tests/MockObject/abstract_class.phpt | 39 +- .../tests/MockObject/class.phpt | 33 +- .../MockObject/class_call_parent_clone.phpt | 19 +- .../class_call_parent_constructor.phpt | 19 +- .../class_dont_call_parent_clone.phpt | 19 +- .../class_dont_call_parent_constructor.phpt | 19 +- ...ing_interface_call_parent_constructor.phpt | 19 +- ...nterface_dont_call_parent_constructor.phpt | 19 +- .../tests/MockObject/class_partial.phpt | 27 +- .../class_with_method_named_method.phpt | 27 +- ...s_with_method_with_variadic_arguments.phpt | 31 +- .../tests/MockObject/interface.phpt | 27 +- .../invocation_object_clone_object.phpt | 35 +- .../tests/MockObject/namespaced_class.phpt | 33 +- .../namespaced_class_call_parent_clone.phpt | 19 +- ...espaced_class_call_parent_constructor.phpt | 19 +- ...mespaced_class_dont_call_parent_clone.phpt | 19 +- ...ed_class_dont_call_parent_constructor.phpt | 19 +- ...ing_interface_call_parent_constructor.phpt | 19 +- ...nterface_dont_call_parent_constructor.phpt | 19 +- .../MockObject/namespaced_class_partial.phpt | 27 +- .../MockObject/namespaced_interface.phpt | 27 +- .../tests/MockObject/nonexistent_class.phpt | 21 +- .../nonexistent_class_with_namespace.phpt | 21 +- ...ith_namespace_starting_with_separator.phpt | 21 +- .../tests/MockObject/proxy.phpt | 25 +- .../MockObject/scalar_type_declarations.phpt | 27 +- .../tests/MockObject/wsdl_class.phpt | 4 +- .../MockObject/wsdl_class_namespace.phpt | 4 +- .../tests/MockObject/wsdl_class_partial.phpt | 6 +- .../tests/MockObjectTest.php | 128 +- .../tests/_fixture/FunctionCallback.php | 2 +- .../tests/_fixture/MethodCallback.php | 4 +- .../tests/_fixture/Mockable.php | 2 +- .../tests/_fixture/SomeClass.php | 4 +- vendor/phpunit/phpunit/.php_cs | 2 +- vendor/phpunit/phpunit/.travis.yml | 5 - vendor/phpunit/phpunit/CODE_OF_CONDUCT.md | 26 +- vendor/phpunit/phpunit/CONTRIBUTING.md | 3 +- vendor/phpunit/phpunit/ChangeLog-4.8.md | 56 + vendor/phpunit/phpunit/LICENSE | 2 +- vendor/phpunit/phpunit/README.md | 4 +- vendor/phpunit/phpunit/build.xml | 39 +- vendor/phpunit/phpunit/build/bin/phpab | 126 +- .../phpunit/build/binary-phar-autoload.php.in | 18 +- vendor/phpunit/phpunit/composer.json | 17 +- vendor/phpunit/phpunit/phpunit | 4 +- vendor/phpunit/phpunit/phpunit.xsd | 40 +- .../phpunit/src/Extensions/GroupTestSuite.php | 2 +- .../phpunit/src/Extensions/PhptTestCase.php | 90 +- .../phpunit/src/Extensions/TicketListener.php | 10 +- .../phpunit/phpunit/src/Framework/Assert.php | 377 +- .../src/Framework/Assert/Functions.php | 282 +- .../src/Framework/BaseTestListener.php | 4 + .../phpunit/src/Framework/Constraint/And.php | 4 +- .../src/Framework/Constraint/Exception.php | 4 +- .../src/Framework/Constraint/IsJson.php | 8 + .../src/Framework/Constraint/IsType.php | 4 +- .../phpunit/src/Framework/Constraint/Not.php | 8 +- .../phpunit/src/Framework/Constraint/Or.php | 4 +- .../Framework/Constraint/StringMatches.php | 8 +- .../phpunit/src/Framework/Constraint/Xor.php | 4 +- .../phpunit/src/Framework/SyntheticError.php | 2 +- .../phpunit/src/Framework/TestCase.php | 383 +- .../phpunit/src/Framework/TestFailure.php | 8 +- .../phpunit/src/Framework/TestListener.php | 15 + .../phpunit/src/Framework/TestResult.php | 314 +- .../phpunit/src/Framework/TestSuite.php | 38 +- .../UnintentionallyCoveredCodeError.php | 2 +- .../phpunit/phpunit/src/Framework/Warning.php | 64 +- .../phpunit/src/Runner/BaseTestRunner.php | 1 + .../phpunit/src/Runner/Filter/Factory.php | 4 +- .../phpunit/src/Runner/Filter/Group.php | 2 +- vendor/phpunit/phpunit/src/Runner/Version.php | 6 +- vendor/phpunit/phpunit/src/TextUI/Command.php | 246 +- .../phpunit/src/TextUI/ResultPrinter.php | 94 +- .../phpunit/phpunit/src/TextUI/TestRunner.php | 418 +- vendor/phpunit/phpunit/src/Util/Blacklist.php | 10 +- .../phpunit/src/Util/Configuration.php | 326 +- .../phpunit/phpunit/src/Util/ErrorHandler.php | 4 +- .../phpunit/phpunit/src/Util/Filesystem.php | 4 +- vendor/phpunit/phpunit/src/Util/Filter.php | 6 +- vendor/phpunit/phpunit/src/Util/Getopt.php | 16 +- .../phpunit/phpunit/src/Util/GlobalState.php | 8 +- vendor/phpunit/phpunit/src/Util/Log/JSON.php | 46 +- vendor/phpunit/phpunit/src/Util/Log/JUnit.php | 108 +- vendor/phpunit/phpunit/src/Util/Log/TAP.php | 22 +- vendor/phpunit/phpunit/src/Util/PHP.php | 74 +- .../phpunit/phpunit/src/Util/PHP/Default.php | 20 +- .../Util/PHP/Template/TestCaseMethod.tpl.dist | 3 +- .../phpunit/phpunit/src/Util/PHP/Windows.php | 20 +- vendor/phpunit/phpunit/src/Util/Printer.php | 2 +- vendor/phpunit/phpunit/src/Util/Test.php | 110 +- .../src/Util/TestDox/NamePrettifier.php | 2 +- .../src/Util/TestDox/ResultPrinter.php | 46 +- vendor/phpunit/phpunit/src/Util/Type.php | 4 +- vendor/phpunit/phpunit/src/Util/XML.php | 795 +-- .../tests/Extensions/PhptTestCaseTest.php | 231 +- .../phpunit/tests/Framework/AssertTest.php | 526 +- .../tests/Framework/Constraint/CountTest.php | 10 +- .../JsonMatches/ErrorMessageProviderTest.php | 46 +- .../Framework/Constraint/JsonMatchesTest.php | 14 +- .../tests/Framework/ConstraintTest.php | 180 +- .../phpunit/tests/Framework/SuiteTest.php | 3 +- .../phpunit/tests/Framework/TestCaseTest.php | 16 +- .../tests/Framework/TestListenerTest.php | 6 + .../phpunit/tests/Regression/1021.phpt | 2 +- .../tests/Regression/1021/Issue1021Test.php | 2 +- .../phpunit/phpunit/tests/Regression/523.phpt | 2 +- .../phpunit/phpunit/tests/Regression/578.phpt | 2 +- .../phpunit/phpunit/tests/Regression/684.phpt | 8 +- .../phpunit/phpunit/tests/Regression/783.phpt | 2 +- .../phpunit/tests/Regression/GitHub/1149.phpt | 2 +- .../phpunit/tests/Regression/GitHub/1216.phpt | 2 +- .../phpunit/tests/Regression/GitHub/1265.phpt | 2 +- .../phpunit/tests/Regression/GitHub/1330.phpt | 2 +- .../phpunit/tests/Regression/GitHub/1335.phpt | 2 +- .../Regression/GitHub/1335/Issue1335Test.php | 10 +- .../Regression/GitHub/1335/bootstrap1335.php | 10 +- .../phpunit/tests/Regression/GitHub/1337.phpt | 4 +- .../Regression/GitHub/1337/Issue1337Test.php | 8 +- .../phpunit/tests/Regression/GitHub/1348.phpt | 2 +- .../phpunit/tests/Regression/GitHub/1351.phpt | 2 +- .../phpunit/tests/Regression/GitHub/1374.phpt | 2 +- .../phpunit/tests/Regression/GitHub/1437.phpt | 2 +- .../phpunit/tests/Regression/GitHub/1468.phpt | 2 +- .../phpunit/tests/Regression/GitHub/1471.phpt | 2 +- .../phpunit/tests/Regression/GitHub/1472.phpt | 2 +- .../phpunit/tests/Regression/GitHub/1570.phpt | 2 +- .../phpunit/tests/Regression/GitHub/244.phpt | 2 +- .../phpunit/tests/Regression/GitHub/322.phpt | 2 +- .../phpunit/tests/Regression/GitHub/433.phpt | 2 +- .../phpunit/tests/Regression/GitHub/445.phpt | 2 +- .../phpunit/tests/Regression/GitHub/498.phpt | 8 +- .../Regression/GitHub/498/Issue498Test.php | 16 +- .../phpunit/tests/Regression/GitHub/503.phpt | 2 +- .../phpunit/tests/Regression/GitHub/581.phpt | 2 +- .../Regression/GitHub/581/Issue581Test.php | 4 +- .../phpunit/tests/Regression/GitHub/74.phpt | 2 +- .../phpunit/tests/Regression/GitHub/765.phpt | 8 +- .../phpunit/tests/Regression/GitHub/797.phpt | 4 +- .../phpunit/tests/Regression/GitHub/863.phpt | 2 +- .../tests/TextUI/abstract-test-class.phpt | 8 +- .../phpunit/tests/TextUI/colors-always.phpt | 2 +- .../tests/TextUI/concrete-test-class.phpt | 2 +- .../tests/TextUI/custom-printer-debug.phpt | 2 +- .../tests/TextUI/custom-printer-verbose.phpt | 6 +- .../tests/TextUI/dataprovider-debug.phpt | 2 +- .../dataprovider-log-xml-isolation.phpt | 2 +- .../tests/TextUI/dataprovider-log-xml.phpt | 2 +- .../phpunit/phpunit/tests/TextUI/debug.phpt | 2 +- .../tests/TextUI/default-isolation.phpt | 2 +- .../phpunit/phpunit/tests/TextUI/default.phpt | 2 +- .../tests/TextUI/dependencies-isolation.phpt | 11 +- .../phpunit/tests/TextUI/dependencies.phpt | 11 +- .../tests/TextUI/dependencies2-isolation.phpt | 2 +- .../phpunit/tests/TextUI/dependencies2.phpt | 2 +- .../tests/TextUI/dependencies3-isolation.phpt | 2 +- .../phpunit/tests/TextUI/dependencies3.phpt | 2 +- .../phpunit/tests/TextUI/empty-testcase.phpt | 8 +- .../phpunit/tests/TextUI/exception-stack.phpt | 2 +- .../tests/TextUI/exclude-group-isolation.phpt | 2 +- .../phpunit/tests/TextUI/exclude-group.phpt | 2 +- .../tests/TextUI/failure-isolation.phpt | 2 +- .../phpunit/phpunit/tests/TextUI/failure.phpt | 2 +- .../phpunit/tests/TextUI/fatal-isolation.phpt | 2 +- .../tests/TextUI/filter-class-isolation.phpt | 2 +- .../phpunit/tests/TextUI/filter-class.phpt | 2 +- ...ider-by-classname-and-range-isolation.phpt | 2 +- ...r-dataprovider-by-classname-and-range.phpt | 2 +- ...lter-dataprovider-by-number-isolation.phpt | 2 +- .../TextUI/filter-dataprovider-by-number.phpt | 2 +- ...-dataprovider-by-only-range-isolation.phpt | 2 +- .../filter-dataprovider-by-only-range.phpt | 2 +- ...dataprovider-by-only-regexp-isolation.phpt | 2 +- .../filter-dataprovider-by-only-regexp.phpt | 2 +- ...dataprovider-by-only-string-isolation.phpt | 2 +- .../filter-dataprovider-by-only-string.phpt | 2 +- ...ilter-dataprovider-by-range-isolation.phpt | 2 +- .../TextUI/filter-dataprovider-by-range.phpt | 2 +- ...lter-dataprovider-by-regexp-isolation.phpt | 2 +- .../TextUI/filter-dataprovider-by-regexp.phpt | 2 +- ...lter-dataprovider-by-string-isolation.phpt | 2 +- .../TextUI/filter-dataprovider-by-string.phpt | 2 +- .../filter-method-case-insensitive.phpt | 2 +- .../tests/TextUI/filter-method-isolation.phpt | 2 +- .../phpunit/tests/TextUI/filter-method.phpt | 2 +- .../phpunit/tests/TextUI/group-isolation.phpt | 2 +- .../phpunit/phpunit/tests/TextUI/group.phpt | 2 +- vendor/phpunit/phpunit/tests/TextUI/help.phpt | 12 +- .../phpunit/phpunit/tests/TextUI/help2.phpt | 12 +- .../phpunit/tests/TextUI/ini-isolation.phpt | 2 +- .../TextUI/log-json-no-pretty-print.phpt | 27 - .../tests/TextUI/log-json-post-66021.phpt | 4 +- .../tests/TextUI/log-json-pre-66021.phpt | 78 - .../phpunit/phpunit/tests/TextUI/log-tap.phpt | 2 +- .../phpunit/phpunit/tests/TextUI/log-xml.phpt | 2 +- .../tests/TextUI/options-after-arguments.phpt | 2 +- .../tests/TextUI/output-isolation.phpt | 2 +- .../phpunit/phpunit/tests/TextUI/repeat.phpt | 2 +- .../report-useless-tests-incomplete.phpt | 2 +- .../report-useless-tests-isolation.phpt | 2 +- .../tests/TextUI/report-useless-tests.phpt | 2 +- .../tests/TextUI/test-suffix-multiple.phpt | 2 +- .../tests/TextUI/test-suffix-single.phpt | 2 +- .../phpunit/tests/TextUI/testdox-html.phpt | 2 +- .../phpunit/tests/TextUI/testdox-text.phpt | 2 +- .../phpunit/tests/Util/ConfigurationTest.php | 238 +- .../phpunit/phpunit/tests/Util/GetoptTest.php | 42 +- .../phpunit/tests/Util/GlobalStateTest.php | 4 +- .../phpunit/phpunit/tests/Util/RegexTest.php | 22 +- .../phpunit/phpunit/tests/Util/TestTest.php | 271 +- vendor/phpunit/phpunit/tests/Util/XMLTest.php | 300 +- .../phpunit/phpunit/tests/_files/Author.php | 2 +- .../_files/ClassWithNonPublicAttributes.php | 6 +- .../tests/_files/DataProviderDebugTest.php | 22 +- .../tests/_files/DataProviderFilterTest.php | 24 +- .../_files/DataProviderIncompleteTest.php | 16 +- .../tests/_files/DataProviderSkippedTest.php | 16 +- .../phpunit/tests/_files/DataProviderTest.php | 12 +- .../tests/_files/DependencyFailureTest.php | 9 +- .../tests/_files/ExceptionStackTest.php | 2 +- .../phpunit/tests/_files/FailureTest.php | 2 +- .../phpunit/tests/_files/RequirementsTest.php | 8 + .../tests/_files/SampleArrayAccess.php | 2 +- .../phpunit/tests/_files/StackTest.php | 2 +- .../phpunit/tests/_files/TestIterator.php | 2 +- .../phpunit/tests/_files/TestWithTest.php | 12 +- .../phpunit/tests/_files/configuration.xml | 36 +- .../tests/_files/configuration_empty.xml | 8 - .../tests/_files/configuration_xinclude.xml | 22 +- vendor/sebastian/diff/composer.json | 6 +- vendor/sebastian/diff/src/Chunk.php | 6 - vendor/sebastian/diff/src/Diff.php | 6 - vendor/sebastian/diff/src/Differ.php | 49 +- .../diff/src/LCS/LongestCommonSubsequence.php | 12 +- ...LongestCommonSubsequenceImplementation.php | 13 +- ...LongestCommonSubsequenceImplementation.php | 14 +- vendor/sebastian/diff/src/Line.php | 10 +- vendor/sebastian/diff/src/Parser.php | 12 +- vendor/sebastian/diff/tests/DifferTest.php | Bin 11371 -> 11492 bytes .../LCS/TimeEfficientImplementationTest.php | 24 +- vendor/sebastian/environment/src/Console.php | 2 +- .../recursion-context/src/Context.php | 2 +- vendor/sebastian/version/composer.json | 8 + vendor/sebastian/version/src/Version.php | 39 +- vendor/symfony/console/Application.php | 19 +- .../symfony/console/Command/HelpCommand.php | 2 +- .../symfony/console/Command/ListCommand.php | 2 +- .../console/Descriptor/TextDescriptor.php | 6 +- .../symfony/console/Helper/DialogHelper.php | 4 +- vendor/symfony/console/Helper/Helper.php | 2 +- vendor/symfony/console/Helper/ProgressBar.php | 10 +- .../symfony/console/Helper/QuestionHelper.php | 5 +- .../console/Helper/SymfonyQuestionHelper.php | 2 +- vendor/symfony/console/Helper/Table.php | 27 +- vendor/symfony/console/Helper/TableHelper.php | 2 +- vendor/symfony/console/LICENSE | 2 +- .../symfony/console/Output/ConsoleOutput.php | 2 +- vendor/symfony/console/Shell.php | 2 +- vendor/symfony/console/Style/SymfonyStyle.php | 2 +- .../console/Tests/Command/ListCommandTest.php | 8 +- .../Fixtures/application_renderexception1.txt | 2 - .../Fixtures/application_renderexception2.txt | 3 - .../Fixtures/application_renderexception3.txt | 9 - .../application_renderexception3decorated.txt | 9 - .../Fixtures/application_renderexception4.txt | 2 - ...plication_renderexception_doublewidth1.txt | 3 - ..._renderexception_doublewidth1decorated.txt | 3 - ...plication_renderexception_doublewidth2.txt | 3 - .../Tests/Formatter/OutputFormatterTest.php | 8 +- .../console/Tests/Helper/HelperSetTest.php | 21 - .../Tests/Helper/LegacyTableHelperTest.php | 18 +- .../console/Tests/Helper/ProgressBarTest.php | 22 +- .../Tests/Helper/QuestionHelperTest.php | 29 + .../console/Tests/Helper/TableTest.php | 18 + .../console/Tests/Input/StringInputTest.php | 2 +- vendor/symfony/console/composer.json | 5 +- vendor/symfony/debug/CHANGELOG.md | 7 + vendor/symfony/debug/Debug.php | 7 +- vendor/symfony/debug/DebugClassLoader.php | 21 +- vendor/symfony/debug/ErrorHandler.php | 96 +- .../debug/Exception/FlattenException.php | 9 +- vendor/symfony/debug/ExceptionHandler.php | 33 +- vendor/symfony/debug/LICENSE | 2 +- vendor/symfony/debug/README.md | 5 +- .../debug/Tests/DebugClassLoaderTest.php | 30 +- .../symfony/debug/Tests/ErrorHandlerTest.php | 71 + .../Tests/Exception/FlattenExceptionTest.php | 14 + vendor/symfony/debug/composer.json | 11 +- vendor/symfony/dom-crawler/LICENSE | 2 +- .../symfony/dom-crawler/Tests/CrawlerTest.php | 57 +- vendor/symfony/dom-crawler/composer.json | 5 +- .../ContainerAwareEventDispatcher.php | 10 + .../Debug/TraceableEventDispatcher.php | 32 + .../event-dispatcher/EventDispatcher.php | 25 +- .../EventSubscriberInterface.php | 2 +- .../ImmutableEventDispatcher.php | 8 + vendor/symfony/event-dispatcher/LICENSE | 2 +- .../Tests/AbstractEventDispatcherTest.php | 14 + .../ContainerAwareEventDispatcherTest.php | 4 + .../Debug/TraceableEventDispatcherTest.php | 18 +- vendor/symfony/event-dispatcher/composer.json | 15 +- .../finder/Iterator/SortableIterator.php | 6 +- vendor/symfony/finder/LICENSE | 2 +- .../finder/Tests/Iterator/MockSplFileInfo.php | 2 +- vendor/symfony/finder/composer.json | 5 +- .../http-foundation/BinaryFileResponse.php | 4 + vendor/symfony/http-foundation/HeaderBag.php | 8 +- .../symfony/http-foundation/JsonResponse.php | 2 +- vendor/symfony/http-foundation/LICENSE | 2 +- .../symfony/http-foundation/ParameterBag.php | 8 +- vendor/symfony/http-foundation/Response.php | 12 +- .../http-foundation/ResponseHeaderBag.php | 4 +- .../Handler/NativeFileSessionHandler.php | 4 +- .../Storage/MockFileSessionStorage.php | 4 +- .../Session/Storage/NativeSessionStorage.php | 2 +- .../Session/Storage/Proxy/AbstractProxy.php | 2 +- .../Tests/BinaryFileResponseTest.php | 15 +- .../http-foundation/Tests/CookieTest.php | 4 - .../http-foundation/Tests/HeaderBagTest.php | 21 - .../Tests/ParameterBagTest.php | 42 - .../http-foundation/Tests/RequestTest.php | 42 +- .../Tests/ResponseHeaderBagTest.php | 1 - .../http-foundation/Tests/ResponseTest.php | 2 +- .../Session/Attribute/AttributeBagTest.php | 6 - .../Tests/Session/Flash/FlashBagTest.php | 1 - .../Tests/Session/SessionTest.php | 6 - .../Handler/MongoDbSessionHandlerTest.php | 8 +- vendor/symfony/http-foundation/composer.json | 5 +- vendor/symfony/http-kernel/Bundle/Bundle.php | 6 +- vendor/symfony/http-kernel/Client.php | 2 +- .../EventListener/DebugHandlersListener.php | 2 +- .../symfony/http-kernel/HttpCache/Store.php | 23 +- vendor/symfony/http-kernel/Kernel.php | 6 +- vendor/symfony/http-kernel/LICENSE | 2 +- .../Profiler/FileProfilerStorage.php | 10 +- .../Profiler/PdoProfilerStorage.php | 3 +- .../Controller/ControllerResolverTest.php | 2 +- .../DataCollector/TimeDataCollectorTest.php | 3 + .../EventListener/ExceptionListenerTest.php | 2 + .../ExtensionLoadedExtension.php | 2 +- .../ExtensionPresentExtension.php | 2 +- .../Tests/Fragment/FragmentHandlerTest.php | 3 + .../Tests/HttpCache/HttpCacheTest.php | 2 +- .../Tests/HttpCache/HttpCacheTestCase.php | 4 - .../http-kernel/Tests/UriSignerTest.php | 1 + vendor/symfony/http-kernel/UriSigner.php | 4 +- vendor/symfony/http-kernel/composer.json | 5 +- vendor/symfony/http-kernel/phpunit.xml.dist | 10 + vendor/symfony/process/LICENSE | 2 +- .../symfony/process/PhpExecutableFinder.php | 12 +- vendor/symfony/process/PhpProcess.php | 13 + vendor/symfony/process/Process.php | 192 +- .../process/Tests/AbstractProcessTest.php | 1208 ----- .../process/Tests/ExecutableFinderTest.php | 4 +- .../process/Tests/NonStopableProcess.php | 8 +- .../process/Tests/PhpExecutableFinderTest.php | 2 + .../symfony/process/Tests/PhpProcessTest.php | 12 +- .../Tests/ProcessInSigchildEnvironment.php | 22 - .../Tests/SigchildDisabledProcessTest.php | 263 - .../Tests/SigchildEnabledProcessTest.php | 148 - .../symfony/process/Tests/SignalListener.php | 12 +- .../process/Tests/SimpleProcessTest.php | 225 - vendor/symfony/process/composer.json | 5 +- vendor/symfony/process/phpunit.xml.dist | 1 + .../Encoder/BCryptPasswordEncoder.php | 2 + .../Encoder/BasePasswordEncoder.php | 2 +- vendor/symfony/security-core/LICENSE | 2 +- .../Token/AbstractTokenTest.php | 18 - .../Encoder/BCryptPasswordEncoderTest.php | 6 +- .../security-core/Tests/User/UserTest.php | 34 - .../Tests/Util/SecureRandomTest.php | 201 - .../User/InMemoryUserProvider.php | 2 +- .../security-core/Util/SecureRandom.php | 89 +- vendor/symfony/security-core/composer.json | 11 +- vendor/symfony/security-core/phpunit.xml.dist | 3 +- .../translation/Dumper/IcuResFileDumper.php | 10 +- vendor/symfony/translation/LICENSE | 2 +- .../translation/PluralizationRules.php | 1 + .../Tests/Loader/XliffFileLoaderTest.php | 5 +- .../Tests/PluralizationRulesTest.php | 10 +- .../translation/Writer/TranslationWriter.php | 4 +- vendor/symfony/translation/composer.json | 5 +- vendor/symfony/translation/phpunit.xml.dist | 2 +- .../symfony/var-dumper/Caster/AmqpCaster.php | 2 +- .../var-dumper/Caster/ReflectionCaster.php | 15 +- vendor/symfony/var-dumper/Cloner/Data.php | 2 +- .../symfony/var-dumper/Dumper/HtmlDumper.php | 2 +- vendor/symfony/var-dumper/LICENSE | 2 +- .../Tests/Caster/ReflectionCasterTest.php | 46 +- .../Tests/Test/VarDumpTestTraitRequire54.php | 41 - .../Tests/Test/VarDumpTestTraitTest.php | 16 - vendor/symfony/var-dumper/composer.json | 5 +- vendor/symfony/var-dumper/phpunit.xml.dist | 2 +- vendor/symfony/yaml/CHANGELOG.md | 26 + vendor/symfony/yaml/Escaper.php | 6 +- .../symfony/yaml/Exception/ParseException.php | 7 +- vendor/symfony/yaml/Inline.php | 21 +- vendor/symfony/yaml/LICENSE | 2 +- vendor/symfony/yaml/Parser.php | 128 +- vendor/symfony/yaml/Tests/DumperTest.php | 14 +- .../Fixtures/YtsSpecificationExamples.yml | 4 +- .../yaml/Tests/Fixtures/YtsTypeTransfers.yml | 4 +- .../yaml/Tests/Fixtures/escapedCharacters.yml | 8 + .../symfony/yaml/Tests/Fixtures/sfQuotes.yml | 2 +- vendor/symfony/yaml/Tests/InlineTest.php | 51 +- .../symfony/yaml/Tests/ParseExceptionTest.php | 12 +- vendor/symfony/yaml/Tests/ParserTest.php | 315 +- vendor/symfony/yaml/Tests/YamlTest.php | 12 - vendor/symfony/yaml/Unescaper.php | 27 +- vendor/symfony/yaml/Yaml.php | 38 +- vendor/symfony/yaml/composer.json | 9 +- vendor/symfony/yaml/phpunit.xml.dist | 2 +- 668 files changed, 11396 insertions(+), 12204 deletions(-) create mode 100644 tests/AuthTest.php delete mode 100644 tests/ExampleTest.php create mode 100644 tests/IndexTest.php delete mode 100644 vendor/mtdowling/cron-expression/phpunit.xml.dist delete mode 100644 vendor/nesbot/carbon/.editorconfig delete mode 100644 vendor/paragonie/random_compat/.gitignore delete mode 100644 vendor/paragonie/random_compat/.scrutinizer.yml delete mode 100644 vendor/paragonie/random_compat/.travis.yml delete mode 100644 vendor/paragonie/random_compat/tests/full/DieHardTest.php delete mode 100644 vendor/paragonie/random_compat/tests/full/StatTest.php delete mode 100755 vendor/paragonie/random_compat/tests/phpunit.sh delete mode 100644 vendor/paragonie/random_compat/tests/specific/capicom.php delete mode 100644 vendor/paragonie/random_compat/tests/specific/dev_urandom.php delete mode 100644 vendor/paragonie/random_compat/tests/specific/libsodium.php delete mode 100644 vendor/paragonie/random_compat/tests/specific/mcrypt.php delete mode 100644 vendor/paragonie/random_compat/tests/specific/openssl.php delete mode 100644 vendor/paragonie/random_compat/tests/unit/RandomBytesTest.php delete mode 100644 vendor/paragonie/random_compat/tests/unit/RandomIntTest.php delete mode 100644 vendor/paragonie/random_compat/tests/unit/UtilityTest.php delete mode 100644 vendor/phpunit/php-code-coverage/scripts/auto_append.php delete mode 100644 vendor/phpunit/php-code-coverage/scripts/auto_prepend.php delete mode 100644 vendor/phpunit/php-code-coverage/src/CodeCoverage/Exception.php delete mode 100644 vendor/phpunit/php-code-coverage/src/CodeCoverage/Exception/UnintentionallyCoveredCode.php delete mode 100644 vendor/phpunit/php-code-coverage/src/CodeCoverage/Util/InvalidArgumentHelper.php delete mode 100644 vendor/phpunit/phpunit/tests/TextUI/log-json-no-pretty-print.phpt delete mode 100644 vendor/phpunit/phpunit/tests/TextUI/log-json-pre-66021.phpt delete mode 100644 vendor/symfony/process/Tests/AbstractProcessTest.php delete mode 100644 vendor/symfony/process/Tests/ProcessInSigchildEnvironment.php delete mode 100644 vendor/symfony/process/Tests/SigchildDisabledProcessTest.php delete mode 100644 vendor/symfony/process/Tests/SigchildEnabledProcessTest.php delete mode 100644 vendor/symfony/process/Tests/SimpleProcessTest.php delete mode 100644 vendor/symfony/security-core/Tests/Util/SecureRandomTest.php delete mode 100644 vendor/symfony/var-dumper/Tests/Test/VarDumpTestTraitRequire54.php delete mode 100644 vendor/symfony/var-dumper/Tests/Test/VarDumpTestTraitTest.php diff --git a/.travis.yml b/.travis.yml index a483a81..0006510 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,5 @@ language: php php: - - '5.4' - '5.5' - '5.6' - '7.0' @@ -10,3 +9,5 @@ before_script: - mv tests/test_env .env - mysql -e 'CREATE DATABASE polrci;' - composer install +notifications: + email: false diff --git a/composer.json b/composer.json index a2155ae..71b225a 100644 --- a/composer.json +++ b/composer.json @@ -10,8 +10,9 @@ "vlucas/phpdotenv": "~1.0" }, "require-dev": { - "phpunit/phpunit": "~4.0", - "fzaninotto/faker": "~1.0" + "fzaninotto/faker": "~1.0", + "phpunit/phpunit": "^5.2", + "symfony/css-selector": "^3.0" }, "autoload": { "psr-4": { diff --git a/composer.lock b/composer.lock index 6809690..fa4c3ea 100644 --- a/composer.lock +++ b/composer.lock @@ -4,8 +4,8 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "0ba9a6e650a21c6ae6f1625344a596c7", - "content-hash": "f616d7f088bedb4cc5af1b176d081f4f", + "hash": "14e5ddab6cbb9404df063f1f4327e790", + "content-hash": "7ae10f27bd927015a126d5343bf31671", "packages": [ { "name": "danielstjules/stringy", @@ -65,16 +65,16 @@ }, { "name": "doctrine/inflector", - "version": "v1.0.1", + "version": "v1.1.0", "source": { "type": "git", "url": "https://github.com/doctrine/inflector.git", - "reference": "0bcb2e79d8571787f18b7eb036ed3d004908e604" + "reference": "90b2128806bfde671b6952ab8bea493942c1fdae" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/inflector/zipball/0bcb2e79d8571787f18b7eb036ed3d004908e604", - "reference": "0bcb2e79d8571787f18b7eb036ed3d004908e604", + "url": "https://api.github.com/repos/doctrine/inflector/zipball/90b2128806bfde671b6952ab8bea493942c1fdae", + "reference": "90b2128806bfde671b6952ab8bea493942c1fdae", "shasum": "" }, "require": { @@ -86,7 +86,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "1.1.x-dev" } }, "autoload": { @@ -128,20 +128,20 @@ "singularize", "string" ], - "time": "2014-12-20 21:24:13" + "time": "2015-11-06 14:35:42" }, { "name": "illuminate/auth", - "version": "v5.1.22", + "version": "v5.1.28", "source": { "type": "git", "url": "https://github.com/illuminate/auth.git", - "reference": "ed926c9ad2b54164c0183a3a63f77f5f0ea0986a" + "reference": "78b1b83ceecace60d7563712425f404a6619da2a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/auth/zipball/ed926c9ad2b54164c0183a3a63f77f5f0ea0986a", - "reference": "ed926c9ad2b54164c0183a3a63f77f5f0ea0986a", + "url": "https://api.github.com/repos/illuminate/auth/zipball/78b1b83ceecace60d7563712425f404a6619da2a", + "reference": "78b1b83ceecace60d7563712425f404a6619da2a", "shasum": "" }, "require": { @@ -178,20 +178,20 @@ ], "description": "The Illuminate Auth package.", "homepage": "http://laravel.com", - "time": "2015-10-19 06:01:02" + "time": "2015-12-08 14:38:44" }, { "name": "illuminate/broadcasting", - "version": "v5.1.22", + "version": "v5.1.28", "source": { "type": "git", "url": "https://github.com/illuminate/broadcasting.git", - "reference": "c5eb4e0730dbe34aabff238507d3e8144c6625a2" + "reference": "d9393a6d1455b14149999911cb06a48c6eff6a74" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/broadcasting/zipball/c5eb4e0730dbe34aabff238507d3e8144c6625a2", - "reference": "c5eb4e0730dbe34aabff238507d3e8144c6625a2", + "url": "https://api.github.com/repos/illuminate/broadcasting/zipball/d9393a6d1455b14149999911cb06a48c6eff6a74", + "reference": "d9393a6d1455b14149999911cb06a48c6eff6a74", "shasum": "" }, "require": { @@ -225,20 +225,20 @@ ], "description": "The Illuminate Broadcasting package.", "homepage": "http://laravel.com", - "time": "2015-10-08 01:12:55" + "time": "2015-12-21 04:33:22" }, { "name": "illuminate/bus", - "version": "v5.1.22", + "version": "v5.1.28", "source": { "type": "git", "url": "https://github.com/illuminate/bus.git", - "reference": "83fecbefb010c30e1cd2fef1290316000cdc742d" + "reference": "32a190fcc3f3ce487045b5eabd2ce839b9080a98" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/bus/zipball/83fecbefb010c30e1cd2fef1290316000cdc742d", - "reference": "83fecbefb010c30e1cd2fef1290316000cdc742d", + "url": "https://api.github.com/repos/illuminate/bus/zipball/32a190fcc3f3ce487045b5eabd2ce839b9080a98", + "reference": "32a190fcc3f3ce487045b5eabd2ce839b9080a98", "shasum": "" }, "require": { @@ -270,20 +270,20 @@ ], "description": "The Illuminate Bus package.", "homepage": "http://laravel.com", - "time": "2015-10-19 06:01:02" + "time": "2015-12-24 19:50:28" }, { "name": "illuminate/cache", - "version": "v5.1.22", + "version": "v5.1.28", "source": { "type": "git", "url": "https://github.com/illuminate/cache.git", - "reference": "6ffa99bbc2c6dccb1e50ed5219a30aea6d02f0d3" + "reference": "3721b684d82e1cea05081cef2eafa04ef5fe2795" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/cache/zipball/6ffa99bbc2c6dccb1e50ed5219a30aea6d02f0d3", - "reference": "6ffa99bbc2c6dccb1e50ed5219a30aea6d02f0d3", + "url": "https://api.github.com/repos/illuminate/cache/zipball/3721b684d82e1cea05081cef2eafa04ef5fe2795", + "reference": "3721b684d82e1cea05081cef2eafa04ef5fe2795", "shasum": "" }, "require": { @@ -320,11 +320,11 @@ ], "description": "The Illuminate Cache package.", "homepage": "http://laravel.com", - "time": "2015-10-06 17:04:59" + "time": "2015-12-28 21:20:38" }, { "name": "illuminate/config", - "version": "v5.1.22", + "version": "v5.1.28", "source": { "type": "git", "url": "https://github.com/illuminate/config.git", @@ -369,16 +369,16 @@ }, { "name": "illuminate/console", - "version": "v5.1.22", + "version": "v5.1.28", "source": { "type": "git", "url": "https://github.com/illuminate/console.git", - "reference": "c712f03ce8fdfbc90ff3587ba31a0b8e3914ddb0" + "reference": "548cfc29d0779cb5152f1a1724bafa2b53461a95" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/console/zipball/c712f03ce8fdfbc90ff3587ba31a0b8e3914ddb0", - "reference": "c712f03ce8fdfbc90ff3587ba31a0b8e3914ddb0", + "url": "https://api.github.com/repos/illuminate/console/zipball/548cfc29d0779cb5152f1a1724bafa2b53461a95", + "reference": "548cfc29d0779cb5152f1a1724bafa2b53461a95", "shasum": "" }, "require": { @@ -389,7 +389,7 @@ "symfony/console": "2.7.*" }, "suggest": { - "guzzlehttp/guzzle": "Required to use the thenPing method on schedules (~5.3|~6.0).", + "guzzlehttp/guzzle": "Required to use the ping methods on schedules (~5.3|~6.0).", "mtdowling/cron-expression": "Required to use scheduling component (~1.0).", "symfony/process": "Required to use scheduling component (2.7.*)." }, @@ -416,20 +416,20 @@ ], "description": "The Illuminate Console package.", "homepage": "http://laravel.com", - "time": "2015-10-20 21:16:46" + "time": "2015-12-28 21:10:29" }, { "name": "illuminate/container", - "version": "v5.1.22", + "version": "v5.1.28", "source": { "type": "git", "url": "https://github.com/illuminate/container.git", - "reference": "bb2cd1d9c6cb7c4ce80b8d89f899e086f5a4f65b" + "reference": "91e10d009af0afd95d729bdec7acf9958ae95277" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/container/zipball/bb2cd1d9c6cb7c4ce80b8d89f899e086f5a4f65b", - "reference": "bb2cd1d9c6cb7c4ce80b8d89f899e086f5a4f65b", + "url": "https://api.github.com/repos/illuminate/container/zipball/91e10d009af0afd95d729bdec7acf9958ae95277", + "reference": "91e10d009af0afd95d729bdec7acf9958ae95277", "shasum": "" }, "require": { @@ -459,11 +459,11 @@ ], "description": "The Illuminate Container package.", "homepage": "http://laravel.com", - "time": "2015-10-19 06:01:02" + "time": "2015-12-07 20:20:37" }, { "name": "illuminate/contracts", - "version": "v5.1.22", + "version": "v5.1.28", "source": { "type": "git", "url": "https://github.com/illuminate/contracts.git", @@ -505,16 +505,16 @@ }, { "name": "illuminate/cookie", - "version": "v5.1.22", + "version": "v5.1.28", "source": { "type": "git", "url": "https://github.com/illuminate/cookie.git", - "reference": "8ded782fcb8f0affa9fc53bc6646a88b9acb615a" + "reference": "b996f1da991449a3a91720c1a08a8cc27ddba8d4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/cookie/zipball/8ded782fcb8f0affa9fc53bc6646a88b9acb615a", - "reference": "8ded782fcb8f0affa9fc53bc6646a88b9acb615a", + "url": "https://api.github.com/repos/illuminate/cookie/zipball/b996f1da991449a3a91720c1a08a8cc27ddba8d4", + "reference": "b996f1da991449a3a91720c1a08a8cc27ddba8d4", "shasum": "" }, "require": { @@ -547,20 +547,20 @@ ], "description": "The Illuminate Cookie package.", "homepage": "http://laravel.com", - "time": "2015-09-22 11:44:48" + "time": "2015-12-05 16:40:16" }, { "name": "illuminate/database", - "version": "v5.1.22", + "version": "v5.1.28", "source": { "type": "git", "url": "https://github.com/illuminate/database.git", - "reference": "f82f4009e5776a8b0a580fca881694a778b229e6" + "reference": "508d4dca412f7645a4e5ae97a2ee0f3cf836550f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/database/zipball/f82f4009e5776a8b0a580fca881694a778b229e6", - "reference": "f82f4009e5776a8b0a580fca881694a778b229e6", + "url": "https://api.github.com/repos/illuminate/database/zipball/508d4dca412f7645a4e5ae97a2ee0f3cf836550f", + "reference": "508d4dca412f7645a4e5ae97a2ee0f3cf836550f", "shasum": "" }, "require": { @@ -575,7 +575,8 @@ "fzaninotto/faker": "Required to use the eloquent factory builder (~1.4).", "illuminate/console": "Required to use the database commands (5.1.*).", "illuminate/events": "Required to use the observers with Eloquent (5.1.*).", - "illuminate/filesystem": "Required to use the migrations (5.1.*)." + "illuminate/filesystem": "Required to use the migrations (5.1.*).", + "illuminate/pagination": "Required to paginate the result set (5.1.*)." }, "type": "library", "extra": { @@ -606,20 +607,20 @@ "orm", "sql" ], - "time": "2015-10-28 21:57:04" + "time": "2015-12-30 23:14:26" }, { "name": "illuminate/encryption", - "version": "v5.1.22", + "version": "v5.1.28", "source": { "type": "git", "url": "https://github.com/illuminate/encryption.git", - "reference": "c10405ee5ec354b1d888e52dca6adeee6bac8476" + "reference": "abd14c81ce4f21edff005130dd5d980fe9cc4249" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/encryption/zipball/c10405ee5ec354b1d888e52dca6adeee6bac8476", - "reference": "c10405ee5ec354b1d888e52dca6adeee6bac8476", + "url": "https://api.github.com/repos/illuminate/encryption/zipball/abd14c81ce4f21edff005130dd5d980fe9cc4249", + "reference": "abd14c81ce4f21edff005130dd5d980fe9cc4249", "shasum": "" }, "require": { @@ -630,7 +631,7 @@ "php": ">=5.5.9" }, "suggest": { - "paragonie/random_compat": "Provides a compatible interface like PHP7's random_bytes() in PHP 5 projects (^1.0.6)." + "paragonie/random_compat": "Provides a compatible interface like PHP7's random_bytes() in PHP 5 projects (~1.1)." }, "type": "library", "extra": { @@ -655,20 +656,20 @@ ], "description": "The Illuminate Encryption package.", "homepage": "http://laravel.com", - "time": "2015-10-16 21:40:18" + "time": "2015-12-02 19:57:45" }, { "name": "illuminate/events", - "version": "v5.1.22", + "version": "v5.1.28", "source": { "type": "git", "url": "https://github.com/illuminate/events.git", - "reference": "fdb64e091b635bf1525c157f1cfdd19cbca508c9" + "reference": "a199e83e8a0f172ca3f0d3d685780c55a96104ab" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/events/zipball/fdb64e091b635bf1525c157f1cfdd19cbca508c9", - "reference": "fdb64e091b635bf1525c157f1cfdd19cbca508c9", + "url": "https://api.github.com/repos/illuminate/events/zipball/a199e83e8a0f172ca3f0d3d685780c55a96104ab", + "reference": "a199e83e8a0f172ca3f0d3d685780c55a96104ab", "shasum": "" }, "require": { @@ -700,20 +701,20 @@ ], "description": "The Illuminate Events package.", "homepage": "http://laravel.com", - "time": "2015-09-23 13:19:23" + "time": "2015-11-29 16:58:05" }, { "name": "illuminate/filesystem", - "version": "v5.1.22", + "version": "v5.1.28", "source": { "type": "git", "url": "https://github.com/illuminate/filesystem.git", - "reference": "d2df6ede91e6af495674f2def38170330319819f" + "reference": "a1cc4b69d9cde4e8617506fa84576c4197ca0cf0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/filesystem/zipball/d2df6ede91e6af495674f2def38170330319819f", - "reference": "d2df6ede91e6af495674f2def38170330319819f", + "url": "https://api.github.com/repos/illuminate/filesystem/zipball/a1cc4b69d9cde4e8617506fa84576c4197ca0cf0", + "reference": "a1cc4b69d9cde4e8617506fa84576c4197ca0cf0", "shasum": "" }, "require": { @@ -750,20 +751,20 @@ ], "description": "The Illuminate Filesystem package.", "homepage": "http://laravel.com", - "time": "2015-10-19 06:01:02" + "time": "2015-12-20 15:51:01" }, { "name": "illuminate/hashing", - "version": "v5.1.22", + "version": "v5.1.28", "source": { "type": "git", "url": "https://github.com/illuminate/hashing.git", - "reference": "86d12970c19823809314eae180939de62d4fab2c" + "reference": "6c2e1658d57b1d5cc60a397d3cd0d64c61c2062f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/hashing/zipball/86d12970c19823809314eae180939de62d4fab2c", - "reference": "86d12970c19823809314eae180939de62d4fab2c", + "url": "https://api.github.com/repos/illuminate/hashing/zipball/6c2e1658d57b1d5cc60a397d3cd0d64c61c2062f", + "reference": "6c2e1658d57b1d5cc60a397d3cd0d64c61c2062f", "shasum": "" }, "require": { @@ -794,20 +795,20 @@ ], "description": "The Illuminate Hashing package.", "homepage": "http://laravel.com", - "time": "2015-07-16 20:28:10" + "time": "2015-11-29 16:58:05" }, { "name": "illuminate/http", - "version": "v5.1.22", + "version": "v5.1.28", "source": { "type": "git", "url": "https://github.com/illuminate/http.git", - "reference": "b30fa1af5d1a7b525cc801ac41436179e43d52ee" + "reference": "4b33ade62b49946c5f32e7680e42111409e1ce6d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/http/zipball/b30fa1af5d1a7b525cc801ac41436179e43d52ee", - "reference": "b30fa1af5d1a7b525cc801ac41436179e43d52ee", + "url": "https://api.github.com/repos/illuminate/http/zipball/4b33ade62b49946c5f32e7680e42111409e1ce6d", + "reference": "4b33ade62b49946c5f32e7680e42111409e1ce6d", "shasum": "" }, "require": { @@ -840,20 +841,20 @@ ], "description": "The Illuminate Http package.", "homepage": "http://laravel.com", - "time": "2015-10-19 06:01:02" + "time": "2015-12-19 22:27:14" }, { "name": "illuminate/pagination", - "version": "v5.1.22", + "version": "v5.1.28", "source": { "type": "git", "url": "https://github.com/illuminate/pagination.git", - "reference": "3ed65ae58f191f2819a44c1b0e1408dcc847948f" + "reference": "2649ea015109c2e80ec38397e2c00ba123de9743" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/pagination/zipball/3ed65ae58f191f2819a44c1b0e1408dcc847948f", - "reference": "3ed65ae58f191f2819a44c1b0e1408dcc847948f", + "url": "https://api.github.com/repos/illuminate/pagination/zipball/2649ea015109c2e80ec38397e2c00ba123de9743", + "reference": "2649ea015109c2e80ec38397e2c00ba123de9743", "shasum": "" }, "require": { @@ -884,11 +885,11 @@ ], "description": "The Illuminate Pagination package.", "homepage": "http://laravel.com", - "time": "2015-10-19 06:01:02" + "time": "2015-12-07 19:40:09" }, { "name": "illuminate/pipeline", - "version": "v5.1.22", + "version": "v5.1.28", "source": { "type": "git", "url": "https://github.com/illuminate/pipeline.git", @@ -932,16 +933,16 @@ }, { "name": "illuminate/queue", - "version": "v5.1.22", + "version": "v5.1.28", "source": { "type": "git", "url": "https://github.com/illuminate/queue.git", - "reference": "189b1cfaf7f08dce381b4ebbf16b0602a1efcdda" + "reference": "a53899731c1bc8d68dda2b70ada25d0cbe875729" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/queue/zipball/189b1cfaf7f08dce381b4ebbf16b0602a1efcdda", - "reference": "189b1cfaf7f08dce381b4ebbf16b0602a1efcdda", + "url": "https://api.github.com/repos/illuminate/queue/zipball/a53899731c1bc8d68dda2b70ada25d0cbe875729", + "reference": "a53899731c1bc8d68dda2b70ada25d0cbe875729", "shasum": "" }, "require": { @@ -986,20 +987,20 @@ ], "description": "The Illuminate Queue package.", "homepage": "http://laravel.com", - "time": "2015-10-28 19:38:40" + "time": "2015-12-28 15:52:33" }, { "name": "illuminate/session", - "version": "v5.1.22", + "version": "v5.1.28", "source": { "type": "git", "url": "https://github.com/illuminate/session.git", - "reference": "a719532f1ba75c352e1254743f4a9ed9a2b8412c" + "reference": "3f0456a00023c29aebaa2938f65ebe744db1aeeb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/session/zipball/a719532f1ba75c352e1254743f4a9ed9a2b8412c", - "reference": "a719532f1ba75c352e1254743f4a9ed9a2b8412c", + "url": "https://api.github.com/repos/illuminate/session/zipball/3f0456a00023c29aebaa2938f65ebe744db1aeeb", + "reference": "3f0456a00023c29aebaa2938f65ebe744db1aeeb", "shasum": "" }, "require": { @@ -1036,20 +1037,20 @@ ], "description": "The Illuminate Session package.", "homepage": "http://laravel.com", - "time": "2015-10-19 06:01:02" + "time": "2015-12-26 15:27:27" }, { "name": "illuminate/support", - "version": "v5.1.22", + "version": "v5.1.28", "source": { "type": "git", "url": "https://github.com/illuminate/support.git", - "reference": "d52a832d3f4b025b82f954cbdef8ee24f6a77e77" + "reference": "8d62c6e1064d3013609ccc9ab6221efd86c31403" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/support/zipball/d52a832d3f4b025b82f954cbdef8ee24f6a77e77", - "reference": "d52a832d3f4b025b82f954cbdef8ee24f6a77e77", + "url": "https://api.github.com/repos/illuminate/support/zipball/8d62c6e1064d3013609ccc9ab6221efd86c31403", + "reference": "8d62c6e1064d3013609ccc9ab6221efd86c31403", "shasum": "" }, "require": { @@ -1061,8 +1062,8 @@ }, "suggest": { "jeremeamia/superclosure": "Required to be able to serialize closures (~2.0).", - "paragonie/random_compat": "Provides a compatible interface like PHP7's random_bytes() in PHP 5 projects (^1.0.6).", - "symfony/var-dumper": "Required to use the dd function (2.7.*)." + "paragonie/random_compat": "Provides a compatible interface like PHP7's random_bytes() in PHP 5 projects (~1.1).", + "symfony/var-dumper": "Improves the dd function (2.7.*)." }, "type": "library", "extra": { @@ -1090,20 +1091,20 @@ ], "description": "The Illuminate Support package.", "homepage": "http://laravel.com", - "time": "2015-10-19 06:01:02" + "time": "2015-12-28 21:10:29" }, { "name": "illuminate/translation", - "version": "v5.1.22", + "version": "v5.1.28", "source": { "type": "git", "url": "https://github.com/illuminate/translation.git", - "reference": "81bf81fcb3ccc18e7aeabaefdbb7306581439fcc" + "reference": "a9f73e7bd5ad6231e477c1149cf7802f53bc86bd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/translation/zipball/81bf81fcb3ccc18e7aeabaefdbb7306581439fcc", - "reference": "81bf81fcb3ccc18e7aeabaefdbb7306581439fcc", + "url": "https://api.github.com/repos/illuminate/translation/zipball/a9f73e7bd5ad6231e477c1149cf7802f53bc86bd", + "reference": "a9f73e7bd5ad6231e477c1149cf7802f53bc86bd", "shasum": "" }, "require": { @@ -1135,20 +1136,20 @@ ], "description": "The Illuminate Translation package.", "homepage": "http://laravel.com", - "time": "2015-08-01 00:02:33" + "time": "2015-11-28 13:59:02" }, { "name": "illuminate/validation", - "version": "v5.1.22", + "version": "v5.1.28", "source": { "type": "git", "url": "https://github.com/illuminate/validation.git", - "reference": "66151dde43b34fc2800f8201a73f61f889c77084" + "reference": "ca27ece6bbb01b7bee9b2f1b51a50aff2f77edd1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/validation/zipball/66151dde43b34fc2800f8201a73f61f889c77084", - "reference": "66151dde43b34fc2800f8201a73f61f889c77084", + "url": "https://api.github.com/repos/illuminate/validation/zipball/ca27ece6bbb01b7bee9b2f1b51a50aff2f77edd1", + "reference": "ca27ece6bbb01b7bee9b2f1b51a50aff2f77edd1", "shasum": "" }, "require": { @@ -1185,20 +1186,20 @@ ], "description": "The Illuminate Validation package.", "homepage": "http://laravel.com", - "time": "2015-10-23 08:21:26" + "time": "2015-12-09 15:24:53" }, { "name": "illuminate/view", - "version": "v5.1.22", + "version": "v5.1.28", "source": { "type": "git", "url": "https://github.com/illuminate/view.git", - "reference": "50e3027b470c8d92d433b6de0b1f227c232eda46" + "reference": "f43a4600a2acfaf4d8734ebc1fa869ede1990b25" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/illuminate/view/zipball/50e3027b470c8d92d433b6de0b1f227c232eda46", - "reference": "50e3027b470c8d92d433b6de0b1f227c232eda46", + "url": "https://api.github.com/repos/illuminate/view/zipball/f43a4600a2acfaf4d8734ebc1fa869ede1990b25", + "reference": "f43a4600a2acfaf4d8734ebc1fa869ede1990b25", "shasum": "" }, "require": { @@ -1232,7 +1233,7 @@ ], "description": "The Illuminate View package.", "homepage": "http://laravel.com", - "time": "2015-10-19 06:01:02" + "time": "2015-11-29 16:58:05" }, { "name": "laravel/lumen-framework", @@ -1399,23 +1400,23 @@ }, { "name": "mtdowling/cron-expression", - "version": "v1.0.4", + "version": "v1.1.0", "source": { "type": "git", "url": "https://github.com/mtdowling/cron-expression.git", - "reference": "fd92e883195e5dfa77720b1868cf084b08be4412" + "reference": "c9ee7886f5a12902b225a1a12f36bb45f9ab89e5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/mtdowling/cron-expression/zipball/fd92e883195e5dfa77720b1868cf084b08be4412", - "reference": "fd92e883195e5dfa77720b1868cf084b08be4412", + "url": "https://api.github.com/repos/mtdowling/cron-expression/zipball/c9ee7886f5a12902b225a1a12f36bb45f9ab89e5", + "reference": "c9ee7886f5a12902b225a1a12f36bb45f9ab89e5", "shasum": "" }, "require": { "php": ">=5.3.2" }, "require-dev": { - "phpunit/phpunit": "4.*" + "phpunit/phpunit": "~4.0|~5.0" }, "type": "library", "autoload": { @@ -1439,20 +1440,20 @@ "cron", "schedule" ], - "time": "2015-01-11 23:07:46" + "time": "2016-01-26 21:23:30" }, { "name": "nesbot/carbon", - "version": "1.20.0", + "version": "1.21.0", "source": { "type": "git", "url": "https://github.com/briannesbitt/Carbon.git", - "reference": "bfd3eaba109c9a2405c92174c8e17f20c2b9caf3" + "reference": "7b08ec6f75791e130012f206e3f7b0e76e18e3d7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/bfd3eaba109c9a2405c92174c8e17f20c2b9caf3", - "reference": "bfd3eaba109c9a2405c92174c8e17f20c2b9caf3", + "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/7b08ec6f75791e130012f206e3f7b0e76e18e3d7", + "reference": "7b08ec6f75791e130012f206e3f7b0e76e18e3d7", "shasum": "" }, "require": { @@ -1460,12 +1461,12 @@ "symfony/translation": "~2.6|~3.0" }, "require-dev": { - "phpunit/phpunit": "~4.0" + "phpunit/phpunit": "~4.0|~5.0" }, "type": "library", "autoload": { - "psr-0": { - "Carbon": "src" + "psr-4": { + "Carbon\\": "src/Carbon/" } }, "notification-url": "https://packagist.org/downloads/", @@ -1486,7 +1487,7 @@ "datetime", "time" ], - "time": "2015-06-25 04:19:39" + "time": "2015-11-04 20:07:17" }, { "name": "nikic/fast-route", @@ -1533,21 +1534,24 @@ }, { "name": "paragonie/random_compat", - "version": "1.0.10", + "version": "v1.2.0", "source": { "type": "git", "url": "https://github.com/paragonie/random_compat.git", - "reference": "2fa50aa2f17066fa74ba00d943e8cee1a98284af" + "reference": "b0e69d10852716b2ccbdff69c75c477637220790" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/paragonie/random_compat/zipball/2fa50aa2f17066fa74ba00d943e8cee1a98284af", - "reference": "2fa50aa2f17066fa74ba00d943e8cee1a98284af", + "url": "https://api.github.com/repos/paragonie/random_compat/zipball/b0e69d10852716b2ccbdff69c75c477637220790", + "reference": "b0e69d10852716b2ccbdff69c75c477637220790", "shasum": "" }, "require": { "php": ">=5.2.0" }, + "require-dev": { + "phpunit/phpunit": "4.*|5.*" + }, "suggest": { "ext-libsodium": "Provides a modern crypto API that can be used to generate random bytes." }, @@ -1574,7 +1578,7 @@ "pseudorandom", "random" ], - "time": "2015-10-23 13:21:37" + "time": "2016-02-06 03:52:05" }, { "name": "psr/log", @@ -1616,16 +1620,16 @@ }, { "name": "symfony/console", - "version": "v2.7.6", + "version": "v2.7.9", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "5efd632294c8320ea52492db22292ff853a43766" + "reference": "d3fc138b6ed8f8074591821d3416d8f9c04d6ca6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/5efd632294c8320ea52492db22292ff853a43766", - "reference": "5efd632294c8320ea52492db22292ff853a43766", + "url": "https://api.github.com/repos/symfony/console/zipball/d3fc138b6ed8f8074591821d3416d8f9c04d6ca6", + "reference": "d3fc138b6ed8f8074591821d3416d8f9c04d6ca6", "shasum": "" }, "require": { @@ -1650,7 +1654,10 @@ "autoload": { "psr-4": { "Symfony\\Component\\Console\\": "" - } + }, + "exclude-from-classmap": [ + "/Tests/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -1668,20 +1675,20 @@ ], "description": "Symfony Console Component", "homepage": "https://symfony.com", - "time": "2015-10-20 14:38:46" + "time": "2016-01-14 08:26:43" }, { "name": "symfony/debug", - "version": "v2.7.6", + "version": "v2.8.2", "source": { "type": "git", "url": "https://github.com/symfony/debug.git", - "reference": "fb9e6887db716939f41af0ba8ef38a1582eb501b" + "reference": "386364a0e71158615ab9ae76b74bf84efc0bac7e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/debug/zipball/fb9e6887db716939f41af0ba8ef38a1582eb501b", - "reference": "fb9e6887db716939f41af0ba8ef38a1582eb501b", + "url": "https://api.github.com/repos/symfony/debug/zipball/386364a0e71158615ab9ae76b74bf84efc0bac7e", + "reference": "386364a0e71158615ab9ae76b74bf84efc0bac7e", "shasum": "" }, "require": { @@ -1692,19 +1699,22 @@ "symfony/http-kernel": ">=2.3,<2.3.24|~2.4.0|>=2.5,<2.5.9|>=2.6,<2.6.2" }, "require-dev": { - "symfony/class-loader": "~2.2", - "symfony/http-kernel": "~2.3.24|~2.5.9|~2.6,>=2.6.2" + "symfony/class-loader": "~2.2|~3.0.0", + "symfony/http-kernel": "~2.3.24|~2.5.9|~2.6,>=2.6.2|~3.0.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.7-dev" + "dev-master": "2.8-dev" } }, "autoload": { "psr-4": { "Symfony\\Component\\Debug\\": "" - } + }, + "exclude-from-classmap": [ + "/Tests/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -1722,20 +1732,20 @@ ], "description": "Symfony Debug Component", "homepage": "https://symfony.com", - "time": "2015-10-11 09:39:48" + "time": "2016-01-13 10:28:07" }, { "name": "symfony/dom-crawler", - "version": "v2.7.6", + "version": "v2.7.9", "source": { "type": "git", "url": "https://github.com/symfony/dom-crawler.git", - "reference": "5fef7d8b80d8f9992df99d8ee283f420484c9612" + "reference": "55cc79a177193eb3bd74ac54b353691fbb211d3a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/dom-crawler/zipball/5fef7d8b80d8f9992df99d8ee283f420484c9612", - "reference": "5fef7d8b80d8f9992df99d8ee283f420484c9612", + "url": "https://api.github.com/repos/symfony/dom-crawler/zipball/55cc79a177193eb3bd74ac54b353691fbb211d3a", + "reference": "55cc79a177193eb3bd74ac54b353691fbb211d3a", "shasum": "" }, "require": { @@ -1756,7 +1766,10 @@ "autoload": { "psr-4": { "Symfony\\Component\\DomCrawler\\": "" - } + }, + "exclude-from-classmap": [ + "/Tests/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -1774,20 +1787,20 @@ ], "description": "Symfony DomCrawler Component", "homepage": "https://symfony.com", - "time": "2015-10-11 09:39:48" + "time": "2016-01-03 15:32:00" }, { "name": "symfony/event-dispatcher", - "version": "v2.7.6", + "version": "v2.8.2", "source": { "type": "git", "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "87a5db5ea887763fa3a31a5471b512ff1596d9b8" + "reference": "ee278f7c851533e58ca307f66305ccb9188aceda" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/87a5db5ea887763fa3a31a5471b512ff1596d9b8", - "reference": "87a5db5ea887763fa3a31a5471b512ff1596d9b8", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/ee278f7c851533e58ca307f66305ccb9188aceda", + "reference": "ee278f7c851533e58ca307f66305ccb9188aceda", "shasum": "" }, "require": { @@ -1795,10 +1808,10 @@ }, "require-dev": { "psr/log": "~1.0", - "symfony/config": "~2.0,>=2.0.5", - "symfony/dependency-injection": "~2.6", - "symfony/expression-language": "~2.6", - "symfony/stopwatch": "~2.3" + "symfony/config": "~2.0,>=2.0.5|~3.0.0", + "symfony/dependency-injection": "~2.6|~3.0.0", + "symfony/expression-language": "~2.6|~3.0.0", + "symfony/stopwatch": "~2.3|~3.0.0" }, "suggest": { "symfony/dependency-injection": "", @@ -1807,13 +1820,16 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.7-dev" + "dev-master": "2.8-dev" } }, "autoload": { "psr-4": { "Symfony\\Component\\EventDispatcher\\": "" - } + }, + "exclude-from-classmap": [ + "/Tests/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -1831,20 +1847,20 @@ ], "description": "Symfony EventDispatcher Component", "homepage": "https://symfony.com", - "time": "2015-10-11 09:39:48" + "time": "2016-01-13 10:28:07" }, { "name": "symfony/finder", - "version": "v2.7.6", + "version": "v2.7.9", "source": { "type": "git", "url": "https://github.com/symfony/finder.git", - "reference": "2ffb4e9598db3c48eb6d0ae73b04bbf09280c59d" + "reference": "d20ac81c81a67ab898b0c0afa435f3e9a7d460cf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/2ffb4e9598db3c48eb6d0ae73b04bbf09280c59d", - "reference": "2ffb4e9598db3c48eb6d0ae73b04bbf09280c59d", + "url": "https://api.github.com/repos/symfony/finder/zipball/d20ac81c81a67ab898b0c0afa435f3e9a7d460cf", + "reference": "d20ac81c81a67ab898b0c0afa435f3e9a7d460cf", "shasum": "" }, "require": { @@ -1859,7 +1875,10 @@ "autoload": { "psr-4": { "Symfony\\Component\\Finder\\": "" - } + }, + "exclude-from-classmap": [ + "/Tests/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -1877,20 +1896,20 @@ ], "description": "Symfony Finder Component", "homepage": "https://symfony.com", - "time": "2015-10-11 09:39:48" + "time": "2016-01-14 08:26:43" }, { "name": "symfony/http-foundation", - "version": "v2.7.6", + "version": "v2.7.9", "source": { "type": "git", "url": "https://github.com/symfony/http-foundation.git", - "reference": "7598eea151ae3d4134df1f9957364b17809eea75" + "reference": "2f9d240056f026af5f7ba7f7052b0c6709bf288c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/7598eea151ae3d4134df1f9957364b17809eea75", - "reference": "7598eea151ae3d4134df1f9957364b17809eea75", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/2f9d240056f026af5f7ba7f7052b0c6709bf288c", + "reference": "2f9d240056f026af5f7ba7f7052b0c6709bf288c", "shasum": "" }, "require": { @@ -1911,6 +1930,9 @@ }, "classmap": [ "Resources/stubs" + ], + "exclude-from-classmap": [ + "/Tests/" ] }, "notification-url": "https://packagist.org/downloads/", @@ -1929,20 +1951,20 @@ ], "description": "Symfony HttpFoundation Component", "homepage": "https://symfony.com", - "time": "2015-10-23 14:47:27" + "time": "2016-01-13 10:26:43" }, { "name": "symfony/http-kernel", - "version": "v2.7.6", + "version": "v2.7.9", "source": { "type": "git", "url": "https://github.com/symfony/http-kernel.git", - "reference": "4260f2273a446a6715063dc9ca89fd0c475c2f77" + "reference": "aa2f1e544d6cb862452504b5479a5095b7bfc53f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-kernel/zipball/4260f2273a446a6715063dc9ca89fd0c475c2f77", - "reference": "4260f2273a446a6715063dc9ca89fd0c475c2f77", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/aa2f1e544d6cb862452504b5479a5095b7bfc53f", + "reference": "aa2f1e544d6cb862452504b5479a5095b7bfc53f", "shasum": "" }, "require": { @@ -1990,7 +2012,10 @@ "autoload": { "psr-4": { "Symfony\\Component\\HttpKernel\\": "" - } + }, + "exclude-from-classmap": [ + "/Tests/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -2008,20 +2033,20 @@ ], "description": "Symfony HttpKernel Component", "homepage": "https://symfony.com", - "time": "2015-10-27 19:07:21" + "time": "2016-01-14 10:41:45" }, { "name": "symfony/process", - "version": "v2.7.6", + "version": "v2.7.9", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "4a959dd4e19c2c5d7512689413921e0a74386ec7" + "reference": "0570b9ca51135ee7da0f19239eaf7b07ffb87034" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/4a959dd4e19c2c5d7512689413921e0a74386ec7", - "reference": "4a959dd4e19c2c5d7512689413921e0a74386ec7", + "url": "https://api.github.com/repos/symfony/process/zipball/0570b9ca51135ee7da0f19239eaf7b07ffb87034", + "reference": "0570b9ca51135ee7da0f19239eaf7b07ffb87034", "shasum": "" }, "require": { @@ -2036,7 +2061,10 @@ "autoload": { "psr-4": { "Symfony\\Component\\Process\\": "" - } + }, + "exclude-from-classmap": [ + "/Tests/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -2054,23 +2082,24 @@ ], "description": "Symfony Process Component", "homepage": "https://symfony.com", - "time": "2015-10-23 14:47:27" + "time": "2016-01-06 09:57:37" }, { "name": "symfony/security-core", - "version": "v2.7.6", + "version": "v2.7.9", "source": { "type": "git", "url": "https://github.com/symfony/security-core.git", - "reference": "677af9aa5a497f768bf23ba84a466be060dc7509" + "reference": "2d9171c507de3987d3b7ec59d0c8eb90b2150e46" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/security-core/zipball/677af9aa5a497f768bf23ba84a466be060dc7509", - "reference": "677af9aa5a497f768bf23ba84a466be060dc7509", + "url": "https://api.github.com/repos/symfony/security-core/zipball/2d9171c507de3987d3b7ec59d0c8eb90b2150e46", + "reference": "2d9171c507de3987d3b7ec59d0c8eb90b2150e46", "shasum": "" }, "require": { + "paragonie/random_compat": "~1.0", "php": ">=5.3.9" }, "require-dev": { @@ -2079,8 +2108,7 @@ "symfony/event-dispatcher": "~2.1", "symfony/expression-language": "~2.6", "symfony/http-foundation": "~2.4", - "symfony/translation": "~2.0,>=2.0.5", - "symfony/validator": "~2.5,>=2.5.5" + "symfony/validator": "~2.5,>=2.5.9" }, "suggest": { "ircmaxell/password-compat": "For using the BCrypt password encoder in PHP <5.5", @@ -2098,7 +2126,10 @@ "autoload": { "psr-4": { "Symfony\\Component\\Security\\Core\\": "" - } + }, + "exclude-from-classmap": [ + "/Tests/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -2116,20 +2147,20 @@ ], "description": "Symfony Security Component - Core Library", "homepage": "https://symfony.com", - "time": "2015-10-11 09:39:48" + "time": "2016-01-14 09:08:21" }, { "name": "symfony/translation", - "version": "v2.7.6", + "version": "v2.7.9", "source": { "type": "git", "url": "https://github.com/symfony/translation.git", - "reference": "6ccd9289ec1c71d01a49d83480de3b5293ce30c8" + "reference": "8cbab8445ad4269427077ba02fff8718cb397e22" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/translation/zipball/6ccd9289ec1c71d01a49d83480de3b5293ce30c8", - "reference": "6ccd9289ec1c71d01a49d83480de3b5293ce30c8", + "url": "https://api.github.com/repos/symfony/translation/zipball/8cbab8445ad4269427077ba02fff8718cb397e22", + "reference": "8cbab8445ad4269427077ba02fff8718cb397e22", "shasum": "" }, "require": { @@ -2158,7 +2189,10 @@ "autoload": { "psr-4": { "Symfony\\Component\\Translation\\": "" - } + }, + "exclude-from-classmap": [ + "/Tests/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -2176,20 +2210,20 @@ ], "description": "Symfony Translation Component", "homepage": "https://symfony.com", - "time": "2015-10-27 15:38:06" + "time": "2016-01-03 15:32:00" }, { "name": "symfony/var-dumper", - "version": "v2.7.6", + "version": "v2.7.9", "source": { "type": "git", "url": "https://github.com/symfony/var-dumper.git", - "reference": "eb033050050916b6bfa51be71009ef67b16046c9" + "reference": "ad39199e91f2f845a0181b14d459fda13a622138" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-dumper/zipball/eb033050050916b6bfa51be71009ef67b16046c9", - "reference": "eb033050050916b6bfa51be71009ef67b16046c9", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/ad39199e91f2f845a0181b14d459fda13a622138", + "reference": "ad39199e91f2f845a0181b14d459fda13a622138", "shasum": "" }, "require": { @@ -2210,7 +2244,10 @@ ], "psr-4": { "Symfony\\Component\\VarDumper\\": "" - } + }, + "exclude-from-classmap": [ + "/Tests/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -2232,7 +2269,7 @@ "debug", "dump" ], - "time": "2015-10-25 17:17:38" + "time": "2016-01-07 11:12:32" }, { "name": "vlucas/phpdotenv", @@ -2388,6 +2425,48 @@ ], "time": "2015-05-29 06:29:14" }, + { + "name": "myclabs/deep-copy", + "version": "1.5.0", + "source": { + "type": "git", + "url": "https://github.com/myclabs/DeepCopy.git", + "reference": "e3abefcd7f106677fd352cd7c187d6c969aa9ddc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/e3abefcd7f106677fd352cd7c187d6c969aa9ddc", + "reference": "e3abefcd7f106677fd352cd7c187d6c969aa9ddc", + "shasum": "" + }, + "require": { + "php": ">=5.4.0" + }, + "require-dev": { + "doctrine/collections": "1.*", + "phpunit/phpunit": "~4.1" + }, + "type": "library", + "autoload": { + "psr-4": { + "DeepCopy\\": "src/DeepCopy/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Create deep copies (clones) of your objects", + "homepage": "https://github.com/myclabs/DeepCopy", + "keywords": [ + "clone", + "copy", + "duplicate", + "object", + "object graph" + ], + "time": "2015-11-07 22:20:37" + }, { "name": "phpdocumentor/reflection-docblock", "version": "2.0.4", @@ -2499,29 +2578,30 @@ }, { "name": "phpunit/php-code-coverage", - "version": "2.2.4", + "version": "3.2.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "eabf68b476ac7d0f73793aada060f1c1a9bf8979" + "reference": "85f5db2d0a0da79ad6a256eb54148ba383059ad9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/eabf68b476ac7d0f73793aada060f1c1a9bf8979", - "reference": "eabf68b476ac7d0f73793aada060f1c1a9bf8979", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/85f5db2d0a0da79ad6a256eb54148ba383059ad9", + "reference": "85f5db2d0a0da79ad6a256eb54148ba383059ad9", "shasum": "" }, "require": { - "php": ">=5.3.3", + "php": ">=5.6", "phpunit/php-file-iterator": "~1.3", "phpunit/php-text-template": "~1.2", "phpunit/php-token-stream": "~1.3", + "sebastian/code-unit-reverse-lookup": "~1.0", "sebastian/environment": "^1.3.2", - "sebastian/version": "~1.0" + "sebastian/version": "~1.0|~2.0" }, "require-dev": { "ext-xdebug": ">=2.1.4", - "phpunit/phpunit": "~4" + "phpunit/phpunit": "~5" }, "suggest": { "ext-dom": "*", @@ -2531,7 +2611,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.2.x-dev" + "dev-master": "3.2.x-dev" } }, "autoload": { @@ -2557,7 +2637,7 @@ "testing", "xunit" ], - "time": "2015-10-06 15:47:00" + "time": "2016-02-13 06:47:56" }, { "name": "phpunit/php-file-iterator", @@ -2739,16 +2819,16 @@ }, { "name": "phpunit/phpunit", - "version": "4.8.16", + "version": "5.2.5", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "625f8c345606ed0f3a141dfb88f4116f0e22978e" + "reference": "db79855b229d4bbcdc055ad74c5dc20ad3f5c5fe" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/625f8c345606ed0f3a141dfb88f4116f0e22978e", - "reference": "625f8c345606ed0f3a141dfb88f4116f0e22978e", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/db79855b229d4bbcdc055ad74c5dc20ad3f5c5fe", + "reference": "db79855b229d4bbcdc055ad74c5dc20ad3f5c5fe", "shasum": "" }, "require": { @@ -2757,19 +2837,21 @@ "ext-pcre": "*", "ext-reflection": "*", "ext-spl": "*", - "php": ">=5.3.3", + "myclabs/deep-copy": "~1.3", + "php": ">=5.6", "phpspec/prophecy": "^1.3.1", - "phpunit/php-code-coverage": "~2.1", + "phpunit/php-code-coverage": "~3.2", "phpunit/php-file-iterator": "~1.4", "phpunit/php-text-template": "~1.2", "phpunit/php-timer": ">=1.0.6", - "phpunit/phpunit-mock-objects": "~2.3", + "phpunit/phpunit-mock-objects": ">=3.0.5", "sebastian/comparator": "~1.1", "sebastian/diff": "~1.2", "sebastian/environment": "~1.3", "sebastian/exporter": "~1.2", "sebastian/global-state": "~1.0", - "sebastian/version": "~1.0", + "sebastian/resource-operations": "~1.0", + "sebastian/version": "~1.0|~2.0", "symfony/yaml": "~2.1|~3.0" }, "suggest": { @@ -2781,7 +2863,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.8.x-dev" + "dev-master": "5.2.x-dev" } }, "autoload": { @@ -2807,30 +2889,30 @@ "testing", "xunit" ], - "time": "2015-10-23 06:48:33" + "time": "2016-02-13 06:58:29" }, { "name": "phpunit/phpunit-mock-objects", - "version": "2.3.8", + "version": "3.0.6", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git", - "reference": "ac8e7a3db35738d56ee9a76e78a4e03d97628983" + "reference": "49bc700750196c04dd6bc2c4c99cb632b893836b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/ac8e7a3db35738d56ee9a76e78a4e03d97628983", - "reference": "ac8e7a3db35738d56ee9a76e78a4e03d97628983", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/49bc700750196c04dd6bc2c4c99cb632b893836b", + "reference": "49bc700750196c04dd6bc2c4c99cb632b893836b", "shasum": "" }, "require": { "doctrine/instantiator": "^1.0.2", - "php": ">=5.3.3", + "php": ">=5.6", "phpunit/php-text-template": "~1.2", "sebastian/exporter": "~1.2" }, "require-dev": { - "phpunit/phpunit": "~4.4" + "phpunit/phpunit": "~5" }, "suggest": { "ext-soap": "*" @@ -2838,7 +2920,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.3.x-dev" + "dev-master": "3.0.x-dev" } }, "autoload": { @@ -2863,7 +2945,52 @@ "mock", "xunit" ], - "time": "2015-10-02 06:51:40" + "time": "2015-12-08 08:47:06" + }, + { + "name": "sebastian/code-unit-reverse-lookup", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", + "reference": "c36f5e7cfce482fde5bf8d10d41a53591e0198fe" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/c36f5e7cfce482fde5bf8d10d41a53591e0198fe", + "reference": "c36f5e7cfce482fde5bf8d10d41a53591e0198fe", + "shasum": "" + }, + "require": { + "php": ">=5.6" + }, + "require-dev": { + "phpunit/phpunit": "~5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Looks up which function or method a line of code belongs to", + "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", + "time": "2016-02-13 06:45:14" }, { "name": "sebastian/comparator", @@ -2931,28 +3058,28 @@ }, { "name": "sebastian/diff", - "version": "1.3.0", + "version": "1.4.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "863df9687835c62aa423a22412d26fa2ebde3fd3" + "reference": "13edfd8706462032c2f52b4b862974dd46b71c9e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/863df9687835c62aa423a22412d26fa2ebde3fd3", - "reference": "863df9687835c62aa423a22412d26fa2ebde3fd3", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/13edfd8706462032c2f52b4b862974dd46b71c9e", + "reference": "13edfd8706462032c2f52b4b862974dd46b71c9e", "shasum": "" }, "require": { "php": ">=5.3.3" }, "require-dev": { - "phpunit/phpunit": "~4.2" + "phpunit/phpunit": "~4.8" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.3-dev" + "dev-master": "1.4-dev" } }, "autoload": { @@ -2975,24 +3102,24 @@ } ], "description": "Diff implementation", - "homepage": "http://www.github.com/sebastianbergmann/diff", + "homepage": "https://github.com/sebastianbergmann/diff", "keywords": [ "diff" ], - "time": "2015-02-22 15:13:53" + "time": "2015-12-08 07:14:41" }, { "name": "sebastian/environment", - "version": "1.3.2", + "version": "1.3.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "6324c907ce7a52478eeeaede764f48733ef5ae44" + "reference": "6e7133793a8e5a5714a551a8324337374be209df" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/6324c907ce7a52478eeeaede764f48733ef5ae44", - "reference": "6324c907ce7a52478eeeaede764f48733ef5ae44", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/6e7133793a8e5a5714a551a8324337374be209df", + "reference": "6e7133793a8e5a5714a551a8324337374be209df", "shasum": "" }, "require": { @@ -3029,7 +3156,7 @@ "environment", "hhvm" ], - "time": "2015-08-03 06:14:51" + "time": "2015-12-02 08:37:27" }, { "name": "sebastian/exporter", @@ -3150,16 +3277,16 @@ }, { "name": "sebastian/recursion-context", - "version": "1.0.1", + "version": "1.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "994d4a811bafe801fb06dccbee797863ba2792ba" + "reference": "913401df809e99e4f47b27cdd781f4a258d58791" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/994d4a811bafe801fb06dccbee797863ba2792ba", - "reference": "994d4a811bafe801fb06dccbee797863ba2792ba", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/913401df809e99e4f47b27cdd781f4a258d58791", + "reference": "913401df809e99e4f47b27cdd781f4a258d58791", "shasum": "" }, "require": { @@ -3199,23 +3326,73 @@ ], "description": "Provides functionality to recursively process PHP variables", "homepage": "http://www.github.com/sebastianbergmann/recursion-context", - "time": "2015-06-21 08:04:50" + "time": "2015-11-11 19:50:13" }, { - "name": "sebastian/version", - "version": "1.0.6", + "name": "sebastian/resource-operations", + "version": "1.0.0", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/version.git", - "reference": "58b3a85e7999757d6ad81c787a1fbf5ff6c628c6" + "url": "https://github.com/sebastianbergmann/resource-operations.git", + "reference": "ce990bb21759f94aeafd30209e8cfcdfa8bc3f52" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/58b3a85e7999757d6ad81c787a1fbf5ff6c628c6", - "reference": "58b3a85e7999757d6ad81c787a1fbf5ff6c628c6", + "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/ce990bb21759f94aeafd30209e8cfcdfa8bc3f52", + "reference": "ce990bb21759f94aeafd30209e8cfcdfa8bc3f52", "shasum": "" }, + "require": { + "php": ">=5.6.0" + }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides a list of PHP built-in functions that operate on resources", + "homepage": "https://www.github.com/sebastianbergmann/resource-operations", + "time": "2015-07-28 20:34:47" + }, + { + "name": "sebastian/version", + "version": "2.0.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/version.git", + "reference": "c829badbd8fdf16a0bad8aa7fa7971c029f1b9c5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/c829badbd8fdf16a0bad8aa7fa7971c029f1b9c5", + "reference": "c829badbd8fdf16a0bad8aa7fa7971c029f1b9c5", + "shasum": "" + }, + "require": { + "php": ">=5.6" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, "autoload": { "classmap": [ "src/" @@ -3234,35 +3411,91 @@ ], "description": "Library that helps with managing the version number of Git-hosted PHP projects", "homepage": "https://github.com/sebastianbergmann/version", - "time": "2015-06-21 13:59:46" + "time": "2016-02-04 12:56:52" }, { - "name": "symfony/yaml", - "version": "v2.7.6", + "name": "symfony/css-selector", + "version": "v3.0.2", "source": { "type": "git", - "url": "https://github.com/symfony/yaml.git", - "reference": "eca9019c88fbe250164affd107bc8057771f3f4d" + "url": "https://github.com/symfony/css-selector.git", + "reference": "6605602690578496091ac20ec7a5cbd160d4dff4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/eca9019c88fbe250164affd107bc8057771f3f4d", - "reference": "eca9019c88fbe250164affd107bc8057771f3f4d", + "url": "https://api.github.com/repos/symfony/css-selector/zipball/6605602690578496091ac20ec7a5cbd160d4dff4", + "reference": "6605602690578496091ac20ec7a5cbd160d4dff4", "shasum": "" }, "require": { - "php": ">=5.3.9" + "php": ">=5.5.9" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.7-dev" + "dev-master": "3.0-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\CssSelector\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jean-François Simon", + "email": "jeanfrancois.simon@sensiolabs.com" + }, + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony CssSelector Component", + "homepage": "https://symfony.com", + "time": "2016-01-27 05:14:46" + }, + { + "name": "symfony/yaml", + "version": "v3.0.2", + "source": { + "type": "git", + "url": "https://github.com/symfony/yaml.git", + "reference": "3cf0709d7fe936e97bee9e954382e449003f1d9a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/yaml/zipball/3cf0709d7fe936e97bee9e954382e449003f1d9a", + "reference": "3cf0709d7fe936e97bee9e954382e449003f1d9a", + "shasum": "" + }, + "require": { + "php": ">=5.5.9" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" } }, "autoload": { "psr-4": { "Symfony\\Component\\Yaml\\": "" - } + }, + "exclude-from-classmap": [ + "/Tests/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -3280,7 +3513,7 @@ ], "description": "Symfony Yaml Component", "homepage": "https://symfony.com", - "time": "2015-10-11 09:39:48" + "time": "2016-02-02 13:44:19" } ], "aliases": [], diff --git a/tests/AuthTest.php b/tests/AuthTest.php new file mode 100644 index 0000000..0306afd --- /dev/null +++ b/tests/AuthTest.php @@ -0,0 +1,18 @@ +visit('/') + // ->type('polrci', 'username') + // ->type('polrci', 'password ') + // ->press('Sign In') + // ->dontSee('name="login" value="Sign In" />') + // ->see('>Dashboard'); + } +} diff --git a/tests/ExampleTest.php b/tests/ExampleTest.php deleted file mode 100644 index 67c9299..0000000 --- a/tests/ExampleTest.php +++ /dev/null @@ -1,15 +0,0 @@ -visit('/') - ->see('Lumen.'); - } -} diff --git a/tests/IndexTest.php b/tests/IndexTest.php new file mode 100644 index 0000000..af40015 --- /dev/null +++ b/tests/IndexTest.php @@ -0,0 +1,17 @@ +visit('/') + ->see('

'. env('APP_NAME') .'

') // Ensure page loads correctly + ->see('see('>Sign In') // Ensure log in buttons are shown when user is logged out + ->dontSee('SQLSTATE'); // Ensure database connection is correct + } +} diff --git a/tests/test_env b/tests/test_env index 4516f33..e712c52 100644 --- a/tests/test_env +++ b/tests/test_env @@ -7,7 +7,7 @@ APP_DEBUG=false APP_KEY=a5bd6a61b1327670bedd712a358d9c2b # Your app's name (shown on interface) -APP_NAME=Polr +APP_NAME=Polr CI # Protocol to access your app. e.g https:// APP_PROTOCOL=http:// diff --git a/vendor/composer/ClassLoader.php b/vendor/composer/ClassLoader.php index 5e1469e..ff6ecfb 100644 --- a/vendor/composer/ClassLoader.php +++ b/vendor/composer/ClassLoader.php @@ -13,9 +13,7 @@ namespace Composer\Autoload; /** - * ClassLoader implements a PSR-0 class loader - * - * See https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-0.md + * ClassLoader implements a PSR-0, PSR-4 and classmap class loader. * * $loader = new \Composer\Autoload\ClassLoader(); * @@ -39,6 +37,8 @@ namespace Composer\Autoload; * * @author Fabien Potencier * @author Jordi Boggiano + * @see http://www.php-fig.org/psr/psr-0/ + * @see http://www.php-fig.org/psr/psr-4/ */ class ClassLoader { @@ -147,7 +147,7 @@ class ClassLoader * appending or prepending to the ones previously set for this namespace. * * @param string $prefix The prefix/namespace, with trailing '\\' - * @param array|string $paths The PSR-0 base directories + * @param array|string $paths The PSR-4 base directories * @param bool $prepend Whether to prepend the directories * * @throws \InvalidArgumentException diff --git a/vendor/composer/autoload_classmap.php b/vendor/composer/autoload_classmap.php index eef66df..68b4ee0 100644 --- a/vendor/composer/autoload_classmap.php +++ b/vendor/composer/autoload_classmap.php @@ -6,11 +6,10 @@ $vendorDir = dirname(dirname(__FILE__)); $baseDir = dirname($vendorDir); return array( - 'AddVotesToUsersTable' => $baseDir . '/database/migrations/2015_11_04_015656_add_votes_to_users_table.php', + 'AuthTest' => $baseDir . '/tests/AuthTest.php', 'CreateLinkTable' => $baseDir . '/database/migrations/2015_11_04_015813_create_link_table.php', 'CreateUsersTable' => $baseDir . '/database/migrations/2015_11_04_015823_create_users_table.php', 'DatabaseSeeder' => $baseDir . '/database/seeds/DatabaseSeeder.php', - 'ExampleTest' => $baseDir . '/tests/ExampleTest.php', 'File_Iterator' => $vendorDir . '/phpunit/php-file-iterator/src/Iterator.php', 'File_Iterator_Facade' => $vendorDir . '/phpunit/php-file-iterator/src/Facade.php', 'File_Iterator_Factory' => $vendorDir . '/phpunit/php-file-iterator/src/Factory.php', @@ -20,6 +19,7 @@ return array( 'Illuminate\\Foundation\\Testing\\DatabaseMigrations' => $vendorDir . '/laravel/lumen-framework/src/Foundation/Testing/DatabaseMigrations.php', 'Illuminate\\Foundation\\Testing\\DatabaseTransactions' => $vendorDir . '/laravel/lumen-framework/src/Foundation/Testing/DatabaseTransactions.php', 'Illuminate\\Foundation\\Testing\\WithoutMiddleware' => $vendorDir . '/laravel/lumen-framework/src/Foundation/Testing/WithoutMiddleware.php', + 'IndexTest' => $baseDir . '/tests/IndexTest.php', 'PHPUnit_Exception' => $vendorDir . '/phpunit/phpunit/src/Exception.php', 'PHPUnit_Extensions_GroupTestSuite' => $vendorDir . '/phpunit/phpunit/src/Extensions/GroupTestSuite.php', 'PHPUnit_Extensions_PhptTestCase' => $vendorDir . '/phpunit/phpunit/src/Extensions/PhptTestCase.php', @@ -51,9 +51,12 @@ return array( 'PHPUnit_Framework_Constraint_IsEmpty' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/IsEmpty.php', 'PHPUnit_Framework_Constraint_IsEqual' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/IsEqual.php', 'PHPUnit_Framework_Constraint_IsFalse' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/IsFalse.php', + 'PHPUnit_Framework_Constraint_IsFinite' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/IsFinite.php', 'PHPUnit_Framework_Constraint_IsIdentical' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/IsIdentical.php', + 'PHPUnit_Framework_Constraint_IsInfinite' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/IsInfinite.php', 'PHPUnit_Framework_Constraint_IsInstanceOf' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/IsInstanceOf.php', 'PHPUnit_Framework_Constraint_IsJson' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/IsJson.php', + 'PHPUnit_Framework_Constraint_IsNan' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/IsNan.php', 'PHPUnit_Framework_Constraint_IsNull' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/IsNull.php', 'PHPUnit_Framework_Constraint_IsTrue' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/IsTrue.php', 'PHPUnit_Framework_Constraint_IsType' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/IsType.php', @@ -72,6 +75,7 @@ return array( 'PHPUnit_Framework_Constraint_TraversableContains' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/TraversableContains.php', 'PHPUnit_Framework_Constraint_TraversableContainsOnly' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/TraversableContainsOnly.php', 'PHPUnit_Framework_Constraint_Xor' => $vendorDir . '/phpunit/phpunit/src/Framework/Constraint/Xor.php', + 'PHPUnit_Framework_CoveredCodeNotExecutedException' => $vendorDir . '/phpunit/phpunit/src/Framework/PHPUnit_Framework_CoveredCodeNotExecutedException.php', 'PHPUnit_Framework_Error' => $vendorDir . '/phpunit/phpunit/src/Framework/Error.php', 'PHPUnit_Framework_Error_Deprecated' => $vendorDir . '/phpunit/phpunit/src/Framework/Error/Deprecated.php', 'PHPUnit_Framework_Error_Notice' => $vendorDir . '/phpunit/phpunit/src/Framework/Error/Notice.php', @@ -144,6 +148,7 @@ return array( 'PHPUnit_Framework_TestSuite_DataProvider' => $vendorDir . '/phpunit/phpunit/src/Framework/TestSuite/DataProvider.php', 'PHPUnit_Framework_UnintentionallyCoveredCodeError' => $vendorDir . '/phpunit/phpunit/src/Framework/UnintentionallyCoveredCodeError.php', 'PHPUnit_Framework_Warning' => $vendorDir . '/phpunit/phpunit/src/Framework/Warning.php', + 'PHPUnit_Framework_WarningTestCase' => $vendorDir . '/phpunit/phpunit/src/Framework/WarningTestCase.php', 'PHPUnit_Runner_BaseTestRunner' => $vendorDir . '/phpunit/phpunit/src/Runner/BaseTestRunner.php', 'PHPUnit_Runner_Exception' => $vendorDir . '/phpunit/phpunit/src/Runner/Exception.php', 'PHPUnit_Runner_Filter_Factory' => $vendorDir . '/phpunit/phpunit/src/Runner/Filter/Factory.php', @@ -169,6 +174,7 @@ return array( 'PHPUnit_Util_Log_JSON' => $vendorDir . '/phpunit/phpunit/src/Util/Log/JSON.php', 'PHPUnit_Util_Log_JUnit' => $vendorDir . '/phpunit/phpunit/src/Util/Log/JUnit.php', 'PHPUnit_Util_Log_TAP' => $vendorDir . '/phpunit/phpunit/src/Util/Log/TAP.php', + 'PHPUnit_Util_Log_TeamCity' => $vendorDir . '/phpunit/phpunit/src/Util/Log/TeamCity.php', 'PHPUnit_Util_PHP' => $vendorDir . '/phpunit/phpunit/src/Util/PHP.php', 'PHPUnit_Util_PHP_Default' => $vendorDir . '/phpunit/phpunit/src/Util/PHP/Default.php', 'PHPUnit_Util_PHP_Windows' => $vendorDir . '/phpunit/phpunit/src/Util/PHP/Windows.php', @@ -184,13 +190,15 @@ return array( 'PHPUnit_Util_Type' => $vendorDir . '/phpunit/phpunit/src/Util/Type.php', 'PHPUnit_Util_XML' => $vendorDir . '/phpunit/phpunit/src/Util/XML.php', 'PHP_CodeCoverage' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage.php', + 'PHP_CodeCoverage_CoveredCodeNotExecutedException' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage/Exception/CoveredCodeNotExecutedException.php', 'PHP_CodeCoverage_Driver' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage/Driver.php', 'PHP_CodeCoverage_Driver_HHVM' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage/Driver/HHVM.php', 'PHP_CodeCoverage_Driver_PHPDBG' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage/Driver/PHPDBG.php', 'PHP_CodeCoverage_Driver_Xdebug' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage/Driver/Xdebug.php', - 'PHP_CodeCoverage_Exception' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage/Exception.php', - 'PHP_CodeCoverage_Exception_UnintentionallyCoveredCode' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage/Exception/UnintentionallyCoveredCode.php', + 'PHP_CodeCoverage_Exception' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage/Exception/Exception.php', 'PHP_CodeCoverage_Filter' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage/Filter.php', + 'PHP_CodeCoverage_InvalidArgumentException' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage/Exception/InvalidArgumentException.php', + 'PHP_CodeCoverage_MissingCoversAnnotationException' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage/Exception/MissingCoversAnnotationException.php', 'PHP_CodeCoverage_Report_Clover' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage/Report/Clover.php', 'PHP_CodeCoverage_Report_Crap4j' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage/Report/Crap4j.php', 'PHP_CodeCoverage_Report_Factory' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage/Report/Factory.php', @@ -216,8 +224,9 @@ return array( 'PHP_CodeCoverage_Report_XML_Project' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/Project.php', 'PHP_CodeCoverage_Report_XML_Tests' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/Tests.php', 'PHP_CodeCoverage_Report_XML_Totals' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/Totals.php', + 'PHP_CodeCoverage_RuntimeException' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage/Exception/RuntimeException.php', + 'PHP_CodeCoverage_UnintentionallyCoveredCodeException' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage/Exception/UnintentionallyCoveredCodeException.php', 'PHP_CodeCoverage_Util' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage/Util.php', - 'PHP_CodeCoverage_Util_InvalidArgumentHelper' => $vendorDir . '/phpunit/php-code-coverage/src/CodeCoverage/Util/InvalidArgumentHelper.php', 'PHP_Timer' => $vendorDir . '/phpunit/php-timer/src/Timer.php', 'PHP_Token' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', 'PHP_TokenWithScope' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', @@ -415,6 +424,7 @@ return array( 'PHP_Token_XOR_EQUAL' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', 'PHP_Token_YIELD' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', 'PHP_Token_YIELD_FROM' => $vendorDir . '/phpunit/php-token-stream/src/Token.php', + 'SebastianBergmann\\CodeUnitReverseLookup\\Wizard' => $vendorDir . '/sebastian/code-unit-reverse-lookup/src/Wizard.php', 'SebastianBergmann\\Comparator\\ArrayComparator' => $vendorDir . '/sebastian/comparator/src/ArrayComparator.php', 'SebastianBergmann\\Comparator\\Comparator' => $vendorDir . '/sebastian/comparator/src/Comparator.php', 'SebastianBergmann\\Comparator\\ComparisonFailure' => $vendorDir . '/sebastian/comparator/src/ComparisonFailure.php', @@ -450,6 +460,7 @@ return array( 'SebastianBergmann\\RecursionContext\\Context' => $vendorDir . '/sebastian/recursion-context/src/Context.php', 'SebastianBergmann\\RecursionContext\\Exception' => $vendorDir . '/sebastian/recursion-context/src/Exception.php', 'SebastianBergmann\\RecursionContext\\InvalidArgumentException' => $vendorDir . '/sebastian/recursion-context/src/InvalidArgumentException.php', + 'SebastianBergmann\\ResourceOperations\\ResourceOperations' => $vendorDir . '/sebastian/resource-operations/src/ResourceOperations.php', 'SebastianBergmann\\Version' => $vendorDir . '/sebastian/version/src/Version.php', 'SessionHandlerInterface' => $vendorDir . '/symfony/http-foundation/Resources/stubs/SessionHandlerInterface.php', 'TestCase' => $baseDir . '/tests/TestCase.php', diff --git a/vendor/composer/autoload_files.php b/vendor/composer/autoload_files.php index bf84a18..c46dcf2 100644 --- a/vendor/composer/autoload_files.php +++ b/vendor/composer/autoload_files.php @@ -6,10 +6,10 @@ $vendorDir = dirname(dirname(__FILE__)); $baseDir = dirname($vendorDir); return array( - $vendorDir . '/danielstjules/stringy/src/Create.php', - $vendorDir . '/illuminate/support/helpers.php', - $vendorDir . '/symfony/var-dumper/Resources/functions/dump.php', - $vendorDir . '/paragonie/random_compat/lib/random.php', - $vendorDir . '/nikic/fast-route/src/functions.php', - $vendorDir . '/laravel/lumen-framework/src/helpers.php', + '65fec9ebcfbb3cbb4fd0d519687aea01' => $vendorDir . '/danielstjules/stringy/src/Create.php', + '72579e7bd17821bb1321b87411366eae' => $vendorDir . '/illuminate/support/helpers.php', + '667aeda72477189d0494fecd327c3641' => $vendorDir . '/symfony/var-dumper/Resources/functions/dump.php', + '5255c38a0faeba867671b61dfda6d864' => $vendorDir . '/paragonie/random_compat/lib/random.php', + '253c157292f75eb38082b5acb06f3f01' => $vendorDir . '/nikic/fast-route/src/functions.php', + 'bee9632da3ca00a99623b9c35d0c4f8b' => $vendorDir . '/laravel/lumen-framework/src/helpers.php', ); diff --git a/vendor/composer/autoload_namespaces.php b/vendor/composer/autoload_namespaces.php index 5b6598d..2aa1842 100644 --- a/vendor/composer/autoload_namespaces.php +++ b/vendor/composer/autoload_namespaces.php @@ -12,5 +12,4 @@ return array( 'Dotenv' => array($vendorDir . '/vlucas/phpdotenv/src'), 'Doctrine\\Common\\Inflector\\' => array($vendorDir . '/doctrine/inflector/lib'), 'Cron' => array($vendorDir . '/mtdowling/cron-expression/src'), - 'Carbon' => array($vendorDir . '/nesbot/carbon/src'), ); diff --git a/vendor/composer/autoload_psr4.php b/vendor/composer/autoload_psr4.php index 5d4b577..3b94fe5 100644 --- a/vendor/composer/autoload_psr4.php +++ b/vendor/composer/autoload_psr4.php @@ -17,6 +17,7 @@ return array( 'Symfony\\Component\\EventDispatcher\\' => array($vendorDir . '/symfony/event-dispatcher'), 'Symfony\\Component\\DomCrawler\\' => array($vendorDir . '/symfony/dom-crawler'), 'Symfony\\Component\\Debug\\' => array($vendorDir . '/symfony/debug'), + 'Symfony\\Component\\CssSelector\\' => array($vendorDir . '/symfony/css-selector'), 'Symfony\\Component\\Console\\' => array($vendorDir . '/symfony/console'), 'Stringy\\' => array($vendorDir . '/danielstjules/stringy/src'), 'Monolog\\' => array($vendorDir . '/monolog/monolog/src/Monolog'), @@ -47,5 +48,7 @@ return array( 'FastRoute\\' => array($vendorDir . '/nikic/fast-route/src'), 'Faker\\' => array($vendorDir . '/fzaninotto/faker/src/Faker'), 'Doctrine\\Instantiator\\' => array($vendorDir . '/doctrine/instantiator/src/Doctrine/Instantiator'), + 'DeepCopy\\' => array($vendorDir . '/myclabs/deep-copy/src/DeepCopy'), + 'Carbon\\' => array($vendorDir . '/nesbot/carbon/src/Carbon'), 'App\\' => array($baseDir . '/app'), ); diff --git a/vendor/composer/autoload_real.php b/vendor/composer/autoload_real.php index e82b030..d41e9ff 100644 --- a/vendor/composer/autoload_real.php +++ b/vendor/composer/autoload_real.php @@ -41,15 +41,19 @@ class ComposerAutoloaderInit1022d009db9f708df68c1991f93b734b $loader->register(true); $includeFiles = require __DIR__ . '/autoload_files.php'; - foreach ($includeFiles as $file) { - composerRequire1022d009db9f708df68c1991f93b734b($file); + foreach ($includeFiles as $fileIdentifier => $file) { + composerRequire1022d009db9f708df68c1991f93b734b($fileIdentifier, $file); } return $loader; } } -function composerRequire1022d009db9f708df68c1991f93b734b($file) +function composerRequire1022d009db9f708df68c1991f93b734b($fileIdentifier, $file) { - require $file; + if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) { + require $file; + + $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true; + } } diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json index aed8e1e..ec34fff 100644 --- a/vendor/composer/installed.json +++ b/vendor/composer/installed.json @@ -1,180 +1,4 @@ [ - { - "name": "symfony/var-dumper", - "version": "v2.7.6", - "version_normalized": "2.7.6.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/var-dumper.git", - "reference": "eb033050050916b6bfa51be71009ef67b16046c9" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/var-dumper/zipball/eb033050050916b6bfa51be71009ef67b16046c9", - "reference": "eb033050050916b6bfa51be71009ef67b16046c9", - "shasum": "" - }, - "require": { - "php": ">=5.3.9" - }, - "suggest": { - "ext-symfony_debug": "" - }, - "time": "2015-10-25 17:17:38", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.7-dev" - } - }, - "installation-source": "dist", - "autoload": { - "files": [ - "Resources/functions/dump.php" - ], - "psr-4": { - "Symfony\\Component\\VarDumper\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony mechanism for exploring and dumping PHP variables", - "homepage": "https://symfony.com", - "keywords": [ - "debug", - "dump" - ] - }, - { - "name": "symfony/security-core", - "version": "v2.7.6", - "version_normalized": "2.7.6.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/security-core.git", - "reference": "677af9aa5a497f768bf23ba84a466be060dc7509" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/security-core/zipball/677af9aa5a497f768bf23ba84a466be060dc7509", - "reference": "677af9aa5a497f768bf23ba84a466be060dc7509", - "shasum": "" - }, - "require": { - "php": ">=5.3.9" - }, - "require-dev": { - "ircmaxell/password-compat": "1.0.*", - "psr/log": "~1.0", - "symfony/event-dispatcher": "~2.1", - "symfony/expression-language": "~2.6", - "symfony/http-foundation": "~2.4", - "symfony/translation": "~2.0,>=2.0.5", - "symfony/validator": "~2.5,>=2.5.5" - }, - "suggest": { - "ircmaxell/password-compat": "For using the BCrypt password encoder in PHP <5.5", - "symfony/event-dispatcher": "", - "symfony/expression-language": "For using the expression voter", - "symfony/http-foundation": "", - "symfony/validator": "For using the user password constraint" - }, - "time": "2015-10-11 09:39:48", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.7-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Symfony\\Component\\Security\\Core\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony Security Component - Core Library", - "homepage": "https://symfony.com" - }, - { - "name": "symfony/http-foundation", - "version": "v2.7.6", - "version_normalized": "2.7.6.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/http-foundation.git", - "reference": "7598eea151ae3d4134df1f9957364b17809eea75" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/7598eea151ae3d4134df1f9957364b17809eea75", - "reference": "7598eea151ae3d4134df1f9957364b17809eea75", - "shasum": "" - }, - "require": { - "php": ">=5.3.9" - }, - "require-dev": { - "symfony/expression-language": "~2.4" - }, - "time": "2015-10-23 14:47:27", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.7-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Symfony\\Component\\HttpFoundation\\": "" - }, - "classmap": [ - "Resources/stubs" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony HttpFoundation Component", - "homepage": "https://symfony.com" - }, { "name": "psr/log", "version": "1.0.0", @@ -215,303 +39,6 @@ "psr-3" ] }, - { - "name": "symfony/debug", - "version": "v2.7.6", - "version_normalized": "2.7.6.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/debug.git", - "reference": "fb9e6887db716939f41af0ba8ef38a1582eb501b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/debug/zipball/fb9e6887db716939f41af0ba8ef38a1582eb501b", - "reference": "fb9e6887db716939f41af0ba8ef38a1582eb501b", - "shasum": "" - }, - "require": { - "php": ">=5.3.9", - "psr/log": "~1.0" - }, - "conflict": { - "symfony/http-kernel": ">=2.3,<2.3.24|~2.4.0|>=2.5,<2.5.9|>=2.6,<2.6.2" - }, - "require-dev": { - "symfony/class-loader": "~2.2", - "symfony/http-kernel": "~2.3.24|~2.5.9|~2.6,>=2.6.2" - }, - "time": "2015-10-11 09:39:48", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.7-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Symfony\\Component\\Debug\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony Debug Component", - "homepage": "https://symfony.com" - }, - { - "name": "symfony/event-dispatcher", - "version": "v2.7.6", - "version_normalized": "2.7.6.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "87a5db5ea887763fa3a31a5471b512ff1596d9b8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/87a5db5ea887763fa3a31a5471b512ff1596d9b8", - "reference": "87a5db5ea887763fa3a31a5471b512ff1596d9b8", - "shasum": "" - }, - "require": { - "php": ">=5.3.9" - }, - "require-dev": { - "psr/log": "~1.0", - "symfony/config": "~2.0,>=2.0.5", - "symfony/dependency-injection": "~2.6", - "symfony/expression-language": "~2.6", - "symfony/stopwatch": "~2.3" - }, - "suggest": { - "symfony/dependency-injection": "", - "symfony/http-kernel": "" - }, - "time": "2015-10-11 09:39:48", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.7-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Symfony\\Component\\EventDispatcher\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony EventDispatcher Component", - "homepage": "https://symfony.com" - }, - { - "name": "symfony/http-kernel", - "version": "v2.7.6", - "version_normalized": "2.7.6.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/http-kernel.git", - "reference": "4260f2273a446a6715063dc9ca89fd0c475c2f77" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/http-kernel/zipball/4260f2273a446a6715063dc9ca89fd0c475c2f77", - "reference": "4260f2273a446a6715063dc9ca89fd0c475c2f77", - "shasum": "" - }, - "require": { - "php": ">=5.3.9", - "psr/log": "~1.0", - "symfony/debug": "~2.6,>=2.6.2", - "symfony/event-dispatcher": "~2.6,>=2.6.7", - "symfony/http-foundation": "~2.5,>=2.5.4" - }, - "conflict": { - "symfony/config": "<2.7" - }, - "require-dev": { - "symfony/browser-kit": "~2.3", - "symfony/class-loader": "~2.1", - "symfony/config": "~2.7", - "symfony/console": "~2.3", - "symfony/css-selector": "~2.0,>=2.0.5", - "symfony/dependency-injection": "~2.2", - "symfony/dom-crawler": "~2.0,>=2.0.5", - "symfony/expression-language": "~2.4", - "symfony/finder": "~2.0,>=2.0.5", - "symfony/process": "~2.0,>=2.0.5", - "symfony/routing": "~2.2", - "symfony/stopwatch": "~2.3", - "symfony/templating": "~2.2", - "symfony/translation": "~2.0,>=2.0.5", - "symfony/var-dumper": "~2.6" - }, - "suggest": { - "symfony/browser-kit": "", - "symfony/class-loader": "", - "symfony/config": "", - "symfony/console": "", - "symfony/dependency-injection": "", - "symfony/finder": "", - "symfony/var-dumper": "" - }, - "time": "2015-10-27 19:07:21", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.7-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Symfony\\Component\\HttpKernel\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony HttpKernel Component", - "homepage": "https://symfony.com" - }, - { - "name": "symfony/dom-crawler", - "version": "v2.7.6", - "version_normalized": "2.7.6.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/dom-crawler.git", - "reference": "5fef7d8b80d8f9992df99d8ee283f420484c9612" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/dom-crawler/zipball/5fef7d8b80d8f9992df99d8ee283f420484c9612", - "reference": "5fef7d8b80d8f9992df99d8ee283f420484c9612", - "shasum": "" - }, - "require": { - "php": ">=5.3.9" - }, - "require-dev": { - "symfony/css-selector": "~2.3" - }, - "suggest": { - "symfony/css-selector": "" - }, - "time": "2015-10-11 09:39:48", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.7-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Symfony\\Component\\DomCrawler\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony DomCrawler Component", - "homepage": "https://symfony.com" - }, - { - "name": "paragonie/random_compat", - "version": "1.0.10", - "version_normalized": "1.0.10.0", - "source": { - "type": "git", - "url": "https://github.com/paragonie/random_compat.git", - "reference": "2fa50aa2f17066fa74ba00d943e8cee1a98284af" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/paragonie/random_compat/zipball/2fa50aa2f17066fa74ba00d943e8cee1a98284af", - "reference": "2fa50aa2f17066fa74ba00d943e8cee1a98284af", - "shasum": "" - }, - "require": { - "php": ">=5.2.0" - }, - "suggest": { - "ext-libsodium": "Provides a modern crypto API that can be used to generate random bytes." - }, - "time": "2015-10-23 13:21:37", - "type": "library", - "installation-source": "dist", - "autoload": { - "files": [ - "lib/random.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Paragon Initiative Enterprises", - "email": "security@paragonie.com", - "homepage": "https://paragonie.com" - } - ], - "description": "PHP 5.x polyfill for random_bytes() and random_int() from PHP 7", - "keywords": [ - "csprng", - "pseudorandom", - "random" - ] - }, { "name": "nikic/fast-route", "version": "v0.4.0", @@ -557,52 +84,6 @@ "routing" ] }, - { - "name": "mtdowling/cron-expression", - "version": "v1.0.4", - "version_normalized": "1.0.4.0", - "source": { - "type": "git", - "url": "https://github.com/mtdowling/cron-expression.git", - "reference": "fd92e883195e5dfa77720b1868cf084b08be4412" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/mtdowling/cron-expression/zipball/fd92e883195e5dfa77720b1868cf084b08be4412", - "reference": "fd92e883195e5dfa77720b1868cf084b08be4412", - "shasum": "" - }, - "require": { - "php": ">=5.3.2" - }, - "require-dev": { - "phpunit/phpunit": "4.*" - }, - "time": "2015-01-11 23:07:46", - "type": "library", - "installation-source": "dist", - "autoload": { - "psr-0": { - "Cron": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - } - ], - "description": "CRON for PHP: Calculate the next or previous run date and determine if a CRON expression is due", - "keywords": [ - "cron", - "schedule" - ] - }, { "name": "monolog/monolog", "version": "1.17.2", @@ -740,1490 +221,6 @@ "utils" ] }, - { - "name": "doctrine/inflector", - "version": "v1.0.1", - "version_normalized": "1.0.1.0", - "source": { - "type": "git", - "url": "https://github.com/doctrine/inflector.git", - "reference": "0bcb2e79d8571787f18b7eb036ed3d004908e604" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/inflector/zipball/0bcb2e79d8571787f18b7eb036ed3d004908e604", - "reference": "0bcb2e79d8571787f18b7eb036ed3d004908e604", - "shasum": "" - }, - "require": { - "php": ">=5.3.2" - }, - "require-dev": { - "phpunit/phpunit": "4.*" - }, - "time": "2014-12-20 21:24:13", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-0": { - "Doctrine\\Common\\Inflector\\": "lib/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Roman Borschel", - "email": "roman@code-factory.org" - }, - { - "name": "Benjamin Eberlei", - "email": "kontakt@beberlei.de" - }, - { - "name": "Guilherme Blanco", - "email": "guilhermeblanco@gmail.com" - }, - { - "name": "Jonathan Wage", - "email": "jonwage@gmail.com" - }, - { - "name": "Johannes Schmitt", - "email": "schmittjoh@gmail.com" - } - ], - "description": "Common String Manipulations with regard to casing and singular/plural rules.", - "homepage": "http://www.doctrine-project.org", - "keywords": [ - "inflection", - "pluralize", - "singularize", - "string" - ] - }, - { - "name": "illuminate/contracts", - "version": "v5.1.22", - "version_normalized": "5.1.22.0", - "source": { - "type": "git", - "url": "https://github.com/illuminate/contracts.git", - "reference": "e2b71fdbeeb3438748dca5f497e205888788a883" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/illuminate/contracts/zipball/e2b71fdbeeb3438748dca5f497e205888788a883", - "reference": "e2b71fdbeeb3438748dca5f497e205888788a883", - "shasum": "" - }, - "require": { - "php": ">=5.5.9" - }, - "time": "2015-09-24 11:16:48", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.1-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Illuminate\\Contracts\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Taylor Otwell", - "email": "taylorotwell@gmail.com" - } - ], - "description": "The Illuminate Contracts package.", - "homepage": "http://laravel.com" - }, - { - "name": "illuminate/support", - "version": "v5.1.22", - "version_normalized": "5.1.22.0", - "source": { - "type": "git", - "url": "https://github.com/illuminate/support.git", - "reference": "d52a832d3f4b025b82f954cbdef8ee24f6a77e77" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/illuminate/support/zipball/d52a832d3f4b025b82f954cbdef8ee24f6a77e77", - "reference": "d52a832d3f4b025b82f954cbdef8ee24f6a77e77", - "shasum": "" - }, - "require": { - "danielstjules/stringy": "~1.8", - "doctrine/inflector": "~1.0", - "ext-mbstring": "*", - "illuminate/contracts": "5.1.*", - "php": ">=5.5.9" - }, - "suggest": { - "jeremeamia/superclosure": "Required to be able to serialize closures (~2.0).", - "paragonie/random_compat": "Provides a compatible interface like PHP7's random_bytes() in PHP 5 projects (^1.0.6).", - "symfony/var-dumper": "Required to use the dd function (2.7.*)." - }, - "time": "2015-10-19 06:01:02", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.1-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Illuminate\\Support\\": "" - }, - "files": [ - "helpers.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Taylor Otwell", - "email": "taylorotwell@gmail.com" - } - ], - "description": "The Illuminate Support package.", - "homepage": "http://laravel.com" - }, - { - "name": "symfony/finder", - "version": "v2.7.6", - "version_normalized": "2.7.6.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/finder.git", - "reference": "2ffb4e9598db3c48eb6d0ae73b04bbf09280c59d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/finder/zipball/2ffb4e9598db3c48eb6d0ae73b04bbf09280c59d", - "reference": "2ffb4e9598db3c48eb6d0ae73b04bbf09280c59d", - "shasum": "" - }, - "require": { - "php": ">=5.3.9" - }, - "time": "2015-10-11 09:39:48", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.7-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Symfony\\Component\\Finder\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony Finder Component", - "homepage": "https://symfony.com" - }, - { - "name": "illuminate/filesystem", - "version": "v5.1.22", - "version_normalized": "5.1.22.0", - "source": { - "type": "git", - "url": "https://github.com/illuminate/filesystem.git", - "reference": "d2df6ede91e6af495674f2def38170330319819f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/illuminate/filesystem/zipball/d2df6ede91e6af495674f2def38170330319819f", - "reference": "d2df6ede91e6af495674f2def38170330319819f", - "shasum": "" - }, - "require": { - "illuminate/contracts": "5.1.*", - "illuminate/support": "5.1.*", - "php": ">=5.5.9", - "symfony/finder": "2.7.*" - }, - "suggest": { - "league/flysystem": "Required to use the Flysystem local and FTP drivers (~1.0).", - "league/flysystem-aws-s3-v3": "Required to use the Flysystem S3 driver (~1.0).", - "league/flysystem-rackspace": "Required to use the Flysystem Rackspace driver (~1.0)." - }, - "time": "2015-10-19 06:01:02", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.1-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Illuminate\\Filesystem\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Taylor Otwell", - "email": "taylorotwell@gmail.com" - } - ], - "description": "The Illuminate Filesystem package.", - "homepage": "http://laravel.com" - }, - { - "name": "illuminate/container", - "version": "v5.1.22", - "version_normalized": "5.1.22.0", - "source": { - "type": "git", - "url": "https://github.com/illuminate/container.git", - "reference": "bb2cd1d9c6cb7c4ce80b8d89f899e086f5a4f65b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/illuminate/container/zipball/bb2cd1d9c6cb7c4ce80b8d89f899e086f5a4f65b", - "reference": "bb2cd1d9c6cb7c4ce80b8d89f899e086f5a4f65b", - "shasum": "" - }, - "require": { - "illuminate/contracts": "5.1.*", - "php": ">=5.5.9" - }, - "time": "2015-10-19 06:01:02", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.1-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Illuminate\\Container\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Taylor Otwell", - "email": "taylorotwell@gmail.com" - } - ], - "description": "The Illuminate Container package.", - "homepage": "http://laravel.com" - }, - { - "name": "illuminate/events", - "version": "v5.1.22", - "version_normalized": "5.1.22.0", - "source": { - "type": "git", - "url": "https://github.com/illuminate/events.git", - "reference": "fdb64e091b635bf1525c157f1cfdd19cbca508c9" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/illuminate/events/zipball/fdb64e091b635bf1525c157f1cfdd19cbca508c9", - "reference": "fdb64e091b635bf1525c157f1cfdd19cbca508c9", - "shasum": "" - }, - "require": { - "illuminate/container": "5.1.*", - "illuminate/contracts": "5.1.*", - "illuminate/support": "5.1.*", - "php": ">=5.5.9" - }, - "time": "2015-09-23 13:19:23", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.1-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Illuminate\\Events\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Taylor Otwell", - "email": "taylorotwell@gmail.com" - } - ], - "description": "The Illuminate Events package.", - "homepage": "http://laravel.com" - }, - { - "name": "illuminate/view", - "version": "v5.1.22", - "version_normalized": "5.1.22.0", - "source": { - "type": "git", - "url": "https://github.com/illuminate/view.git", - "reference": "50e3027b470c8d92d433b6de0b1f227c232eda46" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/illuminate/view/zipball/50e3027b470c8d92d433b6de0b1f227c232eda46", - "reference": "50e3027b470c8d92d433b6de0b1f227c232eda46", - "shasum": "" - }, - "require": { - "illuminate/container": "5.1.*", - "illuminate/contracts": "5.1.*", - "illuminate/events": "5.1.*", - "illuminate/filesystem": "5.1.*", - "illuminate/support": "5.1.*", - "php": ">=5.5.9" - }, - "time": "2015-10-19 06:01:02", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.1-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Illuminate\\View\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Taylor Otwell", - "email": "taylorotwell@gmail.com" - } - ], - "description": "The Illuminate View package.", - "homepage": "http://laravel.com" - }, - { - "name": "symfony/translation", - "version": "v2.7.6", - "version_normalized": "2.7.6.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/translation.git", - "reference": "6ccd9289ec1c71d01a49d83480de3b5293ce30c8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/translation/zipball/6ccd9289ec1c71d01a49d83480de3b5293ce30c8", - "reference": "6ccd9289ec1c71d01a49d83480de3b5293ce30c8", - "shasum": "" - }, - "require": { - "php": ">=5.3.9" - }, - "conflict": { - "symfony/config": "<2.7" - }, - "require-dev": { - "psr/log": "~1.0", - "symfony/config": "~2.7", - "symfony/intl": "~2.4", - "symfony/yaml": "~2.2" - }, - "suggest": { - "psr/log": "To use logging capability in translator", - "symfony/config": "", - "symfony/yaml": "" - }, - "time": "2015-10-27 15:38:06", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.7-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Symfony\\Component\\Translation\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony Translation Component", - "homepage": "https://symfony.com" - }, - { - "name": "illuminate/validation", - "version": "v5.1.22", - "version_normalized": "5.1.22.0", - "source": { - "type": "git", - "url": "https://github.com/illuminate/validation.git", - "reference": "66151dde43b34fc2800f8201a73f61f889c77084" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/illuminate/validation/zipball/66151dde43b34fc2800f8201a73f61f889c77084", - "reference": "66151dde43b34fc2800f8201a73f61f889c77084", - "shasum": "" - }, - "require": { - "illuminate/container": "5.1.*", - "illuminate/contracts": "5.1.*", - "illuminate/support": "5.1.*", - "php": ">=5.5.9", - "symfony/http-foundation": "2.7.*", - "symfony/translation": "2.7.*" - }, - "suggest": { - "illuminate/database": "Required to use the database presence verifier (5.1.*)." - }, - "time": "2015-10-23 08:21:26", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.1-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Illuminate\\Validation\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Taylor Otwell", - "email": "taylorotwell@gmail.com" - } - ], - "description": "The Illuminate Validation package.", - "homepage": "http://laravel.com" - }, - { - "name": "illuminate/translation", - "version": "v5.1.22", - "version_normalized": "5.1.22.0", - "source": { - "type": "git", - "url": "https://github.com/illuminate/translation.git", - "reference": "81bf81fcb3ccc18e7aeabaefdbb7306581439fcc" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/illuminate/translation/zipball/81bf81fcb3ccc18e7aeabaefdbb7306581439fcc", - "reference": "81bf81fcb3ccc18e7aeabaefdbb7306581439fcc", - "shasum": "" - }, - "require": { - "illuminate/filesystem": "5.1.*", - "illuminate/support": "5.1.*", - "php": ">=5.5.9", - "symfony/translation": "2.7.*" - }, - "time": "2015-08-01 00:02:33", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.1-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Illuminate\\Translation\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Taylor Otwell", - "email": "taylorotwell@gmail.com" - } - ], - "description": "The Illuminate Translation package.", - "homepage": "http://laravel.com" - }, - { - "name": "nesbot/carbon", - "version": "1.20.0", - "version_normalized": "1.20.0.0", - "source": { - "type": "git", - "url": "https://github.com/briannesbitt/Carbon.git", - "reference": "bfd3eaba109c9a2405c92174c8e17f20c2b9caf3" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/bfd3eaba109c9a2405c92174c8e17f20c2b9caf3", - "reference": "bfd3eaba109c9a2405c92174c8e17f20c2b9caf3", - "shasum": "" - }, - "require": { - "php": ">=5.3.0", - "symfony/translation": "~2.6|~3.0" - }, - "require-dev": { - "phpunit/phpunit": "~4.0" - }, - "time": "2015-06-25 04:19:39", - "type": "library", - "installation-source": "dist", - "autoload": { - "psr-0": { - "Carbon": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Brian Nesbitt", - "email": "brian@nesbot.com", - "homepage": "http://nesbot.com" - } - ], - "description": "A simple API extension for DateTime.", - "homepage": "http://carbon.nesbot.com", - "keywords": [ - "date", - "datetime", - "time" - ] - }, - { - "name": "illuminate/session", - "version": "v5.1.22", - "version_normalized": "5.1.22.0", - "source": { - "type": "git", - "url": "https://github.com/illuminate/session.git", - "reference": "a719532f1ba75c352e1254743f4a9ed9a2b8412c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/illuminate/session/zipball/a719532f1ba75c352e1254743f4a9ed9a2b8412c", - "reference": "a719532f1ba75c352e1254743f4a9ed9a2b8412c", - "shasum": "" - }, - "require": { - "illuminate/contracts": "5.1.*", - "illuminate/support": "5.1.*", - "nesbot/carbon": "~1.19", - "php": ">=5.5.9", - "symfony/finder": "2.7.*", - "symfony/http-foundation": "2.7.*" - }, - "suggest": { - "illuminate/console": "Required to use the session:table command (5.1.*)." - }, - "time": "2015-10-19 06:01:02", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.1-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Illuminate\\Session\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Taylor Otwell", - "email": "taylorotwell@gmail.com" - } - ], - "description": "The Illuminate Session package.", - "homepage": "http://laravel.com" - }, - { - "name": "symfony/process", - "version": "v2.7.6", - "version_normalized": "2.7.6.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/process.git", - "reference": "4a959dd4e19c2c5d7512689413921e0a74386ec7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/4a959dd4e19c2c5d7512689413921e0a74386ec7", - "reference": "4a959dd4e19c2c5d7512689413921e0a74386ec7", - "shasum": "" - }, - "require": { - "php": ">=5.3.9" - }, - "time": "2015-10-23 14:47:27", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.7-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Symfony\\Component\\Process\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony Process Component", - "homepage": "https://symfony.com" - }, - { - "name": "illuminate/http", - "version": "v5.1.22", - "version_normalized": "5.1.22.0", - "source": { - "type": "git", - "url": "https://github.com/illuminate/http.git", - "reference": "b30fa1af5d1a7b525cc801ac41436179e43d52ee" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/illuminate/http/zipball/b30fa1af5d1a7b525cc801ac41436179e43d52ee", - "reference": "b30fa1af5d1a7b525cc801ac41436179e43d52ee", - "shasum": "" - }, - "require": { - "illuminate/session": "5.1.*", - "illuminate/support": "5.1.*", - "php": ">=5.5.9", - "symfony/http-foundation": "2.7.*", - "symfony/http-kernel": "2.7.*" - }, - "time": "2015-10-19 06:01:02", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.1-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Illuminate\\Http\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Taylor Otwell", - "email": "taylorotwell@gmail.com" - } - ], - "description": "The Illuminate Http package.", - "homepage": "http://laravel.com" - }, - { - "name": "symfony/console", - "version": "v2.7.6", - "version_normalized": "2.7.6.0", - "source": { - "type": "git", - "url": "https://github.com/symfony/console.git", - "reference": "5efd632294c8320ea52492db22292ff853a43766" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/5efd632294c8320ea52492db22292ff853a43766", - "reference": "5efd632294c8320ea52492db22292ff853a43766", - "shasum": "" - }, - "require": { - "php": ">=5.3.9" - }, - "require-dev": { - "psr/log": "~1.0", - "symfony/event-dispatcher": "~2.1", - "symfony/process": "~2.1" - }, - "suggest": { - "psr/log": "For using the console logger", - "symfony/event-dispatcher": "", - "symfony/process": "" - }, - "time": "2015-10-20 14:38:46", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.7-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Symfony\\Component\\Console\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony Console Component", - "homepage": "https://symfony.com" - }, - { - "name": "illuminate/console", - "version": "v5.1.22", - "version_normalized": "5.1.22.0", - "source": { - "type": "git", - "url": "https://github.com/illuminate/console.git", - "reference": "c712f03ce8fdfbc90ff3587ba31a0b8e3914ddb0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/illuminate/console/zipball/c712f03ce8fdfbc90ff3587ba31a0b8e3914ddb0", - "reference": "c712f03ce8fdfbc90ff3587ba31a0b8e3914ddb0", - "shasum": "" - }, - "require": { - "illuminate/contracts": "5.1.*", - "illuminate/support": "5.1.*", - "nesbot/carbon": "~1.19", - "php": ">=5.5.9", - "symfony/console": "2.7.*" - }, - "suggest": { - "guzzlehttp/guzzle": "Required to use the thenPing method on schedules (~5.3|~6.0).", - "mtdowling/cron-expression": "Required to use scheduling component (~1.0).", - "symfony/process": "Required to use scheduling component (2.7.*)." - }, - "time": "2015-10-20 21:16:46", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.1-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Illuminate\\Console\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Taylor Otwell", - "email": "taylorotwell@gmail.com" - } - ], - "description": "The Illuminate Console package.", - "homepage": "http://laravel.com" - }, - { - "name": "illuminate/queue", - "version": "v5.1.22", - "version_normalized": "5.1.22.0", - "source": { - "type": "git", - "url": "https://github.com/illuminate/queue.git", - "reference": "189b1cfaf7f08dce381b4ebbf16b0602a1efcdda" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/illuminate/queue/zipball/189b1cfaf7f08dce381b4ebbf16b0602a1efcdda", - "reference": "189b1cfaf7f08dce381b4ebbf16b0602a1efcdda", - "shasum": "" - }, - "require": { - "illuminate/console": "5.1.*", - "illuminate/container": "5.1.*", - "illuminate/contracts": "5.1.*", - "illuminate/http": "5.1.*", - "illuminate/support": "5.1.*", - "nesbot/carbon": "~1.19", - "php": ">=5.5.9", - "symfony/process": "2.7.*" - }, - "suggest": { - "aws/aws-sdk-php": "Required to use the SQS queue driver (~3.0).", - "illuminate/redis": "Required to use the redis queue driver (5.1.*).", - "iron-io/iron_mq": "Required to use the iron queue driver (~2.0).", - "pda/pheanstalk": "Required to use the beanstalk queue driver (~3.0)." - }, - "time": "2015-10-28 19:38:40", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.1-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Illuminate\\Queue\\": "" - }, - "classmap": [ - "IlluminateQueueClosure.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Taylor Otwell", - "email": "taylorotwell@gmail.com" - } - ], - "description": "The Illuminate Queue package.", - "homepage": "http://laravel.com" - }, - { - "name": "illuminate/pagination", - "version": "v5.1.22", - "version_normalized": "5.1.22.0", - "source": { - "type": "git", - "url": "https://github.com/illuminate/pagination.git", - "reference": "3ed65ae58f191f2819a44c1b0e1408dcc847948f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/illuminate/pagination/zipball/3ed65ae58f191f2819a44c1b0e1408dcc847948f", - "reference": "3ed65ae58f191f2819a44c1b0e1408dcc847948f", - "shasum": "" - }, - "require": { - "illuminate/contracts": "5.1.*", - "illuminate/support": "5.1.*", - "php": ">=5.5.9" - }, - "time": "2015-10-19 06:01:02", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.1-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Illuminate\\Pagination\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Taylor Otwell", - "email": "taylorotwell@gmail.com" - } - ], - "description": "The Illuminate Pagination package.", - "homepage": "http://laravel.com" - }, - { - "name": "illuminate/hashing", - "version": "v5.1.22", - "version_normalized": "5.1.22.0", - "source": { - "type": "git", - "url": "https://github.com/illuminate/hashing.git", - "reference": "86d12970c19823809314eae180939de62d4fab2c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/illuminate/hashing/zipball/86d12970c19823809314eae180939de62d4fab2c", - "reference": "86d12970c19823809314eae180939de62d4fab2c", - "shasum": "" - }, - "require": { - "illuminate/contracts": "5.1.*", - "illuminate/support": "5.1.*", - "php": ">=5.5.9" - }, - "time": "2015-07-16 20:28:10", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.1-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Illuminate\\Hashing\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Taylor Otwell", - "email": "taylorotwell@gmail.com" - } - ], - "description": "The Illuminate Hashing package.", - "homepage": "http://laravel.com" - }, - { - "name": "illuminate/encryption", - "version": "v5.1.22", - "version_normalized": "5.1.22.0", - "source": { - "type": "git", - "url": "https://github.com/illuminate/encryption.git", - "reference": "c10405ee5ec354b1d888e52dca6adeee6bac8476" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/illuminate/encryption/zipball/c10405ee5ec354b1d888e52dca6adeee6bac8476", - "reference": "c10405ee5ec354b1d888e52dca6adeee6bac8476", - "shasum": "" - }, - "require": { - "ext-mbstring": "*", - "ext-openssl": "*", - "illuminate/contracts": "5.1.*", - "illuminate/support": "5.1.*", - "php": ">=5.5.9" - }, - "suggest": { - "paragonie/random_compat": "Provides a compatible interface like PHP7's random_bytes() in PHP 5 projects (^1.0.6)." - }, - "time": "2015-10-16 21:40:18", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.1-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Illuminate\\Encryption\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Taylor Otwell", - "email": "taylorotwell@gmail.com" - } - ], - "description": "The Illuminate Encryption package.", - "homepage": "http://laravel.com" - }, - { - "name": "illuminate/database", - "version": "v5.1.22", - "version_normalized": "5.1.22.0", - "source": { - "type": "git", - "url": "https://github.com/illuminate/database.git", - "reference": "f82f4009e5776a8b0a580fca881694a778b229e6" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/illuminate/database/zipball/f82f4009e5776a8b0a580fca881694a778b229e6", - "reference": "f82f4009e5776a8b0a580fca881694a778b229e6", - "shasum": "" - }, - "require": { - "illuminate/container": "5.1.*", - "illuminate/contracts": "5.1.*", - "illuminate/support": "5.1.*", - "nesbot/carbon": "~1.19", - "php": ">=5.5.9" - }, - "suggest": { - "doctrine/dbal": "Required to rename columns and drop SQLite columns (~2.4).", - "fzaninotto/faker": "Required to use the eloquent factory builder (~1.4).", - "illuminate/console": "Required to use the database commands (5.1.*).", - "illuminate/events": "Required to use the observers with Eloquent (5.1.*).", - "illuminate/filesystem": "Required to use the migrations (5.1.*)." - }, - "time": "2015-10-28 21:57:04", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.1-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Illuminate\\Database\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Taylor Otwell", - "email": "taylorotwell@gmail.com" - } - ], - "description": "The Illuminate Database package.", - "homepage": "http://laravel.com", - "keywords": [ - "database", - "laravel", - "orm", - "sql" - ] - }, - { - "name": "illuminate/cookie", - "version": "v5.1.22", - "version_normalized": "5.1.22.0", - "source": { - "type": "git", - "url": "https://github.com/illuminate/cookie.git", - "reference": "8ded782fcb8f0affa9fc53bc6646a88b9acb615a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/illuminate/cookie/zipball/8ded782fcb8f0affa9fc53bc6646a88b9acb615a", - "reference": "8ded782fcb8f0affa9fc53bc6646a88b9acb615a", - "shasum": "" - }, - "require": { - "illuminate/contracts": "5.1.*", - "illuminate/support": "5.1.*", - "php": ">=5.5.9", - "symfony/http-foundation": "2.7.*", - "symfony/http-kernel": "2.7.*" - }, - "time": "2015-09-22 11:44:48", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.1-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Illuminate\\Cookie\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Taylor Otwell", - "email": "taylorotwell@gmail.com" - } - ], - "description": "The Illuminate Cookie package.", - "homepage": "http://laravel.com" - }, - { - "name": "illuminate/cache", - "version": "v5.1.22", - "version_normalized": "5.1.22.0", - "source": { - "type": "git", - "url": "https://github.com/illuminate/cache.git", - "reference": "6ffa99bbc2c6dccb1e50ed5219a30aea6d02f0d3" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/illuminate/cache/zipball/6ffa99bbc2c6dccb1e50ed5219a30aea6d02f0d3", - "reference": "6ffa99bbc2c6dccb1e50ed5219a30aea6d02f0d3", - "shasum": "" - }, - "require": { - "illuminate/contracts": "5.1.*", - "illuminate/support": "5.1.*", - "nesbot/carbon": "~1.19", - "php": ">=5.5.9" - }, - "suggest": { - "illuminate/database": "Required to use the database cache driver (5.1.*).", - "illuminate/filesystem": "Required to use the file cache driver (5.1.*).", - "illuminate/redis": "Required to use the redis cache driver (5.1.*)." - }, - "time": "2015-10-06 17:04:59", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.1-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Illuminate\\Cache\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Taylor Otwell", - "email": "taylorotwell@gmail.com" - } - ], - "description": "The Illuminate Cache package.", - "homepage": "http://laravel.com" - }, - { - "name": "illuminate/config", - "version": "v5.1.22", - "version_normalized": "5.1.22.0", - "source": { - "type": "git", - "url": "https://github.com/illuminate/config.git", - "reference": "de6c1cc0f2745645dec3f8bab0e43a3aa141d12d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/illuminate/config/zipball/de6c1cc0f2745645dec3f8bab0e43a3aa141d12d", - "reference": "de6c1cc0f2745645dec3f8bab0e43a3aa141d12d", - "shasum": "" - }, - "require": { - "illuminate/contracts": "5.1.*", - "illuminate/filesystem": "5.1.*", - "illuminate/support": "5.1.*", - "php": ">=5.5.9" - }, - "time": "2015-06-18 02:16:31", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.1-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Illuminate\\Config\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Taylor Otwell", - "email": "taylorotwell@gmail.com" - } - ], - "description": "The Illuminate Config package.", - "homepage": "http://laravel.com" - }, - { - "name": "illuminate/broadcasting", - "version": "v5.1.22", - "version_normalized": "5.1.22.0", - "source": { - "type": "git", - "url": "https://github.com/illuminate/broadcasting.git", - "reference": "c5eb4e0730dbe34aabff238507d3e8144c6625a2" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/illuminate/broadcasting/zipball/c5eb4e0730dbe34aabff238507d3e8144c6625a2", - "reference": "c5eb4e0730dbe34aabff238507d3e8144c6625a2", - "shasum": "" - }, - "require": { - "illuminate/contracts": "5.1.*", - "illuminate/support": "5.1.*", - "php": ">=5.5.9" - }, - "suggest": { - "pusher/pusher-php-server": "Required to use the Pusher broadcast driver (~2.0)." - }, - "time": "2015-10-08 01:12:55", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.1-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Illuminate\\Broadcasting\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Taylor Otwell", - "email": "taylorotwell@gmail.com" - } - ], - "description": "The Illuminate Broadcasting package.", - "homepage": "http://laravel.com" - }, - { - "name": "illuminate/pipeline", - "version": "v5.1.22", - "version_normalized": "5.1.22.0", - "source": { - "type": "git", - "url": "https://github.com/illuminate/pipeline.git", - "reference": "2725b0523b50415e1d20aea7297d205f65b53e27" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/illuminate/pipeline/zipball/2725b0523b50415e1d20aea7297d205f65b53e27", - "reference": "2725b0523b50415e1d20aea7297d205f65b53e27", - "shasum": "" - }, - "require": { - "illuminate/contracts": "5.1.*", - "illuminate/support": "5.1.*", - "php": ">=5.5.9" - }, - "time": "2015-10-05 21:58:27", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.1-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Illuminate\\Pipeline\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Taylor Otwell", - "email": "taylorotwell@gmail.com" - } - ], - "description": "The Illuminate Pipeline package.", - "homepage": "http://laravel.com" - }, - { - "name": "illuminate/bus", - "version": "v5.1.22", - "version_normalized": "5.1.22.0", - "source": { - "type": "git", - "url": "https://github.com/illuminate/bus.git", - "reference": "83fecbefb010c30e1cd2fef1290316000cdc742d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/illuminate/bus/zipball/83fecbefb010c30e1cd2fef1290316000cdc742d", - "reference": "83fecbefb010c30e1cd2fef1290316000cdc742d", - "shasum": "" - }, - "require": { - "illuminate/contracts": "5.1.*", - "illuminate/pipeline": "5.1.*", - "illuminate/support": "5.1.*", - "php": ">=5.5.9" - }, - "time": "2015-10-19 06:01:02", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.1-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Illuminate\\Bus\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Taylor Otwell", - "email": "taylorotwell@gmail.com" - } - ], - "description": "The Illuminate Bus package.", - "homepage": "http://laravel.com" - }, - { - "name": "illuminate/auth", - "version": "v5.1.22", - "version_normalized": "5.1.22.0", - "source": { - "type": "git", - "url": "https://github.com/illuminate/auth.git", - "reference": "ed926c9ad2b54164c0183a3a63f77f5f0ea0986a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/illuminate/auth/zipball/ed926c9ad2b54164c0183a3a63f77f5f0ea0986a", - "reference": "ed926c9ad2b54164c0183a3a63f77f5f0ea0986a", - "shasum": "" - }, - "require": { - "illuminate/contracts": "5.1.*", - "illuminate/http": "5.1.*", - "illuminate/session": "5.1.*", - "illuminate/support": "5.1.*", - "nesbot/carbon": "~1.19", - "php": ">=5.5.9" - }, - "suggest": { - "illuminate/console": "Required to use the auth:clear-resets command (5.1.*)." - }, - "time": "2015-10-19 06:01:02", - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "5.1-dev" - } - }, - "installation-source": "dist", - "autoload": { - "psr-4": { - "Illuminate\\Auth\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Taylor Otwell", - "email": "taylorotwell@gmail.com" - } - ], - "description": "The Illuminate Auth package.", - "homepage": "http://laravel.com" - }, { "name": "laravel/lumen-framework", "version": "v5.1.6", @@ -2361,22 +358,2168 @@ ] }, { - "name": "sebastian/version", - "version": "1.0.6", - "version_normalized": "1.0.6.0", + "name": "fzaninotto/faker", + "version": "v1.5.0", + "version_normalized": "1.5.0.0", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/version.git", - "reference": "58b3a85e7999757d6ad81c787a1fbf5ff6c628c6" + "url": "https://github.com/fzaninotto/Faker.git", + "reference": "d0190b156bcca848d401fb80f31f504f37141c8d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/58b3a85e7999757d6ad81c787a1fbf5ff6c628c6", - "reference": "58b3a85e7999757d6ad81c787a1fbf5ff6c628c6", + "url": "https://api.github.com/repos/fzaninotto/Faker/zipball/d0190b156bcca848d401fb80f31f504f37141c8d", + "reference": "d0190b156bcca848d401fb80f31f504f37141c8d", "shasum": "" }, - "time": "2015-06-21 13:59:46", + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "~4.0", + "squizlabs/php_codesniffer": "~1.5" + }, + "suggest": { + "ext-intl": "*" + }, + "time": "2015-05-29 06:29:14", "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.5.x-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Faker\\": "src/Faker/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "François Zaninotto" + } + ], + "description": "Faker is a PHP library that generates fake data for you.", + "keywords": [ + "data", + "faker", + "fixtures" + ] + }, + { + "name": "symfony/translation", + "version": "v2.7.9", + "version_normalized": "2.7.9.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/translation.git", + "reference": "8cbab8445ad4269427077ba02fff8718cb397e22" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/translation/zipball/8cbab8445ad4269427077ba02fff8718cb397e22", + "reference": "8cbab8445ad4269427077ba02fff8718cb397e22", + "shasum": "" + }, + "require": { + "php": ">=5.3.9" + }, + "conflict": { + "symfony/config": "<2.7" + }, + "require-dev": { + "psr/log": "~1.0", + "symfony/config": "~2.7", + "symfony/intl": "~2.4", + "symfony/yaml": "~2.2" + }, + "suggest": { + "psr/log": "To use logging capability in translator", + "symfony/config": "", + "symfony/yaml": "" + }, + "time": "2016-01-03 15:32:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.7-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Symfony\\Component\\Translation\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Translation Component", + "homepage": "https://symfony.com" + }, + { + "name": "nesbot/carbon", + "version": "1.21.0", + "version_normalized": "1.21.0.0", + "source": { + "type": "git", + "url": "https://github.com/briannesbitt/Carbon.git", + "reference": "7b08ec6f75791e130012f206e3f7b0e76e18e3d7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/7b08ec6f75791e130012f206e3f7b0e76e18e3d7", + "reference": "7b08ec6f75791e130012f206e3f7b0e76e18e3d7", + "shasum": "" + }, + "require": { + "php": ">=5.3.0", + "symfony/translation": "~2.6|~3.0" + }, + "require-dev": { + "phpunit/phpunit": "~4.0|~5.0" + }, + "time": "2015-11-04 20:07:17", + "type": "library", + "installation-source": "dist", + "autoload": { + "psr-4": { + "Carbon\\": "src/Carbon/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Brian Nesbitt", + "email": "brian@nesbot.com", + "homepage": "http://nesbot.com" + } + ], + "description": "A simple API extension for DateTime.", + "homepage": "http://carbon.nesbot.com", + "keywords": [ + "date", + "datetime", + "time" + ] + }, + { + "name": "illuminate/contracts", + "version": "v5.1.28", + "version_normalized": "5.1.28.0", + "source": { + "type": "git", + "url": "https://github.com/illuminate/contracts.git", + "reference": "e2b71fdbeeb3438748dca5f497e205888788a883" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/illuminate/contracts/zipball/e2b71fdbeeb3438748dca5f497e205888788a883", + "reference": "e2b71fdbeeb3438748dca5f497e205888788a883", + "shasum": "" + }, + "require": { + "php": ">=5.5.9" + }, + "time": "2015-09-24 11:16:48", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.1-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Illuminate\\Contracts\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylorotwell@gmail.com" + } + ], + "description": "The Illuminate Contracts package.", + "homepage": "http://laravel.com" + }, + { + "name": "doctrine/inflector", + "version": "v1.1.0", + "version_normalized": "1.1.0.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/inflector.git", + "reference": "90b2128806bfde671b6952ab8bea493942c1fdae" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/inflector/zipball/90b2128806bfde671b6952ab8bea493942c1fdae", + "reference": "90b2128806bfde671b6952ab8bea493942c1fdae", + "shasum": "" + }, + "require": { + "php": ">=5.3.2" + }, + "require-dev": { + "phpunit/phpunit": "4.*" + }, + "time": "2015-11-06 14:35:42", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1.x-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-0": { + "Doctrine\\Common\\Inflector\\": "lib/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + } + ], + "description": "Common String Manipulations with regard to casing and singular/plural rules.", + "homepage": "http://www.doctrine-project.org", + "keywords": [ + "inflection", + "pluralize", + "singularize", + "string" + ] + }, + { + "name": "illuminate/support", + "version": "v5.1.28", + "version_normalized": "5.1.28.0", + "source": { + "type": "git", + "url": "https://github.com/illuminate/support.git", + "reference": "8d62c6e1064d3013609ccc9ab6221efd86c31403" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/illuminate/support/zipball/8d62c6e1064d3013609ccc9ab6221efd86c31403", + "reference": "8d62c6e1064d3013609ccc9ab6221efd86c31403", + "shasum": "" + }, + "require": { + "danielstjules/stringy": "~1.8", + "doctrine/inflector": "~1.0", + "ext-mbstring": "*", + "illuminate/contracts": "5.1.*", + "php": ">=5.5.9" + }, + "suggest": { + "jeremeamia/superclosure": "Required to be able to serialize closures (~2.0).", + "paragonie/random_compat": "Provides a compatible interface like PHP7's random_bytes() in PHP 5 projects (~1.1).", + "symfony/var-dumper": "Improves the dd function (2.7.*)." + }, + "time": "2015-12-28 21:10:29", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.1-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Illuminate\\Support\\": "" + }, + "files": [ + "helpers.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylorotwell@gmail.com" + } + ], + "description": "The Illuminate Support package.", + "homepage": "http://laravel.com" + }, + { + "name": "symfony/http-foundation", + "version": "v2.7.9", + "version_normalized": "2.7.9.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/http-foundation.git", + "reference": "2f9d240056f026af5f7ba7f7052b0c6709bf288c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/2f9d240056f026af5f7ba7f7052b0c6709bf288c", + "reference": "2f9d240056f026af5f7ba7f7052b0c6709bf288c", + "shasum": "" + }, + "require": { + "php": ">=5.3.9" + }, + "require-dev": { + "symfony/expression-language": "~2.4" + }, + "time": "2016-01-13 10:26:43", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.7-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Symfony\\Component\\HttpFoundation\\": "" + }, + "classmap": [ + "Resources/stubs" + ], + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony HttpFoundation Component", + "homepage": "https://symfony.com" + }, + { + "name": "symfony/finder", + "version": "v2.7.9", + "version_normalized": "2.7.9.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/finder.git", + "reference": "d20ac81c81a67ab898b0c0afa435f3e9a7d460cf" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/finder/zipball/d20ac81c81a67ab898b0c0afa435f3e9a7d460cf", + "reference": "d20ac81c81a67ab898b0c0afa435f3e9a7d460cf", + "shasum": "" + }, + "require": { + "php": ">=5.3.9" + }, + "time": "2016-01-14 08:26:43", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.7-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Symfony\\Component\\Finder\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Finder Component", + "homepage": "https://symfony.com" + }, + { + "name": "illuminate/session", + "version": "v5.1.28", + "version_normalized": "5.1.28.0", + "source": { + "type": "git", + "url": "https://github.com/illuminate/session.git", + "reference": "3f0456a00023c29aebaa2938f65ebe744db1aeeb" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/illuminate/session/zipball/3f0456a00023c29aebaa2938f65ebe744db1aeeb", + "reference": "3f0456a00023c29aebaa2938f65ebe744db1aeeb", + "shasum": "" + }, + "require": { + "illuminate/contracts": "5.1.*", + "illuminate/support": "5.1.*", + "nesbot/carbon": "~1.19", + "php": ">=5.5.9", + "symfony/finder": "2.7.*", + "symfony/http-foundation": "2.7.*" + }, + "suggest": { + "illuminate/console": "Required to use the session:table command (5.1.*)." + }, + "time": "2015-12-26 15:27:27", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.1-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Illuminate\\Session\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylorotwell@gmail.com" + } + ], + "description": "The Illuminate Session package.", + "homepage": "http://laravel.com" + }, + { + "name": "symfony/event-dispatcher", + "version": "v2.8.2", + "version_normalized": "2.8.2.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/event-dispatcher.git", + "reference": "ee278f7c851533e58ca307f66305ccb9188aceda" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/ee278f7c851533e58ca307f66305ccb9188aceda", + "reference": "ee278f7c851533e58ca307f66305ccb9188aceda", + "shasum": "" + }, + "require": { + "php": ">=5.3.9" + }, + "require-dev": { + "psr/log": "~1.0", + "symfony/config": "~2.0,>=2.0.5|~3.0.0", + "symfony/dependency-injection": "~2.6|~3.0.0", + "symfony/expression-language": "~2.6|~3.0.0", + "symfony/stopwatch": "~2.3|~3.0.0" + }, + "suggest": { + "symfony/dependency-injection": "", + "symfony/http-kernel": "" + }, + "time": "2016-01-13 10:28:07", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.8-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Symfony\\Component\\EventDispatcher\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony EventDispatcher Component", + "homepage": "https://symfony.com" + }, + { + "name": "symfony/debug", + "version": "v2.8.2", + "version_normalized": "2.8.2.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/debug.git", + "reference": "386364a0e71158615ab9ae76b74bf84efc0bac7e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/debug/zipball/386364a0e71158615ab9ae76b74bf84efc0bac7e", + "reference": "386364a0e71158615ab9ae76b74bf84efc0bac7e", + "shasum": "" + }, + "require": { + "php": ">=5.3.9", + "psr/log": "~1.0" + }, + "conflict": { + "symfony/http-kernel": ">=2.3,<2.3.24|~2.4.0|>=2.5,<2.5.9|>=2.6,<2.6.2" + }, + "require-dev": { + "symfony/class-loader": "~2.2|~3.0.0", + "symfony/http-kernel": "~2.3.24|~2.5.9|~2.6,>=2.6.2|~3.0.0" + }, + "time": "2016-01-13 10:28:07", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.8-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Symfony\\Component\\Debug\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Debug Component", + "homepage": "https://symfony.com" + }, + { + "name": "symfony/http-kernel", + "version": "v2.7.9", + "version_normalized": "2.7.9.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/http-kernel.git", + "reference": "aa2f1e544d6cb862452504b5479a5095b7bfc53f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/aa2f1e544d6cb862452504b5479a5095b7bfc53f", + "reference": "aa2f1e544d6cb862452504b5479a5095b7bfc53f", + "shasum": "" + }, + "require": { + "php": ">=5.3.9", + "psr/log": "~1.0", + "symfony/debug": "~2.6,>=2.6.2", + "symfony/event-dispatcher": "~2.6,>=2.6.7", + "symfony/http-foundation": "~2.5,>=2.5.4" + }, + "conflict": { + "symfony/config": "<2.7" + }, + "require-dev": { + "symfony/browser-kit": "~2.3", + "symfony/class-loader": "~2.1", + "symfony/config": "~2.7", + "symfony/console": "~2.3", + "symfony/css-selector": "~2.0,>=2.0.5", + "symfony/dependency-injection": "~2.2", + "symfony/dom-crawler": "~2.0,>=2.0.5", + "symfony/expression-language": "~2.4", + "symfony/finder": "~2.0,>=2.0.5", + "symfony/process": "~2.0,>=2.0.5", + "symfony/routing": "~2.2", + "symfony/stopwatch": "~2.3", + "symfony/templating": "~2.2", + "symfony/translation": "~2.0,>=2.0.5", + "symfony/var-dumper": "~2.6" + }, + "suggest": { + "symfony/browser-kit": "", + "symfony/class-loader": "", + "symfony/config": "", + "symfony/console": "", + "symfony/dependency-injection": "", + "symfony/finder": "", + "symfony/var-dumper": "" + }, + "time": "2016-01-14 10:41:45", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.7-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Symfony\\Component\\HttpKernel\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony HttpKernel Component", + "homepage": "https://symfony.com" + }, + { + "name": "illuminate/http", + "version": "v5.1.28", + "version_normalized": "5.1.28.0", + "source": { + "type": "git", + "url": "https://github.com/illuminate/http.git", + "reference": "4b33ade62b49946c5f32e7680e42111409e1ce6d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/illuminate/http/zipball/4b33ade62b49946c5f32e7680e42111409e1ce6d", + "reference": "4b33ade62b49946c5f32e7680e42111409e1ce6d", + "shasum": "" + }, + "require": { + "illuminate/session": "5.1.*", + "illuminate/support": "5.1.*", + "php": ">=5.5.9", + "symfony/http-foundation": "2.7.*", + "symfony/http-kernel": "2.7.*" + }, + "time": "2015-12-19 22:27:14", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.1-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Illuminate\\Http\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylorotwell@gmail.com" + } + ], + "description": "The Illuminate Http package.", + "homepage": "http://laravel.com" + }, + { + "name": "illuminate/auth", + "version": "v5.1.28", + "version_normalized": "5.1.28.0", + "source": { + "type": "git", + "url": "https://github.com/illuminate/auth.git", + "reference": "78b1b83ceecace60d7563712425f404a6619da2a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/illuminate/auth/zipball/78b1b83ceecace60d7563712425f404a6619da2a", + "reference": "78b1b83ceecace60d7563712425f404a6619da2a", + "shasum": "" + }, + "require": { + "illuminate/contracts": "5.1.*", + "illuminate/http": "5.1.*", + "illuminate/session": "5.1.*", + "illuminate/support": "5.1.*", + "nesbot/carbon": "~1.19", + "php": ">=5.5.9" + }, + "suggest": { + "illuminate/console": "Required to use the auth:clear-resets command (5.1.*)." + }, + "time": "2015-12-08 14:38:44", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.1-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Illuminate\\Auth\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylorotwell@gmail.com" + } + ], + "description": "The Illuminate Auth package.", + "homepage": "http://laravel.com" + }, + { + "name": "illuminate/broadcasting", + "version": "v5.1.28", + "version_normalized": "5.1.28.0", + "source": { + "type": "git", + "url": "https://github.com/illuminate/broadcasting.git", + "reference": "d9393a6d1455b14149999911cb06a48c6eff6a74" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/illuminate/broadcasting/zipball/d9393a6d1455b14149999911cb06a48c6eff6a74", + "reference": "d9393a6d1455b14149999911cb06a48c6eff6a74", + "shasum": "" + }, + "require": { + "illuminate/contracts": "5.1.*", + "illuminate/support": "5.1.*", + "php": ">=5.5.9" + }, + "suggest": { + "pusher/pusher-php-server": "Required to use the Pusher broadcast driver (~2.0)." + }, + "time": "2015-12-21 04:33:22", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.1-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Illuminate\\Broadcasting\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylorotwell@gmail.com" + } + ], + "description": "The Illuminate Broadcasting package.", + "homepage": "http://laravel.com" + }, + { + "name": "illuminate/pipeline", + "version": "v5.1.28", + "version_normalized": "5.1.28.0", + "source": { + "type": "git", + "url": "https://github.com/illuminate/pipeline.git", + "reference": "2725b0523b50415e1d20aea7297d205f65b53e27" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/illuminate/pipeline/zipball/2725b0523b50415e1d20aea7297d205f65b53e27", + "reference": "2725b0523b50415e1d20aea7297d205f65b53e27", + "shasum": "" + }, + "require": { + "illuminate/contracts": "5.1.*", + "illuminate/support": "5.1.*", + "php": ">=5.5.9" + }, + "time": "2015-10-05 21:58:27", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.1-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Illuminate\\Pipeline\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylorotwell@gmail.com" + } + ], + "description": "The Illuminate Pipeline package.", + "homepage": "http://laravel.com" + }, + { + "name": "illuminate/bus", + "version": "v5.1.28", + "version_normalized": "5.1.28.0", + "source": { + "type": "git", + "url": "https://github.com/illuminate/bus.git", + "reference": "32a190fcc3f3ce487045b5eabd2ce839b9080a98" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/illuminate/bus/zipball/32a190fcc3f3ce487045b5eabd2ce839b9080a98", + "reference": "32a190fcc3f3ce487045b5eabd2ce839b9080a98", + "shasum": "" + }, + "require": { + "illuminate/contracts": "5.1.*", + "illuminate/pipeline": "5.1.*", + "illuminate/support": "5.1.*", + "php": ">=5.5.9" + }, + "time": "2015-12-24 19:50:28", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.1-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Illuminate\\Bus\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylorotwell@gmail.com" + } + ], + "description": "The Illuminate Bus package.", + "homepage": "http://laravel.com" + }, + { + "name": "illuminate/cache", + "version": "v5.1.28", + "version_normalized": "5.1.28.0", + "source": { + "type": "git", + "url": "https://github.com/illuminate/cache.git", + "reference": "3721b684d82e1cea05081cef2eafa04ef5fe2795" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/illuminate/cache/zipball/3721b684d82e1cea05081cef2eafa04ef5fe2795", + "reference": "3721b684d82e1cea05081cef2eafa04ef5fe2795", + "shasum": "" + }, + "require": { + "illuminate/contracts": "5.1.*", + "illuminate/support": "5.1.*", + "nesbot/carbon": "~1.19", + "php": ">=5.5.9" + }, + "suggest": { + "illuminate/database": "Required to use the database cache driver (5.1.*).", + "illuminate/filesystem": "Required to use the file cache driver (5.1.*).", + "illuminate/redis": "Required to use the redis cache driver (5.1.*)." + }, + "time": "2015-12-28 21:20:38", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.1-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Illuminate\\Cache\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylorotwell@gmail.com" + } + ], + "description": "The Illuminate Cache package.", + "homepage": "http://laravel.com" + }, + { + "name": "illuminate/filesystem", + "version": "v5.1.28", + "version_normalized": "5.1.28.0", + "source": { + "type": "git", + "url": "https://github.com/illuminate/filesystem.git", + "reference": "a1cc4b69d9cde4e8617506fa84576c4197ca0cf0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/illuminate/filesystem/zipball/a1cc4b69d9cde4e8617506fa84576c4197ca0cf0", + "reference": "a1cc4b69d9cde4e8617506fa84576c4197ca0cf0", + "shasum": "" + }, + "require": { + "illuminate/contracts": "5.1.*", + "illuminate/support": "5.1.*", + "php": ">=5.5.9", + "symfony/finder": "2.7.*" + }, + "suggest": { + "league/flysystem": "Required to use the Flysystem local and FTP drivers (~1.0).", + "league/flysystem-aws-s3-v3": "Required to use the Flysystem S3 driver (~1.0).", + "league/flysystem-rackspace": "Required to use the Flysystem Rackspace driver (~1.0)." + }, + "time": "2015-12-20 15:51:01", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.1-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Illuminate\\Filesystem\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylorotwell@gmail.com" + } + ], + "description": "The Illuminate Filesystem package.", + "homepage": "http://laravel.com" + }, + { + "name": "illuminate/config", + "version": "v5.1.28", + "version_normalized": "5.1.28.0", + "source": { + "type": "git", + "url": "https://github.com/illuminate/config.git", + "reference": "de6c1cc0f2745645dec3f8bab0e43a3aa141d12d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/illuminate/config/zipball/de6c1cc0f2745645dec3f8bab0e43a3aa141d12d", + "reference": "de6c1cc0f2745645dec3f8bab0e43a3aa141d12d", + "shasum": "" + }, + "require": { + "illuminate/contracts": "5.1.*", + "illuminate/filesystem": "5.1.*", + "illuminate/support": "5.1.*", + "php": ">=5.5.9" + }, + "time": "2015-06-18 02:16:31", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.1-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Illuminate\\Config\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylorotwell@gmail.com" + } + ], + "description": "The Illuminate Config package.", + "homepage": "http://laravel.com" + }, + { + "name": "illuminate/cookie", + "version": "v5.1.28", + "version_normalized": "5.1.28.0", + "source": { + "type": "git", + "url": "https://github.com/illuminate/cookie.git", + "reference": "b996f1da991449a3a91720c1a08a8cc27ddba8d4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/illuminate/cookie/zipball/b996f1da991449a3a91720c1a08a8cc27ddba8d4", + "reference": "b996f1da991449a3a91720c1a08a8cc27ddba8d4", + "shasum": "" + }, + "require": { + "illuminate/contracts": "5.1.*", + "illuminate/support": "5.1.*", + "php": ">=5.5.9", + "symfony/http-foundation": "2.7.*", + "symfony/http-kernel": "2.7.*" + }, + "time": "2015-12-05 16:40:16", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.1-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Illuminate\\Cookie\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylorotwell@gmail.com" + } + ], + "description": "The Illuminate Cookie package.", + "homepage": "http://laravel.com" + }, + { + "name": "illuminate/container", + "version": "v5.1.28", + "version_normalized": "5.1.28.0", + "source": { + "type": "git", + "url": "https://github.com/illuminate/container.git", + "reference": "91e10d009af0afd95d729bdec7acf9958ae95277" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/illuminate/container/zipball/91e10d009af0afd95d729bdec7acf9958ae95277", + "reference": "91e10d009af0afd95d729bdec7acf9958ae95277", + "shasum": "" + }, + "require": { + "illuminate/contracts": "5.1.*", + "php": ">=5.5.9" + }, + "time": "2015-12-07 20:20:37", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.1-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Illuminate\\Container\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylorotwell@gmail.com" + } + ], + "description": "The Illuminate Container package.", + "homepage": "http://laravel.com" + }, + { + "name": "illuminate/database", + "version": "v5.1.28", + "version_normalized": "5.1.28.0", + "source": { + "type": "git", + "url": "https://github.com/illuminate/database.git", + "reference": "508d4dca412f7645a4e5ae97a2ee0f3cf836550f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/illuminate/database/zipball/508d4dca412f7645a4e5ae97a2ee0f3cf836550f", + "reference": "508d4dca412f7645a4e5ae97a2ee0f3cf836550f", + "shasum": "" + }, + "require": { + "illuminate/container": "5.1.*", + "illuminate/contracts": "5.1.*", + "illuminate/support": "5.1.*", + "nesbot/carbon": "~1.19", + "php": ">=5.5.9" + }, + "suggest": { + "doctrine/dbal": "Required to rename columns and drop SQLite columns (~2.4).", + "fzaninotto/faker": "Required to use the eloquent factory builder (~1.4).", + "illuminate/console": "Required to use the database commands (5.1.*).", + "illuminate/events": "Required to use the observers with Eloquent (5.1.*).", + "illuminate/filesystem": "Required to use the migrations (5.1.*).", + "illuminate/pagination": "Required to paginate the result set (5.1.*)." + }, + "time": "2015-12-30 23:14:26", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.1-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Illuminate\\Database\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylorotwell@gmail.com" + } + ], + "description": "The Illuminate Database package.", + "homepage": "http://laravel.com", + "keywords": [ + "database", + "laravel", + "orm", + "sql" + ] + }, + { + "name": "illuminate/encryption", + "version": "v5.1.28", + "version_normalized": "5.1.28.0", + "source": { + "type": "git", + "url": "https://github.com/illuminate/encryption.git", + "reference": "abd14c81ce4f21edff005130dd5d980fe9cc4249" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/illuminate/encryption/zipball/abd14c81ce4f21edff005130dd5d980fe9cc4249", + "reference": "abd14c81ce4f21edff005130dd5d980fe9cc4249", + "shasum": "" + }, + "require": { + "ext-mbstring": "*", + "ext-openssl": "*", + "illuminate/contracts": "5.1.*", + "illuminate/support": "5.1.*", + "php": ">=5.5.9" + }, + "suggest": { + "paragonie/random_compat": "Provides a compatible interface like PHP7's random_bytes() in PHP 5 projects (~1.1)." + }, + "time": "2015-12-02 19:57:45", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.1-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Illuminate\\Encryption\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylorotwell@gmail.com" + } + ], + "description": "The Illuminate Encryption package.", + "homepage": "http://laravel.com" + }, + { + "name": "illuminate/hashing", + "version": "v5.1.28", + "version_normalized": "5.1.28.0", + "source": { + "type": "git", + "url": "https://github.com/illuminate/hashing.git", + "reference": "6c2e1658d57b1d5cc60a397d3cd0d64c61c2062f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/illuminate/hashing/zipball/6c2e1658d57b1d5cc60a397d3cd0d64c61c2062f", + "reference": "6c2e1658d57b1d5cc60a397d3cd0d64c61c2062f", + "shasum": "" + }, + "require": { + "illuminate/contracts": "5.1.*", + "illuminate/support": "5.1.*", + "php": ">=5.5.9" + }, + "time": "2015-11-29 16:58:05", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.1-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Illuminate\\Hashing\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylorotwell@gmail.com" + } + ], + "description": "The Illuminate Hashing package.", + "homepage": "http://laravel.com" + }, + { + "name": "illuminate/pagination", + "version": "v5.1.28", + "version_normalized": "5.1.28.0", + "source": { + "type": "git", + "url": "https://github.com/illuminate/pagination.git", + "reference": "2649ea015109c2e80ec38397e2c00ba123de9743" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/illuminate/pagination/zipball/2649ea015109c2e80ec38397e2c00ba123de9743", + "reference": "2649ea015109c2e80ec38397e2c00ba123de9743", + "shasum": "" + }, + "require": { + "illuminate/contracts": "5.1.*", + "illuminate/support": "5.1.*", + "php": ">=5.5.9" + }, + "time": "2015-12-07 19:40:09", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.1-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Illuminate\\Pagination\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylorotwell@gmail.com" + } + ], + "description": "The Illuminate Pagination package.", + "homepage": "http://laravel.com" + }, + { + "name": "symfony/process", + "version": "v2.7.9", + "version_normalized": "2.7.9.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/process.git", + "reference": "0570b9ca51135ee7da0f19239eaf7b07ffb87034" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/process/zipball/0570b9ca51135ee7da0f19239eaf7b07ffb87034", + "reference": "0570b9ca51135ee7da0f19239eaf7b07ffb87034", + "shasum": "" + }, + "require": { + "php": ">=5.3.9" + }, + "time": "2016-01-06 09:57:37", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.7-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Symfony\\Component\\Process\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Process Component", + "homepage": "https://symfony.com" + }, + { + "name": "symfony/console", + "version": "v2.7.9", + "version_normalized": "2.7.9.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/console.git", + "reference": "d3fc138b6ed8f8074591821d3416d8f9c04d6ca6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/console/zipball/d3fc138b6ed8f8074591821d3416d8f9c04d6ca6", + "reference": "d3fc138b6ed8f8074591821d3416d8f9c04d6ca6", + "shasum": "" + }, + "require": { + "php": ">=5.3.9" + }, + "require-dev": { + "psr/log": "~1.0", + "symfony/event-dispatcher": "~2.1", + "symfony/process": "~2.1" + }, + "suggest": { + "psr/log": "For using the console logger", + "symfony/event-dispatcher": "", + "symfony/process": "" + }, + "time": "2016-01-14 08:26:43", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.7-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Symfony\\Component\\Console\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Console Component", + "homepage": "https://symfony.com" + }, + { + "name": "illuminate/console", + "version": "v5.1.28", + "version_normalized": "5.1.28.0", + "source": { + "type": "git", + "url": "https://github.com/illuminate/console.git", + "reference": "548cfc29d0779cb5152f1a1724bafa2b53461a95" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/illuminate/console/zipball/548cfc29d0779cb5152f1a1724bafa2b53461a95", + "reference": "548cfc29d0779cb5152f1a1724bafa2b53461a95", + "shasum": "" + }, + "require": { + "illuminate/contracts": "5.1.*", + "illuminate/support": "5.1.*", + "nesbot/carbon": "~1.19", + "php": ">=5.5.9", + "symfony/console": "2.7.*" + }, + "suggest": { + "guzzlehttp/guzzle": "Required to use the ping methods on schedules (~5.3|~6.0).", + "mtdowling/cron-expression": "Required to use scheduling component (~1.0).", + "symfony/process": "Required to use scheduling component (2.7.*)." + }, + "time": "2015-12-28 21:10:29", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.1-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Illuminate\\Console\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylorotwell@gmail.com" + } + ], + "description": "The Illuminate Console package.", + "homepage": "http://laravel.com" + }, + { + "name": "illuminate/queue", + "version": "v5.1.28", + "version_normalized": "5.1.28.0", + "source": { + "type": "git", + "url": "https://github.com/illuminate/queue.git", + "reference": "a53899731c1bc8d68dda2b70ada25d0cbe875729" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/illuminate/queue/zipball/a53899731c1bc8d68dda2b70ada25d0cbe875729", + "reference": "a53899731c1bc8d68dda2b70ada25d0cbe875729", + "shasum": "" + }, + "require": { + "illuminate/console": "5.1.*", + "illuminate/container": "5.1.*", + "illuminate/contracts": "5.1.*", + "illuminate/http": "5.1.*", + "illuminate/support": "5.1.*", + "nesbot/carbon": "~1.19", + "php": ">=5.5.9", + "symfony/process": "2.7.*" + }, + "suggest": { + "aws/aws-sdk-php": "Required to use the SQS queue driver (~3.0).", + "illuminate/redis": "Required to use the redis queue driver (5.1.*).", + "iron-io/iron_mq": "Required to use the iron queue driver (~2.0).", + "pda/pheanstalk": "Required to use the beanstalk queue driver (~3.0)." + }, + "time": "2015-12-28 15:52:33", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.1-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Illuminate\\Queue\\": "" + }, + "classmap": [ + "IlluminateQueueClosure.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylorotwell@gmail.com" + } + ], + "description": "The Illuminate Queue package.", + "homepage": "http://laravel.com" + }, + { + "name": "illuminate/translation", + "version": "v5.1.28", + "version_normalized": "5.1.28.0", + "source": { + "type": "git", + "url": "https://github.com/illuminate/translation.git", + "reference": "a9f73e7bd5ad6231e477c1149cf7802f53bc86bd" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/illuminate/translation/zipball/a9f73e7bd5ad6231e477c1149cf7802f53bc86bd", + "reference": "a9f73e7bd5ad6231e477c1149cf7802f53bc86bd", + "shasum": "" + }, + "require": { + "illuminate/filesystem": "5.1.*", + "illuminate/support": "5.1.*", + "php": ">=5.5.9", + "symfony/translation": "2.7.*" + }, + "time": "2015-11-28 13:59:02", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.1-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Illuminate\\Translation\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylorotwell@gmail.com" + } + ], + "description": "The Illuminate Translation package.", + "homepage": "http://laravel.com" + }, + { + "name": "illuminate/validation", + "version": "v5.1.28", + "version_normalized": "5.1.28.0", + "source": { + "type": "git", + "url": "https://github.com/illuminate/validation.git", + "reference": "ca27ece6bbb01b7bee9b2f1b51a50aff2f77edd1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/illuminate/validation/zipball/ca27ece6bbb01b7bee9b2f1b51a50aff2f77edd1", + "reference": "ca27ece6bbb01b7bee9b2f1b51a50aff2f77edd1", + "shasum": "" + }, + "require": { + "illuminate/container": "5.1.*", + "illuminate/contracts": "5.1.*", + "illuminate/support": "5.1.*", + "php": ">=5.5.9", + "symfony/http-foundation": "2.7.*", + "symfony/translation": "2.7.*" + }, + "suggest": { + "illuminate/database": "Required to use the database presence verifier (5.1.*)." + }, + "time": "2015-12-09 15:24:53", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.1-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Illuminate\\Validation\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylorotwell@gmail.com" + } + ], + "description": "The Illuminate Validation package.", + "homepage": "http://laravel.com" + }, + { + "name": "illuminate/events", + "version": "v5.1.28", + "version_normalized": "5.1.28.0", + "source": { + "type": "git", + "url": "https://github.com/illuminate/events.git", + "reference": "a199e83e8a0f172ca3f0d3d685780c55a96104ab" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/illuminate/events/zipball/a199e83e8a0f172ca3f0d3d685780c55a96104ab", + "reference": "a199e83e8a0f172ca3f0d3d685780c55a96104ab", + "shasum": "" + }, + "require": { + "illuminate/container": "5.1.*", + "illuminate/contracts": "5.1.*", + "illuminate/support": "5.1.*", + "php": ">=5.5.9" + }, + "time": "2015-11-29 16:58:05", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.1-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Illuminate\\Events\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylorotwell@gmail.com" + } + ], + "description": "The Illuminate Events package.", + "homepage": "http://laravel.com" + }, + { + "name": "illuminate/view", + "version": "v5.1.28", + "version_normalized": "5.1.28.0", + "source": { + "type": "git", + "url": "https://github.com/illuminate/view.git", + "reference": "f43a4600a2acfaf4d8734ebc1fa869ede1990b25" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/illuminate/view/zipball/f43a4600a2acfaf4d8734ebc1fa869ede1990b25", + "reference": "f43a4600a2acfaf4d8734ebc1fa869ede1990b25", + "shasum": "" + }, + "require": { + "illuminate/container": "5.1.*", + "illuminate/contracts": "5.1.*", + "illuminate/events": "5.1.*", + "illuminate/filesystem": "5.1.*", + "illuminate/support": "5.1.*", + "php": ">=5.5.9" + }, + "time": "2015-11-29 16:58:05", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.1-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Illuminate\\View\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Taylor Otwell", + "email": "taylorotwell@gmail.com" + } + ], + "description": "The Illuminate View package.", + "homepage": "http://laravel.com" + }, + { + "name": "mtdowling/cron-expression", + "version": "v1.1.0", + "version_normalized": "1.1.0.0", + "source": { + "type": "git", + "url": "https://github.com/mtdowling/cron-expression.git", + "reference": "c9ee7886f5a12902b225a1a12f36bb45f9ab89e5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/mtdowling/cron-expression/zipball/c9ee7886f5a12902b225a1a12f36bb45f9ab89e5", + "reference": "c9ee7886f5a12902b225a1a12f36bb45f9ab89e5", + "shasum": "" + }, + "require": { + "php": ">=5.3.2" + }, + "require-dev": { + "phpunit/phpunit": "~4.0|~5.0" + }, + "time": "2016-01-26 21:23:30", + "type": "library", + "installation-source": "dist", + "autoload": { + "psr-0": { + "Cron": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + } + ], + "description": "CRON for PHP: Calculate the next or previous run date and determine if a CRON expression is due", + "keywords": [ + "cron", + "schedule" + ] + }, + { + "name": "symfony/dom-crawler", + "version": "v2.7.9", + "version_normalized": "2.7.9.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/dom-crawler.git", + "reference": "55cc79a177193eb3bd74ac54b353691fbb211d3a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/dom-crawler/zipball/55cc79a177193eb3bd74ac54b353691fbb211d3a", + "reference": "55cc79a177193eb3bd74ac54b353691fbb211d3a", + "shasum": "" + }, + "require": { + "php": ">=5.3.9" + }, + "require-dev": { + "symfony/css-selector": "~2.3" + }, + "suggest": { + "symfony/css-selector": "" + }, + "time": "2016-01-03 15:32:00", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.7-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Symfony\\Component\\DomCrawler\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony DomCrawler Component", + "homepage": "https://symfony.com" + }, + { + "name": "paragonie/random_compat", + "version": "v1.2.0", + "version_normalized": "1.2.0.0", + "source": { + "type": "git", + "url": "https://github.com/paragonie/random_compat.git", + "reference": "b0e69d10852716b2ccbdff69c75c477637220790" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/paragonie/random_compat/zipball/b0e69d10852716b2ccbdff69c75c477637220790", + "reference": "b0e69d10852716b2ccbdff69c75c477637220790", + "shasum": "" + }, + "require": { + "php": ">=5.2.0" + }, + "require-dev": { + "phpunit/phpunit": "4.*|5.*" + }, + "suggest": { + "ext-libsodium": "Provides a modern crypto API that can be used to generate random bytes." + }, + "time": "2016-02-06 03:52:05", + "type": "library", + "installation-source": "dist", + "autoload": { + "files": [ + "lib/random.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Paragon Initiative Enterprises", + "email": "security@paragonie.com", + "homepage": "https://paragonie.com" + } + ], + "description": "PHP 5.x polyfill for random_bytes() and random_int() from PHP 7", + "keywords": [ + "csprng", + "pseudorandom", + "random" + ] + }, + { + "name": "symfony/security-core", + "version": "v2.7.9", + "version_normalized": "2.7.9.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/security-core.git", + "reference": "2d9171c507de3987d3b7ec59d0c8eb90b2150e46" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/security-core/zipball/2d9171c507de3987d3b7ec59d0c8eb90b2150e46", + "reference": "2d9171c507de3987d3b7ec59d0c8eb90b2150e46", + "shasum": "" + }, + "require": { + "paragonie/random_compat": "~1.0", + "php": ">=5.3.9" + }, + "require-dev": { + "ircmaxell/password-compat": "1.0.*", + "psr/log": "~1.0", + "symfony/event-dispatcher": "~2.1", + "symfony/expression-language": "~2.6", + "symfony/http-foundation": "~2.4", + "symfony/validator": "~2.5,>=2.5.9" + }, + "suggest": { + "ircmaxell/password-compat": "For using the BCrypt password encoder in PHP <5.5", + "symfony/event-dispatcher": "", + "symfony/expression-language": "For using the expression voter", + "symfony/http-foundation": "", + "symfony/validator": "For using the user password constraint" + }, + "time": "2016-01-14 09:08:21", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.7-dev" + } + }, + "installation-source": "dist", + "autoload": { + "psr-4": { + "Symfony\\Component\\Security\\Core\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Security Component - Core Library", + "homepage": "https://symfony.com" + }, + { + "name": "symfony/var-dumper", + "version": "v2.7.9", + "version_normalized": "2.7.9.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/var-dumper.git", + "reference": "ad39199e91f2f845a0181b14d459fda13a622138" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/ad39199e91f2f845a0181b14d459fda13a622138", + "reference": "ad39199e91f2f845a0181b14d459fda13a622138", + "shasum": "" + }, + "require": { + "php": ">=5.3.9" + }, + "suggest": { + "ext-symfony_debug": "" + }, + "time": "2016-01-07 11:12:32", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.7-dev" + } + }, + "installation-source": "dist", + "autoload": { + "files": [ + "Resources/functions/dump.php" + ], + "psr-4": { + "Symfony\\Component\\VarDumper\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony mechanism for exploring and dumping PHP variables", + "homepage": "https://symfony.com", + "keywords": [ + "debug", + "dump" + ] + }, + { + "name": "myclabs/deep-copy", + "version": "1.5.0", + "version_normalized": "1.5.0.0", + "source": { + "type": "git", + "url": "https://github.com/myclabs/DeepCopy.git", + "reference": "e3abefcd7f106677fd352cd7c187d6c969aa9ddc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/e3abefcd7f106677fd352cd7c187d6c969aa9ddc", + "reference": "e3abefcd7f106677fd352cd7c187d6c969aa9ddc", + "shasum": "" + }, + "require": { + "php": ">=5.4.0" + }, + "require-dev": { + "doctrine/collections": "1.*", + "phpunit/phpunit": "~4.1" + }, + "time": "2015-11-07 22:20:37", + "type": "library", + "installation-source": "dist", + "autoload": { + "psr-4": { + "DeepCopy\\": "src/DeepCopy/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Create deep copies (clones) of your objects", + "homepage": "https://github.com/myclabs/DeepCopy", + "keywords": [ + "clone", + "copy", + "duplicate", + "object", + "object graph" + ] + }, + { + "name": "sebastian/version", + "version": "2.0.0", + "version_normalized": "2.0.0.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/version.git", + "reference": "c829badbd8fdf16a0bad8aa7fa7971c029f1b9c5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/c829badbd8fdf16a0bad8aa7fa7971c029f1b9c5", + "reference": "c829badbd8fdf16a0bad8aa7fa7971c029f1b9c5", + "shasum": "" + }, + "require": { + "php": ">=5.6" + }, + "time": "2016-02-04 12:56:52", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, "installation-source": "dist", "autoload": { "classmap": [ @@ -2397,6 +2540,50 @@ "description": "Library that helps with managing the version number of Git-hosted PHP projects", "homepage": "https://github.com/sebastianbergmann/version" }, + { + "name": "sebastian/resource-operations", + "version": "1.0.0", + "version_normalized": "1.0.0.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/resource-operations.git", + "reference": "ce990bb21759f94aeafd30209e8cfcdfa8bc3f52" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/ce990bb21759f94aeafd30209e8cfcdfa8bc3f52", + "reference": "ce990bb21759f94aeafd30209e8cfcdfa8bc3f52", + "shasum": "" + }, + "require": { + "php": ">=5.6.0" + }, + "time": "2015-07-28 20:34:47", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "installation-source": "dist", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides a list of PHP built-in functions that operate on resources", + "homepage": "https://www.github.com/sebastianbergmann/resource-operations" + }, { "name": "sebastian/global-state", "version": "1.1.1", @@ -2452,17 +2639,17 @@ }, { "name": "sebastian/recursion-context", - "version": "1.0.1", - "version_normalized": "1.0.1.0", + "version": "1.0.2", + "version_normalized": "1.0.2.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "994d4a811bafe801fb06dccbee797863ba2792ba" + "reference": "913401df809e99e4f47b27cdd781f4a258d58791" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/994d4a811bafe801fb06dccbee797863ba2792ba", - "reference": "994d4a811bafe801fb06dccbee797863ba2792ba", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/913401df809e99e4f47b27cdd781f4a258d58791", + "reference": "913401df809e99e4f47b27cdd781f4a258d58791", "shasum": "" }, "require": { @@ -2471,7 +2658,7 @@ "require-dev": { "phpunit/phpunit": "~4.4" }, - "time": "2015-06-21 08:04:50", + "time": "2015-11-11 19:50:13", "type": "library", "extra": { "branch-alias": { @@ -2575,17 +2762,17 @@ }, { "name": "sebastian/environment", - "version": "1.3.2", - "version_normalized": "1.3.2.0", + "version": "1.3.3", + "version_normalized": "1.3.3.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "6324c907ce7a52478eeeaede764f48733ef5ae44" + "reference": "6e7133793a8e5a5714a551a8324337374be209df" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/6324c907ce7a52478eeeaede764f48733ef5ae44", - "reference": "6324c907ce7a52478eeeaede764f48733ef5ae44", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/6e7133793a8e5a5714a551a8324337374be209df", + "reference": "6e7133793a8e5a5714a551a8324337374be209df", "shasum": "" }, "require": { @@ -2594,7 +2781,7 @@ "require-dev": { "phpunit/phpunit": "~4.4" }, - "time": "2015-08-03 06:14:51", + "time": "2015-12-02 08:37:27", "type": "library", "extra": { "branch-alias": { @@ -2627,30 +2814,30 @@ }, { "name": "sebastian/diff", - "version": "1.3.0", - "version_normalized": "1.3.0.0", + "version": "1.4.1", + "version_normalized": "1.4.1.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "863df9687835c62aa423a22412d26fa2ebde3fd3" + "reference": "13edfd8706462032c2f52b4b862974dd46b71c9e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/863df9687835c62aa423a22412d26fa2ebde3fd3", - "reference": "863df9687835c62aa423a22412d26fa2ebde3fd3", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/13edfd8706462032c2f52b4b862974dd46b71c9e", + "reference": "13edfd8706462032c2f52b4b862974dd46b71c9e", "shasum": "" }, "require": { "php": ">=5.3.3" }, "require-dev": { - "phpunit/phpunit": "~4.2" + "phpunit/phpunit": "~4.8" }, - "time": "2015-02-22 15:13:53", + "time": "2015-12-08 07:14:41", "type": "library", "extra": { "branch-alias": { - "dev-master": "1.3-dev" + "dev-master": "1.4-dev" } }, "installation-source": "dist", @@ -2674,7 +2861,7 @@ } ], "description": "Diff implementation", - "homepage": "http://www.github.com/sebastianbergmann/diff", + "homepage": "https://github.com/sebastianbergmann/diff", "keywords": [ "diff" ] @@ -2747,34 +2934,37 @@ }, { "name": "symfony/yaml", - "version": "v2.7.6", - "version_normalized": "2.7.6.0", + "version": "v3.0.2", + "version_normalized": "3.0.2.0", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "eca9019c88fbe250164affd107bc8057771f3f4d" + "reference": "3cf0709d7fe936e97bee9e954382e449003f1d9a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/eca9019c88fbe250164affd107bc8057771f3f4d", - "reference": "eca9019c88fbe250164affd107bc8057771f3f4d", + "url": "https://api.github.com/repos/symfony/yaml/zipball/3cf0709d7fe936e97bee9e954382e449003f1d9a", + "reference": "3cf0709d7fe936e97bee9e954382e449003f1d9a", "shasum": "" }, "require": { - "php": ">=5.3.9" + "php": ">=5.5.9" }, - "time": "2015-10-11 09:39:48", + "time": "2016-02-02 13:44:19", "type": "library", "extra": { "branch-alias": { - "dev-master": "2.7-dev" + "dev-master": "3.0-dev" } }, "installation-source": "dist", "autoload": { "psr-4": { "Symfony\\Component\\Yaml\\": "" - } + }, + "exclude-from-classmap": [ + "/Tests/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -3007,36 +3197,36 @@ }, { "name": "phpunit/phpunit-mock-objects", - "version": "2.3.8", - "version_normalized": "2.3.8.0", + "version": "3.0.6", + "version_normalized": "3.0.6.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git", - "reference": "ac8e7a3db35738d56ee9a76e78a4e03d97628983" + "reference": "49bc700750196c04dd6bc2c4c99cb632b893836b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/ac8e7a3db35738d56ee9a76e78a4e03d97628983", - "reference": "ac8e7a3db35738d56ee9a76e78a4e03d97628983", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/49bc700750196c04dd6bc2c4c99cb632b893836b", + "reference": "49bc700750196c04dd6bc2c4c99cb632b893836b", "shasum": "" }, "require": { "doctrine/instantiator": "^1.0.2", - "php": ">=5.3.3", + "php": ">=5.6", "phpunit/php-text-template": "~1.2", "sebastian/exporter": "~1.2" }, "require-dev": { - "phpunit/phpunit": "~4.4" + "phpunit/phpunit": "~5" }, "suggest": { "ext-soap": "*" }, - "time": "2015-10-02 06:51:40", + "time": "2015-12-08 08:47:06", "type": "library", "extra": { "branch-alias": { - "dev-master": "2.3.x-dev" + "dev-master": "3.0.x-dev" } }, "installation-source": "dist", @@ -3106,6 +3296,53 @@ "timer" ] }, + { + "name": "sebastian/code-unit-reverse-lookup", + "version": "1.0.0", + "version_normalized": "1.0.0.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", + "reference": "c36f5e7cfce482fde5bf8d10d41a53591e0198fe" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/c36f5e7cfce482fde5bf8d10d41a53591e0198fe", + "reference": "c36f5e7cfce482fde5bf8d10d41a53591e0198fe", + "shasum": "" + }, + "require": { + "php": ">=5.6" + }, + "require-dev": { + "phpunit/phpunit": "~5" + }, + "time": "2016-02-13 06:45:14", + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "installation-source": "dist", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Looks up which function or method a line of code belongs to", + "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/" + }, { "name": "phpunit/php-token-stream", "version": "1.4.8", @@ -3208,41 +3445,42 @@ }, { "name": "phpunit/php-code-coverage", - "version": "2.2.4", - "version_normalized": "2.2.4.0", + "version": "3.2.0", + "version_normalized": "3.2.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "eabf68b476ac7d0f73793aada060f1c1a9bf8979" + "reference": "85f5db2d0a0da79ad6a256eb54148ba383059ad9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/eabf68b476ac7d0f73793aada060f1c1a9bf8979", - "reference": "eabf68b476ac7d0f73793aada060f1c1a9bf8979", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/85f5db2d0a0da79ad6a256eb54148ba383059ad9", + "reference": "85f5db2d0a0da79ad6a256eb54148ba383059ad9", "shasum": "" }, "require": { - "php": ">=5.3.3", + "php": ">=5.6", "phpunit/php-file-iterator": "~1.3", "phpunit/php-text-template": "~1.2", "phpunit/php-token-stream": "~1.3", + "sebastian/code-unit-reverse-lookup": "~1.0", "sebastian/environment": "^1.3.2", - "sebastian/version": "~1.0" + "sebastian/version": "~1.0|~2.0" }, "require-dev": { "ext-xdebug": ">=2.1.4", - "phpunit/phpunit": "~4" + "phpunit/phpunit": "~5" }, "suggest": { "ext-dom": "*", "ext-xdebug": ">=2.2.1", "ext-xmlwriter": "*" }, - "time": "2015-10-06 15:47:00", + "time": "2016-02-13 06:47:56", "type": "library", "extra": { "branch-alias": { - "dev-master": "2.2.x-dev" + "dev-master": "3.2.x-dev" } }, "installation-source": "dist", @@ -3272,17 +3510,17 @@ }, { "name": "phpunit/phpunit", - "version": "4.8.16", - "version_normalized": "4.8.16.0", + "version": "5.2.5", + "version_normalized": "5.2.5.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "625f8c345606ed0f3a141dfb88f4116f0e22978e" + "reference": "db79855b229d4bbcdc055ad74c5dc20ad3f5c5fe" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/625f8c345606ed0f3a141dfb88f4116f0e22978e", - "reference": "625f8c345606ed0f3a141dfb88f4116f0e22978e", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/db79855b229d4bbcdc055ad74c5dc20ad3f5c5fe", + "reference": "db79855b229d4bbcdc055ad74c5dc20ad3f5c5fe", "shasum": "" }, "require": { @@ -3291,32 +3529,34 @@ "ext-pcre": "*", "ext-reflection": "*", "ext-spl": "*", - "php": ">=5.3.3", + "myclabs/deep-copy": "~1.3", + "php": ">=5.6", "phpspec/prophecy": "^1.3.1", - "phpunit/php-code-coverage": "~2.1", + "phpunit/php-code-coverage": "~3.2", "phpunit/php-file-iterator": "~1.4", "phpunit/php-text-template": "~1.2", "phpunit/php-timer": ">=1.0.6", - "phpunit/phpunit-mock-objects": "~2.3", + "phpunit/phpunit-mock-objects": ">=3.0.5", "sebastian/comparator": "~1.1", "sebastian/diff": "~1.2", "sebastian/environment": "~1.3", "sebastian/exporter": "~1.2", "sebastian/global-state": "~1.0", - "sebastian/version": "~1.0", + "sebastian/resource-operations": "~1.0", + "sebastian/version": "~1.0|~2.0", "symfony/yaml": "~2.1|~3.0" }, "suggest": { "phpunit/php-invoker": "~1.1" }, - "time": "2015-10-23 06:48:33", + "time": "2016-02-13 06:58:29", "bin": [ "phpunit" ], "type": "library", "extra": { "branch-alias": { - "dev-master": "4.8.x-dev" + "dev-master": "5.2.x-dev" } }, "installation-source": "dist", @@ -3345,42 +3585,38 @@ ] }, { - "name": "fzaninotto/faker", - "version": "v1.5.0", - "version_normalized": "1.5.0.0", + "name": "symfony/css-selector", + "version": "v3.0.2", + "version_normalized": "3.0.2.0", "source": { "type": "git", - "url": "https://github.com/fzaninotto/Faker.git", - "reference": "d0190b156bcca848d401fb80f31f504f37141c8d" + "url": "https://github.com/symfony/css-selector.git", + "reference": "6605602690578496091ac20ec7a5cbd160d4dff4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/fzaninotto/Faker/zipball/d0190b156bcca848d401fb80f31f504f37141c8d", - "reference": "d0190b156bcca848d401fb80f31f504f37141c8d", + "url": "https://api.github.com/repos/symfony/css-selector/zipball/6605602690578496091ac20ec7a5cbd160d4dff4", + "reference": "6605602690578496091ac20ec7a5cbd160d4dff4", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": ">=5.5.9" }, - "require-dev": { - "phpunit/phpunit": "~4.0", - "squizlabs/php_codesniffer": "~1.5" - }, - "suggest": { - "ext-intl": "*" - }, - "time": "2015-05-29 06:29:14", + "time": "2016-01-27 05:14:46", "type": "library", "extra": { "branch-alias": { - "dev-master": "1.5.x-dev" + "dev-master": "3.0-dev" } }, "installation-source": "dist", "autoload": { "psr-4": { - "Faker\\": "src/Faker/" - } + "Symfony\\Component\\CssSelector\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -3388,14 +3624,19 @@ ], "authors": [ { - "name": "François Zaninotto" + "name": "Jean-François Simon", + "email": "jeanfrancois.simon@sensiolabs.com" + }, + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" } ], - "description": "Faker is a PHP library that generates fake data for you.", - "keywords": [ - "data", - "faker", - "fixtures" - ] + "description": "Symfony CssSelector Component", + "homepage": "https://symfony.com" } ] diff --git a/vendor/doctrine/inflector/.travis.yml b/vendor/doctrine/inflector/.travis.yml index 6b1d8ff..9ec68f7 100644 --- a/vendor/doctrine/inflector/.travis.yml +++ b/vendor/doctrine/inflector/.travis.yml @@ -1,11 +1,21 @@ language: php +sudo: false + +cache: + directory: + - $HOME/.composer/cache + php: - 5.3 - 5.4 - 5.5 - 5.6 + - 7.0 - hhvm install: - - composer --prefer-source install + - composer install -n + +script: + - phpunit diff --git a/vendor/doctrine/inflector/LICENSE b/vendor/doctrine/inflector/LICENSE index 5e781fc..8c38cc1 100644 --- a/vendor/doctrine/inflector/LICENSE +++ b/vendor/doctrine/inflector/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2006-2013 Doctrine Project +Copyright (c) 2006-2015 Doctrine Project Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in diff --git a/vendor/doctrine/inflector/composer.json b/vendor/doctrine/inflector/composer.json index a29c68c..7e5b2ef 100644 --- a/vendor/doctrine/inflector/composer.json +++ b/vendor/doctrine/inflector/composer.json @@ -23,7 +23,7 @@ }, "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "1.1.x-dev" } } } diff --git a/vendor/doctrine/inflector/lib/Doctrine/Common/Inflector/Inflector.php b/vendor/doctrine/inflector/lib/Doctrine/Common/Inflector/Inflector.php index b007b21..a53828a 100644 --- a/vendor/doctrine/inflector/lib/Doctrine/Common/Inflector/Inflector.php +++ b/vendor/doctrine/inflector/lib/Doctrine/Common/Inflector/Inflector.php @@ -56,11 +56,12 @@ class Inflector '/(p)erson$/i' => '\1eople', '/(m)an$/i' => '\1en', '/(c)hild$/i' => '\1hildren', - '/(buffal|tomat)o$/i' => '\1\2oes', + '/(f)oot$/i' => '\1eet', + '/(buffal|her|potat|tomat|volcan)o$/i' => '\1\2oes', '/(alumn|bacill|cact|foc|fung|nucle|radi|stimul|syllab|termin|vir)us$/i' => '\1i', '/us$/i' => 'uses', '/(alias)$/i' => '\1es', - '/(ax|cris|test)is$/i' => '\1es', + '/(analys|ax|cris|test|thes)is$/i' => '\1es', '/s$/' => 's', '/^$/' => '', '/$/' => 's', @@ -70,27 +71,42 @@ class Inflector ), 'irregular' => array( 'atlas' => 'atlases', + 'axe' => 'axes', 'beef' => 'beefs', 'brother' => 'brothers', 'cafe' => 'cafes', + 'chateau' => 'chateaux', 'child' => 'children', 'cookie' => 'cookies', 'corpus' => 'corpuses', 'cow' => 'cows', - 'criteria' => 'criterion', + 'criterion' => 'criteria', + 'curriculum' => 'curricula', + 'demo' => 'demos', + 'domino' => 'dominoes', + 'echo' => 'echoes', + 'foot' => 'feet', + 'fungus' => 'fungi', 'ganglion' => 'ganglions', 'genie' => 'genies', 'genus' => 'genera', 'graffito' => 'graffiti', + 'hippopotamus' => 'hippopotami', 'hoof' => 'hoofs', 'human' => 'humans', + 'iris' => 'irises', + 'leaf' => 'leaves', 'loaf' => 'loaves', 'man' => 'men', + 'medium' => 'media', + 'memorandum' => 'memoranda', 'money' => 'monies', 'mongoose' => 'mongooses', + 'motto' => 'mottoes', 'move' => 'moves', 'mythos' => 'mythoi', 'niche' => 'niches', + 'nucleus' => 'nuclei', 'numen' => 'numina', 'occiput' => 'occiputs', 'octopus' => 'octopuses', @@ -98,11 +114,19 @@ class Inflector 'ox' => 'oxen', 'penis' => 'penises', 'person' => 'people', + 'plateau' => 'plateaux', + 'runner-up' => 'runners-up', 'sex' => 'sexes', 'soliloquy' => 'soliloquies', + 'son-in-law' => 'sons-in-law', + 'syllabus' => 'syllabi', 'testis' => 'testes', + 'thief' => 'thieves', + 'tooth' => 'teeth', + 'tornado' => 'tornadoes', 'trilby' => 'trilbys', 'turf' => 'turfs', + 'volcano' => 'volcanoes', ) ); @@ -120,9 +144,10 @@ class Inflector '/(vert|ind)ices$/i' => '\1ex', '/^(ox)en/i' => '\1', '/(alias)(es)*$/i' => '\1', + '/(buffal|her|potat|tomat|volcan)oes$/i' => '\1o', '/(alumn|bacill|cact|foc|fung|nucle|radi|stimul|syllab|termin|viri?)i$/i' => '\1us', '/([ftw]ax)es/i' => '\1', - '/(cris|ax|test)es$/i' => '\1is', + '/(analys|ax|cris|test|thes)es$/i' => '\1is', '/(shoe|slave)s$/i' => '\1', '/(o)es$/i' => '\1', '/ouses$/' => 'ouse', @@ -143,6 +168,7 @@ class Inflector '/(p)eople$/i' => '\1\2erson', '/(m)en$/i' => '\1an', '/(c)hildren$/i' => '\1\2hild', + '/(f)eet$/i' => '\1oot', '/(n)ews$/i' => '\1\2ews', '/eaus$/' => 'eau', '/^(.*us)$/' => '\\1', @@ -159,10 +185,15 @@ class Inflector '.*ss', ), 'irregular' => array( - 'criterion' => 'criteria', - 'curves' => 'curve', - 'foes' => 'foe', - 'waves' => 'wave', + 'criteria' => 'criterion', + 'curves' => 'curve', + 'emphases' => 'emphasis', + 'foes' => 'foe', + 'hoaxes' => 'hoax', + 'media' => 'medium', + 'neuroses' => 'neurosis', + 'waves' => 'wave', + 'oases' => 'oasis', ) ); @@ -236,6 +267,42 @@ class Inflector return lcfirst(self::classify($word)); } + /** + * Uppercases words with configurable delimeters between words. + * + * Takes a string and capitalizes all of the words, like PHP's built-in + * ucwords function. This extends that behavior, however, by allowing the + * word delimeters to be configured, rather than only separating on + * whitespace. + * + * Here is an example: + * + * + * + * + * @param string $string The string to operate on. + * @param string $delimiters A list of word separators. + * + * @return string The string with all delimeter-separated words capitalized. + */ + public static function ucwords($string, $delimiters = " \n\t\r\0\x0B-") + { + return preg_replace_callback( + '/[^' . preg_quote($delimiters, '/') . ']+/', + function($matches) { + return ucfirst($matches[0]); + }, + $string + ); + } + /** * Clears Inflectors inflected value caches, and resets the inflection * rules to the initial values. diff --git a/vendor/doctrine/inflector/tests/Doctrine/Tests/Common/Inflector/InflectorTest.php b/vendor/doctrine/inflector/tests/Doctrine/Tests/Common/Inflector/InflectorTest.php index a8a075d..4198d22 100644 --- a/vendor/doctrine/inflector/tests/Doctrine/Tests/Common/Inflector/InflectorTest.php +++ b/vendor/doctrine/inflector/tests/Doctrine/Tests/Common/Inflector/InflectorTest.php @@ -16,52 +16,131 @@ class InflectorTest extends DoctrineTestCase { Inflector::reset(); - // in the format array('singular', 'plural') + // In the format array('singular', 'plural') return array( - array('categoria', 'categorias'), - array('house', 'houses'), - array('powerhouse', 'powerhouses'), - array('Bus', 'Buses'), - array('bus', 'buses'), - array('menu', 'menus'), - array('news', 'news'), - array('food_menu', 'food_menus'), - array('Menu', 'Menus'), - array('FoodMenu', 'FoodMenus'), - array('quiz', 'quizzes'), - array('matrix_row', 'matrix_rows'), - array('matrix', 'matrices'), - array('vertex', 'vertices'), - array('index', 'indices'), - array('Alias', 'Aliases'), - array('Media', 'Media'), - array('NodeMedia', 'NodeMedia'), - array('alumnus', 'alumni'), - array('bacillus', 'bacilli'), - array('cactus', 'cacti'), - array('focus', 'foci'), - array('fungus', 'fungi'), - array('nucleus', 'nuclei'), - array('octopus', 'octopuses'), - array('radius', 'radii'), - array('stimulus', 'stimuli'), - array('syllabus', 'syllabi'), - array('terminus', 'termini'), - array('virus', 'viri'), - array('person', 'people'), - array('glove', 'gloves'), - array('crisis', 'crises'), - array('tax', 'taxes'), - array('wave', 'waves'), - array('bureau', 'bureaus'), - array('cafe', 'cafes'), - array('roof', 'roofs'), - array('foe', 'foes'), - array('cookie', 'cookies'), - array('identity', 'identities'), - array('criteria', 'criterion'), - array('curve', 'curves'), array('', ''), + array('Alias', 'Aliases'), + array('alumnus', 'alumni'), + array('analysis', 'analyses'), + array('aquarium', 'aquaria'), + array('arch', 'arches'), + array('atlas', 'atlases'), + array('axe', 'axes'), + array('baby', 'babies'), + array('bacillus', 'bacilli'), + array('bacterium', 'bacteria'), + array('bureau', 'bureaus'), + array('bus', 'buses'), + array('Bus', 'Buses'), + array('cactus', 'cacti'), + array('cafe', 'cafes'), + array('calf', 'calves'), + array('categoria', 'categorias'), + array('chateau', 'chateaux'), + array('cherry', 'cherries'), + array('child', 'children'), + array('church', 'churches'), + array('circus', 'circuses'), + array('city', 'cities'), + array('cod', 'cod'), + array('cookie', 'cookies'), + array('copy', 'copies'), + array('crisis', 'crises'), + array('criterion', 'criteria'), + array('curriculum', 'curricula'), + array('curve', 'curves'), + array('deer', 'deer'), + array('demo', 'demos'), + array('dictionary', 'dictionaries'), + array('domino', 'dominoes'), + array('dwarf', 'dwarves'), + array('echo', 'echoes'), + array('elf', 'elves'), + array('emphasis', 'emphases'), + array('family', 'families'), + array('fax', 'faxes'), + array('fish', 'fish'), + array('flush', 'flushes'), + array('fly', 'flies'), + array('focus', 'foci'), + array('foe', 'foes'), + array('food_menu', 'food_menus'), + array('FoodMenu', 'FoodMenus'), + array('foot', 'feet'), + array('fungus', 'fungi'), + array('glove', 'gloves'), + array('half', 'halves'), + array('hero', 'heroes'), + array('hippopotamus', 'hippopotami'), + array('hoax', 'hoaxes'), + array('house', 'houses'), + array('human', 'humans'), + array('identity', 'identities'), + array('index', 'indices'), + array('iris', 'irises'), + array('kiss', 'kisses'), + array('knife', 'knives'), + array('leaf', 'leaves'), + array('life', 'lives'), + array('loaf', 'loaves'), + array('man', 'men'), + array('matrix', 'matrices'), + array('matrix_row', 'matrix_rows'), + array('medium', 'media'), + array('memorandum', 'memoranda'), + array('menu', 'menus'), + array('Menu', 'Menus'), + array('mess', 'messes'), + array('moose', 'moose'), + array('motto', 'mottoes'), + array('mouse', 'mice'), + array('neurosis', 'neuroses'), + array('news', 'news'), + array('NodeMedia', 'NodeMedia'), + array('nucleus', 'nuclei'), + array('oasis', 'oases'), + array('octopus', 'octopuses'), + array('pass', 'passes'), + array('person', 'people'), + array('plateau', 'plateaux'), + array('potato', 'potatoes'), + array('powerhouse', 'powerhouses'), + array('quiz', 'quizzes'), + array('radius', 'radii'), + array('reflex', 'reflexes'), + array('roof', 'roofs'), + array('runner-up', 'runners-up'), + array('scarf', 'scarves'), + array('scratch', 'scratches'), + array('series', 'series'), + array('sheep', 'sheep'), + array('shelf', 'shelves'), + array('shoe', 'shoes'), + array('son-in-law', 'sons-in-law'), + array('species', 'species'), + array('splash', 'splashes'), + array('spy', 'spies'), + array('stimulus', 'stimuli'), + array('stitch', 'stitches'), + array('story', 'stories'), + array('syllabus', 'syllabi'), + array('tax', 'taxes'), + array('terminus', 'termini'), + array('thesis', 'theses'), + array('thief', 'thieves'), + array('tomato', 'tomatoes'), + array('tooth', 'teeth'), + array('tornado', 'tornadoes'), + array('try', 'tries'), + array('vertex', 'vertices'), + array('virus', 'viri'), + array('volcano', 'volcanoes'), + array('wash', 'washes'), + array('watch', 'watches'), + array('wave', 'waves'), + array('wharf', 'wharves'), + array('wife', 'wives'), + array('woman', 'women'), ); } @@ -206,5 +285,25 @@ class InflectorTest extends DoctrineTestCase $this->assertEquals(Inflector::singularize('Alcoois'), 'Alcool'); $this->assertEquals(Inflector::singularize('Atlas'), 'Atlas'); } + + /** + * Test basic ucwords functionality. + * + * @return void + */ + public function testUcwords() + { + $this->assertSame('Top-O-The-Morning To All_of_you!', Inflector::ucwords( 'top-o-the-morning to all_of_you!')); + } + + /** + * Test ucwords functionality with custom delimeters. + * + * @return void + */ + public function testUcwordsWithCustomDelimeters() + { + $this->assertSame('Top-O-The-Morning To All_Of_You!', Inflector::ucwords( 'top-o-the-morning to all_of_you!', '-_ ')); + } } diff --git a/vendor/illuminate/auth/Access/Gate.php b/vendor/illuminate/auth/Access/Gate.php index 0671b4d..de057d6 100644 --- a/vendor/illuminate/auth/Access/Gate.php +++ b/vendor/illuminate/auth/Access/Gate.php @@ -321,7 +321,9 @@ class Gate implements GateContract } elseif (isset($this->abilities[$ability])) { return $this->abilities[$ability]; } else { - return function () { return false; }; + return function () { + return false; + }; } } @@ -429,8 +431,12 @@ class Gate implements GateContract */ public function forUser($user) { + $callback = function () use ($user) { + return $user; + }; + return new static( - $this->container, function () use ($user) { return $user; }, $this->abilities, + $this->container, $callback, $this->abilities, $this->policies, $this->beforeCallbacks, $this->afterCallbacks ); } diff --git a/vendor/illuminate/auth/AuthServiceProvider.php b/vendor/illuminate/auth/AuthServiceProvider.php index 0200475..9ef8041 100755 --- a/vendor/illuminate/auth/AuthServiceProvider.php +++ b/vendor/illuminate/auth/AuthServiceProvider.php @@ -5,6 +5,7 @@ namespace Illuminate\Auth; use Illuminate\Auth\Access\Gate; use Illuminate\Support\ServiceProvider; use Illuminate\Contracts\Auth\Access\Gate as GateContract; +use Illuminate\Contracts\Auth\Authenticatable as AuthenticatableContract; class AuthServiceProvider extends ServiceProvider { @@ -52,7 +53,7 @@ class AuthServiceProvider extends ServiceProvider */ protected function registerUserResolver() { - $this->app->bind('Illuminate\Contracts\Auth\Authenticatable', function ($app) { + $this->app->bind(AuthenticatableContract::class, function ($app) { return $app['auth']->user(); }); } @@ -65,7 +66,9 @@ class AuthServiceProvider extends ServiceProvider protected function registerAccessGate() { $this->app->singleton(GateContract::class, function ($app) { - return new Gate($app, function () use ($app) { return $app['auth']->user(); }); + return new Gate($app, function () use ($app) { + return $app['auth']->user(); + }); }); } diff --git a/vendor/illuminate/auth/Guard.php b/vendor/illuminate/auth/Guard.php index 5caec98..fac9a0c 100755 --- a/vendor/illuminate/auth/Guard.php +++ b/vendor/illuminate/auth/Guard.php @@ -571,9 +571,11 @@ class Guard implements GuardContract { $this->session->remove($this->getName()); - $recaller = $this->getRecallerName(); + if (! is_null($this->getRecaller())) { + $recaller = $this->getRecallerName(); - $this->getCookieJar()->queue($this->getCookieJar()->forget($recaller)); + $this->getCookieJar()->queue($this->getCookieJar()->forget($recaller)); + } } /** diff --git a/vendor/illuminate/auth/Passwords/PasswordBroker.php b/vendor/illuminate/auth/Passwords/PasswordBroker.php index 9fe8e76..2fecd5b 100755 --- a/vendor/illuminate/auth/Passwords/PasswordBroker.php +++ b/vendor/illuminate/auth/Passwords/PasswordBroker.php @@ -3,6 +3,7 @@ namespace Illuminate\Auth\Passwords; use Closure; +use Illuminate\Support\Arr; use UnexpectedValueException; use Illuminate\Contracts\Auth\UserProvider; use Illuminate\Contracts\Mail\Mailer as MailerContract; @@ -229,7 +230,7 @@ class PasswordBroker implements PasswordBrokerContract */ public function getUser(array $credentials) { - $credentials = array_except($credentials, ['token']); + $credentials = Arr::except($credentials, ['token']); $user = $this->users->retrieveByCredentials($credentials); diff --git a/vendor/illuminate/broadcasting/BroadcastManager.php b/vendor/illuminate/broadcasting/BroadcastManager.php index 8f81d58..97a0fe5 100644 --- a/vendor/illuminate/broadcasting/BroadcastManager.php +++ b/vendor/illuminate/broadcasting/BroadcastManager.php @@ -85,6 +85,8 @@ class BroadcastManager implements FactoryContract * * @param string $name * @return \Illuminate\Contracts\Broadcasting\Broadcaster + * + * @throws \InvalidArgumentException */ protected function resolve($name) { @@ -97,7 +99,13 @@ class BroadcastManager implements FactoryContract if (isset($this->customCreators[$config['driver']])) { return $this->callCustomCreator($config); } else { - return $this->{'create'.ucfirst($config['driver']).'Driver'}($config); + $driverMethod = 'create'.ucfirst($config['driver']).'Driver'; + + if (method_exists($this, $driverMethod)) { + return $this->{$driverMethod}($config); + } else { + throw new InvalidArgumentException("Driver [{$config['driver']}] not supported."); + } } } @@ -121,7 +129,7 @@ class BroadcastManager implements FactoryContract protected function createPusherDriver(array $config) { return new PusherBroadcaster( - new Pusher($config['key'], $config['secret'], $config['app_id'], array_get($config, 'options', [])) + new Pusher($config['key'], $config['secret'], $config['app_id'], Arr::get($config, 'options', [])) ); } diff --git a/vendor/illuminate/broadcasting/Broadcasters/PusherBroadcaster.php b/vendor/illuminate/broadcasting/Broadcasters/PusherBroadcaster.php index 5ce83de..cea2d38 100644 --- a/vendor/illuminate/broadcasting/Broadcasters/PusherBroadcaster.php +++ b/vendor/illuminate/broadcasting/Broadcasters/PusherBroadcaster.php @@ -32,4 +32,14 @@ class PusherBroadcaster implements Broadcaster { $this->pusher->trigger($channels, $event, $payload); } + + /** + * Get the Pusher SDK instance. + * + * @return \Pusher + */ + public function getPusher() + { + return $this->pusher; + } } diff --git a/vendor/illuminate/bus/Dispatcher.php b/vendor/illuminate/bus/Dispatcher.php index 2e10d72..a9a8dea 100644 --- a/vendor/illuminate/bus/Dispatcher.php +++ b/vendor/illuminate/bus/Dispatcher.php @@ -137,7 +137,7 @@ class Dispatcher implements DispatcherContract, QueueingDispatcher, HandlerResol } /** - * Get a parameter value for a marshaled command. + * Get a parameter value for a marshalled command. * * @param string $command * @param \ArrayAccess $source @@ -145,8 +145,7 @@ class Dispatcher implements DispatcherContract, QueueingDispatcher, HandlerResol * @param array $extras * @return mixed */ - protected function getParameterValueForCommand($command, ArrayAccess $source, - ReflectionParameter $parameter, array $extras = []) + protected function getParameterValueForCommand($command, ArrayAccess $source, ReflectionParameter $parameter, array $extras = []) { if (array_key_exists($parameter->name, $extras)) { return $extras[$parameter->name]; @@ -254,7 +253,7 @@ class Dispatcher implements DispatcherContract, QueueingDispatcher, HandlerResol */ protected function pushCommandToQueue($queue, $command) { - if (isset($command->queue) && isset($command->delay)) { + if (isset($command->queue, $command->delay)) { return $queue->laterOn($command->queue, $command->delay, $command); } diff --git a/vendor/illuminate/cache/CacheManager.php b/vendor/illuminate/cache/CacheManager.php index 81681c1..1eb7935 100755 --- a/vendor/illuminate/cache/CacheManager.php +++ b/vendor/illuminate/cache/CacheManager.php @@ -82,6 +82,8 @@ class CacheManager implements FactoryContract * * @param string $name * @return \Illuminate\Contracts\Cache\Repository + * + * @throws \InvalidArgumentException */ protected function resolve($name) { @@ -94,7 +96,13 @@ class CacheManager implements FactoryContract if (isset($this->customCreators[$config['driver']])) { return $this->callCustomCreator($config); } else { - return $this->{'create'.ucfirst($config['driver']).'Driver'}($config); + $driverMethod = 'create'.ucfirst($config['driver']).'Driver'; + + if (method_exists($this, $driverMethod)) { + return $this->{$driverMethod}($config); + } else { + throw new InvalidArgumentException("Driver [{$config['driver']}] not supported."); + } } } @@ -200,7 +208,7 @@ class CacheManager implements FactoryContract { $redis = $this->app['redis']; - $connection = Arr::get($config, 'connection', 'default') ?: 'default'; + $connection = Arr::get($config, 'connection', 'default'); return $this->repository(new RedisStore($redis, $this->getPrefix($config), $connection)); } diff --git a/vendor/illuminate/cache/DatabaseStore.php b/vendor/illuminate/cache/DatabaseStore.php index 2f7bebf..08605df 100755 --- a/vendor/illuminate/cache/DatabaseStore.php +++ b/vendor/illuminate/cache/DatabaseStore.php @@ -116,14 +116,12 @@ class DatabaseStore implements Store * * @param string $key * @param mixed $value - * @return void + * @return int|bool */ public function increment($key, $value = 1) { - $this->connection->transaction(function () use ($key, $value) { - return $this->incrementOrDecrement($key, $value, function ($current) use ($value) { - return $current + $value; - }); + return $this->incrementOrDecrement($key, $value, function ($current, $value) { + return $current + $value; }); } @@ -132,14 +130,12 @@ class DatabaseStore implements Store * * @param string $key * @param mixed $value - * @return void + * @return int|bool */ public function decrement($key, $value = 1) { - $this->connection->transaction(function () use ($key, $value) { - return $this->incrementOrDecrement($key, $value, function ($current) use ($value) { - return $current - $value; - }); + return $this->incrementOrDecrement($key, $value, function ($current, $value) { + return $current - $value; }); } @@ -149,23 +145,32 @@ class DatabaseStore implements Store * @param string $key * @param mixed $value * @param \Closure $callback - * @return void + * @return int|bool */ protected function incrementOrDecrement($key, $value, Closure $callback) { - $prefixed = $this->prefix.$key; + return $this->connection->transaction(function () use ($key, $value, $callback) { + $prefixed = $this->prefix.$key; - $cache = $this->table()->where('key', $prefixed)->lockForUpdate()->first(); + $cache = $this->table()->where('key', $prefixed)->lockForUpdate()->first(); - if (! is_null($cache)) { - $current = $this->encrypter->decrypt($cache->value); - - if (is_numeric($current)) { - $this->table()->where('key', $prefixed)->update([ - 'value' => $this->encrypter->encrypt($callback($current)), - ]); + if (is_null($cache)) { + return false; } - } + + $current = $this->encrypter->decrypt($cache->value); + $new = $callback($current, $value); + + if (! is_numeric($current)) { + return false; + } + + $this->table()->where('key', $prefixed)->update([ + 'value' => $this->encrypter->encrypt($new), + ]); + + return $new; + }); } /** diff --git a/vendor/illuminate/cache/FileStore.php b/vendor/illuminate/cache/FileStore.php index 6bef4cd..a95220b 100755 --- a/vendor/illuminate/cache/FileStore.php +++ b/vendor/illuminate/cache/FileStore.php @@ -209,11 +209,13 @@ class FileStore implements Store */ protected function expiration($minutes) { - if ($minutes === 0) { + $time = time() + ($minutes * 60); + + if ($minutes === 0 || $time > 9999999999) { return 9999999999; } - return time() + ($minutes * 60); + return $time; } /** diff --git a/vendor/illuminate/cache/RedisTaggedCache.php b/vendor/illuminate/cache/RedisTaggedCache.php index 5b9a53b..349627e 100644 --- a/vendor/illuminate/cache/RedisTaggedCache.php +++ b/vendor/illuminate/cache/RedisTaggedCache.php @@ -13,9 +13,9 @@ class RedisTaggedCache extends TaggedCache */ public function forever($key, $value) { - $this->pushForeverKeys($namespace = $this->tags->getNamespace(), $key); + $this->pushForeverKeys($this->tags->getNamespace(), $key); - $this->store->forever(sha1($namespace).':'.$key, $value); + parent::forever($key, $value); } /** diff --git a/vendor/illuminate/cache/Repository.php b/vendor/illuminate/cache/Repository.php index e27c71e..fb76105 100755 --- a/vendor/illuminate/cache/Repository.php +++ b/vendor/illuminate/cache/Repository.php @@ -6,6 +6,7 @@ use Closure; use DateTime; use ArrayAccess; use Carbon\Carbon; +use BadMethodCallException; use Illuminate\Contracts\Cache\Store; use Illuminate\Support\Traits\Macroable; use Illuminate\Contracts\Events\Dispatcher; @@ -94,7 +95,7 @@ class Repository implements CacheContract, ArrayAccess */ public function get($key, $default = null) { - $value = $this->store->get($key); + $value = $this->store->get($this->itemKey($key)); if (is_null($value)) { $this->fireCacheEvent('missed', [$key]); @@ -136,7 +137,7 @@ class Repository implements CacheContract, ArrayAccess $minutes = $this->getMinutes($minutes); if (! is_null($minutes)) { - $this->store->put($key, $value, $minutes); + $this->store->put($this->itemKey($key), $value, $minutes); $this->fireCacheEvent('write', [$key, $value, $minutes]); } @@ -159,7 +160,7 @@ class Repository implements CacheContract, ArrayAccess } if (method_exists($this->store, 'add')) { - return $this->store->add($key, $value, $minutes); + return $this->store->add($this->itemKey($key), $value, $minutes); } if (is_null($this->get($key))) { @@ -180,7 +181,7 @@ class Repository implements CacheContract, ArrayAccess */ public function forever($key, $value) { - $this->store->forever($key, $value); + $this->store->forever($this->itemKey($key), $value); $this->fireCacheEvent('write', [$key, $value, 0]); } @@ -248,13 +249,62 @@ class Repository implements CacheContract, ArrayAccess */ public function forget($key) { - $success = $this->store->forget($key); + $success = $this->store->forget($this->itemKey($key)); $this->fireCacheEvent('delete', [$key]); return $success; } + /** + * Begin executing a new tags operation if the store supports it. + * + * @param string $name + * @return \Illuminate\Cache\TaggedCache + * + * @deprecated since version 5.1. Use tags instead. + */ + public function section($name) + { + return $this->tags($name); + } + + /** + * Begin executing a new tags operation if the store supports it. + * + * @param array|mixed $names + * @return \Illuminate\Cache\TaggedCache + * + * @throws \BadMethodCallException + */ + public function tags($names) + { + if (method_exists($this->store, 'tags')) { + $taggedCache = $this->store->tags($names); + + if (! is_null($this->events)) { + $taggedCache->setEventDispatcher($this->events); + } + + $taggedCache->setDefaultCacheTime($this->default); + + return $taggedCache; + } + + throw new BadMethodCallException('This cache store does not support tagging.'); + } + + /** + * Format the key for a cache item. + * + * @param string $key + * @return string + */ + protected function itemKey($key) + { + return $key; + } + /** * Get the default cache time. * diff --git a/vendor/illuminate/cache/TagSet.php b/vendor/illuminate/cache/TagSet.php index 61ca972..3f15f23 100644 --- a/vendor/illuminate/cache/TagSet.php +++ b/vendor/illuminate/cache/TagSet.php @@ -97,4 +97,14 @@ class TagSet { return 'tag:'.$name.':key'; } + + /** + * Get all of the tag names in the set. + * + * @return array + */ + public function getNames() + { + return $this->names; + } } diff --git a/vendor/illuminate/cache/TaggedCache.php b/vendor/illuminate/cache/TaggedCache.php index 4c3f7ee..c1cfec8 100644 --- a/vendor/illuminate/cache/TaggedCache.php +++ b/vendor/illuminate/cache/TaggedCache.php @@ -2,20 +2,10 @@ namespace Illuminate\Cache; -use Closure; -use DateTime; -use Carbon\Carbon; use Illuminate\Contracts\Cache\Store; -class TaggedCache implements Store +class TaggedCache extends Repository { - /** - * The cache store implementation. - * - * @var \Illuminate\Contracts\Cache\Store - */ - protected $store; - /** * The tag set instance. * @@ -32,69 +22,19 @@ class TaggedCache implements Store */ public function __construct(Store $store, TagSet $tags) { + parent::__construct($store); + $this->tags = $tags; - $this->store = $store; } /** - * Determine if an item exists in the cache. - * - * @param string $key - * @return bool + * {@inheritdoc} */ - public function has($key) + protected function fireCacheEvent($event, $payload) { - return ! is_null($this->get($key)); - } + $payload[] = $this->tags->getNames(); - /** - * Retrieve an item from the cache by key. - * - * @param string $key - * @param mixed $default - * @return mixed - */ - public function get($key, $default = null) - { - $value = $this->store->get($this->taggedItemKey($key)); - - return ! is_null($value) ? $value : value($default); - } - - /** - * Store an item in the cache for a given number of minutes. - * - * @param string $key - * @param mixed $value - * @param \DateTime|int $minutes - * @return void - */ - public function put($key, $value, $minutes) - { - $minutes = $this->getMinutes($minutes); - - if (! is_null($minutes)) { - $this->store->put($this->taggedItemKey($key), $value, $minutes); - } - } - - /** - * Store an item in the cache if the key does not exist. - * - * @param string $key - * @param mixed $value - * @param \DateTime|int $minutes - * @return bool - */ - public function add($key, $value, $minutes) - { - if (is_null($this->get($key))) { - $this->put($key, $value, $minutes); - - return true; - } - - return false; + parent::fireCacheEvent($event, $payload); } /** @@ -106,7 +46,7 @@ class TaggedCache implements Store */ public function increment($key, $value = 1) { - $this->store->increment($this->taggedItemKey($key), $value); + $this->store->increment($this->itemKey($key), $value); } /** @@ -118,30 +58,7 @@ class TaggedCache implements Store */ public function decrement($key, $value = 1) { - $this->store->decrement($this->taggedItemKey($key), $value); - } - - /** - * Store an item in the cache indefinitely. - * - * @param string $key - * @param mixed $value - * @return void - */ - public function forever($key, $value) - { - $this->store->forever($this->taggedItemKey($key), $value); - } - - /** - * Remove an item from the cache. - * - * @param string $key - * @return bool - */ - public function forget($key) - { - return $this->store->forget($this->taggedItemKey($key)); + $this->store->decrement($this->itemKey($key), $value); } /** @@ -155,58 +72,11 @@ class TaggedCache implements Store } /** - * Get an item from the cache, or store the default value. - * - * @param string $key - * @param \DateTime|int $minutes - * @param \Closure $callback - * @return mixed + * {@inheritdoc} */ - public function remember($key, $minutes, Closure $callback) + protected function itemKey($key) { - // If the item exists in the cache we will just return this immediately - // otherwise we will execute the given Closure and cache the result - // of that execution for the given number of minutes in storage. - if (! is_null($value = $this->get($key))) { - return $value; - } - - $this->put($key, $value = $callback(), $minutes); - - return $value; - } - - /** - * Get an item from the cache, or store the default value forever. - * - * @param string $key - * @param \Closure $callback - * @return mixed - */ - public function sear($key, Closure $callback) - { - return $this->rememberForever($key, $callback); - } - - /** - * Get an item from the cache, or store the default value forever. - * - * @param string $key - * @param \Closure $callback - * @return mixed - */ - public function rememberForever($key, Closure $callback) - { - // If the item exists in the cache we will just return this immediately - // otherwise we will execute the given Closure and cache the result - // of that execution for an indefinite amount of time. It's easy. - if (! is_null($value = $this->get($key))) { - return $value; - } - - $this->forever($key, $value = $callback()); - - return $value; + return $this->taggedItemKey($key); } /** @@ -219,31 +89,4 @@ class TaggedCache implements Store { return sha1($this->tags->getNamespace()).':'.$key; } - - /** - * Get the cache key prefix. - * - * @return string - */ - public function getPrefix() - { - return $this->store->getPrefix(); - } - - /** - * Calculate the number of minutes with the given duration. - * - * @param \DateTime|int $duration - * @return int|null - */ - protected function getMinutes($duration) - { - if ($duration instanceof DateTime) { - $fromNow = Carbon::now()->diffInMinutes(Carbon::instance($duration), false); - - return $fromNow > 0 ? $fromNow : null; - } - - return is_string($duration) ? (int) $duration : $duration; - } } diff --git a/vendor/illuminate/console/Application.php b/vendor/illuminate/console/Application.php index 4c1ed4f..ee45c0a 100755 --- a/vendor/illuminate/console/Application.php +++ b/vendor/illuminate/console/Application.php @@ -55,11 +55,17 @@ class Application extends SymfonyApplication implements ApplicationContract */ public function call($command, array $parameters = []) { - $parameters['command'] = $command; + $parameters = collect($parameters)->prepend($command); $this->lastOutput = new BufferedOutput; - return $this->find($command)->run(new ArrayInput($parameters), $this->lastOutput); + $this->setCatchExceptions(false); + + $result = $this->run(new ArrayInput($parameters->toArray()), $this->lastOutput); + + $this->setCatchExceptions(true); + + return $result; } /** diff --git a/vendor/illuminate/console/Command.php b/vendor/illuminate/console/Command.php index 217f1b5..47b79d0 100755 --- a/vendor/illuminate/console/Command.php +++ b/vendor/illuminate/console/Command.php @@ -290,7 +290,7 @@ class Command extends SymfonyCommand * @param string $default * @param mixed $attempts * @param bool $multiple - * @return bool + * @return string */ public function choice($question, array $choices, $default = null, $attempts = null, $multiple = null) { @@ -305,7 +305,7 @@ class Command extends SymfonyCommand * Format input to textual table. * * @param array $headers - * @param array|\Illuminate\Contracts\Support\Arrayable $rows + * @param \Illuminate\Contracts\Support\Arrayable|array $rows * @param string $style * @return void */ @@ -383,9 +383,11 @@ class Command extends SymfonyCommand */ public function warn($string) { - $style = new OutputFormatterStyle('yellow'); + if (! $this->output->getFormatter()->hasStyle('warning')) { + $style = new OutputFormatterStyle('yellow'); - $this->output->getFormatter()->setStyle('warning', $style); + $this->output->getFormatter()->setStyle('warning', $style); + } $this->output->writeln("$string"); } diff --git a/vendor/illuminate/console/ConfirmableTrait.php b/vendor/illuminate/console/ConfirmableTrait.php index 69324f0..b9e1a07 100644 --- a/vendor/illuminate/console/ConfirmableTrait.php +++ b/vendor/illuminate/console/ConfirmableTrait.php @@ -48,6 +48,8 @@ trait ConfirmableTrait */ protected function getDefaultConfirmCallback() { - return function () { return $this->getLaravel()->environment() == 'production'; }; + return function () { + return $this->getLaravel()->environment() == 'production'; + }; } } diff --git a/vendor/illuminate/console/GeneratorCommand.php b/vendor/illuminate/console/GeneratorCommand.php index 9348ae1..6d056aa 100644 --- a/vendor/illuminate/console/GeneratorCommand.php +++ b/vendor/illuminate/console/GeneratorCommand.php @@ -76,7 +76,7 @@ abstract class GeneratorCommand extends Command { $name = $this->parseName($rawName); - return $this->files->exists($path = $this->getPath($name)); + return $this->files->exists($this->getPath($name)); } /** diff --git a/vendor/illuminate/console/Parser.php b/vendor/illuminate/console/Parser.php index 22f6905..73b33ba 100644 --- a/vendor/illuminate/console/Parser.php +++ b/vendor/illuminate/console/Parser.php @@ -91,7 +91,7 @@ class Parser case Str::endsWith($token, '?'): return new InputArgument(trim($token, '?'), InputArgument::OPTIONAL, $description); - case (preg_match('/(.+)\=(.+)/', $token, $matches)): + case preg_match('/(.+)\=(.+)/', $token, $matches): return new InputArgument($matches[1], InputArgument::OPTIONAL, $description, $matches[2]); default: @@ -131,7 +131,7 @@ class Parser case Str::endsWith($token, '=*'): return new InputOption(trim($token, '=*'), $shortcut, InputOption::VALUE_OPTIONAL | InputOption::VALUE_IS_ARRAY, $description); - case (preg_match('/(.+)\=(.+)/', $token, $matches)): + case preg_match('/(.+)\=(.+)/', $token, $matches): return new InputOption($matches[1], $shortcut, InputOption::VALUE_OPTIONAL, $description, $matches[2]); default: diff --git a/vendor/illuminate/console/Scheduling/Event.php b/vendor/illuminate/console/Scheduling/Event.php index 0be3e38..5a3946e 100644 --- a/vendor/illuminate/console/Scheduling/Event.php +++ b/vendor/illuminate/console/Scheduling/Event.php @@ -9,6 +9,7 @@ use Cron\CronExpression; use GuzzleHttp\Client as HttpClient; use Illuminate\Contracts\Mail\Mailer; use Symfony\Component\Process\Process; +use Symfony\Component\Process\ProcessUtils; use Illuminate\Contracts\Container\Container; use Illuminate\Contracts\Foundation\Application; @@ -205,18 +206,20 @@ class Event } /** - * Build the comand string. + * Build the command string. * * @return string */ public function buildCommand() { + $output = ProcessUtils::escapeArgument($this->output); + $redirect = $this->shouldAppendOutput ? ' >> ' : ' > '; if ($this->withoutOverlapping) { - $command = '(touch '.$this->mutexPath().'; '.$this->command.'; rm '.$this->mutexPath().')'.$redirect.$this->output.' 2>&1 &'; + $command = '(touch '.$this->mutexPath().'; '.$this->command.'; rm '.$this->mutexPath().')'.$redirect.$output.' 2>&1 &'; } else { - $command = $this->command.$redirect.$this->output.' 2>&1 &'; + $command = $this->command.$redirect.$output.' 2>&1 &'; } return $this->user ? 'sudo -u '.$this->user.' '.$command : $command; @@ -731,7 +734,9 @@ class Event */ public function pingBefore($url) { - return $this->before(function () use ($url) { (new HttpClient)->get($url); }); + return $this->before(function () use ($url) { + (new HttpClient)->get($url); + }); } /** @@ -755,7 +760,9 @@ class Event */ public function thenPing($url) { - return $this->then(function () use ($url) { (new HttpClient)->get($url); }); + return $this->then(function () use ($url) { + (new HttpClient)->get($url); + }); } /** diff --git a/vendor/illuminate/console/composer.json b/vendor/illuminate/console/composer.json index f78d161..e7c8652 100755 --- a/vendor/illuminate/console/composer.json +++ b/vendor/illuminate/console/composer.json @@ -31,7 +31,7 @@ } }, "suggest": { - "guzzlehttp/guzzle": "Required to use the thenPing method on schedules (~5.3|~6.0).", + "guzzlehttp/guzzle": "Required to use the ping methods on schedules (~5.3|~6.0).", "mtdowling/cron-expression": "Required to use scheduling component (~1.0).", "symfony/process": "Required to use scheduling component (2.7.*)." }, diff --git a/vendor/illuminate/container/Container.php b/vendor/illuminate/container/Container.php index ccfab88..1b2e85c 100755 --- a/vendor/illuminate/container/Container.php +++ b/vendor/illuminate/container/Container.php @@ -142,6 +142,10 @@ class Container implements ArrayAccess, ContainerContract */ public function resolved($abstract) { + if ($this->isAlias($abstract)) { + $abstract = $this->getAlias($abstract); + } + return isset($this->resolved[$abstract]) || isset($this->instances[$abstract]); } diff --git a/vendor/illuminate/cookie/CookieJar.php b/vendor/illuminate/cookie/CookieJar.php index 3cfcbf7..ec7540a 100755 --- a/vendor/illuminate/cookie/CookieJar.php +++ b/vendor/illuminate/cookie/CookieJar.php @@ -22,6 +22,13 @@ class CookieJar implements JarContract */ protected $domain = null; + /** + * The default secure setting (defaults to false). + * + * @var bool + */ + protected $secure = false; + /** * All of the cookies queued for sending. * @@ -43,7 +50,7 @@ class CookieJar implements JarContract */ public function make($name, $value, $minutes = 0, $path = null, $domain = null, $secure = false, $httpOnly = true) { - list($path, $domain) = $this->getPathAndDomain($path, $domain); + list($path, $domain, $secure) = $this->getPathAndDomain($path, $domain, $secure); $time = ($minutes == 0) ? 0 : time() + ($minutes * 60); @@ -135,11 +142,12 @@ class CookieJar implements JarContract * * @param string $path * @param string $domain + * @param bool $secure * @return array */ - protected function getPathAndDomain($path, $domain) + protected function getPathAndDomain($path, $domain, $secure = false) { - return [$path ?: $this->path, $domain ?: $this->domain]; + return [$path ?: $this->path, $domain ?: $this->domain, $secure ?: $this->secure]; } /** @@ -147,11 +155,12 @@ class CookieJar implements JarContract * * @param string $path * @param string $domain + * @param bool $secure * @return $this */ - public function setDefaultPathAndDomain($path, $domain) + public function setDefaultPathAndDomain($path, $domain, $secure = false) { - list($this->path, $this->domain) = [$path, $domain]; + list($this->path, $this->domain, $this->secure) = [$path, $domain, $secure]; return $this; } diff --git a/vendor/illuminate/cookie/CookieServiceProvider.php b/vendor/illuminate/cookie/CookieServiceProvider.php index c5c0dbc..cd04f12 100755 --- a/vendor/illuminate/cookie/CookieServiceProvider.php +++ b/vendor/illuminate/cookie/CookieServiceProvider.php @@ -16,7 +16,7 @@ class CookieServiceProvider extends ServiceProvider $this->app->singleton('cookie', function ($app) { $config = $app['config']['session']; - return (new CookieJar)->setDefaultPathAndDomain($config['path'], $config['domain']); + return (new CookieJar)->setDefaultPathAndDomain($config['path'], $config['domain'], $config['secure']); }); } } diff --git a/vendor/illuminate/cookie/Middleware/EncryptCookies.php b/vendor/illuminate/cookie/Middleware/EncryptCookies.php index 3bb9abf..c30d38c 100644 --- a/vendor/illuminate/cookie/Middleware/EncryptCookies.php +++ b/vendor/illuminate/cookie/Middleware/EncryptCookies.php @@ -106,7 +106,9 @@ class EncryptCookies $decrypted = []; foreach ($cookie as $key => $value) { - $decrypted[$key] = $this->encrypter->decrypt($value); + if (is_string($value)) { + $decrypted[$key] = $this->encrypter->decrypt($value); + } } return $decrypted; diff --git a/vendor/illuminate/database/Connectors/ConnectionFactory.php b/vendor/illuminate/database/Connectors/ConnectionFactory.php index 982cf30..ca89d2a 100755 --- a/vendor/illuminate/database/Connectors/ConnectionFactory.php +++ b/vendor/illuminate/database/Connectors/ConnectionFactory.php @@ -145,7 +145,7 @@ class ConnectionFactory */ protected function mergeReadWriteConfig(array $config, array $merge) { - return array_except(array_merge($config, $merge), ['read', 'write']); + return Arr::except(array_merge($config, $merge), ['read', 'write']); } /** diff --git a/vendor/illuminate/database/Console/Migrations/RefreshCommand.php b/vendor/illuminate/database/Console/Migrations/RefreshCommand.php index cbec9af..ce4e8f1 100755 --- a/vendor/illuminate/database/Console/Migrations/RefreshCommand.php +++ b/vendor/illuminate/database/Console/Migrations/RefreshCommand.php @@ -39,6 +39,8 @@ class RefreshCommand extends Command $force = $this->input->getOption('force'); + $path = $this->input->getOption('path'); + $this->call('migrate:reset', [ '--database' => $database, '--force' => $force, ]); @@ -47,7 +49,9 @@ class RefreshCommand extends Command // the migration commands and just provides a convenient wrapper to execute // them in succession. We'll also see if we need to re-seed the database. $this->call('migrate', [ - '--database' => $database, '--force' => $force, + '--database' => $database, + '--force' => $force, + '--path' => $path, ]); if ($this->needsSeeding()) { @@ -94,6 +98,8 @@ class RefreshCommand extends Command ['force', null, InputOption::VALUE_NONE, 'Force the operation to run when in production.'], + ['path', null, InputOption::VALUE_OPTIONAL, 'The path of migrations files to be executed.'], + ['seed', null, InputOption::VALUE_NONE, 'Indicates if the seed task should be re-run.'], ['seeder', null, InputOption::VALUE_OPTIONAL, 'The class name of the root seeder.'], diff --git a/vendor/illuminate/database/Console/Migrations/StatusCommand.php b/vendor/illuminate/database/Console/Migrations/StatusCommand.php index fd375a6..aba7acf 100644 --- a/vendor/illuminate/database/Console/Migrations/StatusCommand.php +++ b/vendor/illuminate/database/Console/Migrations/StatusCommand.php @@ -3,6 +3,7 @@ namespace Illuminate\Database\Console\Migrations; use Illuminate\Database\Migrations\Migrator; +use Symfony\Component\Console\Input\InputOption; class StatusCommand extends BaseCommand { @@ -51,11 +52,19 @@ class StatusCommand extends BaseCommand return $this->error('No migrations found.'); } + $this->migrator->setConnection($this->input->getOption('database')); + + if (! is_null($path = $this->input->getOption('path'))) { + $path = $this->laravel->basePath().'/'.$path; + } else { + $path = $this->getMigrationPath(); + } + $ran = $this->migrator->getRepository()->getRan(); $migrations = []; - foreach ($this->getAllMigrationFiles() as $migration) { + foreach ($this->getAllMigrationFiles($path) as $migration) { $migrations[] = in_array($migration, $ran) ? ['Y', $migration] : ['N', $migration]; } @@ -69,10 +78,25 @@ class StatusCommand extends BaseCommand /** * Get all of the migration files. * + * @param string $path * @return array */ - protected function getAllMigrationFiles() + protected function getAllMigrationFiles($path) { - return $this->migrator->getMigrationFiles($this->getMigrationPath()); + return $this->migrator->getMigrationFiles($path); + } + + /** + * Get the console command options. + * + * @return array + */ + protected function getOptions() + { + return [ + ['database', null, InputOption::VALUE_OPTIONAL, 'The database connection to use.'], + + ['path', null, InputOption::VALUE_OPTIONAL, 'The path of migrations files to use.'], + ]; } } diff --git a/vendor/illuminate/database/DatabaseServiceProvider.php b/vendor/illuminate/database/DatabaseServiceProvider.php index 976f5a1..1129baa 100755 --- a/vendor/illuminate/database/DatabaseServiceProvider.php +++ b/vendor/illuminate/database/DatabaseServiceProvider.php @@ -50,6 +50,10 @@ class DatabaseServiceProvider extends ServiceProvider $this->app->singleton('db', function ($app) { return new DatabaseManager($app, $app['db.factory']); }); + + $this->app->bind('db.connection', function ($app) { + return $app['db']->connection(); + }); } /** diff --git a/vendor/illuminate/database/DetectsLostConnections.php b/vendor/illuminate/database/DetectsLostConnections.php index 78c65a9..afc9c07 100644 --- a/vendor/illuminate/database/DetectsLostConnections.php +++ b/vendor/illuminate/database/DetectsLostConnections.php @@ -23,6 +23,7 @@ trait DetectsLostConnections 'Lost connection', 'is dead or not enabled', 'Error while sending', + 'decryption failed or bad record mac', ]); } } diff --git a/vendor/illuminate/database/Eloquent/Builder.php b/vendor/illuminate/database/Eloquent/Builder.php index 91b97ab..582fd45 100755 --- a/vendor/illuminate/database/Eloquent/Builder.php +++ b/vendor/illuminate/database/Eloquent/Builder.php @@ -212,7 +212,7 @@ class Builder * * @param int $count * @param callable $callback - * @return void + * @return bool */ public function chunk($count, callable $callback) { @@ -223,20 +223,22 @@ class Builder // developer take care of everything within the callback, which allows us to // keep the memory low for spinning through large result sets for working. if (call_user_func($callback, $results) === false) { - break; + return false; } $page++; $results = $this->forPage($page, $count)->get(); } + + return true; } /** * Get an array with the values of a given column. * * @param string $column - * @param string $key + * @param string|null $key * @return \Illuminate\Support\Collection */ public function lists($column, $key = null) @@ -465,28 +467,28 @@ class Builder /** * Get the relation instance for the given relation name. * - * @param string $relation + * @param string $name * @return \Illuminate\Database\Eloquent\Relations\Relation */ - public function getRelation($relation) + public function getRelation($name) { // We want to run a relationship query without any constrains so that we will // not have to remove these where clauses manually which gets really hacky // and is error prone while we remove the developer's own where clauses. - $query = Relation::noConstraints(function () use ($relation) { - return $this->getModel()->$relation(); + $relation = Relation::noConstraints(function () use ($name) { + return $this->getModel()->$name(); }); - $nested = $this->nestedRelations($relation); + $nested = $this->nestedRelations($name); // If there are nested relationships set on the query, we will put those onto // the query instances so that they can be handled after this relationship // is loaded. In this way they will all trickle down as they are loaded. if (count($nested) > 0) { - $query->getQuery()->with($nested); + $relation->getQuery()->with($nested); } - return $query; + return $relation; } /** @@ -774,7 +776,9 @@ class Builder // constraints have been specified for the eager load and we'll just put // an empty Closure with the loader so that we can treat all the same. if (is_numeric($name)) { - $f = function () {}; + $f = function () { + // + }; list($name, $constraints) = [$constraints, $f]; } @@ -808,7 +812,9 @@ class Builder $progress[] = $segment; if (! isset($results[$last = implode('.', $progress)])) { - $results[$last] = function () {}; + $results[$last] = function () { + // + }; } } diff --git a/vendor/illuminate/database/Eloquent/Collection.php b/vendor/illuminate/database/Eloquent/Collection.php index cac3e24..710c8b1 100755 --- a/vendor/illuminate/database/Eloquent/Collection.php +++ b/vendor/illuminate/database/Eloquent/Collection.php @@ -104,7 +104,9 @@ class Collection extends BaseCollection */ public function modelKeys() { - return array_map(function ($m) { return $m->getKey(); }, $this->items); + return array_map(function ($m) { + return $m->getKey(); + }, $this->items); } /** @@ -202,7 +204,7 @@ class Collection extends BaseCollection */ public function except($keys) { - $dictionary = array_except($this->getDictionary(), $keys); + $dictionary = Arr::except($this->getDictionary(), $keys); return new static(array_values($dictionary)); } diff --git a/vendor/illuminate/database/Eloquent/Factory.php b/vendor/illuminate/database/Eloquent/Factory.php index af5680f..099f4b4 100644 --- a/vendor/illuminate/database/Eloquent/Factory.php +++ b/vendor/illuminate/database/Eloquent/Factory.php @@ -44,15 +44,7 @@ class Factory implements ArrayAccess { $pathToFactories = $pathToFactories ?: database_path('factories'); - $factory = new static($faker); - - if (is_dir($pathToFactories)) { - foreach (Finder::create()->files()->in($pathToFactories) as $file) { - require $file->getRealPath(); - } - } - - return $factory; + return (new static($faker))->load($pathToFactories); } /** @@ -106,6 +98,25 @@ class Factory implements ArrayAccess return $this->of($class, $name)->create($attributes); } + /** + * Load factories from path. + * + * @param string $path + * @return $this + */ + public function load($path) + { + $factory = $this; + + if (is_dir($path)) { + foreach (Finder::create()->files()->in($path) as $file) { + require $file->getRealPath(); + } + } + + return $factory; + } + /** * Create an instance of the given model. * diff --git a/vendor/illuminate/database/Eloquent/Model.php b/vendor/illuminate/database/Eloquent/Model.php index 58cf4eb..c74ee50 100755 --- a/vendor/illuminate/database/Eloquent/Model.php +++ b/vendor/illuminate/database/Eloquent/Model.php @@ -145,7 +145,7 @@ abstract class Model implements ArrayAccess, Arrayable, Jsonable, JsonSerializab protected $dateFormat; /** - * The attributes that should be casted to native types. + * The attributes that should be cast to native types. * * @var array */ @@ -370,7 +370,7 @@ abstract class Model implements ArrayAccess, Arrayable, Jsonable, JsonSerializab /** * Get the global scopes for this class instance. * - * @return \Illuminate\Database\Eloquent\ScopeInterface[] + * @return array */ public function getGlobalScopes() { @@ -465,7 +465,7 @@ abstract class Model implements ArrayAccess, Arrayable, Jsonable, JsonSerializab * Create a new instance of the given model. * * @param array $attributes - * @param bool $exists + * @param bool $exists * @return static */ public function newInstance($attributes = [], $exists = false) @@ -574,7 +574,7 @@ abstract class Model implements ArrayAccess, Arrayable, Jsonable, JsonSerializab */ public static function firstOrCreate(array $attributes) { - if (! is_null($instance = static::where($attributes)->first())) { + if (! is_null($instance = (new static)->newQueryWithoutScopes()->where($attributes)->first())) { return $instance; } @@ -589,7 +589,7 @@ abstract class Model implements ArrayAccess, Arrayable, Jsonable, JsonSerializab */ public static function firstOrNew(array $attributes) { - if (! is_null($instance = static::where($attributes)->first())) { + if (! is_null($instance = (new static)->newQueryWithoutScopes()->where($attributes)->first())) { return $instance; } @@ -812,7 +812,7 @@ abstract class Model implements ArrayAccess, Arrayable, Jsonable, JsonSerializab // the calling method's name and use that as the relationship name as most // of the time this will be what we desire to use for the relationships. if (is_null($relation)) { - list($current, $caller) = debug_backtrace(false, 2); + list($current, $caller) = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 2); $relation = $caller['function']; } @@ -850,7 +850,7 @@ abstract class Model implements ArrayAccess, Arrayable, Jsonable, JsonSerializab // since that is most likely the name of the polymorphic interface. We can // use that to get both the class and foreign key that will be utilized. if (is_null($name)) { - list($current, $caller) = debug_backtrace(false, 2); + list($current, $caller) = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 2); $name = Str::snake($caller['function']); } @@ -1010,7 +1010,7 @@ abstract class Model implements ArrayAccess, Arrayable, Jsonable, JsonSerializab * @param string $table * @param string $foreignKey * @param string $otherKey - * @param bool $inverse + * @param bool $inverse * @return \Illuminate\Database\Eloquent\Relations\MorphToMany */ public function morphToMany($related, $name, $table = null, $foreignKey = null, $otherKey = null, $inverse = false) @@ -1070,7 +1070,7 @@ abstract class Model implements ArrayAccess, Arrayable, Jsonable, JsonSerializab { $self = __FUNCTION__; - $caller = Arr::first(debug_backtrace(false), function ($key, $trace) use ($self) { + $caller = Arr::first(debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS), function ($key, $trace) use ($self) { $caller = $trace['function']; return ! in_array($caller, Model::$manyMethods) && $caller != $self; @@ -1139,6 +1139,7 @@ abstract class Model implements ArrayAccess, Arrayable, Jsonable, JsonSerializab * Delete the model from the database. * * @return bool|null + * * @throws \Exception */ public function delete() @@ -1383,7 +1384,7 @@ abstract class Model implements ArrayAccess, Arrayable, Jsonable, JsonSerializab * Increment a column's value by a given amount. * * @param string $column - * @param int $amount + * @param int $amount * @return int */ protected function increment($column, $amount = 1) @@ -1395,7 +1396,7 @@ abstract class Model implements ArrayAccess, Arrayable, Jsonable, JsonSerializab * Decrement a column's value by a given amount. * * @param string $column - * @param int $amount + * @param int $amount * @return int */ protected function decrement($column, $amount = 1) @@ -1407,7 +1408,7 @@ abstract class Model implements ArrayAccess, Arrayable, Jsonable, JsonSerializab * Run the increment or decrement method on the model. * * @param string $column - * @param int $amount + * @param int $amount * @param string $method * @return int */ @@ -1428,7 +1429,7 @@ abstract class Model implements ArrayAccess, Arrayable, Jsonable, JsonSerializab * Increment the underlying attribute value and sync with original. * * @param string $column - * @param int $amount + * @param int $amount * @param string $method * @return void */ @@ -1520,6 +1521,21 @@ abstract class Model implements ArrayAccess, Arrayable, Jsonable, JsonSerializab return $saved; } + /** + * Save the model to the database using transaction. + * + * @param array $options + * @return bool + * + * @throws \Throwable + */ + public function saveOrFail(array $options = []) + { + return $this->getConnection()->transaction(function () use ($options) { + return $this->save($options); + }); + } + /** * Finish processing on a successful save operation. * @@ -1651,6 +1667,8 @@ abstract class Model implements ArrayAccess, Arrayable, Jsonable, JsonSerializab $this->$relation()->touch(); if ($this->$relation instanceof self) { + $this->$relation->fireModelEvent('saved', false); + $this->$relation->touchOwners(); } elseif ($this->$relation instanceof Collection) { $this->$relation->each(function (Model $relation) { @@ -1675,7 +1693,7 @@ abstract class Model implements ArrayAccess, Arrayable, Jsonable, JsonSerializab * Fire the given event for the model. * * @param string $event - * @param bool $halt + * @param bool $halt * @return mixed */ protected function fireModelEvent($event, $halt = true) @@ -1896,7 +1914,7 @@ abstract class Model implements ArrayAccess, Arrayable, Jsonable, JsonSerializab /** * Create a new Eloquent query builder for the model. * - * @param \Illuminate\Database\Query\Builder $query + * @param \Illuminate\Database\Query\Builder $query * @return \Illuminate\Database\Eloquent\Builder|static */ public function newEloquentBuilder($query) @@ -1933,9 +1951,9 @@ abstract class Model implements ArrayAccess, Arrayable, Jsonable, JsonSerializab * Create a new pivot model instance. * * @param \Illuminate\Database\Eloquent\Model $parent - * @param array $attributes + * @param array $attributes * @param string $table - * @param bool $exists + * @param bool $exists * @return \Illuminate\Database\Eloquent\Relations\Pivot */ public function newPivot(Model $parent, array $attributes, $table, $exists) @@ -2101,7 +2119,7 @@ abstract class Model implements ArrayAccess, Arrayable, Jsonable, JsonSerializab /** * Set the number of models to return per page. * - * @param int $perPage + * @param int $perPage * @return $this */ public function setPerPage($perPage) @@ -2736,7 +2754,7 @@ abstract class Model implements ArrayAccess, Arrayable, Jsonable, JsonSerializab * Get the value of an attribute using its mutator. * * @param string $key - * @param mixed $value + * @param mixed $value * @return mixed */ protected function mutateAttribute($key, $value) @@ -2748,7 +2766,7 @@ abstract class Model implements ArrayAccess, Arrayable, Jsonable, JsonSerializab * Get the value of an attribute using its mutator for array conversion. * * @param string $key - * @param mixed $value + * @param mixed $value * @return mixed */ protected function mutateAttributeForArray($key, $value) @@ -2759,7 +2777,7 @@ abstract class Model implements ArrayAccess, Arrayable, Jsonable, JsonSerializab } /** - * Determine whether an attribute should be casted to a native type. + * Determine whether an attribute should be cast to a native type. * * @param string $key * @return bool @@ -2808,7 +2826,7 @@ abstract class Model implements ArrayAccess, Arrayable, Jsonable, JsonSerializab * Cast an attribute to a native PHP type. * * @param string $key - * @param mixed $value + * @param mixed $value * @return mixed */ protected function castAttribute($key, $value) @@ -2849,7 +2867,7 @@ abstract class Model implements ArrayAccess, Arrayable, Jsonable, JsonSerializab * Set a given attribute on the model. * * @param string $key - * @param mixed $value + * @param mixed $value * @return $this */ public function setAttribute($key, $value) @@ -3019,7 +3037,7 @@ abstract class Model implements ArrayAccess, Arrayable, Jsonable, JsonSerializab /** * Clone the model into a new, non-existing instance. * - * @param array $except + * @param array|null $except * @return \Illuminate\Database\Eloquent\Model */ public function replicate(array $except = null) @@ -3030,7 +3048,7 @@ abstract class Model implements ArrayAccess, Arrayable, Jsonable, JsonSerializab $this->getUpdatedAtColumn(), ]; - $attributes = array_except($this->attributes, $except); + $attributes = Arr::except($this->attributes, $except); with($instance = new static)->setRawAttributes($attributes); @@ -3051,7 +3069,7 @@ abstract class Model implements ArrayAccess, Arrayable, Jsonable, JsonSerializab * Set the array of model attributes. No checking is done. * * @param array $attributes - * @param bool $sync + * @param bool $sync * @return $this */ public function setRawAttributes(array $attributes, $sync = false) @@ -3068,8 +3086,8 @@ abstract class Model implements ArrayAccess, Arrayable, Jsonable, JsonSerializab /** * Get the model's original attribute values. * - * @param string $key - * @param mixed $default + * @param string|null $key + * @param mixed $default * @return array */ public function getOriginal($key = null, $default = null) @@ -3201,7 +3219,7 @@ abstract class Model implements ArrayAccess, Arrayable, Jsonable, JsonSerializab * Set the specific relationship in the model. * * @param string $relation - * @param mixed $value + * @param mixed $value * @return $this */ public function setRelation($relation, $value) @@ -3260,7 +3278,7 @@ abstract class Model implements ArrayAccess, Arrayable, Jsonable, JsonSerializab /** * Resolve a connection instance. * - * @param string $connection + * @param string|null $connection * @return \Illuminate\Database\Connection */ public static function resolveConnection($connection = null) @@ -3349,7 +3367,7 @@ abstract class Model implements ArrayAccess, Arrayable, Jsonable, JsonSerializab /** * Extract and cache all the mutated attributes of a class. * - * @param string $class + * @param string $class * @return void */ public static function cacheMutatedAttributes($class) @@ -3359,14 +3377,13 @@ abstract class Model implements ArrayAccess, Arrayable, Jsonable, JsonSerializab // Here we will extract all of the mutated attributes so that we can quickly // spin through them after we export models to their array form, which we // need to be fast. This'll let us know the attributes that can mutate. - foreach (get_class_methods($class) as $method) { - if (strpos($method, 'Attribute') !== false && - preg_match('/^get(.+)Attribute$/', $method, $matches)) { + if (preg_match_all('/(?<=^|;)get([^;]+?)Attribute(;|$)/', implode(';', get_class_methods($class)), $matches)) { + foreach ($matches[1] as $match) { if (static::$snakeAttributes) { - $matches[1] = Str::snake($matches[1]); + $match = Str::snake($match); } - $mutatedAttributes[] = lcfirst($matches[1]); + $mutatedAttributes[] = lcfirst($match); } } @@ -3388,7 +3405,7 @@ abstract class Model implements ArrayAccess, Arrayable, Jsonable, JsonSerializab * Dynamically set attributes on the model. * * @param string $key - * @param mixed $value + * @param mixed $value * @return void */ public function __set($key, $value) @@ -3468,7 +3485,7 @@ abstract class Model implements ArrayAccess, Arrayable, Jsonable, JsonSerializab * Handle dynamic method calls into the model. * * @param string $method - * @param array $parameters + * @param array $parameters * @return mixed */ public function __call($method, $parameters) @@ -3486,7 +3503,7 @@ abstract class Model implements ArrayAccess, Arrayable, Jsonable, JsonSerializab * Handle dynamic static method calls into the method. * * @param string $method - * @param array $parameters + * @param array $parameters * @return mixed */ public static function __callStatic($method, $parameters) diff --git a/vendor/illuminate/database/Eloquent/Relations/BelongsToMany.php b/vendor/illuminate/database/Eloquent/Relations/BelongsToMany.php index 0272c4d..1e709a8 100755 --- a/vendor/illuminate/database/Eloquent/Relations/BelongsToMany.php +++ b/vendor/illuminate/database/Eloquent/Relations/BelongsToMany.php @@ -229,16 +229,16 @@ class BelongsToMany extends Relation * * @param int $count * @param callable $callback - * @return void + * @return bool */ public function chunk($count, callable $callback) { $this->query->addSelect($this->getSelectColumns()); - $this->query->chunk($count, function ($results) use ($callback) { + return $this->query->chunk($count, function ($results) use ($callback) { $this->hydratePivotRelation($results->all()); - call_user_func($callback, $results); + return $callback($results); }); } diff --git a/vendor/illuminate/database/Grammar.php b/vendor/illuminate/database/Grammar.php index a9985b5..71645d8 100755 --- a/vendor/illuminate/database/Grammar.php +++ b/vendor/illuminate/database/Grammar.php @@ -27,7 +27,7 @@ abstract class Grammar /** * Wrap a table in keyword identifiers. * - * @param string|\Illuminate\Database\Query\Expression $table + * @param \Illuminate\Database\Query\Expression|string $table * @return string */ public function wrapTable($table) @@ -42,7 +42,7 @@ abstract class Grammar /** * Wrap a value in keyword identifiers. * - * @param string|\Illuminate\Database\Query\Expression $value + * @param \Illuminate\Database\Query\Expression|string $value * @param bool $prefixAlias * @return string */ diff --git a/vendor/illuminate/database/Query/Builder.php b/vendor/illuminate/database/Query/Builder.php index a4a9a23..e7527e6 100755 --- a/vendor/illuminate/database/Query/Builder.php +++ b/vendor/illuminate/database/Query/Builder.php @@ -765,6 +765,12 @@ class Builder { $type = $not ? 'NotIn' : 'In'; + if ($values instanceof static) { + return $this->whereInExistingQuery( + $column, $values, $boolean, $not + ); + } + // If the value of the where in clause is actually a Closure, we will assume that // the developer is using a full sub-select for this "in" statement, and will // execute those Closures, then we can re-construct the entire sub-selects. @@ -845,6 +851,26 @@ class Builder return $this; } + /** + * Add a external sub-select to the query. + * + * @param string $column + * @param \Illuminate\Database\Query\Builder|static $query + * @param string $boolean + * @param bool $not + * @return $this + */ + protected function whereInExistingQuery($column, $query, $boolean, $not) + { + $type = $not ? 'NotInSub' : 'InSub'; + + $this->wheres[] = compact('type', 'column', 'query', 'boolean'); + + $this->addBinding($query->getBindings(), 'where'); + + return $this; + } + /** * Add a "where null" clause to the query. * @@ -1207,7 +1233,7 @@ class Builder { $property = $this->unions ? 'unionLimit' : 'limit'; - if ($value > 0) { + if ($value >= 0) { $this->$property = $value; } @@ -1560,7 +1586,7 @@ class Builder * Get an array with the values of a given column. * * @param string $column - * @param string $key + * @param string|null $key * @return array */ public function lists($column, $key = null) @@ -1608,7 +1634,7 @@ class Builder /** * Determine if any rows exist for the current query. * - * @return bool|null + * @return bool */ public function exists() { @@ -1621,6 +1647,8 @@ class Builder return (bool) $results['exists']; } + + return false; } /** diff --git a/vendor/illuminate/database/Query/Grammars/Grammar.php b/vendor/illuminate/database/Query/Grammars/Grammar.php index 6d5e161..5a871ad 100755 --- a/vendor/illuminate/database/Query/Grammars/Grammar.php +++ b/vendor/illuminate/database/Query/Grammars/Grammar.php @@ -164,11 +164,15 @@ class Grammar extends BaseGrammar /** * Create a join clause constraint segment. * - * @param array $clause + * @param array $clause * @return string */ protected function compileJoinConstraint(array $clause) { + if ($clause['nested']) { + return $this->compileNestedJoinConstraint($clause); + } + $first = $this->wrap($clause['first']); if ($clause['where']) { @@ -184,6 +188,27 @@ class Grammar extends BaseGrammar return "{$clause['boolean']} $first {$clause['operator']} $second"; } + /** + * Create a nested join clause constraint segment. + * + * @param array $clause + * @return string + */ + protected function compileNestedJoinConstraint(array $clause) + { + $clauses = []; + + foreach ($clause['join']->clauses as $nestedClause) { + $clauses[] = $this->compileJoinConstraint($nestedClause); + } + + $clauses[0] = $this->removeLeadingBoolean($clauses[0]); + + $clauses = implode(' ', $clauses); + + return "{$clause['boolean']} ({$clauses})"; + } + /** * Compile the "where" portions of the query. * diff --git a/vendor/illuminate/database/Query/Grammars/PostgresGrammar.php b/vendor/illuminate/database/Query/Grammars/PostgresGrammar.php index 2c8f553..5582649 100755 --- a/vendor/illuminate/database/Query/Grammars/PostgresGrammar.php +++ b/vendor/illuminate/database/Query/Grammars/PostgresGrammar.php @@ -33,6 +33,71 @@ class PostgresGrammar extends Grammar return $value ? 'for update' : 'for share'; } + /** + * Compile a "where date" clause. + * + * @param \Illuminate\Database\Query\Builder $query + * @param array $where + * @return string + */ + protected function whereDate(Builder $query, $where) + { + $value = $this->parameter($where['value']); + + return $this->wrap($where['column']).' '.$where['operator'].' '.$value.'::date'; + } + + /** + * Compile a "where day" clause. + * + * @param \Illuminate\Database\Query\Builder $query + * @param array $where + * @return string + */ + protected function whereDay(Builder $query, $where) + { + return $this->dateBasedWhere('day', $query, $where); + } + + /** + * Compile a "where month" clause. + * + * @param \Illuminate\Database\Query\Builder $query + * @param array $where + * @return string + */ + protected function whereMonth(Builder $query, $where) + { + return $this->dateBasedWhere('month', $query, $where); + } + + /** + * Compile a "where year" clause. + * + * @param \Illuminate\Database\Query\Builder $query + * @param array $where + * @return string + */ + protected function whereYear(Builder $query, $where) + { + return $this->dateBasedWhere('year', $query, $where); + } + + /** + * Compile a date based where clause. + * + * @param string $type + * @param \Illuminate\Database\Query\Builder $query + * @param array $where + * @return string + */ + protected function dateBasedWhere($type, Builder $query, $where) + { + $value = $this->parameter($where['value']); + + return 'extract('.$type.' from '.$this->wrap($where['column']).') '.$where['operator'].' '.$value; + } + /** * Compile an update statement into SQL. * diff --git a/vendor/illuminate/database/Query/Grammars/SqlServerGrammar.php b/vendor/illuminate/database/Query/Grammars/SqlServerGrammar.php index 04f7b9d..b36e94c 100755 --- a/vendor/illuminate/database/Query/Grammars/SqlServerGrammar.php +++ b/vendor/illuminate/database/Query/Grammars/SqlServerGrammar.php @@ -211,9 +211,11 @@ class SqlServerGrammar extends Grammar */ public function compileExists(Builder $query) { - $select = $this->compileSelect($query); + $existsQuery = clone $query; - return "select cast(case when exists($select) then 1 else 0 end as bit) as {$this->wrap('exists')}"; + $existsQuery->columns = []; + + return $this->compileSelect($existsQuery->selectRaw('1 [exists]')->limit(1)); } /** @@ -264,4 +266,79 @@ class SqlServerGrammar extends Grammar return '['.str_replace(']', ']]', $value).']'; } + + /** + * Compile an update statement into SQL. + * + * @param \Illuminate\Database\Query\Builder $query + * @param array $values + * @return string + */ + public function compileUpdate(Builder $query, $values) + { + $table = $alias = $this->wrapTable($query->from); + + if (strpos(strtolower($table), '] as [') !== false) { + $segments = explode('] as [', $table); + + $alias = '['.$segments[1]; + } + + // Each one of the columns in the update statements needs to be wrapped in the + // keyword identifiers, also a place-holder needs to be created for each of + // the values in the list of bindings so we can make the sets statements. + $columns = []; + + foreach ($values as $key => $value) { + $columns[] = $this->wrap($key).' = '.$this->parameter($value); + } + + $columns = implode(', ', $columns); + + // If the query has any "join" clauses, we will setup the joins on the builder + // and compile them so we can attach them to this update, as update queries + // can get join statements to attach to other tables when they're needed. + if (isset($query->joins)) { + $joins = ' '.$this->compileJoins($query, $query->joins); + } else { + $joins = ''; + } + + // Of course, update queries may also be constrained by where clauses so we'll + // need to compile the where clauses and attach it to the query so only the + // intended records are updated by the SQL statements we generate to run. + $where = $this->compileWheres($query); + + if (! empty($joins)) { + return trim("update {$alias} set {$columns} from {$table}{$joins} {$where}"); + } + + return trim("update {$table}{$joins} set $columns $where"); + } + + /** + * Wrap a table in keyword identifiers. + * + * @param \Illuminate\Database\Query\Expression|string $table + * @return string + */ + public function wrapTable($table) + { + return $this->wrapTableValuedFunction(parent::wrapTable($table)); + } + + /** + * Wrap a table in keyword identifiers. + * + * @param string $table + * @return string + */ + protected function wrapTableValuedFunction($table) + { + if (preg_match('/^(.+?)(\(.*?\))]$/', $table, $matches) === 1) { + $table = $matches[1].']'.$matches[2]; + } + + return $table; + } } diff --git a/vendor/illuminate/database/Query/JoinClause.php b/vendor/illuminate/database/Query/JoinClause.php index fc1a657..29ce036 100755 --- a/vendor/illuminate/database/Query/JoinClause.php +++ b/vendor/illuminate/database/Query/JoinClause.php @@ -2,6 +2,9 @@ namespace Illuminate\Database\Query; +use Closure; +use InvalidArgumentException; + class JoinClause { /** @@ -57,15 +60,25 @@ class JoinClause * * on `contacts`.`user_id` = `users`.`id` and `contacts`.`info_id` = `info`.`id` * - * @param string $first - * @param string $operator - * @param string $second + * @param \Closure|string $first + * @param string|null $operator + * @param string|null $second * @param string $boolean * @param bool $where * @return $this + * + * @throws \InvalidArgumentException */ - public function on($first, $operator, $second, $boolean = 'and', $where = false) + public function on($first, $operator = null, $second = null, $boolean = 'and', $where = false) { + if ($first instanceof Closure) { + return $this->nest($first, $boolean); + } + + if (func_num_args() < 3) { + throw new InvalidArgumentException('Not enough arguments for the on clause.'); + } + if ($where) { $this->bindings[] = $second; } @@ -74,7 +87,9 @@ class JoinClause $second = count($second); } - $this->clauses[] = compact('first', 'operator', 'second', 'boolean', 'where'); + $nested = false; + + $this->clauses[] = compact('first', 'operator', 'second', 'boolean', 'where', 'nested'); return $this; } @@ -82,12 +97,12 @@ class JoinClause /** * Add an "or on" clause to the join. * - * @param string $first - * @param string $operator - * @param string $second + * @param \Closure|string $first + * @param string|null $operator + * @param string|null $second * @return \Illuminate\Database\Query\JoinClause */ - public function orOn($first, $operator, $second) + public function orOn($first, $operator = null, $second = null) { return $this->on($first, $operator, $second, 'or'); } @@ -95,13 +110,13 @@ class JoinClause /** * Add an "on where" clause to the join. * - * @param string $first - * @param string $operator - * @param string $second + * @param \Closure|string $first + * @param string|null $operator + * @param string|null $second * @param string $boolean * @return \Illuminate\Database\Query\JoinClause */ - public function where($first, $operator, $second, $boolean = 'and') + public function where($first, $operator = null, $second = null, $boolean = 'and') { return $this->on($first, $operator, $second, $boolean, true); } @@ -109,12 +124,12 @@ class JoinClause /** * Add an "or on where" clause to the join. * - * @param string $first - * @param string $operator - * @param string $second + * @param \Closure|string $first + * @param string|null $operator + * @param string|null $second * @return \Illuminate\Database\Query\JoinClause */ - public function orWhere($first, $operator, $second) + public function orWhere($first, $operator = null, $second = null) { return $this->on($first, $operator, $second, 'or', true); } @@ -212,4 +227,27 @@ class JoinClause { return $this->on($column, 'not in', $values, 'or', true); } + + /** + * Add a nested where statement to the query. + * + * @param \Closure $callback + * @param string $boolean + * @return \Illuminate\Database\Query\JoinClause + */ + public function nest(Closure $callback, $boolean = 'and') + { + $join = new static($this->type, $this->table); + + $callback($join); + + if (count($join->clauses)) { + $nested = true; + + $this->clauses[] = compact('nested', 'join', 'boolean'); + $this->bindings = array_merge($this->bindings, $join->bindings); + } + + return $this; + } } diff --git a/vendor/illuminate/database/Schema/Blueprint.php b/vendor/illuminate/database/Schema/Blueprint.php index 69412e4..fca8e89 100755 --- a/vendor/illuminate/database/Schema/Blueprint.php +++ b/vendor/illuminate/database/Schema/Blueprint.php @@ -47,6 +47,13 @@ class Blueprint */ public $collation; + /** + * Whether to make the table temporary. + * + * @var bool + */ + public $temporary = false; + /** * Create a new schema blueprint. * @@ -180,6 +187,16 @@ class Blueprint return $this->addCommand('create'); } + /** + * Indicate that the table needs to be temporary. + * + * @return void + */ + public function temporary() + { + $this->temporary = true; + } + /** * Indicate that the table should be dropped. * @@ -1017,7 +1034,7 @@ class Blueprint public function getChangedColumns() { return array_filter($this->columns, function ($column) { - return ! ! $column->change; + return (bool) $column->change; }); } } diff --git a/vendor/illuminate/database/Schema/Grammars/MySqlGrammar.php b/vendor/illuminate/database/Schema/Grammars/MySqlGrammar.php index 8157c36..3687882 100755 --- a/vendor/illuminate/database/Schema/Grammars/MySqlGrammar.php +++ b/vendor/illuminate/database/Schema/Grammars/MySqlGrammar.php @@ -54,7 +54,9 @@ class MySqlGrammar extends Grammar { $columns = implode(', ', $this->getColumns($blueprint)); - $sql = 'create table '.$this->wrapTable($blueprint)." ($columns)"; + $sql = $blueprint->temporary ? 'create temporary' : 'create'; + + $sql .= ' table '.$this->wrapTable($blueprint)." ($columns)"; // Once we have the primary SQL, we can add the encoding option to the SQL for // the table. Then, we can check if a storage engine has been supplied for @@ -161,7 +163,7 @@ class MySqlGrammar extends Grammar $table = $this->wrapTable($blueprint); - return "alter table {$table} add {$type} {$command->index}($columns)"; + return "alter table {$table} add {$type} `{$command->index}`($columns)"; } /** @@ -227,7 +229,7 @@ class MySqlGrammar extends Grammar { $table = $this->wrapTable($blueprint); - return "alter table {$table} drop index {$command->index}"; + return "alter table {$table} drop index `{$command->index}`"; } /** @@ -241,7 +243,7 @@ class MySqlGrammar extends Grammar { $table = $this->wrapTable($blueprint); - return "alter table {$table} drop index {$command->index}"; + return "alter table {$table} drop index `{$command->index}`"; } /** @@ -255,7 +257,7 @@ class MySqlGrammar extends Grammar { $table = $this->wrapTable($blueprint); - return "alter table {$table} drop foreign key {$command->index}"; + return "alter table {$table} drop foreign key `{$command->index}`"; } /** @@ -526,6 +528,10 @@ class MySqlGrammar extends Grammar */ protected function typeTimestamp(Fluent $column) { + if ($column->useCurrent) { + return 'timestamp default CURRENT_TIMESTAMP'; + } + if (! $column->nullable && $column->default === null) { return 'timestamp default 0'; } @@ -541,6 +547,10 @@ class MySqlGrammar extends Grammar */ protected function typeTimestampTz(Fluent $column) { + if ($column->useCurrent) { + return 'timestamp default CURRENT_TIMESTAMP'; + } + if (! $column->nullable && $column->default === null) { return 'timestamp default 0'; } diff --git a/vendor/illuminate/database/Schema/Grammars/PostgresGrammar.php b/vendor/illuminate/database/Schema/Grammars/PostgresGrammar.php index 33265ba..129292b 100755 --- a/vendor/illuminate/database/Schema/Grammars/PostgresGrammar.php +++ b/vendor/illuminate/database/Schema/Grammars/PostgresGrammar.php @@ -53,7 +53,11 @@ class PostgresGrammar extends Grammar { $columns = implode(', ', $this->getColumns($blueprint)); - return 'create table '.$this->wrapTable($blueprint)." ($columns)"; + $sql = $blueprint->temporary ? 'create temporary' : 'create'; + + $sql .= ' table '.$this->wrapTable($blueprint)." ($columns)"; + + return $sql; } /** @@ -386,7 +390,9 @@ class PostgresGrammar extends Grammar */ protected function typeEnum(Fluent $column) { - $allowed = array_map(function ($a) { return "'".$a."'"; }, $column->allowed); + $allowed = array_map(function ($a) { + return "'".$a."'"; + }, $column->allowed); return "varchar(255) check (\"{$column->name}\" in (".implode(', ', $allowed).'))'; } @@ -476,6 +482,10 @@ class PostgresGrammar extends Grammar */ protected function typeTimestamp(Fluent $column) { + if ($column->useCurrent) { + return 'timestamp(0) without time zone default CURRENT_TIMESTAMP(0)'; + } + return 'timestamp(0) without time zone'; } @@ -487,6 +497,10 @@ class PostgresGrammar extends Grammar */ protected function typeTimestampTz(Fluent $column) { + if ($column->useCurrent) { + return 'timestamp(0) with time zone default CURRENT_TIMESTAMP(0)'; + } + return 'timestamp(0) with time zone'; } diff --git a/vendor/illuminate/database/Schema/Grammars/SQLiteGrammar.php b/vendor/illuminate/database/Schema/Grammars/SQLiteGrammar.php index 59d61d0..a257de7 100755 --- a/vendor/illuminate/database/Schema/Grammars/SQLiteGrammar.php +++ b/vendor/illuminate/database/Schema/Grammars/SQLiteGrammar.php @@ -54,7 +54,9 @@ class SQLiteGrammar extends Grammar { $columns = implode(', ', $this->getColumns($blueprint)); - $sql = 'create table '.$this->wrapTable($blueprint)." ($columns"; + $sql = $blueprint->temporary ? 'create temporary' : 'create'; + + $sql .= ' table '.$this->wrapTable($blueprint)." ($columns"; // SQLite forces primary keys to be added when the table is initially created // so we will need to check for a primary key commands and add the columns @@ -435,7 +437,7 @@ class SQLiteGrammar extends Grammar */ protected function typeBoolean(Fluent $column) { - return 'tinyint'; + return 'tinyint(1)'; } /** @@ -537,6 +539,10 @@ class SQLiteGrammar extends Grammar */ protected function typeTimestamp(Fluent $column) { + if ($column->useCurrent) { + return 'datetime default CURRENT_TIMESTAMP'; + } + return 'datetime'; } @@ -548,6 +554,10 @@ class SQLiteGrammar extends Grammar */ protected function typeTimestampTz(Fluent $column) { + if ($column->useCurrent) { + return 'datetime default CURRENT_TIMESTAMP'; + } + return 'datetime'; } diff --git a/vendor/illuminate/database/Schema/Grammars/SqlServerGrammar.php b/vendor/illuminate/database/Schema/Grammars/SqlServerGrammar.php index 9441e6a..ba5d245 100755 --- a/vendor/illuminate/database/Schema/Grammars/SqlServerGrammar.php +++ b/vendor/illuminate/database/Schema/Grammars/SqlServerGrammar.php @@ -482,6 +482,10 @@ class SqlServerGrammar extends Grammar */ protected function typeTimestamp(Fluent $column) { + if ($column->useCurrent) { + return 'datetime default CURRENT_TIMESTAMP'; + } + return 'datetime'; } @@ -495,6 +499,10 @@ class SqlServerGrammar extends Grammar */ protected function typeTimestampTz(Fluent $column) { + if ($column->useCurrent) { + return 'datetimeoffset(0) default CURRENT_TIMESTAMP'; + } + return 'datetimeoffset(0)'; } diff --git a/vendor/illuminate/database/composer.json b/vendor/illuminate/database/composer.json index 8b7f1e2..26c462a 100755 --- a/vendor/illuminate/database/composer.json +++ b/vendor/illuminate/database/composer.json @@ -36,7 +36,8 @@ "fzaninotto/faker": "Required to use the eloquent factory builder (~1.4).", "illuminate/console": "Required to use the database commands (5.1.*).", "illuminate/events": "Required to use the observers with Eloquent (5.1.*).", - "illuminate/filesystem": "Required to use the migrations (5.1.*)." + "illuminate/filesystem": "Required to use the migrations (5.1.*).", + "illuminate/pagination": "Required to paginate the result set (5.1.*)." }, "minimum-stability": "dev" } diff --git a/vendor/illuminate/encryption/Encrypter.php b/vendor/illuminate/encryption/Encrypter.php index 63c4a07..2ca6ab9 100755 --- a/vendor/illuminate/encryption/Encrypter.php +++ b/vendor/illuminate/encryption/Encrypter.php @@ -23,6 +23,8 @@ class Encrypter extends BaseEncrypter implements EncrypterContract * @param string $key * @param string $cipher * @return void + * + * @throws \RuntimeException */ public function __construct($key, $cipher = 'AES-128-CBC') { @@ -55,6 +57,8 @@ class Encrypter extends BaseEncrypter implements EncrypterContract * * @param string $value * @return string + * + * @throws \Illuminate\Contracts\Encryption\EncryptException */ public function encrypt($value) { @@ -71,7 +75,13 @@ class Encrypter extends BaseEncrypter implements EncrypterContract // authenticity. Then, we'll JSON encode the data in a "payload" array. $mac = $this->hash($iv = base64_encode($iv), $value); - return base64_encode(json_encode(compact('iv', 'value', 'mac'))); + $json = json_encode(compact('iv', 'value', 'mac')); + + if (! is_string($json)) { + throw new EncryptException('Could not encrypt the data.'); + } + + return base64_encode($json); } /** @@ -79,6 +89,8 @@ class Encrypter extends BaseEncrypter implements EncrypterContract * * @param string $payload * @return string + * + * @throws \Illuminate\Contracts\Encryption\DecryptException */ public function decrypt($payload) { diff --git a/vendor/illuminate/encryption/McryptEncrypter.php b/vendor/illuminate/encryption/McryptEncrypter.php index 49df0eb..87958e6 100644 --- a/vendor/illuminate/encryption/McryptEncrypter.php +++ b/vendor/illuminate/encryption/McryptEncrypter.php @@ -5,6 +5,7 @@ namespace Illuminate\Encryption; use Exception; use RuntimeException; use Illuminate\Contracts\Encryption\DecryptException; +use Illuminate\Contracts\Encryption\EncryptException; use Illuminate\Contracts\Encryption\Encrypter as EncrypterContract; /** @@ -32,6 +33,8 @@ class McryptEncrypter extends BaseEncrypter implements EncrypterContract * @param string $key * @param string $cipher * @return void + * + * @throws \RuntimeException */ public function __construct($key, $cipher = MCRYPT_RIJNDAEL_128) { @@ -64,6 +67,8 @@ class McryptEncrypter extends BaseEncrypter implements EncrypterContract * * @param string $value * @return string + * + * @throws \Illuminate\Contracts\Encryption\EncryptException */ public function encrypt($value) { @@ -76,7 +81,13 @@ class McryptEncrypter extends BaseEncrypter implements EncrypterContract // authenticity. Then, we'll JSON encode the data in a "payload" array. $mac = $this->hash($iv = base64_encode($iv), $value); - return base64_encode(json_encode(compact('iv', 'value', 'mac'))); + $json = json_encode(compact('iv', 'value', 'mac')); + + if (! is_string($json)) { + throw new EncryptException('Could not encrypt the data.'); + } + + return base64_encode($json); } /** diff --git a/vendor/illuminate/encryption/composer.json b/vendor/illuminate/encryption/composer.json index a50c1de..1db6547 100755 --- a/vendor/illuminate/encryption/composer.json +++ b/vendor/illuminate/encryption/composer.json @@ -31,7 +31,7 @@ } }, "suggest": { - "paragonie/random_compat": "Provides a compatible interface like PHP7's random_bytes() in PHP 5 projects (^1.0.6)." + "paragonie/random_compat": "Provides a compatible interface like PHP7's random_bytes() in PHP 5 projects (~1.1)." }, "minimum-stability": "dev" } diff --git a/vendor/illuminate/events/Dispatcher.php b/vendor/illuminate/events/Dispatcher.php index 9e99ea8..b2d2939 100755 --- a/vendor/illuminate/events/Dispatcher.php +++ b/vendor/illuminate/events/Dispatcher.php @@ -427,7 +427,9 @@ class Dispatcher implements DispatcherContract */ protected function cloneArgumentsForQueueing(array $arguments) { - return array_map(function ($a) { return is_object($a) ? clone $a : $a; }, $arguments); + return array_map(function ($a) { + return is_object($a) ? clone $a : $a; + }, $arguments); } /** diff --git a/vendor/illuminate/filesystem/Filesystem.php b/vendor/illuminate/filesystem/Filesystem.php index a989025..11eb46c 100755 --- a/vendor/illuminate/filesystem/Filesystem.php +++ b/vendor/illuminate/filesystem/Filesystem.php @@ -13,7 +13,7 @@ class Filesystem use Macroable; /** - * Determine if a file exists. + * Determine if a file or directory exists. * * @param string $path * @return bool diff --git a/vendor/illuminate/filesystem/FilesystemAdapter.php b/vendor/illuminate/filesystem/FilesystemAdapter.php index 3643493..0dfae6d 100644 --- a/vendor/illuminate/filesystem/FilesystemAdapter.php +++ b/vendor/illuminate/filesystem/FilesystemAdapter.php @@ -69,7 +69,11 @@ class FilesystemAdapter implements FilesystemContract, CloudFilesystemContract */ public function put($path, $contents, $visibility = null) { - $config = ['visibility' => $this->parseVisibility($visibility)]; + if ($visibility = $this->parseVisibility($visibility)) { + $config = ['visibility' => $visibility]; + } else { + $config = []; + } if (is_resource($contents)) { return $this->driver->putStream($path, $contents, $config); diff --git a/vendor/illuminate/filesystem/FilesystemManager.php b/vendor/illuminate/filesystem/FilesystemManager.php index 8d1b82b..b61ad2c 100644 --- a/vendor/illuminate/filesystem/FilesystemManager.php +++ b/vendor/illuminate/filesystem/FilesystemManager.php @@ -6,6 +6,8 @@ use Closure; use Aws\S3\S3Client; use OpenCloud\Rackspace; use Illuminate\Support\Arr; +use InvalidArgumentException; +use League\Flysystem\AdapterInterface; use League\Flysystem\FilesystemInterface; use League\Flysystem\Filesystem as Flysystem; use League\Flysystem\Adapter\Ftp as FtpAdapter; @@ -88,6 +90,8 @@ class FilesystemManager implements FactoryContract * * @param string $name * @return \Illuminate\Contracts\Filesystem\Filesystem + * + * @throws \InvalidArgumentException */ protected function resolve($name) { @@ -97,7 +101,13 @@ class FilesystemManager implements FactoryContract return $this->callCustomCreator($config); } - return $this->{'create'.ucfirst($config['driver']).'Driver'}($config); + $driverMethod = 'create'.ucfirst($config['driver']).'Driver'; + + if (method_exists($this, $driverMethod)) { + return $this->{$driverMethod}($config); + } else { + throw new InvalidArgumentException("Driver [{$config['driver']}] not supported."); + } } /** @@ -127,9 +137,13 @@ class FilesystemManager implements FactoryContract { $permissions = isset($config['permissions']) ? $config['permissions'] : []; - return $this->adapt(new Flysystem(new LocalAdapter( - $config['root'], LOCK_EX, LocalAdapter::DISALLOW_LINKS, $permissions - ))); + $links = Arr::get($config, 'links') === 'skip' + ? LocalAdapter::SKIP_LINKS + : LocalAdapter::DISALLOW_LINKS; + + return $this->adapt($this->createFlysystem(new LocalAdapter( + $config['root'], LOCK_EX, $links, $permissions + ), $config)); } /** @@ -144,7 +158,9 @@ class FilesystemManager implements FactoryContract 'host', 'username', 'password', 'port', 'root', 'passive', 'ssl', 'timeout', ]); - return $this->adapt(new Flysystem(new FtpAdapter($ftpConfig))); + return $this->adapt($this->createFlysystem( + new FtpAdapter($ftpConfig), $config + )); } /** @@ -155,13 +171,13 @@ class FilesystemManager implements FactoryContract */ public function createS3Driver(array $config) { - $config = $this->formatS3Config($config); + $s3Config = $this->formatS3Config($config); - $root = isset($config['root']) ? $config['root'] : null; + $root = isset($s3Config['root']) ? $s3Config['root'] : null; - return $this->adapt( - new Flysystem(new S3Adapter(new S3Client($config), $config['bucket'], $root)) - ); + return $this->adapt($this->createFlysystem( + new S3Adapter(new S3Client($s3Config), $s3Config['bucket'], $root), $config + )); } /** @@ -193,8 +209,8 @@ class FilesystemManager implements FactoryContract 'username' => $config['username'], 'apiKey' => $config['key'], ]); - return $this->adapt(new Flysystem( - new RackspaceAdapter($this->getRackspaceContainer($client, $config)) + return $this->adapt($this->createFlysystem( + new RackspaceAdapter($this->getRackspaceContainer($client, $config)), $config )); } @@ -214,6 +230,20 @@ class FilesystemManager implements FactoryContract return $store->getContainer($config['container']); } + /** + * Create a Flysystem instance with the given adapter. + * + * @param \League\Flysystem\AdapterInterface $adapter + * @param array $config + * @return \Leage\Flysystem\FlysystemInterface + */ + protected function createFlysystem(AdapterInterface $adapter, array $config) + { + $config = Arr::only($config, ['visibility']); + + return new Flysystem($adapter, count($config) > 0 ? $config : null); + } + /** * Adapt the filesystem implementation. * diff --git a/vendor/illuminate/filesystem/FilesystemServiceProvider.php b/vendor/illuminate/filesystem/FilesystemServiceProvider.php index 5e16866..6932270 100755 --- a/vendor/illuminate/filesystem/FilesystemServiceProvider.php +++ b/vendor/illuminate/filesystem/FilesystemServiceProvider.php @@ -25,7 +25,9 @@ class FilesystemServiceProvider extends ServiceProvider */ protected function registerNativeFilesystem() { - $this->app->singleton('files', function () { return new Filesystem; }); + $this->app->singleton('files', function () { + return new Filesystem; + }); } /** diff --git a/vendor/illuminate/hashing/HashServiceProvider.php b/vendor/illuminate/hashing/HashServiceProvider.php index 819e9ed..85581f4 100755 --- a/vendor/illuminate/hashing/HashServiceProvider.php +++ b/vendor/illuminate/hashing/HashServiceProvider.php @@ -20,7 +20,9 @@ class HashServiceProvider extends ServiceProvider */ public function register() { - $this->app->singleton('hash', function () { return new BcryptHasher; }); + $this->app->singleton('hash', function () { + return new BcryptHasher; + }); } /** diff --git a/vendor/illuminate/http/Request.php b/vendor/illuminate/http/Request.php index f59d3c9..405ad5b 100755 --- a/vendor/illuminate/http/Request.php +++ b/vendor/illuminate/http/Request.php @@ -141,7 +141,9 @@ class Request extends SymfonyRequest implements ArrayAccess { $segments = explode('/', $this->path()); - return array_values(array_filter($segments, function ($v) { return $v != ''; })); + return array_values(array_filter($segments, function ($v) { + return $v != ''; + })); } /** @@ -595,7 +597,7 @@ class Request extends SymfonyRequest implements ArrayAccess */ public function isJson() { - return Str::contains($this->header('CONTENT_TYPE'), '/json'); + return Str::contains($this->header('CONTENT_TYPE'), ['/json', '+json']); } /** @@ -607,7 +609,7 @@ class Request extends SymfonyRequest implements ArrayAccess { $acceptable = $this->getAcceptableContentTypes(); - return isset($acceptable[0]) && $acceptable[0] === 'application/json'; + return isset($acceptable[0]) && Str::contains($acceptable[0], ['/json', '+json']); } /** @@ -796,7 +798,9 @@ class Request extends SymfonyRequest implements ArrayAccess */ public function getUserResolver() { - return $this->userResolver ?: function () {}; + return $this->userResolver ?: function () { + // + }; } /** @@ -819,7 +823,9 @@ class Request extends SymfonyRequest implements ArrayAccess */ public function getRouteResolver() { - return $this->routeResolver ?: function () {}; + return $this->routeResolver ?: function () { + // + }; } /** diff --git a/vendor/illuminate/pagination/LengthAwarePaginator.php b/vendor/illuminate/pagination/LengthAwarePaginator.php index dbecee9..8c562e1 100644 --- a/vendor/illuminate/pagination/LengthAwarePaginator.php +++ b/vendor/illuminate/pagination/LengthAwarePaginator.php @@ -46,8 +46,8 @@ class LengthAwarePaginator extends AbstractPaginator implements Arrayable, Array $this->total = $total; $this->perPage = $perPage; $this->lastPage = (int) ceil($total / $perPage); + $this->path = $this->path != '/' ? rtrim($this->path, '/') : $this->path; $this->currentPage = $this->setCurrentPage($currentPage, $this->lastPage); - $this->path = $this->path != '/' ? rtrim($this->path, '/').'/' : $this->path; $this->items = $items instanceof Collection ? $items : Collection::make($items); } diff --git a/vendor/illuminate/pagination/PaginationServiceProvider.php b/vendor/illuminate/pagination/PaginationServiceProvider.php index 28a17fb..48d3e2c 100755 --- a/vendor/illuminate/pagination/PaginationServiceProvider.php +++ b/vendor/illuminate/pagination/PaginationServiceProvider.php @@ -18,7 +18,13 @@ class PaginationServiceProvider extends ServiceProvider }); Paginator::currentPageResolver(function ($pageName = 'page') { - return $this->app['request']->input($pageName); + $page = $this->app['request']->input($pageName); + + if (filter_var($page, FILTER_VALIDATE_INT) !== false && (int) $page >= 1) { + return $page; + } + + return 1; }); } } diff --git a/vendor/illuminate/pagination/Paginator.php b/vendor/illuminate/pagination/Paginator.php index 0c969fc..6229f06 100644 --- a/vendor/illuminate/pagination/Paginator.php +++ b/vendor/illuminate/pagination/Paginator.php @@ -37,7 +37,7 @@ class Paginator extends AbstractPaginator implements Arrayable, ArrayAccess, Cou $this->perPage = $perPage; $this->currentPage = $this->setCurrentPage($currentPage); - $this->path = $this->path != '/' ? rtrim($this->path, '/').'/' : $this->path; + $this->path = $this->path != '/' ? rtrim($this->path, '/') : $this->path; $this->items = $items instanceof Collection ? $items : Collection::make($items); $this->checkForMorePages(); diff --git a/vendor/illuminate/queue/Connectors/SqsConnector.php b/vendor/illuminate/queue/Connectors/SqsConnector.php index 595b9e8..4e8e5e6 100755 --- a/vendor/illuminate/queue/Connectors/SqsConnector.php +++ b/vendor/illuminate/queue/Connectors/SqsConnector.php @@ -16,14 +16,31 @@ class SqsConnector implements ConnectorInterface */ public function connect(array $config) { - $config = array_merge([ - 'version' => 'latest', 'http' => ['connect_timeout' => 60], - ], $config); + $config = $this->getDefaultConfiguration($config); if ($config['key'] && $config['secret']) { $config['credentials'] = Arr::only($config, ['key', 'secret']); } - return new SqsQueue(new SqsClient($config), $config['queue']); + return new SqsQueue( + new SqsClient($config), $config['queue'], Arr::get($config, 'prefix', '') + ); + } + + /** + * Get the default configuration for SQS. + * + * @param array $config + * @return array + */ + protected function getDefaultConfiguration(array $config) + { + return array_merge([ + 'version' => 'latest', + 'http' => [ + 'timeout' => 60, + 'connect_timeout' => 60, + ], + ], $config); } } diff --git a/vendor/illuminate/queue/Console/ListFailedCommand.php b/vendor/illuminate/queue/Console/ListFailedCommand.php index 33113b5..27b4df7 100644 --- a/vendor/illuminate/queue/Console/ListFailedCommand.php +++ b/vendor/illuminate/queue/Console/ListFailedCommand.php @@ -68,7 +68,7 @@ class ListFailedCommand extends Command */ protected function parseFailedJob(array $failed) { - $row = array_values(array_except($failed, ['payload'])); + $row = array_values(Arr::except($failed, ['payload'])); array_splice($row, 3, 0, $this->extractJobName($failed['payload'])); diff --git a/vendor/illuminate/queue/Console/RetryCommand.php b/vendor/illuminate/queue/Console/RetryCommand.php index f8a373c..4b61b19 100644 --- a/vendor/illuminate/queue/Console/RetryCommand.php +++ b/vendor/illuminate/queue/Console/RetryCommand.php @@ -2,6 +2,7 @@ namespace Illuminate\Queue\Console; +use Illuminate\Support\Arr; use Illuminate\Console\Command; use Symfony\Component\Console\Input\InputArgument; @@ -28,20 +29,40 @@ class RetryCommand extends Command */ public function fire() { - $failed = $this->laravel['queue.failer']->find($this->argument('id')); + $ids = $this->argument('id'); + + if (count($ids) === 1 && $ids[0] === 'all') { + $ids = Arr::pluck($this->laravel['queue.failer']->all(), 'id'); + } + + foreach ($ids as $id) { + $this->retryJob($id); + } + } + + /** + * Retry the queue job with the given ID. + * + * @param string $id + * @return void + */ + protected function retryJob($id) + { + $failed = $this->laravel['queue.failer']->find($id); if (! is_null($failed)) { $failed = (object) $failed; $failed->payload = $this->resetAttempts($failed->payload); - $this->laravel['queue']->connection($failed->connection)->pushRaw($failed->payload, $failed->queue); + $this->laravel['queue']->connection($failed->connection) + ->pushRaw($failed->payload, $failed->queue); $this->laravel['queue.failer']->forget($failed->id); - $this->info('The failed job has been pushed back onto the queue!'); + $this->info("The failed job [{$id}] has been pushed back onto the queue!"); } else { - $this->error('No failed job matches the given ID.'); + $this->error("No failed job matches the given ID [{$id}]."); } } @@ -70,7 +91,7 @@ class RetryCommand extends Command protected function getArguments() { return [ - ['id', InputArgument::REQUIRED, 'The ID of the failed job'], + ['id', InputArgument::IS_ARRAY, 'The ID of the failed job'], ]; } } diff --git a/vendor/illuminate/queue/IronQueue.php b/vendor/illuminate/queue/IronQueue.php index 2baaaf6..6831889 100755 --- a/vendor/illuminate/queue/IronQueue.php +++ b/vendor/illuminate/queue/IronQueue.php @@ -93,7 +93,7 @@ class IronQueue extends Queue implements QueueContract * @param int $delay * @return mixed */ - public function recreate($payload, $queue = null, $delay) + public function recreate($payload, $queue, $delay) { $options = ['delay' => $this->getSeconds($delay)]; diff --git a/vendor/illuminate/queue/SerializesModels.php b/vendor/illuminate/queue/SerializesModels.php index 23cdaac..0ff90b5 100644 --- a/vendor/illuminate/queue/SerializesModels.php +++ b/vendor/illuminate/queue/SerializesModels.php @@ -24,7 +24,9 @@ trait SerializesModels )); } - return array_map(function ($p) { return $p->getName(); }, $properties); + return array_map(function ($p) { + return $p->getName(); + }, $properties); } /** diff --git a/vendor/illuminate/queue/SqsQueue.php b/vendor/illuminate/queue/SqsQueue.php index f195ad6..15a1392 100755 --- a/vendor/illuminate/queue/SqsQueue.php +++ b/vendor/illuminate/queue/SqsQueue.php @@ -22,6 +22,13 @@ class SqsQueue extends Queue implements QueueContract */ protected $default; + /** + * The sqs prefix url. + * + * @var string + */ + protected $prefix; + /** * The job creator callback. * @@ -34,11 +41,13 @@ class SqsQueue extends Queue implements QueueContract * * @param \Aws\Sqs\SqsClient $sqs * @param string $default + * @param string $prefix * @return void */ - public function __construct(SqsClient $sqs, $default) + public function __construct(SqsClient $sqs, $default, $prefix = '') { $this->sqs = $sqs; + $this->prefix = $prefix; $this->default = $default; } @@ -136,7 +145,13 @@ class SqsQueue extends Queue implements QueueContract */ public function getQueue($queue) { - return $queue ?: $this->default; + $queue = $queue ?: $this->default; + + if (filter_var($queue, FILTER_VALIDATE_URL) !== false) { + return $queue; + } + + return rtrim($this->prefix, '/').'/'.($queue); } /** diff --git a/vendor/illuminate/session/Store.php b/vendor/illuminate/session/Store.php index 3f0cf11..3419713 100755 --- a/vendor/illuminate/session/Store.php +++ b/vendor/illuminate/session/Store.php @@ -283,7 +283,11 @@ class Store implements SessionInterface protected function addBagDataToSession() { foreach (array_merge($this->bags, [$this->metaBag]) as $bag) { - $this->put($bag->getStorageKey(), $this->bagData[$bag->getStorageKey()]); + $key = $bag->getStorageKey(); + + if (isset($this->bagData[$key])) { + $this->put($key, $this->bagData[$key]); + } } } @@ -294,9 +298,7 @@ class Store implements SessionInterface */ public function ageFlashData() { - foreach ($this->get('flash.old', []) as $old) { - $this->forget($old); - } + $this->forget($this->get('flash.old', [])); $this->put('flash.old', $this->get('flash.new', [])); @@ -419,6 +421,21 @@ class Store implements SessionInterface $this->removeFromOldFlashData([$key]); } + /** + * Flash a key / value pair to the session + * for immediate use. + * + * @param string $key + * @param mixed $value + * @return void + */ + public function now($key, $value) + { + $this->put($key, $value); + + $this->push('flash.old', $key); + } + /** * Flash an input array to the session. * @@ -506,14 +523,14 @@ class Store implements SessionInterface } /** - * Remove an item from the session. + * Remove one or many items from the session. * - * @param string $key + * @param string|array $keys * @return void */ - public function forget($key) + public function forget($keys) { - Arr::forget($this->attributes, $key); + Arr::forget($this->attributes, $keys); } /** diff --git a/vendor/illuminate/support/Arr.php b/vendor/illuminate/support/Arr.php index 1817897..93e9569 100755 --- a/vendor/illuminate/support/Arr.php +++ b/vendor/illuminate/support/Arr.php @@ -48,7 +48,7 @@ class Arr /** * Collapse an array of arrays into a single array. * - * @param array|\ArrayAccess $array + * @param \ArrayAccess|array $array * @return array */ public static function collapse($array) @@ -181,7 +181,9 @@ class Arr { $return = []; - array_walk_recursive($array, function ($x) use (&$return) { $return[] = $x; }); + array_walk_recursive($array, function ($x) use (&$return) { + $return[] = $x; + }); return $return; } @@ -197,7 +199,13 @@ class Arr { $original = &$array; - foreach ((array) $keys as $key) { + $keys = (array) $keys; + + if (count($keys) === 0) { + return; + } + + foreach ($keys as $key) { $parts = explode('.', $key); while (count($parts) > 1) { @@ -349,6 +357,25 @@ class Arr return [$value, $key]; } + /** + * Push an item onto the beginning of an array. + * + * @param array $array + * @param mixed $value + * @param mixed $key + * @return array + */ + public static function prepend($array, $value, $key = null) + { + if (is_null($key)) { + array_unshift($array, $value); + } else { + $array = [$key => $value] + $array; + } + + return $array; + } + /** * Get a value from the array, and remove it. * diff --git a/vendor/illuminate/support/ClassLoader.php b/vendor/illuminate/support/ClassLoader.php index 97ac5d6..6a8d235 100644 --- a/vendor/illuminate/support/ClassLoader.php +++ b/vendor/illuminate/support/ClassLoader.php @@ -62,7 +62,7 @@ class ClassLoader public static function register() { if (! static::$registered) { - static::$registered = spl_autoload_register(['\Illuminate\Support\ClassLoader', 'load']); + static::$registered = spl_autoload_register([static::class, 'load']); } } diff --git a/vendor/illuminate/support/Collection.php b/vendor/illuminate/support/Collection.php index e2e0ea8..a8ad53b 100755 --- a/vendor/illuminate/support/Collection.php +++ b/vendor/illuminate/support/Collection.php @@ -9,11 +9,14 @@ use CachingIterator; use JsonSerializable; use IteratorAggregate; use InvalidArgumentException; +use Illuminate\Support\Traits\Macroable; use Illuminate\Contracts\Support\Jsonable; use Illuminate\Contracts\Support\Arrayable; class Collection implements ArrayAccess, Arrayable, Countable, IteratorAggregate, Jsonable, JsonSerializable { + use Macroable; + /** * The items contained in the collection. * @@ -161,6 +164,19 @@ class Collection implements ArrayAccess, Arrayable, Countable, IteratorAggregate return new static($new); } + /** + * Get all items except for those with the specified keys. + * + * @param mixed $keys + * @return static + */ + public function except($keys) + { + $keys = is_array($keys) ? $keys : func_get_args(); + + return new static(Arr::except($this->items, $keys)); + } + /** * Fetch a nested element of the collection. * @@ -417,10 +433,10 @@ class Collection implements ArrayAccess, Arrayable, Countable, IteratorAggregate } /** - * Get an array with the values of a given key. + * Get the values of a given key. * * @param string $value - * @param string $key + * @param string|null $key * @return static */ public function pluck($value, $key = null) @@ -432,7 +448,7 @@ class Collection implements ArrayAccess, Arrayable, Countable, IteratorAggregate * Alias for the "pluck" method. * * @param string $value - * @param string $key + * @param string|null $key * @return static */ public function lists($value, $key = null) @@ -455,6 +471,17 @@ class Collection implements ArrayAccess, Arrayable, Countable, IteratorAggregate return new static(array_combine($keys, $items)); } + /** + * Map a collection and flatten the result by a single level. + * + * @param callable $callback + * @return static + */ + public function flatMap(callable $callback) + { + return $this->map($callback)->collapse(); + } + /** * Get the max value of a given key. * @@ -496,6 +523,19 @@ class Collection implements ArrayAccess, Arrayable, Countable, IteratorAggregate }); } + /** + * Get the items with the specified keys. + * + * @param mixed $keys + * @return static + */ + public function only($keys) + { + $keys = is_array($keys) ? $keys : func_get_args(); + + return new static(Arr::only($this->items, $keys)); + } + /** * "Paginate" the collection by slicing it into a smaller collection. * @@ -522,11 +562,12 @@ class Collection implements ArrayAccess, Arrayable, Countable, IteratorAggregate * Push an item onto the beginning of the collection. * * @param mixed $value + * @param mixed $key * @return $this */ - public function prepend($value) + public function prepend($value, $key = null) { - array_unshift($this->items, $value); + $this->items = Arr::prepend($this->items, $value, $key); return $this; } diff --git a/vendor/illuminate/support/Debug/Dumper.php b/vendor/illuminate/support/Debug/Dumper.php index 7463ddb..99a045d 100644 --- a/vendor/illuminate/support/Debug/Dumper.php +++ b/vendor/illuminate/support/Debug/Dumper.php @@ -15,8 +15,12 @@ class Dumper */ public function dump($value) { - $dumper = 'cli' === PHP_SAPI ? new CliDumper : new HtmlDumper; + if (class_exists(CliDumper::class)) { + $dumper = 'cli' === PHP_SAPI ? new CliDumper : new HtmlDumper; - $dumper->dump((new VarCloner)->cloneVar($value)); + $dumper->dump((new VarCloner)->cloneVar($value)); + } else { + var_dump($value); + } } } diff --git a/vendor/illuminate/support/Facades/Facade.php b/vendor/illuminate/support/Facades/Facade.php index 6e36a1e..7f92a0e 100755 --- a/vendor/illuminate/support/Facades/Facade.php +++ b/vendor/illuminate/support/Facades/Facade.php @@ -64,6 +64,8 @@ abstract class Facade { static::$resolvedInstance[$name] = $mock = static::createMockByName($name); + $mock->shouldAllowMockingProtectedMethods(); + if (isset(static::$app)) { static::$app->instance($name, $mock); } diff --git a/vendor/illuminate/support/Pluralizer.php b/vendor/illuminate/support/Pluralizer.php index ca8d902..7ba7a4d 100755 --- a/vendor/illuminate/support/Pluralizer.php +++ b/vendor/illuminate/support/Pluralizer.php @@ -24,6 +24,9 @@ class Pluralizer 'fish', 'gold', 'information', + 'knowledge', + 'love', + 'rain', 'money', 'moose', 'offspring', diff --git a/vendor/illuminate/support/ViewErrorBag.php b/vendor/illuminate/support/ViewErrorBag.php index eed64c3..9fe3b96 100644 --- a/vendor/illuminate/support/ViewErrorBag.php +++ b/vendor/illuminate/support/ViewErrorBag.php @@ -33,7 +33,7 @@ class ViewErrorBag implements Countable */ public function getBag($key) { - return Arr::get($this->bags, $key, new MessageBag); + return Arr::get($this->bags, $key) ?: new MessageBag; } /** @@ -90,7 +90,7 @@ class ViewErrorBag implements Countable */ public function __get($key) { - return Arr::get($this->bags, $key, new MessageBag); + return $this->getBag($key); } /** @@ -102,6 +102,6 @@ class ViewErrorBag implements Countable */ public function __set($key, $value) { - Arr::set($this->bags, $key, $value); + $this->put($key, $value); } } diff --git a/vendor/illuminate/support/composer.json b/vendor/illuminate/support/composer.json index feb8bd4..bfef525 100755 --- a/vendor/illuminate/support/composer.json +++ b/vendor/illuminate/support/composer.json @@ -35,8 +35,8 @@ }, "suggest": { "jeremeamia/superclosure": "Required to be able to serialize closures (~2.0).", - "paragonie/random_compat": "Provides a compatible interface like PHP7's random_bytes() in PHP 5 projects (^1.0.6).", - "symfony/var-dumper": "Required to use the dd function (2.7.*)." + "paragonie/random_compat": "Provides a compatible interface like PHP7's random_bytes() in PHP 5 projects (~1.1).", + "symfony/var-dumper": "Improves the dd function (2.7.*)." }, "minimum-stability": "dev" } diff --git a/vendor/illuminate/support/helpers.php b/vendor/illuminate/support/helpers.php index 6a8fbe9..4c53ffa 100755 --- a/vendor/illuminate/support/helpers.php +++ b/vendor/illuminate/support/helpers.php @@ -62,7 +62,7 @@ if (! function_exists('array_collapse')) { /** * Collapse an array of arrays into a single array. * - * @param array|\ArrayAccess $array + * @param \ArrayAccess|array $array * @return array */ function array_collapse($array) @@ -243,6 +243,21 @@ if (! function_exists('array_pluck')) { } } +if (! function_exists('array_prepend')) { + /** + * Push an item onto the beginning of an array. + * + * @param array $array + * @param mixed $value + * @param mixed $key + * @return array + */ + function array_prepend($array, $value, $key = null) + { + return Arr::prepend($array, $value, $key); + } +} + if (! function_exists('array_pull')) { /** * Get a value from the array, and remove it. @@ -442,7 +457,7 @@ if (! function_exists('e')) { /** * Escape HTML entities in a string. * - * @param \Illuminate\Support\Htmlable|string $value + * @param \Illuminate\Contracts\Support\Htmlable|string $value * @return string */ function e($value) diff --git a/vendor/illuminate/translation/Translator.php b/vendor/illuminate/translation/Translator.php index 3ac09a4..62f09c7 100755 --- a/vendor/illuminate/translation/Translator.php +++ b/vendor/illuminate/translation/Translator.php @@ -51,16 +51,29 @@ class Translator extends NamespacedItemResolver implements TranslatorInterface $this->locale = $locale; } + /** + * Determine if a translation exists for a given locale. + * + * @param string $key + * @param string|null $locale + * @return bool + */ + public function hasForLocale($key, $locale = null) + { + return $this->has($key, $locale, false); + } + /** * Determine if a translation exists. * * @param string $key - * @param string $locale + * @param string|null $locale + * @param bool $fallback * @return bool */ - public function has($key, $locale = null) + public function has($key, $locale = null, $fallback = true) { - return $this->get($key, [], $locale) !== $key; + return $this->get($key, [], $locale, $fallback) !== $key; } /** @@ -68,17 +81,20 @@ class Translator extends NamespacedItemResolver implements TranslatorInterface * * @param string $key * @param array $replace - * @param string $locale + * @param string|null $locale + * @param bool $fallback * @return string */ - public function get($key, array $replace = [], $locale = null) + public function get($key, array $replace = [], $locale = null, $fallback = true) { list($namespace, $group, $item) = $this->parseKey($key); // Here we will get the locale that should be used for the language line. If one // was not passed, we will use the default locales which was given to us when // the translator was instantiated. Then, we can load the lines and return. - foreach ($this->parseLocale($locale) as $locale) { + $locales = $fallback ? $this->parseLocale($locale) : [$locale ?: $this->locale]; + + foreach ($locales as $locale) { $this->load($namespace, $group, $locale); $line = $this->getLine( diff --git a/vendor/illuminate/validation/Validator.php b/vendor/illuminate/validation/Validator.php index 0a1a61e..c935e82 100755 --- a/vendor/illuminate/validation/Validator.php +++ b/vendor/illuminate/validation/Validator.php @@ -147,7 +147,7 @@ class Validator implements ValidatorContract * @var array */ protected $implicitRules = [ - 'Required', 'RequiredWith', 'RequiredWithAll', 'RequiredWithout', 'RequiredWithoutAll', 'RequiredIf', 'Accepted', + 'Required', 'RequiredWith', 'RequiredWithAll', 'RequiredWithout', 'RequiredWithoutAll', 'RequiredIf', 'RequiredUnless', 'Accepted', ]; /** @@ -685,6 +685,29 @@ class Validator implements ValidatorContract return true; } + /** + * Validate that an attribute exists when another attribute does not have a given value. + * + * @param string $attribute + * @param mixed $value + * @param mixed $parameters + * @return bool + */ + protected function validateRequiredUnless($attribute, $value, $parameters) + { + $this->requireParameterCount(2, $parameters, 'required_unless'); + + $data = Arr::get($this->data, $parameters[0]); + + $values = array_slice($parameters, 1); + + if (! in_array($data, $values)) { + return $this->validateRequired($attribute, $value); + } + + return true; + } + /** * Get the number of attributes in a list that are present. * @@ -1212,9 +1235,11 @@ class Validator implements ValidatorContract */ protected function validateActiveUrl($attribute, $value) { - $url = str_replace(['http://', 'https://', 'ftp://'], '', strtolower($value)); + if ($url = parse_url($value, PHP_URL_HOST)) { + return count(dns_get_record($url, DNS_A | DNS_AAAA)) > 0; + } - return checkdnsrr($url, 'A'); + return false; } /** @@ -1945,6 +1970,22 @@ class Validator implements ValidatorContract return str_replace([':other', ':value'], $parameters, $message); } + /** + * Replace all place-holders for the required_unless rule. + * + * @param string $message + * @param string $attribute + * @param string $rule + * @param array $parameters + * @return string + */ + protected function replaceRequiredUnless($message, $attribute, $rule, $parameters) + { + $other = $this->getAttribute(array_shift($parameters)); + + return str_replace([':other', ':values'], [$other, implode(', ', $parameters)], $message); + } + /** * Replace all place-holders for the same rule. * diff --git a/vendor/illuminate/view/Factory.php b/vendor/illuminate/view/Factory.php index c24d757..587297d 100755 --- a/vendor/illuminate/view/Factory.php +++ b/vendor/illuminate/view/Factory.php @@ -544,6 +544,10 @@ class Factory implements FactoryContract */ public function yieldSection() { + if (empty($this->sectionStack)) { + return ''; + } + return $this->yieldContent($this->stopSection()); } @@ -552,9 +556,14 @@ class Factory implements FactoryContract * * @param bool $overwrite * @return string + * @throws \InvalidArgumentException */ public function stopSection($overwrite = false) { + if (empty($this->sectionStack)) { + throw new InvalidArgumentException('Cannot end a section without first starting one.'); + } + $last = array_pop($this->sectionStack); if ($overwrite) { @@ -570,9 +579,14 @@ class Factory implements FactoryContract * Stop injecting content into a section and append it. * * @return string + * @throws \InvalidArgumentException */ public function appendSection() { + if (empty($this->sectionStack)) { + throw new InvalidArgumentException('Cannot end a section without first starting one.'); + } + $last = array_pop($this->sectionStack); if (isset($this->sections[$last])) { diff --git a/vendor/illuminate/view/ViewServiceProvider.php b/vendor/illuminate/view/ViewServiceProvider.php index 342afa8..119e1d8 100755 --- a/vendor/illuminate/view/ViewServiceProvider.php +++ b/vendor/illuminate/view/ViewServiceProvider.php @@ -53,7 +53,9 @@ class ViewServiceProvider extends ServiceProvider */ public function registerPhpEngine($resolver) { - $resolver->register('php', function () { return new PhpEngine; }); + $resolver->register('php', function () { + return new PhpEngine; + }); } /** diff --git a/vendor/mtdowling/cron-expression/README.md b/vendor/mtdowling/cron-expression/README.md index 1571e5d..c9e3bf3 100644 --- a/vendor/mtdowling/cron-expression/README.md +++ b/vendor/mtdowling/cron-expression/README.md @@ -68,15 +68,4 @@ Requirements - PHP 5.3+ - PHPUnit is required to run the unit tests -- Composer is required to run the unit tests - -CHANGELOG -========= - -1.0.3 (2013-11-23) ------------------- - -* Only set default timezone if the given $currentTime is not a DateTime instance ([#34](https://github.com/mtdowling/cron-expression/issues/34)) -* Fixes issue [#28](https://github.com/mtdowling/cron-expression/issues/28) where PHP increments of ranges were failing due to PHP casting hyphens to 0 -* Now supports expressions with any number of extra spaces, tabs, or newlines -* Using static instead of self in `CronExpression::factory` +- Composer is required to run the unit tests \ No newline at end of file diff --git a/vendor/mtdowling/cron-expression/composer.json b/vendor/mtdowling/cron-expression/composer.json index 62c0d89..506d8cf 100644 --- a/vendor/mtdowling/cron-expression/composer.json +++ b/vendor/mtdowling/cron-expression/composer.json @@ -13,7 +13,7 @@ "php": ">=5.3.2" }, "require-dev": { - "phpunit/phpunit": "4.*" + "phpunit/phpunit": "~4.0|~5.0" }, "autoload": { "psr-0": { diff --git a/vendor/mtdowling/cron-expression/phpunit.xml.dist b/vendor/mtdowling/cron-expression/phpunit.xml.dist deleted file mode 100644 index fb8a552..0000000 --- a/vendor/mtdowling/cron-expression/phpunit.xml.dist +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - ./tests - - - - - - ./src/Cron - - - - diff --git a/vendor/mtdowling/cron-expression/src/Cron/AbstractField.php b/vendor/mtdowling/cron-expression/src/Cron/AbstractField.php index c0616a2..bc7de80 100644 --- a/vendor/mtdowling/cron-expression/src/Cron/AbstractField.php +++ b/vendor/mtdowling/cron-expression/src/Cron/AbstractField.php @@ -101,4 +101,43 @@ abstract class AbstractField implements FieldInterface return false; } + + /** + * Returns a range of values for the given cron expression + * + * @param string $expression The expression to evaluate + * @param int $max Maximum offset for range + * + * @return array + */ + public function getRangeForExpression($expression, $max) + { + $values = array(); + + if ($this->isRange($expression) || $this->isIncrementsOfRanges($expression)) { + if (!$this->isIncrementsOfRanges($expression)) { + list ($offset, $to) = explode('-', $expression); + $stepSize = 1; + } + else { + $range = array_map('trim', explode('/', $expression, 2)); + $stepSize = isset($range[1]) ? $range[1] : 0; + $range = $range[0]; + $range = explode('-', $range, 2); + $offset = $range[0]; + $to = isset($range[1]) ? $range[1] : $max; + } + $offset = $offset == '*' ? 0 : $offset; + for ($i = $offset; $i <= $to; $i += $stepSize) { + $values[] = $i; + } + sort($values); + } + else { + $values = array($expression); + } + + return $values; + } + } diff --git a/vendor/mtdowling/cron-expression/src/Cron/CronExpression.php b/vendor/mtdowling/cron-expression/src/Cron/CronExpression.php index ce90f29..04f75e3 100644 --- a/vendor/mtdowling/cron-expression/src/Cron/CronExpression.php +++ b/vendor/mtdowling/cron-expression/src/Cron/CronExpression.php @@ -33,6 +33,11 @@ class CronExpression */ private $fieldFactory; + /** + * @var int Max iteration count when searching for next run date + */ + private $maxIterationCount = 1000; + /** * @var array Order in which to test of cron parts */ @@ -72,6 +77,25 @@ class CronExpression return new static($expression, $fieldFactory ?: new FieldFactory()); } + /** + * Validate a CronExpression. + * + * @param string $expression The CRON expression to validate. + * + * @return bool True if a valid CRON expression was passed. False if not. + * @see Cron\CronExpression::factory + */ + public static function isValidExpression($expression) + { + try { + self::factory($expression); + } catch (\InvalidArgumentException $e) { + return false; + } + + return true; + } + /** * Parse a CRON expression * @@ -121,7 +145,7 @@ class CronExpression { if (!$this->fieldFactory->getField($position)->validate($value)) { throw new \InvalidArgumentException( - 'Invalid CRON field value ' . $value . ' as position ' . $position + 'Invalid CRON field value ' . $value . ' at position ' . $position ); } @@ -130,6 +154,20 @@ class CronExpression return $this; } + /** + * Set max iteration count for searching next run dates + * + * @param int $maxIterationCount Max iteration count when searching for next run date + * + * @return CronExpression + */ + public function setMaxIterationCount($maxIterationCount) + { + $this->maxIterationCount = $maxIterationCount; + + return $this; + } + /** * Get a next run date relative to the current date or a specific date * @@ -183,7 +221,11 @@ class CronExpression { $matches = array(); for ($i = 0; $i < max(0, $total); $i++) { - $matches[] = $this->getRunDate($currentTime, $i, $invert, $allowCurrentDate); + try { + $matches[] = $this->getRunDate($currentTime, $i, $invert, $allowCurrentDate); + } catch (\RuntimeException $e) { + break; + } } return $matches; @@ -239,6 +281,11 @@ class CronExpression $currentDate->setTimezone(new \DateTimeZone(date_default_timezone_get())); $currentDate = $currentDate->format('Y-m-d H:i'); $currentTime = strtotime($currentDate); + } elseif ($currentTime instanceof \DateTimeImmutable) { + $currentDate = \DateTime::createFromFormat('U', $currentTime->format('U')); + $currentDate->setTimezone(new \DateTimeZone(date_default_timezone_get())); + $currentDate = $currentDate->format('Y-m-d H:i'); + $currentTime = strtotime($currentDate); } else { $currentTime = new \DateTime($currentTime); $currentTime->setTime($currentTime->format('H'), $currentTime->format('i'), 0); @@ -269,6 +316,9 @@ class CronExpression { if ($currentTime instanceof \DateTime) { $currentDate = clone $currentTime; + } elseif ($currentTime instanceof \DateTimeImmutable) { + $currentDate = \DateTime::createFromFormat('U', $currentTime->format('U')); + $currentDate->setTimezone($currentTime->getTimezone()); } else { $currentDate = new \DateTime($currentTime ?: 'now'); $currentDate->setTimezone(new \DateTimeZone(date_default_timezone_get())); @@ -291,7 +341,7 @@ class CronExpression } // Set a hard limit to bail on an impossible date - for ($i = 0; $i < 1000; $i++) { + for ($i = 0; $i < $this->maxIterationCount; $i++) { foreach ($parts as $position => $part) { $satisfied = false; @@ -311,14 +361,14 @@ class CronExpression // If the field is not satisfied, then start over if (!$satisfied) { - $field->increment($nextRun, $invert); + $field->increment($nextRun, $invert, $part); continue 2; } } // Skip this match if needed if ((!$allowCurrentDate && $nextRun == $currentDate) || --$nth > -1) { - $this->fieldFactory->getField(0)->increment($nextRun, $invert); + $this->fieldFactory->getField(0)->increment($nextRun, $invert, isset($parts[0]) ? $parts[0] : null); continue; } diff --git a/vendor/mtdowling/cron-expression/src/Cron/DayOfWeekField.php b/vendor/mtdowling/cron-expression/src/Cron/DayOfWeekField.php index 8e33b19..f0e39dc 100644 --- a/vendor/mtdowling/cron-expression/src/Cron/DayOfWeekField.php +++ b/vendor/mtdowling/cron-expression/src/Cron/DayOfWeekField.php @@ -36,7 +36,10 @@ class DayOfWeekField extends AbstractField $tdate = clone $date; $tdate->setDate($currentYear, $currentMonth, $lastDayOfMonth); while ($tdate->format('w') != $weekday) { - $tdate->setDate($currentYear, $currentMonth, --$lastDayOfMonth); + $tdateClone = new \DateTime(); + $tdate = $tdateClone + ->setTimezone($tdate->getTimezone()) + ->setDate($currentYear, $currentMonth, --$lastDayOfMonth); } return $date->format('j') == $lastDayOfMonth; diff --git a/vendor/mtdowling/cron-expression/src/Cron/HoursField.php b/vendor/mtdowling/cron-expression/src/Cron/HoursField.php index 325bf14..d275b85 100644 --- a/vendor/mtdowling/cron-expression/src/Cron/HoursField.php +++ b/vendor/mtdowling/cron-expression/src/Cron/HoursField.php @@ -12,21 +12,51 @@ class HoursField extends AbstractField return $this->isSatisfied($date->format('H'), $value); } - public function increment(\DateTime $date, $invert = false) + public function increment(\DateTime $date, $invert = false, $parts = null) { // Change timezone to UTC temporarily. This will // allow us to go back or forwards and hour even // if DST will be changed between the hours. - $timezone = $date->getTimezone(); - $date->setTimezone(new \DateTimeZone('UTC')); - if ($invert) { - $date->modify('-1 hour'); - $date->setTime($date->format('H'), 59); - } else { - $date->modify('+1 hour'); - $date->setTime($date->format('H'), 0); + if (is_null($parts) || $parts == '*') { + $timezone = $date->getTimezone(); + $date->setTimezone(new \DateTimeZone('UTC')); + if ($invert) { + $date->modify('-1 hour'); + } else { + $date->modify('+1 hour'); + } + $date->setTimezone($timezone); + + $date->setTime($date->format('H'), $invert ? 59 : 0); + return $this; + } + + $parts = strpos($parts, ',') !== false ? explode(',', $parts) : array($parts); + $hours = array(); + foreach ($parts as $part) { + $hours = array_merge($hours, $this->getRangeForExpression($part, 23)); + } + + $current_hour = $date->format('H'); + $position = $invert ? count($hours) - 1 : 0; + if (count($hours) > 1) { + for ($i = 0; $i < count($hours) - 1; $i++) { + if ((!$invert && $current_hour >= $hours[$i] && $current_hour < $hours[$i + 1]) || + ($invert && $current_hour > $hours[$i] && $current_hour <= $hours[$i + 1])) { + $position = $invert ? $i : $i + 1; + break; + } + } + } + + $hour = $hours[$position]; + if ((!$invert && $date->format('H') >= $hour) || ($invert && $date->format('H') <= $hour)) { + $date->modify(($invert ? '-' : '+') . '1 day'); + $date->setTime($invert ? 23 : 0, $invert ? 59 : 0); + } + else { + $date->setTime($hour, $invert ? 59 : 0); } - $date->setTimezone($timezone); return $this; } diff --git a/vendor/mtdowling/cron-expression/src/Cron/MinutesField.php b/vendor/mtdowling/cron-expression/src/Cron/MinutesField.php index cfa2b09..47cd287 100644 --- a/vendor/mtdowling/cron-expression/src/Cron/MinutesField.php +++ b/vendor/mtdowling/cron-expression/src/Cron/MinutesField.php @@ -12,12 +12,41 @@ class MinutesField extends AbstractField return $this->isSatisfied($date->format('i'), $value); } - public function increment(\DateTime $date, $invert = false) + public function increment(\DateTime $date, $invert = false, $parts = null) { - if ($invert) { - $date->modify('-1 minute'); - } else { - $date->modify('+1 minute'); + if (is_null($parts)) { + if ($invert) { + $date->modify('-1 minute'); + } else { + $date->modify('+1 minute'); + } + return $this; + } + + $parts = strpos($parts, ',') !== false ? explode(',', $parts) : array($parts); + $minutes = array(); + foreach ($parts as $part) { + $minutes = array_merge($minutes, $this->getRangeForExpression($part, 59)); + } + + $current_minute = $date->format('i'); + $position = $invert ? count($minutes) - 1 : 0; + if (count($minutes) > 1) { + for ($i = 0; $i < count($minutes) - 1; $i++) { + if ((!$invert && $current_minute >= $minutes[$i] && $current_minute < $minutes[$i + 1]) || + ($invert && $current_minute > $minutes[$i] && $current_minute <= $minutes[$i + 1])) { + $position = $invert ? $i : $i + 1; + break; + } + } + } + + if ((!$invert && $current_minute >= $minutes[$position]) || ($invert && $current_minute <= $minutes[$position])) { + $date->modify(($invert ? '-' : '+') . '1 hour'); + $date->setTime($date->format('H'), $invert ? 59 : 0); + } + else { + $date->setTime($date->format('H'), $minutes[$position]); } return $this; diff --git a/vendor/mtdowling/cron-expression/tests/Cron/CronExpressionTest.php b/vendor/mtdowling/cron-expression/tests/Cron/CronExpressionTest.php index 013b701..b81a13d 100644 --- a/vendor/mtdowling/cron-expression/tests/Cron/CronExpressionTest.php +++ b/vendor/mtdowling/cron-expression/tests/Cron/CronExpressionTest.php @@ -277,6 +277,27 @@ class CronExpressionTest extends \PHPUnit_Framework_TestCase ), $cron->getMultipleRunDates(4, '2008-11-09 00:00:00', false, true)); } + /** + * @covers Cron\CronExpression::getMultipleRunDates + * @covers Cron\CronExpression::setMaxIterationCount + */ + public function testProvidesMultipleRunDatesForTheFarFuture() { + // Fails with the default 1000 iteration limit + $cron = CronExpression::factory('0 0 12 1 * */2'); + $cron->setMaxIterationCount(2000); + $this->assertEquals(array( + new DateTime('2016-01-12 00:00:00'), + new DateTime('2018-01-12 00:00:00'), + new DateTime('2020-01-12 00:00:00'), + new DateTime('2022-01-12 00:00:00'), + new DateTime('2024-01-12 00:00:00'), + new DateTime('2026-01-12 00:00:00'), + new DateTime('2028-01-12 00:00:00'), + new DateTime('2030-01-12 00:00:00'), + new DateTime('2032-01-12 00:00:00'), + ), $cron->getMultipleRunDates(9, '2015-04-28 00:00:00', false, true)); + } + /** * @covers Cron\CronExpression */ @@ -373,4 +394,19 @@ class CronExpressionTest extends \PHPUnit_Framework_TestCase $cron->getPreviousRunDate($now); $this->assertEquals($strNow, $now->format(\DateTime::ISO8601)); } + + /** + * @covers Cron\CronExpression::__construct + * @covers Cron\CronExpression::factory + * @covers Cron\CronExpression::isValidExpression + * @covers Cron\CronExpression::setExpression + * @covers Cron\CronExpression::setPart + */ + public function testValidationWorks() + { + // Invalid. Only four values + $this->assertFalse(CronExpression::isValidExpression('* * * 1')); + // Valid + $this->assertTrue(CronExpression::isValidExpression('* * * * 1')); + } } diff --git a/vendor/mtdowling/cron-expression/tests/Cron/HoursFieldTest.php b/vendor/mtdowling/cron-expression/tests/Cron/HoursFieldTest.php index 48bd135..4a0ce6e 100644 --- a/vendor/mtdowling/cron-expression/tests/Cron/HoursFieldTest.php +++ b/vendor/mtdowling/cron-expression/tests/Cron/HoursFieldTest.php @@ -35,4 +35,40 @@ class HoursFieldTest extends \PHPUnit_Framework_TestCase $f->increment($d, true); $this->assertEquals('2011-03-15 10:59:00', $d->format('Y-m-d H:i:s')); } + + /** + * @covers Cron\HoursField::increment + */ + public function testIncrementsDateWithThirtyMinuteOffsetTimezone() + { + $tz = date_default_timezone_get(); + date_default_timezone_set('America/St_Johns'); + $d = new DateTime('2011-03-15 11:15:00'); + $f = new HoursField(); + $f->increment($d); + $this->assertEquals('2011-03-15 12:00:00', $d->format('Y-m-d H:i:s')); + + $d->setTime(11, 15, 0); + $f->increment($d, true); + $this->assertEquals('2011-03-15 10:59:00', $d->format('Y-m-d H:i:s')); + date_default_timezone_set($tz); + } + + /** + * @covers Cron\HoursField::increment + */ + public function testIncrementDateWithFifteenMinuteOffsetTimezone() + { + $tz = date_default_timezone_get(); + date_default_timezone_set('Asia/Kathmandu'); + $d = new DateTime('2011-03-15 11:15:00'); + $f = new HoursField(); + $f->increment($d); + $this->assertEquals('2011-03-15 12:00:00', $d->format('Y-m-d H:i:s')); + + $d->setTime(11, 15, 0); + $f->increment($d, true); + $this->assertEquals('2011-03-15 10:59:00', $d->format('Y-m-d H:i:s')); + date_default_timezone_set($tz); + } } diff --git a/vendor/mtdowling/cron-expression/tests/Cron/MonthFieldTest.php b/vendor/mtdowling/cron-expression/tests/Cron/MonthFieldTest.php index 82878f8..ea01210 100644 --- a/vendor/mtdowling/cron-expression/tests/Cron/MonthFieldTest.php +++ b/vendor/mtdowling/cron-expression/tests/Cron/MonthFieldTest.php @@ -37,6 +37,25 @@ class MonthFieldTest extends \PHPUnit_Framework_TestCase $this->assertEquals('2011-02-28 23:59:00', $d->format('Y-m-d H:i:s')); } + /** + * @covers Cron\MonthField::increment + */ + public function testIncrementsDateWithThirtyMinuteTimezone() + { + $tz = date_default_timezone_get(); + date_default_timezone_set('America/St_Johns'); + $d = new DateTime('2011-03-31 11:59:59'); + $f = new MonthField(); + $f->increment($d); + $this->assertEquals('2011-04-01 00:00:00', $d->format('Y-m-d H:i:s')); + + $d = new DateTime('2011-03-15 11:15:00'); + $f->increment($d, true); + $this->assertEquals('2011-02-28 23:59:00', $d->format('Y-m-d H:i:s')); + date_default_timezone_set($tz); + } + + /** * @covers Cron\MonthField::increment */ diff --git a/vendor/nesbot/carbon/.editorconfig b/vendor/nesbot/carbon/.editorconfig deleted file mode 100644 index 1533dae..0000000 --- a/vendor/nesbot/carbon/.editorconfig +++ /dev/null @@ -1,14 +0,0 @@ -root = true - -[*] -trim_trailing_whitespace = true -insert_final_newline = true - -[*.php] -charset = utf-8 -indent_style = space -indent_size = 4 - -[composer.json] -indent_style = space -indent_size = 2 diff --git a/vendor/nesbot/carbon/composer.json b/vendor/nesbot/carbon/composer.json index e44aa8d..a31043f 100644 --- a/vendor/nesbot/carbon/composer.json +++ b/vendor/nesbot/carbon/composer.json @@ -8,6 +8,10 @@ "DateTime" ], "homepage": "http://carbon.nesbot.com", + "support": { + "issues": "https://github.com/briannesbitt/Carbon/issues", + "source": "https://github.com/briannesbitt/Carbon" + }, "license": "MIT", "authors": [ { @@ -21,11 +25,16 @@ "symfony/translation": "~2.6|~3.0" }, "require-dev": { - "phpunit/phpunit": "~4.0" + "phpunit/phpunit": "~4.0|~5.0" }, "autoload": { - "psr-0": { - "Carbon": "src" + "psr-4": { + "Carbon\\": "src/Carbon/" + } + }, + "autoload-dev": { + "psr-4": { + "Tests\\": "tests/" } } } diff --git a/vendor/nesbot/carbon/readme.md b/vendor/nesbot/carbon/readme.md index e705936..545bed3 100644 --- a/vendor/nesbot/carbon/readme.md +++ b/vendor/nesbot/carbon/readme.md @@ -1,6 +1,9 @@ # Carbon -[![Latest Stable Version](https://poser.pugx.org/nesbot/carbon/v/stable.png)](https://packagist.org/packages/nesbot/carbon) [![Total Downloads](https://poser.pugx.org/nesbot/carbon/downloads.png)](https://packagist.org/packages/nesbot/carbon) [![Build Status](https://travis-ci.org/briannesbitt/Carbon.svg?branch=master)](https://travis-ci.org/briannesbitt/Carbon) +[![Latest Stable Version](https://poser.pugx.org/nesbot/carbon/v/stable.png)](https://packagist.org/packages/nesbot/carbon) +[![Total Downloads](https://poser.pugx.org/nesbot/carbon/downloads.png)](https://packagist.org/packages/nesbot/carbon) +[![Build Status](https://travis-ci.org/briannesbitt/Carbon.svg?branch=master)](https://travis-ci.org/briannesbitt/Carbon) +[![StyleCI](https://styleci.io/repos/5724990/shield?style=flat)](https://styleci.io/repos/5724990) A simple PHP API extension for DateTime. [http://carbon.nesbot.com](http://carbon.nesbot.com) @@ -24,21 +27,21 @@ Carbon::setTestNow(Carbon::createFromDate(2000, 1, 1)); // comparisons are always done in UTC if (Carbon::now()->gte($worldWillEnd)) { - die(); + die(); } // Phew! Return to normal behaviour Carbon::setTestNow(); if (Carbon::now()->isWeekend()) { - echo 'Party!'; + echo 'Party!'; } echo Carbon::now()->subMinutes(2)->diffForHumans(); // '2 minutes ago' // ... but also does 'from now', 'after' and 'before' // rolling up to seconds, minutes, hours, days, months, years -$daysSinceEpoch = Carbon::createFromTimeStamp(0)->diffInDays(); +$daysSinceEpoch = Carbon::createFromTimestamp(0)->diffInDays(); ``` ## Installation diff --git a/vendor/nesbot/carbon/src/Carbon/Carbon.php b/vendor/nesbot/carbon/src/Carbon/Carbon.php index 4af5b41..2d27616 100644 --- a/vendor/nesbot/carbon/src/Carbon/Carbon.php +++ b/vendor/nesbot/carbon/src/Carbon/Carbon.php @@ -23,14 +23,14 @@ use Symfony\Component\Translation\Loader\ArrayLoader; /** * A simple API extension for DateTime * - * @property integer $year - * @property integer $yearIso - * @property integer $month - * @property integer $day - * @property integer $hour - * @property integer $minute - * @property integer $second - * @property integer $timestamp seconds since the Unix Epoch + * @property int $year + * @property int $yearIso + * @property int $month + * @property int $day + * @property int $hour + * @property int $minute + * @property int $second + * @property int $timestamp seconds since the Unix Epoch * @property DateTimeZone $timezone the current timezone * @property DateTimeZone $tz alias of timezone * @property-read integer $micro @@ -121,7 +121,6 @@ class Carbon extends DateTime */ protected static $toStringFormat = self::DEFAULT_TO_STRING_FORMAT; - /** * First day of week * @@ -162,9 +161,9 @@ class Carbon extends DateTime * * @param DateTimeZone|string|null $object * - * @return DateTimeZone - * * @throws InvalidArgumentException + * + * @return DateTimeZone */ protected static function safeCreateDateTimeZone($object) { @@ -196,8 +195,8 @@ class Carbon extends DateTime * Please see the testing aids section (specifically static::setTestNow()) * for more on the possibility of this constructor returning a test instance. * - * @param string $time - * @param DateTimeZone|string $tz + * @param string|null $time + * @param DateTimeZone|string|null $tz */ public function __construct($time = null, $tz = null) { @@ -210,7 +209,7 @@ class Carbon extends DateTime } //shift the time according to the given time zone - if ($tz !== NULL && $tz != static::getTestNow()->tz) { + if ($tz !== null && $tz !== static::getTestNow()->tz) { $testInstance->setTimezone($tz); } else { $tz = $testInstance->tz; @@ -240,8 +239,8 @@ class Carbon extends DateTime * Carbon::parse('Monday next week')->fn() rather than * (new Carbon('Monday next week'))->fn() * - * @param string $time - * @param DateTimeZone|string $tz + * @param string|null $time + * @param DateTimeZone|string|null $tz * * @return static */ @@ -253,7 +252,7 @@ class Carbon extends DateTime /** * Get a Carbon instance for the current date and time * - * @param DateTimeZone|string $tz + * @param DateTimeZone|string|null $tz * * @return static */ @@ -265,7 +264,7 @@ class Carbon extends DateTime /** * Create a Carbon instance for today * - * @param DateTimeZone|string $tz + * @param DateTimeZone|string|null $tz * * @return static */ @@ -277,7 +276,7 @@ class Carbon extends DateTime /** * Create a Carbon instance for tomorrow * - * @param DateTimeZone|string $tz + * @param DateTimeZone|string|null $tz * * @return static */ @@ -289,7 +288,7 @@ class Carbon extends DateTime /** * Create a Carbon instance for yesterday * - * @param DateTimeZone|string $tz + * @param DateTimeZone|string|null $tz * * @return static */ @@ -305,7 +304,13 @@ class Carbon extends DateTime */ public static function maxValue() { - return static::createFromTimestamp(PHP_INT_MAX); + if (PHP_INT_SIZE === 4) { + // 32 bit (and additionally Windows 64 bit) + return static::createFromTimestamp(PHP_INT_MAX); + } + + // 64 bit + return static::create(9999, 12, 31, 23, 59, 59); } /** @@ -315,7 +320,13 @@ class Carbon extends DateTime */ public static function minValue() { - return static::createFromTimestamp(~PHP_INT_MAX); + if (PHP_INT_SIZE === 4) { + // 32 bit (and additionally Windows 64 bit) + return static::createFromTimestamp(~PHP_INT_MAX); + } + + // 64 bit + return static::create(1, 1, 1, 0, 0, 0); } /** @@ -329,29 +340,29 @@ class Carbon extends DateTime * If $hour is not null then the default values for $minute and $second * will be 0. * - * @param integer $year - * @param integer $month - * @param integer $day - * @param integer $hour - * @param integer $minute - * @param integer $second - * @param DateTimeZone|string $tz + * @param int|null $year + * @param int|null $month + * @param int|null $day + * @param int|null $hour + * @param int|null $minute + * @param int|null $second + * @param DateTimeZone|string|null $tz * * @return static */ public static function create($year = null, $month = null, $day = null, $hour = null, $minute = null, $second = null, $tz = null) { - $year = ($year === null) ? date('Y') : $year; - $month = ($month === null) ? date('n') : $month; - $day = ($day === null) ? date('j') : $day; + $year = $year === null ? date('Y') : $year; + $month = $month === null ? date('n') : $month; + $day = $day === null ? date('j') : $day; if ($hour === null) { $hour = date('G'); - $minute = ($minute === null) ? date('i') : $minute; - $second = ($second === null) ? date('s') : $second; + $minute = $minute === null ? date('i') : $minute; + $second = $second === null ? date('s') : $second; } else { - $minute = ($minute === null) ? 0 : $minute; - $second = ($second === null) ? 0 : $second; + $minute = $minute === null ? 0 : $minute; + $second = $second === null ? 0 : $second; } return static::createFromFormat('Y-n-j G:i:s', sprintf('%s-%s-%s %s:%02s:%02s', $year, $month, $day, $hour, $minute, $second), $tz); @@ -360,10 +371,10 @@ class Carbon extends DateTime /** * Create a Carbon instance from just a date. The time portion is set to now. * - * @param integer $year - * @param integer $month - * @param integer $day - * @param DateTimeZone|string $tz + * @param int|null $year + * @param int|null $month + * @param int|null $day + * @param DateTimeZone|string|null $tz * * @return static */ @@ -375,10 +386,10 @@ class Carbon extends DateTime /** * Create a Carbon instance from just a time. The date portion is set to today. * - * @param integer $hour - * @param integer $minute - * @param integer $second - * @param DateTimeZone|string $tz + * @param int|null $hour + * @param int|null $minute + * @param int|null $second + * @param DateTimeZone|string|null $tz * * @return static */ @@ -390,13 +401,13 @@ class Carbon extends DateTime /** * Create a Carbon instance from a specific format * - * @param string $format - * @param string $time - * @param DateTimeZone|string $tz - * - * @return static + * @param string $format + * @param string $time + * @param DateTimeZone|string|null $tz * * @throws InvalidArgumentException + * + * @return static */ public static function createFromFormat($format, $time, $tz = null) { @@ -417,8 +428,8 @@ class Carbon extends DateTime /** * Create a Carbon instance from a timestamp * - * @param integer $timestamp - * @param DateTimeZone|string $tz + * @param int $timestamp + * @param DateTimeZone|string|null $tz * * @return static */ @@ -430,7 +441,7 @@ class Carbon extends DateTime /** * Create a Carbon instance from an UTC timestamp * - * @param integer $timestamp + * @param int $timestamp * * @return static */ @@ -460,7 +471,7 @@ class Carbon extends DateTime * * @throws InvalidArgumentException * - * @return string|integer|DateTimeZone + * @return string|int|DateTimeZone */ public function __get($name) { @@ -498,13 +509,13 @@ class Carbon extends DateTime return $this->getOffset() / static::SECONDS_PER_MINUTE / static::MINUTES_PER_HOUR; case $name === 'dst': - return $this->format('I') == '1'; + return $this->format('I') === '1'; case $name === 'local': - return $this->offset == $this->copy()->setTimezone(date_default_timezone_get())->offset; + return $this->offset === $this->copy()->setTimezone(date_default_timezone_get())->offset; case $name === 'utc': - return $this->offset == 0; + return $this->offset === 0; case $name === 'timezone' || $name === 'tz': return $this->getTimezone(); @@ -522,7 +533,7 @@ class Carbon extends DateTime * * @param string $name * - * @return boolean + * @return bool */ public function __isset($name) { @@ -538,8 +549,8 @@ class Carbon extends DateTime /** * Set a part of the Carbon object * - * @param string $name - * @param string|integer|DateTimeZone $value + * @param string $name + * @param string|int|DateTimeZone $value * * @throws InvalidArgumentException */ @@ -587,7 +598,7 @@ class Carbon extends DateTime /** * Set the instance's year * - * @param integer $value + * @param int $value * * @return static */ @@ -601,7 +612,7 @@ class Carbon extends DateTime /** * Set the instance's month * - * @param integer $value + * @param int $value * * @return static */ @@ -615,7 +626,7 @@ class Carbon extends DateTime /** * Set the instance's day * - * @param integer $value + * @param int $value * * @return static */ @@ -629,7 +640,7 @@ class Carbon extends DateTime /** * Set the instance's hour * - * @param integer $value + * @param int $value * * @return static */ @@ -643,7 +654,7 @@ class Carbon extends DateTime /** * Set the instance's minute * - * @param integer $value + * @param int $value * * @return static */ @@ -657,7 +668,7 @@ class Carbon extends DateTime /** * Set the instance's second * - * @param integer $value + * @param int $value * * @return static */ @@ -671,12 +682,12 @@ class Carbon extends DateTime /** * Set the date and time all together * - * @param integer $year - * @param integer $month - * @param integer $day - * @param integer $hour - * @param integer $minute - * @param integer $second + * @param int $year + * @param int $month + * @param int $day + * @param int $hour + * @param int $minute + * @param int $second * * @return static */ @@ -685,10 +696,28 @@ class Carbon extends DateTime return $this->setDate($year, $month, $day)->setTime($hour, $minute, $second); } + /** + * Set the time by time string + * + * @param string $time + * + * @return static + */ + public function setTimeFromTimeString($time) + { + $time = explode(":", $time); + + $hour = $time[0]; + $minute = isset($time[1]) ? $time[1] : 0; + $second = isset($time[2]) ? $time[2] : 0; + + return $this->setTime($hour, $minute, $second); + } + /** * Set the instance's timestamp * - * @param integer $value + * @param int $value * * @return static */ @@ -737,8 +766,6 @@ class Carbon extends DateTime return $this; } - - /////////////////////////////////////////////////////////////////// /////////////////////// WEEK SPECIAL DAYS ///////////////////////// /////////////////////////////////////////////////////////////////// @@ -803,7 +830,6 @@ class Carbon extends DateTime static::$weekendDays = $days; } - /////////////////////////////////////////////////////////////////// ///////////////////////// TESTING AIDS //////////////////////////// /////////////////////////////////////////////////////////////////// @@ -822,7 +848,7 @@ class Carbon extends DateTime * To clear the test instance call this method using the default * parameter of null. * - * @param Carbon $testNow + * @param Carbon|null $testNow */ public static function setTestNow(Carbon $testNow = null) { @@ -844,7 +870,7 @@ class Carbon extends DateTime * Determine if there is a valid test instance set. A valid test instance * is anything that is not null. * - * @return boolean true if there is a test instance, otherwise false + * @return bool true if there is a test instance, otherwise false */ public static function hasTestNow() { @@ -857,7 +883,7 @@ class Carbon extends DateTime * * @param string $time * - * @return boolean true if there is a keyword, otherwise false + * @return bool true if there is a keyword, otherwise false */ public static function hasRelativeKeywords($time) { @@ -884,7 +910,7 @@ class Carbon extends DateTime */ protected static function translator() { - if (static::$translator == null) { + if (static::$translator === null) { static::$translator = new Translator('en'); static::$translator->addLoader('array', new ArrayLoader()); static::setLocale('en'); @@ -952,7 +978,7 @@ class Carbon extends DateTime { // Check for Windows to find and replace the %e // modifier correctly - if (strtoupper(substr(PHP_OS, 0, 3)) == 'WIN') { + if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') { $format = preg_replace('#(? and < comparison should be used or <= or >= + * @param Carbon $dt1 + * @param Carbon $dt2 + * @param bool $equal Indicates if a > and < comparison should be used or <= or >= * - * @return boolean + * @return bool */ public function between(Carbon $dt1, Carbon $dt2, $equal = true) { @@ -1243,21 +1268,47 @@ class Carbon extends DateTime if ($equal) { return $this->gte($dt1) && $this->lte($dt2); - } else { - return $this->gt($dt1) && $this->lt($dt2); } + + return $this->gt($dt1) && $this->lt($dt2); + } + + /** + * Get the closest date from the instance. + * + * @param Carbon $dt1 + * @param Carbon $dt2 + * + * @return static + */ + public function closest(Carbon $dt1, Carbon $dt2) + { + return $this->diffInSeconds($dt1) < $this->diffInSeconds($dt2) ? $dt1 : $dt2; + } + + /** + * Get the farthest date from the instance. + * + * @param Carbon $dt1 + * @param Carbon $dt2 + * + * @return static + */ + public function farthest(Carbon $dt1, Carbon $dt2) + { + return $this->diffInSeconds($dt1) > $this->diffInSeconds($dt2) ? $dt1 : $dt2; } /** * Get the minimum instance between a given instance (default now) and the current instance. * - * @param Carbon $dt + * @param Carbon|null $dt * * @return static */ public function min(Carbon $dt = null) { - $dt = ($dt === null) ? static::now($this->tz) : $dt; + $dt = $dt ?: static::now($this->tz); return $this->lt($dt) ? $this : $dt; } @@ -1265,13 +1316,13 @@ class Carbon extends DateTime /** * Get the maximum instance between a given instance (default now) and the current instance. * - * @param Carbon $dt + * @param Carbon|null $dt * * @return static */ public function max(Carbon $dt = null) { - $dt = ($dt === null) ? static::now($this->tz) : $dt; + $dt = $dt ?: static::now($this->tz); return $this->gt($dt) ? $this : $dt; } @@ -1279,7 +1330,7 @@ class Carbon extends DateTime /** * Determines if the instance is a weekday * - * @return boolean + * @return bool */ public function isWeekday() { @@ -1289,7 +1340,7 @@ class Carbon extends DateTime /** * Determines if the instance is a weekend day * - * @return boolean + * @return bool */ public function isWeekend() { @@ -1299,7 +1350,7 @@ class Carbon extends DateTime /** * Determines if the instance is yesterday * - * @return boolean + * @return bool */ public function isYesterday() { @@ -1309,7 +1360,7 @@ class Carbon extends DateTime /** * Determines if the instance is today * - * @return boolean + * @return bool */ public function isToday() { @@ -1319,7 +1370,7 @@ class Carbon extends DateTime /** * Determines if the instance is tomorrow * - * @return boolean + * @return bool */ public function isTomorrow() { @@ -1329,7 +1380,7 @@ class Carbon extends DateTime /** * Determines if the instance is in the future, ie. greater (after) than now * - * @return boolean + * @return bool */ public function isFuture() { @@ -1339,7 +1390,7 @@ class Carbon extends DateTime /** * Determines if the instance is in the past, ie. less (before) than now * - * @return boolean + * @return bool */ public function isPast() { @@ -1349,18 +1400,19 @@ class Carbon extends DateTime /** * Determines if the instance is a leap year * - * @return boolean + * @return bool */ public function isLeapYear() { - return $this->format('L') == '1'; + return $this->format('L') === '1'; } /** * Checks if the passed in date is the same day as the instance current day. * - * @param Carbon $dt - * @return boolean + * @param Carbon $dt + * + * @return bool */ public function isSameDay(Carbon $dt) { @@ -1369,8 +1421,8 @@ class Carbon extends DateTime /** * Checks if this day is a Sunday. - * - * @return boolean + * + * @return bool */ public function isSunday() { @@ -1379,8 +1431,8 @@ class Carbon extends DateTime /** * Checks if this day is a Monday. - * - * @return boolean + * + * @return bool */ public function isMonday() { @@ -1389,8 +1441,8 @@ class Carbon extends DateTime /** * Checks if this day is a Tuesday. - * - * @return boolean + * + * @return bool */ public function isTuesday() { @@ -1399,8 +1451,8 @@ class Carbon extends DateTime /** * Checks if this day is a Wednesday. - * - * @return boolean + * + * @return bool */ public function isWednesday() { @@ -1409,8 +1461,8 @@ class Carbon extends DateTime /** * Checks if this day is a Thursday. - * - * @return boolean + * + * @return bool */ public function isThursday() { @@ -1419,8 +1471,8 @@ class Carbon extends DateTime /** * Checks if this day is a Friday. - * - * @return boolean + * + * @return bool */ public function isFriday() { @@ -1429,14 +1481,14 @@ class Carbon extends DateTime /** * Checks if this day is a Saturday. - * - * @return boolean + * + * @return bool */ public function isSaturday() { return $this->dayOfWeek === static::SATURDAY; } - + /////////////////////////////////////////////////////////////////// /////////////////// ADDITIONS AND SUBTRACTIONS //////////////////// /////////////////////////////////////////////////////////////////// @@ -1445,7 +1497,7 @@ class Carbon extends DateTime * Add years to the instance. Positive $value travel forward while * negative $value travel into the past. * - * @param integer $value + * @param int $value * * @return static */ @@ -1457,7 +1509,7 @@ class Carbon extends DateTime /** * Add a year to the instance * - * @param integer $value + * @param int $value * * @return static */ @@ -1469,7 +1521,7 @@ class Carbon extends DateTime /** * Remove a year from the instance * - * @param integer $value + * @param int $value * * @return static */ @@ -1481,7 +1533,7 @@ class Carbon extends DateTime /** * Remove years from the instance. * - * @param integer $value + * @param int $value * * @return static */ @@ -1494,7 +1546,7 @@ class Carbon extends DateTime * Add months to the instance. Positive $value travels forward while * negative $value travels into the past. * - * @param integer $value + * @param int $value * * @return static */ @@ -1506,7 +1558,7 @@ class Carbon extends DateTime /** * Add a month to the instance * - * @param integer $value + * @param int $value * * @return static */ @@ -1518,7 +1570,7 @@ class Carbon extends DateTime /** * Remove a month from the instance * - * @param integer $value + * @param int $value * * @return static */ @@ -1530,7 +1582,7 @@ class Carbon extends DateTime /** * Remove months from the instance * - * @param integer $value + * @param int $value * * @return static */ @@ -1543,7 +1595,7 @@ class Carbon extends DateTime * Add months without overflowing to the instance. Positive $value * travels forward while negative $value travels into the past. * - * @param integer $value + * @param int $value * * @return static */ @@ -1551,7 +1603,7 @@ class Carbon extends DateTime { $date = $this->copy()->addMonths($value); - if ($date->day != $this->day) { + if ($date->day !== $this->day) { $date->day(1)->subMonth()->day($date->daysInMonth); } @@ -1561,7 +1613,7 @@ class Carbon extends DateTime /** * Add a month with no overflow to the instance * - * @param integer $value + * @param int $value * * @return static */ @@ -1573,7 +1625,7 @@ class Carbon extends DateTime /** * Remove a month with no overflow from the instance * - * @param integer $value + * @param int $value * * @return static */ @@ -1585,7 +1637,7 @@ class Carbon extends DateTime /** * Remove months with no overflow from the instance * - * @param integer $value + * @param int $value * * @return static */ @@ -1598,7 +1650,7 @@ class Carbon extends DateTime * Add days to the instance. Positive $value travels forward while * negative $value travels into the past. * - * @param integer $value + * @param int $value * * @return static */ @@ -1610,7 +1662,7 @@ class Carbon extends DateTime /** * Add a day to the instance * - * @param integer $value + * @param int $value * * @return static */ @@ -1622,7 +1674,7 @@ class Carbon extends DateTime /** * Remove a day from the instance * - * @param integer $value + * @param int $value * * @return static */ @@ -1634,7 +1686,7 @@ class Carbon extends DateTime /** * Remove days from the instance * - * @param integer $value + * @param int $value * * @return static */ @@ -1647,7 +1699,7 @@ class Carbon extends DateTime * Add weekdays to the instance. Positive $value travels forward while * negative $value travels into the past. * - * @param integer $value + * @param int $value * * @return static */ @@ -1659,7 +1711,7 @@ class Carbon extends DateTime /** * Add a weekday to the instance * - * @param integer $value + * @param int $value * * @return static */ @@ -1671,7 +1723,7 @@ class Carbon extends DateTime /** * Remove a weekday from the instance * - * @param integer $value + * @param int $value * * @return static */ @@ -1683,7 +1735,7 @@ class Carbon extends DateTime /** * Remove weekdays from the instance * - * @param integer $value + * @param int $value * * @return static */ @@ -1696,7 +1748,7 @@ class Carbon extends DateTime * Add weeks to the instance. Positive $value travels forward while * negative $value travels into the past. * - * @param integer $value + * @param int $value * * @return static */ @@ -1708,7 +1760,7 @@ class Carbon extends DateTime /** * Add a week to the instance * - * @param integer $value + * @param int $value * * @return static */ @@ -1720,7 +1772,7 @@ class Carbon extends DateTime /** * Remove a week from the instance * - * @param integer $value + * @param int $value * * @return static */ @@ -1732,7 +1784,7 @@ class Carbon extends DateTime /** * Remove weeks to the instance * - * @param integer $value + * @param int $value * * @return static */ @@ -1745,7 +1797,7 @@ class Carbon extends DateTime * Add hours to the instance. Positive $value travels forward while * negative $value travels into the past. * - * @param integer $value + * @param int $value * * @return static */ @@ -1757,7 +1809,7 @@ class Carbon extends DateTime /** * Add an hour to the instance * - * @param integer $value + * @param int $value * * @return static */ @@ -1769,7 +1821,7 @@ class Carbon extends DateTime /** * Remove an hour from the instance * - * @param integer $value + * @param int $value * * @return static */ @@ -1781,7 +1833,7 @@ class Carbon extends DateTime /** * Remove hours from the instance * - * @param integer $value + * @param int $value * * @return static */ @@ -1794,7 +1846,7 @@ class Carbon extends DateTime * Add minutes to the instance. Positive $value travels forward while * negative $value travels into the past. * - * @param integer $value + * @param int $value * * @return static */ @@ -1806,7 +1858,7 @@ class Carbon extends DateTime /** * Add a minute to the instance * - * @param integer $value + * @param int $value * * @return static */ @@ -1818,7 +1870,7 @@ class Carbon extends DateTime /** * Remove a minute from the instance * - * @param integer $value + * @param int $value * * @return static */ @@ -1830,7 +1882,7 @@ class Carbon extends DateTime /** * Remove minutes from the instance * - * @param integer $value + * @param int $value * * @return static */ @@ -1843,7 +1895,7 @@ class Carbon extends DateTime * Add seconds to the instance. Positive $value travels forward while * negative $value travels into the past. * - * @param integer $value + * @param int $value * * @return static */ @@ -1855,7 +1907,7 @@ class Carbon extends DateTime /** * Add a second to the instance * - * @param integer $value + * @param int $value * * @return static */ @@ -1867,7 +1919,7 @@ class Carbon extends DateTime /** * Remove a second from the instance * - * @param integer $value + * @param int $value * * @return static */ @@ -1879,7 +1931,7 @@ class Carbon extends DateTime /** * Remove seconds from the instance * - * @param integer $value + * @param int $value * * @return static */ @@ -1895,14 +1947,14 @@ class Carbon extends DateTime /** * Get the difference in years * - * @param Carbon $dt - * @param boolean $abs Get the absolute of the difference + * @param Carbon|null $dt + * @param bool $abs Get the absolute of the difference * - * @return integer + * @return int */ public function diffInYears(Carbon $dt = null, $abs = true) { - $dt = ($dt === null) ? static::now($this->tz) : $dt; + $dt = $dt ?: static::now($this->tz); return (int) $this->diff($dt, $abs)->format('%r%y'); } @@ -1910,14 +1962,14 @@ class Carbon extends DateTime /** * Get the difference in months * - * @param Carbon $dt - * @param boolean $abs Get the absolute of the difference + * @param Carbon|null $dt + * @param bool $abs Get the absolute of the difference * - * @return integer + * @return int */ public function diffInMonths(Carbon $dt = null, $abs = true) { - $dt = ($dt === null) ? static::now($this->tz) : $dt; + $dt = $dt ?: static::now($this->tz); return $this->diffInYears($dt, $abs) * static::MONTHS_PER_YEAR + (int) $this->diff($dt, $abs)->format('%r%m'); } @@ -1925,10 +1977,10 @@ class Carbon extends DateTime /** * Get the difference in weeks * - * @param Carbon $dt - * @param boolean $abs Get the absolute of the difference + * @param Carbon|null $dt + * @param bool $abs Get the absolute of the difference * - * @return integer + * @return int */ public function diffInWeeks(Carbon $dt = null, $abs = true) { @@ -1938,14 +1990,14 @@ class Carbon extends DateTime /** * Get the difference in days * - * @param Carbon $dt - * @param boolean $abs Get the absolute of the difference + * @param Carbon|null $dt + * @param bool $abs Get the absolute of the difference * - * @return integer + * @return int */ public function diffInDays(Carbon $dt = null, $abs = true) { - $dt = ($dt === null) ? static::now($this->tz) : $dt; + $dt = $dt ?: static::now($this->tz); return (int) $this->diff($dt, $abs)->format('%r%a'); } @@ -1953,9 +2005,9 @@ class Carbon extends DateTime /** * Get the difference in days using a filter closure * - * @param Closure $callback - * @param Carbon $dt - * @param boolean $abs Get the absolute of the difference + * @param Closure $callback + * @param Carbon|null $dt + * @param bool $abs Get the absolute of the difference * * @return int */ @@ -1967,9 +2019,9 @@ class Carbon extends DateTime /** * Get the difference in hours using a filter closure * - * @param Closure $callback - * @param Carbon $dt - * @param boolean $abs Get the absolute of the difference + * @param Closure $callback + * @param Carbon|null $dt + * @param bool $abs Get the absolute of the difference * * @return int */ @@ -1981,17 +2033,17 @@ class Carbon extends DateTime /** * Get the difference by the given interval using a filter closure * - * @param CarbonInterval $ci An interval to traverse by - * @param Closure $callback - * @param Carbon $dt - * @param boolean $abs Get the absolute of the difference + * @param CarbonInterval $ci An interval to traverse by + * @param Closure $callback + * @param Carbon|null $dt + * @param bool $abs Get the absolute of the difference * * @return int */ public function diffFiltered(CarbonInterval $ci, Closure $callback, Carbon $dt = null, $abs = true) { $start = $this; - $end = ($dt === null) ? static::now($this->tz) : $dt; + $end = $dt ?: static::now($this->tz); $inverse = false; if ($end < $start) { @@ -2013,8 +2065,8 @@ class Carbon extends DateTime /** * Get the difference in weekdays * - * @param Carbon $dt - * @param boolean $abs Get the absolute of the difference + * @param Carbon|null $dt + * @param bool $abs Get the absolute of the difference * * @return int */ @@ -2028,8 +2080,8 @@ class Carbon extends DateTime /** * Get the difference in weekend days using a filter * - * @param Carbon $dt - * @param boolean $abs Get the absolute of the difference + * @param Carbon|null $dt + * @param bool $abs Get the absolute of the difference * * @return int */ @@ -2043,10 +2095,10 @@ class Carbon extends DateTime /** * Get the difference in hours * - * @param Carbon $dt - * @param boolean $abs Get the absolute of the difference + * @param Carbon|null $dt + * @param bool $abs Get the absolute of the difference * - * @return integer + * @return int */ public function diffInHours(Carbon $dt = null, $abs = true) { @@ -2056,10 +2108,10 @@ class Carbon extends DateTime /** * Get the difference in minutes * - * @param Carbon $dt - * @param boolean $abs Get the absolute of the difference + * @param Carbon|null $dt + * @param bool $abs Get the absolute of the difference * - * @return integer + * @return int */ public function diffInMinutes(Carbon $dt = null, $abs = true) { @@ -2069,14 +2121,14 @@ class Carbon extends DateTime /** * Get the difference in seconds * - * @param Carbon $dt - * @param boolean $abs Get the absolute of the difference + * @param Carbon|null $dt + * @param bool $abs Get the absolute of the difference * - * @return integer + * @return int */ public function diffInSeconds(Carbon $dt = null, $abs = true) { - $dt = ($dt === null) ? static::now($this->tz) : $dt; + $dt = $dt ?: static::now($this->tz); $value = $dt->getTimestamp() - $this->getTimestamp(); return $abs ? abs($value) : $value; @@ -2085,7 +2137,7 @@ class Carbon extends DateTime /** * The number of seconds since midnight. * - * @return integer + * @return int */ public function secondsSinceMidnight() { @@ -2095,7 +2147,7 @@ class Carbon extends DateTime /** * The number of seconds until 23:23:59. * - * @return integer + * @return int */ public function secondsUntilEndOfDay() { @@ -2121,8 +2173,8 @@ class Carbon extends DateTime * 1 hour after * 5 months after * - * @param Carbon $other - * @param bool $absolute removes time difference modifiers ago, after, etc + * @param Carbon|null $other + * @param bool $absolute removes time difference modifiers ago, after, etc * * @return string */ @@ -2172,7 +2224,7 @@ class Carbon extends DateTime break; } - if ($count == 0) { + if ($count === 0) { $count = 1; } @@ -2306,7 +2358,7 @@ class Carbon extends DateTime */ public function startOfWeek() { - if ($this->dayOfWeek != static::$weekStartsAt) { + if ($this->dayOfWeek !== static::$weekStartsAt) { $this->previous(static::$weekStartsAt); } @@ -2320,7 +2372,7 @@ class Carbon extends DateTime */ public function endOfWeek() { - if ($this->dayOfWeek != static::$weekEndsAt) { + if ($this->dayOfWeek !== static::$weekEndsAt) { $this->next(static::$weekEndsAt); } @@ -2328,14 +2380,14 @@ class Carbon extends DateTime } /** - * Modify to the next occurence of a given day of the week. - * If no dayOfWeek is provided, modify to the next occurence + * Modify to the next occurrence of a given day of the week. + * If no dayOfWeek is provided, modify to the next occurrence * of the current day of the week. Use the supplied consts * to indicate the desired dayOfWeek, ex. static::MONDAY. * - * @param int $dayOfWeek + * @param int|null $dayOfWeek * - * @return mixed + * @return static */ public function next($dayOfWeek = null) { @@ -2347,14 +2399,14 @@ class Carbon extends DateTime } /** - * Modify to the previous occurence of a given day of the week. - * If no dayOfWeek is provided, modify to the previous occurence + * Modify to the previous occurrence of a given day of the week. + * If no dayOfWeek is provided, modify to the previous occurrence * of the current day of the week. Use the supplied consts * to indicate the desired dayOfWeek, ex. static::MONDAY. * - * @param int $dayOfWeek + * @param int|null $dayOfWeek * - * @return mixed + * @return static */ public function previous($dayOfWeek = null) { @@ -2366,14 +2418,14 @@ class Carbon extends DateTime } /** - * Modify to the first occurence of a given day of the week + * Modify to the first occurrence of a given day of the week * in the current month. If no dayOfWeek is provided, modify to the * first day of the current month. Use the supplied consts * to indicate the desired dayOfWeek, ex. static::MONDAY. * - * @param int $dayOfWeek + * @param int|null $dayOfWeek * - * @return mixed + * @return static */ public function firstOfMonth($dayOfWeek = null) { @@ -2387,14 +2439,14 @@ class Carbon extends DateTime } /** - * Modify to the last occurence of a given day of the week + * Modify to the last occurrence of a given day of the week * in the current month. If no dayOfWeek is provided, modify to the * last day of the current month. Use the supplied consts * to indicate the desired dayOfWeek, ex. static::MONDAY. * - * @param int $dayOfWeek + * @param int|null $dayOfWeek * - * @return mixed + * @return static */ public function lastOfMonth($dayOfWeek = null) { @@ -2408,8 +2460,8 @@ class Carbon extends DateTime } /** - * Modify to the given occurence of a given day of the week - * in the current month. If the calculated occurence is outside the scope + * Modify to the given occurrence of a given day of the week + * in the current month. If the calculated occurrence is outside the scope * of the current month, then return false and no modifications are made. * Use the supplied consts to indicate the desired dayOfWeek, ex. static::MONDAY. * @@ -2424,18 +2476,18 @@ class Carbon extends DateTime $check = $dt->format('Y-m'); $dt->modify('+'.$nth.' '.static::$days[$dayOfWeek]); - return ($dt->format('Y-m') === $check) ? $this->modify($dt) : false; + return $dt->format('Y-m') === $check ? $this->modify($dt) : false; } /** - * Modify to the first occurence of a given day of the week + * Modify to the first occurrence of a given day of the week * in the current quarter. If no dayOfWeek is provided, modify to the * first day of the current quarter. Use the supplied consts * to indicate the desired dayOfWeek, ex. static::MONDAY. * - * @param int $dayOfWeek + * @param int|null $dayOfWeek * - * @return mixed + * @return static */ public function firstOfQuarter($dayOfWeek = null) { @@ -2443,14 +2495,14 @@ class Carbon extends DateTime } /** - * Modify to the last occurence of a given day of the week + * Modify to the last occurrence of a given day of the week * in the current quarter. If no dayOfWeek is provided, modify to the * last day of the current quarter. Use the supplied consts * to indicate the desired dayOfWeek, ex. static::MONDAY. * - * @param int $dayOfWeek + * @param int|null $dayOfWeek * - * @return mixed + * @return static */ public function lastOfQuarter($dayOfWeek = null) { @@ -2458,8 +2510,8 @@ class Carbon extends DateTime } /** - * Modify to the given occurence of a given day of the week - * in the current quarter. If the calculated occurence is outside the scope + * Modify to the given occurrence of a given day of the week + * in the current quarter. If the calculated occurrence is outside the scope * of the current quarter, then return false and no modifications are made. * Use the supplied consts to indicate the desired dayOfWeek, ex. static::MONDAY. * @@ -2471,22 +2523,22 @@ class Carbon extends DateTime public function nthOfQuarter($nth, $dayOfWeek) { $dt = $this->copy()->day(1)->month($this->quarter * 3); - $last_month = $dt->month; + $lastMonth = $dt->month; $year = $dt->year; $dt->firstOfQuarter()->modify('+'.$nth.' '.static::$days[$dayOfWeek]); - return ($last_month < $dt->month || $year !== $dt->year) ? false : $this->modify($dt); + return ($lastMonth < $dt->month || $year !== $dt->year) ? false : $this->modify($dt); } /** - * Modify to the first occurence of a given day of the week + * Modify to the first occurrence of a given day of the week * in the current year. If no dayOfWeek is provided, modify to the * first day of the current year. Use the supplied consts * to indicate the desired dayOfWeek, ex. static::MONDAY. * - * @param int $dayOfWeek + * @param int|null $dayOfWeek * - * @return mixed + * @return static */ public function firstOfYear($dayOfWeek = null) { @@ -2494,14 +2546,14 @@ class Carbon extends DateTime } /** - * Modify to the last occurence of a given day of the week + * Modify to the last occurrence of a given day of the week * in the current year. If no dayOfWeek is provided, modify to the * last day of the current year. Use the supplied consts * to indicate the desired dayOfWeek, ex. static::MONDAY. * - * @param int $dayOfWeek + * @param int|null $dayOfWeek * - * @return mixed + * @return static */ public function lastOfYear($dayOfWeek = null) { @@ -2509,8 +2561,8 @@ class Carbon extends DateTime } /** - * Modify to the given occurence of a given day of the week - * in the current year. If the calculated occurence is outside the scope + * Modify to the given occurrence of a given day of the week + * in the current year. If the calculated occurrence is outside the scope * of the current year, then return false and no modifications are made. * Use the supplied consts to indicate the desired dayOfWeek, ex. static::MONDAY. * @@ -2523,19 +2575,19 @@ class Carbon extends DateTime { $dt = $this->copy()->firstOfYear()->modify('+'.$nth.' '.static::$days[$dayOfWeek]); - return $this->year == $dt->year ? $this->modify($dt) : false; + return $this->year === $dt->year ? $this->modify($dt) : false; } /** * Modify the current instance to the average of a given instance (default now) and the current instance. * - * @param Carbon $dt + * @param Carbon|null $dt * * @return static */ public function average(Carbon $dt = null) { - $dt = ($dt === null) ? static::now($this->tz) : $dt; + $dt = $dt ?: static::now($this->tz); return $this->addSeconds((int) ($this->diffInSeconds($dt, false) / 2)); } @@ -2543,12 +2595,14 @@ class Carbon extends DateTime /** * Check if its the birthday. Compares the date/month values of the two dates. * - * @param Carbon $dt + * @param Carbon|null $dt The instance to compare with or null to use current day. * - * @return boolean + * @return bool */ - public function isBirthday(Carbon $dt) + public function isBirthday(Carbon $dt = null) { + $dt = $dt ?: static::now($this->tz); + return $this->format('md') === $dt->format('md'); } } diff --git a/vendor/nesbot/carbon/src/Carbon/CarbonInterval.php b/vendor/nesbot/carbon/src/Carbon/CarbonInterval.php index 27f8627..05f00a4 100644 --- a/vendor/nesbot/carbon/src/Carbon/CarbonInterval.php +++ b/vendor/nesbot/carbon/src/Carbon/CarbonInterval.php @@ -22,13 +22,13 @@ use Symfony\Component\Translation\Loader\ArrayLoader; * The implemenation provides helpers to handle weeks but only days are saved. * Weeks are calculated based on the total days of the current instance. * - * @property integer $years Total years of the current interval. - * @property integer $months Total months of the current interval. - * @property integer $weeks Total weeks of the current interval calculated from the days. - * @property integer $dayz Total days of the current interval (weeks * 7 + days). - * @property integer $hours Total hours of the current interval. - * @property integer $minutes Total minutes of the current interval. - * @property integer $seconds Total seconds of the current interval. + * @property int $years Total years of the current interval. + * @property int $months Total months of the current interval. + * @property int $weeks Total weeks of the current interval calculated from the days. + * @property int $dayz Total days of the current interval (weeks * 7 + days). + * @property int $hours Total hours of the current interval. + * @property int $minutes Total minutes of the current interval. + * @property int $seconds Total seconds of the current interval. * * @property-read integer $dayzExcludeWeeks Total days remaining in the final week of the current instance (days % 7). * @property-read integer $daysExcludeWeeks alias of dayzExcludeWeeks @@ -48,7 +48,6 @@ use Symfony\Component\Translation\Loader\ArrayLoader; * @method static CarbonInterval minute($minutes = 1) Alias for minutes() * @method static CarbonInterval seconds($seconds = 1) Create instance specifying a number of seconds. * @method static CarbonInterval second($seconds = 1) Alias for seconds() - * * @method CarbonInterval years() years($years = 1) Set the years portion of the current interval. * @method CarbonInterval year() year($years = 1) Alias for years(). * @method CarbonInterval months() months($months = 1) Set the months portion of the current interval. @@ -97,11 +96,11 @@ class CarbonInterval extends DateInterval * * @param DateInterval $interval * - * @return boolean + * @return bool */ private static function wasCreatedFromDiff(DateInterval $interval) { - return ($interval->days !== false && $interval->days !== static::PHP_DAYS_FALSE); + return $interval->days !== false && $interval->days !== static::PHP_DAYS_FALSE; } /////////////////////////////////////////////////////////////////// @@ -111,13 +110,13 @@ class CarbonInterval extends DateInterval /** * Create a new CarbonInterval instance. * - * @param integer $years - * @param integer $months - * @param integer $weeks - * @param integer $days - * @param integer $hours - * @param integer $minutes - * @param integer $seconds + * @param int $years + * @param int $months + * @param int $weeks + * @param int $days + * @param int $hours + * @param int $minutes + * @param int $seconds */ public function __construct($years = 1, $months = null, $weeks = null, $days = null, $hours = null, $minutes = null, $seconds = null) { @@ -130,7 +129,7 @@ class CarbonInterval extends DateInterval $specDays += $weeks > 0 ? $weeks * Carbon::DAYS_PER_WEEK : 0; $specDays += $days > 0 ? $days : 0; - $spec .= ($specDays > 0) ? $specDays.static::PERIOD_DAYS : ''; + $spec .= $specDays > 0 ? $specDays.static::PERIOD_DAYS : ''; if ($hours > 0 || $minutes > 0 || $seconds > 0) { $spec .= static::PERIOD_TIME_PREFIX; @@ -139,6 +138,11 @@ class CarbonInterval extends DateInterval $spec .= $seconds > 0 ? $seconds.static::PERIOD_SECONDS : ''; } + if ($spec === static::PERIOD_PREFIX) { + // Allow the zero interval. + $spec .= '0'.static::PERIOD_YEARS; + } + parent::__construct($spec); } @@ -148,13 +152,13 @@ class CarbonInterval extends DateInterval * syntax as it allows you to do CarbonInterval::create(1)->fn() rather than * (new CarbonInterval(1))->fn(). * - * @param integer $years - * @param integer $months - * @param integer $weeks - * @param integer $days - * @param integer $hours - * @param integer $minutes - * @param integer $seconds + * @param int $years + * @param int $months + * @param int $weeks + * @param int $days + * @param int $hours + * @param int $minutes + * @param int $seconds * * @return static */ @@ -170,13 +174,13 @@ class CarbonInterval extends DateInterval * have the same names. * * @param string $name - * @param array $args + * @param array $args * * @return static */ public static function __callStatic($name, $args) { - $arg = count($args) == 0 ? 1 : $args[0]; + $arg = count($args) === 0 ? 1 : $args[0]; switch ($name) { case 'years': @@ -230,6 +234,7 @@ class CarbonInterval extends DateInterval $instance = new static($di->y, $di->m, 0, $di->d, $di->h, $di->i, $di->s); $instance->invert = $di->invert; $instance->days = $di->days; + return $instance; } @@ -244,7 +249,7 @@ class CarbonInterval extends DateInterval */ protected static function translator() { - if (static::$translator == null) { + if (static::$translator === null) { static::$translator = new Translator('en'); static::$translator->addLoader('array', new ArrayLoader()); static::setLocale('en'); @@ -307,7 +312,7 @@ class CarbonInterval extends DateInterval * * @throws InvalidArgumentException * - * @return integer + * @return int */ public function __get($name) { @@ -346,7 +351,7 @@ class CarbonInterval extends DateInterval * Set a part of the CarbonInterval object * * @param string $name - * @param integer $val + * @param int $val * * @throws InvalidArgumentException */ @@ -387,13 +392,14 @@ class CarbonInterval extends DateInterval * Allow setting of weeks and days to be cumulative. * * @param int $weeks Number of weeks to set - * @param int $days Number of days to set + * @param int $days Number of days to set * * @return static */ public function weeksAndDays($weeks, $days) { $this->dayz = ($weeks * Carbon::DAYS_PER_WEEK) + $days; + return $this; } @@ -404,13 +410,13 @@ class CarbonInterval extends DateInterval * have the same names. * * @param string $name - * @param array $args + * @param array $args * * @return static */ public function __call($name, $args) { - $arg = count($args) == 0 ? 1 : $args[0]; + $arg = count($args) === 0 ? 1 : $args[0]; switch ($name) { case 'years': @@ -491,25 +497,25 @@ class CarbonInterval extends DateInterval } /** - * Add the passed interval to the current instance - * - * @param DateInterval $interval - * - * @return static - */ + * Add the passed interval to the current instance + * + * @param DateInterval $interval + * + * @return static + */ public function add(DateInterval $interval) { - $sign = ($interval->invert === 1) ? -1 : 1; + $sign = $interval->invert === 1 ? -1 : 1; if (static::wasCreatedFromDiff($interval)) { - $this->dayz = $this->dayz + ($interval->days * $sign); + $this->dayz = $this->dayz + $interval->days * $sign; } else { - $this->years = $this->years + ($interval->y * $sign); - $this->months = $this->months + ($interval->m * $sign); - $this->dayz = $this->dayz + ($interval->d * $sign); - $this->hours = $this->hours + ($interval->h * $sign); - $this->minutes = $this->minutes + ($interval->i * $sign); - $this->seconds = $this->seconds + ($interval->s * $sign); + $this->years = $this->years + $interval->y * $sign; + $this->months = $this->months + $interval->m * $sign; + $this->dayz = $this->dayz + $interval->d * $sign; + $this->hours = $this->hours + $interval->h * $sign; + $this->minutes = $this->minutes + $interval->i * $sign; + $this->seconds = $this->seconds + $interval->s * $sign; } return $this; diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/ar.php b/vendor/nesbot/carbon/src/Carbon/Lang/ar.php index 610e064..76b2772 100644 --- a/vendor/nesbot/carbon/src/Carbon/Lang/ar.php +++ b/vendor/nesbot/carbon/src/Carbon/Lang/ar.php @@ -11,20 +11,19 @@ /** * Translation messages. See http://symfony.com/doc/current/book/translation.html * for possible formats. - * */ /** * Extracted from https://github.com/jenssegers/laravel-date/blob/master/src/lang/ar/date.php */ return array( - 'year' => '{0}سنة|{1}سنة|{2}سنتين|[3,10]:count سنوات|[11,Inf] سنة', - 'month' => '{0}شهر|{1}شهر|{2}شهرين|[3,10]:count أشهر|[11,Inf] شهر', - 'week' => '{0}أسبوع|{1}أسبوع|{2}أسبوعين|[3,10]:count أسابيع|[11,Inf] أسبوع', + 'year' => '{0}سنة|{1}سنة|{2}سنتين|[3,10]:count سنوات|[11,Inf]:count سنة', + 'month' => '{0}شهر|{1} شهر|{2}شهرين|[3,10]:count أشهر|[11,Inf]:count شهر', + 'week' => '{0}إسبوع|{1}إسبوع|{2}إسبوعين|[3,10]:count أسابيع|[11,Inf]:count إسبوع', 'day' => '{0}يوم|{1}يوم|{2}يومين|[3,10]:count أيام|[11,Inf] يوم', - 'hour' => '{0}ساعة|{1}ساعة|{2}ساعتين|[3,10]:count ساعات|[11,Inf] ساعة', + 'hour' => '{0}ساعة|{1}ساعة|{2}ساعتين|[3,10]:count ساعات|[11,Inf]:count ساعة', 'minute' => '{0}دقيقة|{1}دقيقة|{2}دقيقتين|[3,10]:count دقائق|[11,Inf]:count دقيقة', - 'second' => '{0}ثانية|{1}ثانية|{2}ثانيتين|[3,10]:count ثوان|[11,Inf] ثانية', + 'second' => '{0}ثانية|{1}ثانية|{2}ثانيتين|[3,10]:count ثوان|[11,Inf]:count ثانية', 'ago' => 'منذ :time', 'from_now' => 'من الآن :time', 'after' => 'بعد :time', diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/az.php b/vendor/nesbot/carbon/src/Carbon/Lang/az.php index 6202be9..455d262 100644 --- a/vendor/nesbot/carbon/src/Carbon/Lang/az.php +++ b/vendor/nesbot/carbon/src/Carbon/Lang/az.php @@ -10,9 +10,8 @@ /** * Translation messages. See http://symfony.com/doc/current/book/translation.html * for possible formats. - * */ - /** +/** * Extracted from https://github.com/The-Hasanov/laravel-date/blob/1006f37c431178b5c7219d02c93579c9690ae546/src/Lang/az.php */ return array( diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/bg.php b/vendor/nesbot/carbon/src/Carbon/Lang/bg.php index 7a262a7..d70d780 100644 --- a/vendor/nesbot/carbon/src/Carbon/Lang/bg.php +++ b/vendor/nesbot/carbon/src/Carbon/Lang/bg.php @@ -11,7 +11,6 @@ /** * Translation messages. See http://symfony.com/doc/current/book/translation.html * for possible formats. - * */ /** * Extracted from https://github.com/jenssegers/laravel-date/blob/master/src/lang/bg/date.php diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/bn.php b/vendor/nesbot/carbon/src/Carbon/Lang/bn.php index 6a31e53..41357cd 100644 --- a/vendor/nesbot/carbon/src/Carbon/Lang/bn.php +++ b/vendor/nesbot/carbon/src/Carbon/Lang/bn.php @@ -10,7 +10,6 @@ /** * Translation messages. See http://symfony.com/doc/current/book/translation.html * for possible formats. - * */ /** * Extracted from https://github.com/jenssegers/laravel-date/blob/master/src/lang/eu/date.php diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/ca.php b/vendor/nesbot/carbon/src/Carbon/Lang/ca.php index 95e04e4..8145161 100644 --- a/vendor/nesbot/carbon/src/Carbon/Lang/ca.php +++ b/vendor/nesbot/carbon/src/Carbon/Lang/ca.php @@ -10,7 +10,6 @@ /** * Translation messages. See http://symfony.com/doc/current/book/translation.html * for possible formats. - * */ /** * Extracted from https://github.com/jenssegers/laravel-date/blob/master/src/lang/ca/date.php diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/cs.php b/vendor/nesbot/carbon/src/Carbon/Lang/cs.php index d8890c4..26a78b3 100644 --- a/vendor/nesbot/carbon/src/Carbon/Lang/cs.php +++ b/vendor/nesbot/carbon/src/Carbon/Lang/cs.php @@ -10,7 +10,6 @@ /** * Translation messages. See http://symfony.com/doc/current/book/translation.html * for possible formats. - * */ /** * Extracted from https://github.com/jenssegers/laravel-date/blob/master/src/lang/cs/date.php diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/da.php b/vendor/nesbot/carbon/src/Carbon/Lang/da.php index 4586fad..d5c6a0a 100644 --- a/vendor/nesbot/carbon/src/Carbon/Lang/da.php +++ b/vendor/nesbot/carbon/src/Carbon/Lang/da.php @@ -12,7 +12,6 @@ /** * Translation messages. See http://symfony.com/doc/current/book/translation.html * for possible formats. - * */ return array( 'year' => '1 år|:count år', diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/de.php b/vendor/nesbot/carbon/src/Carbon/Lang/de.php index 7586b32..bf0af71 100644 --- a/vendor/nesbot/carbon/src/Carbon/Lang/de.php +++ b/vendor/nesbot/carbon/src/Carbon/Lang/de.php @@ -13,7 +13,6 @@ /** * Translation messages. See http://symfony.com/doc/current/book/translation.html * for possible formats. - * */ return array( 'year' => '1 Jahr|:count Jahre', diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/el.php b/vendor/nesbot/carbon/src/Carbon/Lang/el.php index 0cc34e6..1ecb271 100644 --- a/vendor/nesbot/carbon/src/Carbon/Lang/el.php +++ b/vendor/nesbot/carbon/src/Carbon/Lang/el.php @@ -10,7 +10,6 @@ /** * Translation messages. See http://symfony.com/doc/current/book/translation.html * for possible formats. - * */ /** * Extracted from https://github.com/jenssegers/laravel-date/blob/master/src/lang/el/date.php diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/en.php b/vendor/nesbot/carbon/src/Carbon/Lang/en.php index 6b682b5..e0ad273 100644 --- a/vendor/nesbot/carbon/src/Carbon/Lang/en.php +++ b/vendor/nesbot/carbon/src/Carbon/Lang/en.php @@ -12,7 +12,6 @@ /** * Translation messages. See http://symfony.com/doc/current/book/translation.html * for possible formats. - * */ return array( 'year' => '1 year|:count years', diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/eo.php b/vendor/nesbot/carbon/src/Carbon/Lang/eo.php index 34cd0ee..3175a27 100644 --- a/vendor/nesbot/carbon/src/Carbon/Lang/eo.php +++ b/vendor/nesbot/carbon/src/Carbon/Lang/eo.php @@ -10,7 +10,6 @@ /** * Translation messages. See http://symfony.com/doc/current/book/translation.html * for possible formats. - * */ /** * Extracted from https://github.com/jenssegers/laravel-date/blob/master/src/lang/eo/date.php diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/es.php b/vendor/nesbot/carbon/src/Carbon/Lang/es.php index b4573ec..2da39a0 100644 --- a/vendor/nesbot/carbon/src/Carbon/Lang/es.php +++ b/vendor/nesbot/carbon/src/Carbon/Lang/es.php @@ -12,7 +12,6 @@ /** * Translation messages. See http://symfony.com/doc/current/book/translation.html * for possible formats. - * */ return array( 'year' => '1 año|:count años', @@ -24,6 +23,6 @@ return array( 'second' => '1 segundo|:count segundos', 'ago' => 'hace :time', 'from_now' => 'dentro de :time', - 'after' => ':time antes', - 'before' => ':time después', + 'after' => ':time después', + 'before' => ':time antes', ); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/eu.php b/vendor/nesbot/carbon/src/Carbon/Lang/eu.php index 91f1d2a..79c4d12 100644 --- a/vendor/nesbot/carbon/src/Carbon/Lang/eu.php +++ b/vendor/nesbot/carbon/src/Carbon/Lang/eu.php @@ -10,7 +10,6 @@ /** * Translation messages. See http://symfony.com/doc/current/book/translation.html * for possible formats. - * */ /** * Extracted from https://github.com/jenssegers/laravel-date/blob/master/src/lang/eu/date.php diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/fa.php b/vendor/nesbot/carbon/src/Carbon/Lang/fa.php index e77e2f5..8b671da 100644 --- a/vendor/nesbot/carbon/src/Carbon/Lang/fa.php +++ b/vendor/nesbot/carbon/src/Carbon/Lang/fa.php @@ -12,7 +12,6 @@ /** * Translation messages. See http://symfony.com/doc/current/book/translation.html * for possible formats. - * */ return array( diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/fi.php b/vendor/nesbot/carbon/src/Carbon/Lang/fi.php index 7930c6b..6198f99 100644 --- a/vendor/nesbot/carbon/src/Carbon/Lang/fi.php +++ b/vendor/nesbot/carbon/src/Carbon/Lang/fi.php @@ -10,7 +10,6 @@ /** * Translation messages. See http://symfony.com/doc/current/book/translation.html * for possible formats. - * */ /** * Extracted from https://github.com/jenssegers/laravel-date/blob/master/src/lang/fi/date.php diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/fo.php b/vendor/nesbot/carbon/src/Carbon/Lang/fo.php index caa8080..740f03b 100644 --- a/vendor/nesbot/carbon/src/Carbon/Lang/fo.php +++ b/vendor/nesbot/carbon/src/Carbon/Lang/fo.php @@ -12,7 +12,6 @@ /** * Translation messages. See http://symfony.com/doc/current/book/translation.html * for possible formats. - * */ return array( 'year' => '1 ár|:count ár', diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/fr.php b/vendor/nesbot/carbon/src/Carbon/Lang/fr.php index b10ac40..298131a 100644 --- a/vendor/nesbot/carbon/src/Carbon/Lang/fr.php +++ b/vendor/nesbot/carbon/src/Carbon/Lang/fr.php @@ -12,7 +12,6 @@ /** * Translation messages. See http://symfony.com/doc/current/book/translation.html * for possible formats. - * */ return array( 'year' => '1 an|:count ans', diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/he.php b/vendor/nesbot/carbon/src/Carbon/Lang/he.php index 9ed00f1..681915b 100644 --- a/vendor/nesbot/carbon/src/Carbon/Lang/he.php +++ b/vendor/nesbot/carbon/src/Carbon/Lang/he.php @@ -12,7 +12,6 @@ /** * Translation messages. See http://symfony.com/doc/current/book/translation.html * for possible formats. - * */ return array( 'year' => 'שנה|{2}שנתיים|:count שנים', diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/hr.php b/vendor/nesbot/carbon/src/Carbon/Lang/hr.php index 7ab1c26..ea21ced 100644 --- a/vendor/nesbot/carbon/src/Carbon/Lang/hr.php +++ b/vendor/nesbot/carbon/src/Carbon/Lang/hr.php @@ -10,7 +10,6 @@ /** * Translation messages. See http://symfony.com/doc/current/book/translation.html * for possible formats. - * */ /** * Extracted from https://github.com/jenssegers/laravel-date/blob/master/src/lang/hr/date.php diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/hu.php b/vendor/nesbot/carbon/src/Carbon/Lang/hu.php index a866039..f30c0c8 100644 --- a/vendor/nesbot/carbon/src/Carbon/Lang/hu.php +++ b/vendor/nesbot/carbon/src/Carbon/Lang/hu.php @@ -10,7 +10,6 @@ /** * Translation messages. See http://symfony.com/doc/current/book/translation.html * for possible formats. - * */ /** * Extracted from https://github.com/jenssegers/laravel-date/blob/master/src/lang/hu/date.php diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/id.php b/vendor/nesbot/carbon/src/Carbon/Lang/id.php index 4b168f6..56757a5 100644 --- a/vendor/nesbot/carbon/src/Carbon/Lang/id.php +++ b/vendor/nesbot/carbon/src/Carbon/Lang/id.php @@ -10,7 +10,6 @@ /** * Translation messages. See http://symfony.com/doc/current/book/translation.html * for possible formats. - * */ /** * Extracted from https://github.com/jenssegers/laravel-date/blob/master/src/lang/id/date.php diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/it.php b/vendor/nesbot/carbon/src/Carbon/Lang/it.php index ef1b55d..680e0f5 100644 --- a/vendor/nesbot/carbon/src/Carbon/Lang/it.php +++ b/vendor/nesbot/carbon/src/Carbon/Lang/it.php @@ -12,7 +12,6 @@ /** * Translation messages. See http://symfony.com/doc/current/book/translation.html * for possible formats. - * */ return array( 'year' => '1 anno|:count anni', diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/ja.php b/vendor/nesbot/carbon/src/Carbon/Lang/ja.php index 4b5e77d..66cbf90 100644 --- a/vendor/nesbot/carbon/src/Carbon/Lang/ja.php +++ b/vendor/nesbot/carbon/src/Carbon/Lang/ja.php @@ -10,7 +10,6 @@ /** * Translation messages. See http://symfony.com/doc/current/book/translation.html * for possible formats. - * */ /** * Extracted from https://github.com/jenssegers/laravel-date/blob/master/src/lang/ja/date.php diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/ko.php b/vendor/nesbot/carbon/src/Carbon/Lang/ko.php index f3ed1c4..fa863d9 100644 --- a/vendor/nesbot/carbon/src/Carbon/Lang/ko.php +++ b/vendor/nesbot/carbon/src/Carbon/Lang/ko.php @@ -10,7 +10,6 @@ /** * Translation messages. See http://symfony.com/doc/current/book/translation.html * for possible formats. - * */ /** * Extracted from https://github.com/jenssegers/laravel-date/blob/master/src/lang/cs/date.php diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/lt.php b/vendor/nesbot/carbon/src/Carbon/Lang/lt.php index 4a6446b..af8ddcb 100644 --- a/vendor/nesbot/carbon/src/Carbon/Lang/lt.php +++ b/vendor/nesbot/carbon/src/Carbon/Lang/lt.php @@ -12,7 +12,6 @@ /** * Translation messages. See http://symfony.com/doc/current/book/translation.html * for possible formats. - * */ return array( @@ -27,4 +26,4 @@ return array( 'from_now' => 'už :time', 'after' => 'po :time', 'before' => ':time nuo dabar', -); \ No newline at end of file +); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/lv.php b/vendor/nesbot/carbon/src/Carbon/Lang/lv.php index 07b5a02..fb66c22 100644 --- a/vendor/nesbot/carbon/src/Carbon/Lang/lv.php +++ b/vendor/nesbot/carbon/src/Carbon/Lang/lv.php @@ -11,7 +11,6 @@ /** * Translation messages. See http://symfony.com/doc/current/book/translation.html * for possible formats. - * */ return array( 'year' => '0 gadiem|:count gada|:count gadiem', diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/ms.php b/vendor/nesbot/carbon/src/Carbon/Lang/ms.php index 078b9d2..90304f5 100644 --- a/vendor/nesbot/carbon/src/Carbon/Lang/ms.php +++ b/vendor/nesbot/carbon/src/Carbon/Lang/ms.php @@ -10,7 +10,6 @@ /** * Translation messages. See http://symfony.com/doc/current/book/translation.html * for possible formats. - * */ return array( 'year' => ':count tahun', diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/nl.php b/vendor/nesbot/carbon/src/Carbon/Lang/nl.php index 8104b71..00cd194 100644 --- a/vendor/nesbot/carbon/src/Carbon/Lang/nl.php +++ b/vendor/nesbot/carbon/src/Carbon/Lang/nl.php @@ -10,7 +10,6 @@ /** * Translation messages. See http://symfony.com/doc/current/book/translation.html * for possible formats. - * */ return array( 'year' => '1 jaar|:count jaren', diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/no.php b/vendor/nesbot/carbon/src/Carbon/Lang/no.php index 0cfd3d3..32a08c8 100644 --- a/vendor/nesbot/carbon/src/Carbon/Lang/no.php +++ b/vendor/nesbot/carbon/src/Carbon/Lang/no.php @@ -10,7 +10,6 @@ /** * Translation messages. See http://symfony.com/doc/current/book/translation.html * for possible formats. - * */ /** * Extracted from https://github.com/jenssegers/laravel-date/blob/master/src/lang/no/date.php diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/pl.php b/vendor/nesbot/carbon/src/Carbon/Lang/pl.php index 05fea60..1381d90 100644 --- a/vendor/nesbot/carbon/src/Carbon/Lang/pl.php +++ b/vendor/nesbot/carbon/src/Carbon/Lang/pl.php @@ -10,7 +10,6 @@ /** * Translation messages. See http://symfony.com/doc/current/book/translation.html * for possible formats. - * */ /** * Extracted from https://github.com/jenssegers/laravel-date/blob/master/src/lang/pl/date.php diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/pt.php b/vendor/nesbot/carbon/src/Carbon/Lang/pt.php index 28aab4d..4ee091f 100644 --- a/vendor/nesbot/carbon/src/Carbon/Lang/pt.php +++ b/vendor/nesbot/carbon/src/Carbon/Lang/pt.php @@ -10,7 +10,6 @@ /** * Translation messages. See http://symfony.com/doc/current/book/translation.html * for possible formats. - * */ /** * Extracted from https://github.com/jenssegers/laravel-date/blob/master/src/lang/pt/date.php diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/pt_BR.php b/vendor/nesbot/carbon/src/Carbon/Lang/pt_BR.php index 70435ee..cd9a90e 100644 --- a/vendor/nesbot/carbon/src/Carbon/Lang/pt_BR.php +++ b/vendor/nesbot/carbon/src/Carbon/Lang/pt_BR.php @@ -10,7 +10,6 @@ /** * Translation messages. See http://symfony.com/doc/current/book/translation.html * for possible formats. - * */ return array( 'year' => '1 ano|:count anos', @@ -22,6 +21,6 @@ return array( 'second' => '1 segundo|:count segundos', 'ago' => 'há :time', 'from_now' => 'dentro de :time', - 'after' => ':time depois', - 'before' => ':time antes', + 'after' => 'após :time', + 'before' => ':time atrás', ); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/ro.php b/vendor/nesbot/carbon/src/Carbon/Lang/ro.php index efc847d..bd812f0 100644 --- a/vendor/nesbot/carbon/src/Carbon/Lang/ro.php +++ b/vendor/nesbot/carbon/src/Carbon/Lang/ro.php @@ -10,7 +10,6 @@ /** * Translation messages. See http://symfony.com/doc/current/book/translation.html * for possible formats. - * */ /** * Extracted from https://github.com/jenssegers/laravel-date/blob/master/src/lang/ro/date.php diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/ru.php b/vendor/nesbot/carbon/src/Carbon/Lang/ru.php index e4a1cb5..c843c35 100644 --- a/vendor/nesbot/carbon/src/Carbon/Lang/ru.php +++ b/vendor/nesbot/carbon/src/Carbon/Lang/ru.php @@ -10,7 +10,6 @@ /** * Translation messages. See http://symfony.com/doc/current/book/translation.html * for possible formats. - * */ /** * Extracted from https://github.com/jenssegers/laravel-date/blob/master/src/lang/ru/date.php diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/sk.php b/vendor/nesbot/carbon/src/Carbon/Lang/sk.php index 8087afe..8729e45 100644 --- a/vendor/nesbot/carbon/src/Carbon/Lang/sk.php +++ b/vendor/nesbot/carbon/src/Carbon/Lang/sk.php @@ -10,7 +10,6 @@ /** * Translation messages. See http://symfony.com/doc/current/book/translation.html * for possible formats. - * */ /** * Extracted from https://github.com/jenssegers/laravel-date/blob/master/src/lang/sk/date.php diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/sl.php b/vendor/nesbot/carbon/src/Carbon/Lang/sl.php index 53f810b..8149a5d 100644 --- a/vendor/nesbot/carbon/src/Carbon/Lang/sl.php +++ b/vendor/nesbot/carbon/src/Carbon/Lang/sl.php @@ -10,28 +10,27 @@ /** * Translation messages. See http://symfony.com/doc/current/book/translation.html * for possible formats. - * */ /** * Extracted from https://github.com/jenssegers/laravel-date/blob/master/src/lang/sl/date.php */ return array( - 'year' => ':count leto|:count leti|:count leta|:count let', - 'month' => ':count mesec|:count meseca|:count mesece|:count mesecev', - 'week' => ':count teden|:count tedna|:count tedne|:count tednov', - 'day' => ':count dan|:count dni|:count dni|:count dni', - 'hour' => ':count uro|:count uri|:count ure|:count ur', - 'minute' => ':count minuto|:count minuti|:count minute|:count minut', - 'second' => ':count sekundo|:count sekundi|:count sekunde|:count sekund', - 'year_ago' => ':count letom|:count leti|:count leti|:count leti', - 'month_ago' => ':count mesecem|:count meseci|:count meseci|:count meseci', - 'week_ago' => ':count tednom|:count tednoma|:count tedni|:count tedni', - 'day_ago' => ':count dnem|:count dnevoma|:count dnevi|:count dnevi', - 'hour_ago' => ':count uro|:count urama|:count urami|:count urami', - 'minute_ago'=> ':count minuto|:count minutama|:count minutami|:count minutami', - 'second_ago'=> ':count sekundo|:count sekundama|:count sekundami|:count sekundami', - 'ago' => 'pred :time', - 'from_now' => 'čez :time', - 'after' => 'čez :time', - 'before' => 'pred :time' + 'year' => ':count leto|:count leti|:count leta|:count let', + 'month' => ':count mesec|:count meseca|:count mesece|:count mesecev', + 'week' => ':count teden|:count tedna|:count tedne|:count tednov', + 'day' => ':count dan|:count dni|:count dni|:count dni', + 'hour' => ':count uro|:count uri|:count ure|:count ur', + 'minute' => ':count minuto|:count minuti|:count minute|:count minut', + 'second' => ':count sekundo|:count sekundi|:count sekunde|:count sekund', + 'year_ago' => ':count letom|:count leti|:count leti|:count leti', + 'month_ago' => ':count mesecem|:count meseci|:count meseci|:count meseci', + 'week_ago' => ':count tednom|:count tednoma|:count tedni|:count tedni', + 'day_ago' => ':count dnem|:count dnevoma|:count dnevi|:count dnevi', + 'hour_ago' => ':count uro|:count urama|:count urami|:count urami', + 'minute_ago'=> ':count minuto|:count minutama|:count minutami|:count minutami', + 'second_ago'=> ':count sekundo|:count sekundama|:count sekundami|:count sekundami', + 'ago' => 'pred :time', + 'from_now' => 'čez :time', + 'after' => 'čez :time', + 'before' => 'pred :time' ); diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/sr.php b/vendor/nesbot/carbon/src/Carbon/Lang/sr.php index c19087f..af060fa 100644 --- a/vendor/nesbot/carbon/src/Carbon/Lang/sr.php +++ b/vendor/nesbot/carbon/src/Carbon/Lang/sr.php @@ -10,7 +10,6 @@ /** * Translation messages. See http://symfony.com/doc/current/book/translation.html * for possible formats. - * */ /** * Extracted from https://github.com/jenssegers/laravel-date/blob/master/src/lang/sr/date.php diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/sv.php b/vendor/nesbot/carbon/src/Carbon/Lang/sv.php index 2ed2349..54f61fc 100644 --- a/vendor/nesbot/carbon/src/Carbon/Lang/sv.php +++ b/vendor/nesbot/carbon/src/Carbon/Lang/sv.php @@ -10,7 +10,6 @@ /** * Translation messages. See http://symfony.com/doc/current/book/translation.html * for possible formats. - * */ /** * Extracted from https://github.com/jenssegers/laravel-date/blob/master/src/lang/sv/date.php diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/th.php b/vendor/nesbot/carbon/src/Carbon/Lang/th.php index aad56c2..13459bc 100644 --- a/vendor/nesbot/carbon/src/Carbon/Lang/th.php +++ b/vendor/nesbot/carbon/src/Carbon/Lang/th.php @@ -10,7 +10,6 @@ /** * Translation messages. See http://symfony.com/doc/current/book/translation.html * for possible formats. - * */ /** * Extracted from https://github.com/jenssegers/laravel-date/blob/master/src/lang/th/date.php @@ -23,7 +22,6 @@ return array( 'hour' => '1 ชั่วโมง|:count ชั่วโมง', 'minute' => '1 นาที|:count นาที', 'second' => '1 วินาที|:count วินาที', - 'ago' => ':time sitten', 'ago' => ':time ที่แล้ว', 'from_now' => ':time จากนี้', 'after' => 'หลัง:time', diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/tr.php b/vendor/nesbot/carbon/src/Carbon/Lang/tr.php index 52561db..d7f5134 100644 --- a/vendor/nesbot/carbon/src/Carbon/Lang/tr.php +++ b/vendor/nesbot/carbon/src/Carbon/Lang/tr.php @@ -12,7 +12,6 @@ /** * Translation messages. See http://symfony.com/doc/current/book/translation.html * for possible formats. - * */ return array( 'year' => ':count yıl', diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/uk.php b/vendor/nesbot/carbon/src/Carbon/Lang/uk.php index 8e57386..6a23d27 100644 --- a/vendor/nesbot/carbon/src/Carbon/Lang/uk.php +++ b/vendor/nesbot/carbon/src/Carbon/Lang/uk.php @@ -10,7 +10,6 @@ /** * Translation messages. See http://symfony.com/doc/current/book/translation.html * for possible formats. - * */ /** * Extracted from https://github.com/jenssegers/laravel-date/blob/master/src/lang/uk/date.php diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/uz.php b/vendor/nesbot/carbon/src/Carbon/Lang/uz.php index 14f4078..d9a5efa 100644 --- a/vendor/nesbot/carbon/src/Carbon/Lang/uz.php +++ b/vendor/nesbot/carbon/src/Carbon/Lang/uz.php @@ -10,7 +10,6 @@ /** * Translation messages. See http://symfony.com/doc/current/book/translation.html * for possible formats. - * */ return array( diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/vi.php b/vendor/nesbot/carbon/src/Carbon/Lang/vi.php index 7c70ff9..e0e8dfc 100644 --- a/vendor/nesbot/carbon/src/Carbon/Lang/vi.php +++ b/vendor/nesbot/carbon/src/Carbon/Lang/vi.php @@ -10,7 +10,6 @@ /** * Translation messages. See http://symfony.com/doc/current/book/translation.html * for possible formats. - * */ /** * Extracted from https://github.com/jenssegers/laravel-date/blob/master/src/lang/vi/date.php diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/zh-TW.php b/vendor/nesbot/carbon/src/Carbon/Lang/zh-TW.php index 0ffdc7f..30f0825 100644 --- a/vendor/nesbot/carbon/src/Carbon/Lang/zh-TW.php +++ b/vendor/nesbot/carbon/src/Carbon/Lang/zh-TW.php @@ -10,7 +10,6 @@ /** * Translation messages. See http://symfony.com/doc/current/book/translation.html * for possible formats. - * */ /** * Extracted from https://github.com/jenssegers/laravel-date/blob/master/src/lang/zh-TW/date.php diff --git a/vendor/nesbot/carbon/src/Carbon/Lang/zh.php b/vendor/nesbot/carbon/src/Carbon/Lang/zh.php index 9a74f39..58ea74f 100644 --- a/vendor/nesbot/carbon/src/Carbon/Lang/zh.php +++ b/vendor/nesbot/carbon/src/Carbon/Lang/zh.php @@ -10,7 +10,6 @@ /** * Translation messages. See http://symfony.com/doc/current/book/translation.html * for possible formats. - * */ /** * Extracted from https://github.com/jenssegers/laravel-date/blob/master/src/lang/zh/date.php diff --git a/vendor/paragonie/random_compat/.gitignore b/vendor/paragonie/random_compat/.gitignore deleted file mode 100644 index de26af5..0000000 --- a/vendor/paragonie/random_compat/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -composer.lock -/vendor/ -/tests/phpunit.phar -/tests/phpunit.phar.asc \ No newline at end of file diff --git a/vendor/paragonie/random_compat/.scrutinizer.yml b/vendor/paragonie/random_compat/.scrutinizer.yml deleted file mode 100644 index a2f32ea..0000000 --- a/vendor/paragonie/random_compat/.scrutinizer.yml +++ /dev/null @@ -1,4 +0,0 @@ -checks: - php: - code_rating: true - duplication: false \ No newline at end of file diff --git a/vendor/paragonie/random_compat/.travis.yml b/vendor/paragonie/random_compat/.travis.yml deleted file mode 100644 index 25d9efc..0000000 --- a/vendor/paragonie/random_compat/.travis.yml +++ /dev/null @@ -1,26 +0,0 @@ -language: php -php: - -- "7.0" -- "5.6" -- "5.5" -- "5.4" -- "5.3" -- "hhvm" - - -sudo: false - -matrix: - fast_finish: true - allow_failures: - - php: "hhvm" - -install: - -- composer install -- composer self-update -- composer update -- chmod +x ./tests/phpunit.sh - -script: ./tests/phpunit.sh travis diff --git a/vendor/paragonie/random_compat/ERRATA.md b/vendor/paragonie/random_compat/ERRATA.md index 9c0ef9f..4990273 100644 --- a/vendor/paragonie/random_compat/ERRATA.md +++ b/vendor/paragonie/random_compat/ERRATA.md @@ -6,7 +6,7 @@ The order is: 1. `libsodium if available` 2. `fread() /dev/urandom if available` - 3. `mcrypt_create_iv($bytes, MCRYPT_CREATE_IV)` + 3. `mcrypt_create_iv($bytes, MCRYPT_DEV_URANDOM)` 4. `COM('CAPICOM.Utilities.1')->GetRandom()` 5. `openssl_random_pseudo_bytes()` diff --git a/vendor/paragonie/random_compat/README.md b/vendor/paragonie/random_compat/README.md index ed5b1d8..8056086 100644 --- a/vendor/paragonie/random_compat/README.md +++ b/vendor/paragonie/random_compat/README.md @@ -28,6 +28,31 @@ If PHP cannot safely generate random data, this library will throw an `Exception It will never fall back to insecure random data. If this keeps happening, upgrade to a newer version of PHP immediately. +## Installing + +**With [Composer](https://getcomposer.org):** + + composer require paragonie/random_compat + +**Signed PHP Archive:** + +As of version 1.2.0, we also ship an ECDSA-signed PHP Archive with each stable +release on Github. + +1. Download [the `.phar`, `.phar.pubkey`, and `.phar.pubkey.asc`](https://github.com/paragonie/random_compat/releases/latest) files. +2. (**Recommended** but not required) Verify the PGP signature of `.phar.pubkey` + (contained within the `.asc` file) using the [PGP public key for Paragon Initiative Enterprises](https://paragonie.com/static/gpg-public-key.txt). +3. Extract both `.phar` and `.phar.pubkey` files to the same directory. +4. `require_once "/path/to/random_compat.phar";` +5. When a new version is released, you only need to replace the `.phar` file; + the `.pubkey` will not change (unless our signing key is ever compromised). + +**Manual Installation:** + +1. Download [a stable release](https://github.com/paragonie/random_compat/releases/latest). +2. Extract the files into your project. +3. `require_once "/path/to/random_compat/lib/random.php";` + ## Usage This library exposes the [CSPRNG functions added in PHP 7](https://secure.php.net/manual/en/ref.csprng.php) @@ -118,6 +143,7 @@ weren't for the contributions of the following individuals: * [@AndrewCarterUK (Andrew Carter)](https://github.com/AndrewCarterUK) * [@asgrim (James Titcumb)](https://github.com/asgrim) +* [@bcremer (Benjamin Cremer)](https://github.com/bcremer) * [@CodesInChaos (Christian Winnerlein)](https://github.com/CodesInChaos) * [@chriscct7 (Chris Christoff)](https://github.com/chriscct7) * [@cs278 (Chris Smith)](https://github.com/cs278) @@ -134,6 +160,7 @@ weren't for the contributions of the following individuals: * [@narfbg (Andrey Andreev)](https://github.com/narfbg) * [@nicolas-grekas (Nicolas Grekas)](https://github.com/nicolas-grekas) * [@oittaa](https://github.com/oittaa) +* [@oucil (Kevin Farley)](https://github.com/oucil) * [@redragonx (Stephen Chavez)](https://github.com/redragonx) * [@rchouinard (Ryan Chouinard)](https://github.com/rchouinard) * [@SammyK (Sammy Kaye Powers)](https://github.com/SammyK) diff --git a/vendor/paragonie/random_compat/composer.json b/vendor/paragonie/random_compat/composer.json index d70abf4..d363f4c 100644 --- a/vendor/paragonie/random_compat/composer.json +++ b/vendor/paragonie/random_compat/composer.json @@ -23,6 +23,9 @@ "require": { "php": ">=5.2.0" }, + "require-dev": { + "phpunit/phpunit": "4.*|5.*" + }, "suggest": { "ext-libsodium": "Provides a modern crypto API that can be used to generate random bytes." }, diff --git a/vendor/paragonie/random_compat/lib/byte_safe_strings.php b/vendor/paragonie/random_compat/lib/byte_safe_strings.php index a3cc90b..ae3b7b9 100644 --- a/vendor/paragonie/random_compat/lib/byte_safe_strings.php +++ b/vendor/paragonie/random_compat/lib/byte_safe_strings.php @@ -50,8 +50,10 @@ if (!function_exists('RandomCompat_strlen')) { 'RandomCompat_strlen() expects a string' ); } + return mb_strlen($binary_string, '8bit'); } + } else { /** * strlen() implementation that isn't brittle to mbstring.func_overload @@ -77,8 +79,10 @@ if (!function_exists('RandomCompat_strlen')) { } if (!function_exists('RandomCompat_substr')) { + if ( - defined('MB_OVERLOAD_STRING') && + defined('MB_OVERLOAD_STRING') + && ini_get('mbstring.func_overload') & MB_OVERLOAD_STRING ) { /** @@ -102,11 +106,13 @@ if (!function_exists('RandomCompat_substr')) { 'RandomCompat_substr(): First argument should be a string' ); } + if (!is_int($start)) { throw new TypeError( 'RandomCompat_substr(): Second argument should be an integer' ); } + if ($length === null) { /** * mb_substr($str, 0, NULL, '8bit') returns an empty string on @@ -118,9 +124,12 @@ if (!function_exists('RandomCompat_substr')) { 'RandomCompat_substr(): Third argument should be an integer, or omitted' ); } + return mb_substr($binary_string, $start, $length, '8bit'); } + } else { + /** * substr() implementation that isn't brittle to mbstring.func_overload * @@ -141,19 +150,23 @@ if (!function_exists('RandomCompat_substr')) { 'RandomCompat_substr(): First argument should be a string' ); } + if (!is_int($start)) { throw new TypeError( 'RandomCompat_substr(): Second argument should be an integer' ); } + if ($length !== null) { if (!is_int($length)) { throw new TypeError( 'RandomCompat_substr(): Third argument should be an integer, or omitted' ); } + return substr($binary_string, $start, $length); } + return substr($binary_string, $start); } } diff --git a/vendor/paragonie/random_compat/lib/cast_to_int.php b/vendor/paragonie/random_compat/lib/cast_to_int.php index 474ce64..f441c5d 100644 --- a/vendor/paragonie/random_compat/lib/cast_to_int.php +++ b/vendor/paragonie/random_compat/lib/cast_to_int.php @@ -37,26 +37,33 @@ if (!function_exists('RandomCompat_intval')) { * lose precision, so the <= and => operators might accidentally let a float * through. * - * @param numeric $number The number we want to convert to an int - * @param boolean $fail_open Set to true to not throw an exception + * @param int|float $number The number we want to convert to an int + * @param boolean $fail_open Set to true to not throw an exception * * @return int (or float if $fail_open) + * + * @throws TypeError */ function RandomCompat_intval($number, $fail_open = false) { if (is_numeric($number)) { $number += 0; } + if ( - is_float($number) && - $number > ~PHP_INT_MAX && + is_float($number) + && + $number > ~PHP_INT_MAX + && $number < PHP_INT_MAX ) { $number = (int) $number; } + if (is_int($number) || $fail_open) { return $number; } + throw new TypeError( 'Expected an integer.' ); diff --git a/vendor/paragonie/random_compat/lib/random.php b/vendor/paragonie/random_compat/lib/random.php index ebc7bd3..42237ea 100644 --- a/vendor/paragonie/random_compat/lib/random.php +++ b/vendor/paragonie/random_compat/lib/random.php @@ -1,22 +1,22 @@ GetRandom() * 5. openssl_random_pseudo_bytes() (absolute last resort) - * + * * See ERRATA.md for our reasoning behind this particular order */ if (extension_loaded('libsodium')) { // See random_bytes_libsodium.php - require_once $RandomCompatDIR.'/random_bytes_libsodium.php'; + if (PHP_VERSION_ID >= 50300 && function_exists('\\Sodium\\randombytes_buf')) { + require_once $RandomCompatDIR.'/random_bytes_libsodium.php'; + } elseif (method_exists('Sodium', 'randombytes_buf')) { + require_once $RandomCompatDIR.'/random_bytes_libsodium_legacy.php'; + } } - if ( - !function_exists('random_bytes') && - DIRECTORY_SEPARATOR === '/' && - @is_readable('/dev/urandom') - ) { + + /** + * Reading directly from /dev/urandom: + */ + if (DIRECTORY_SEPARATOR === '/') { // DIRECTORY_SEPARATOR === '/' on Unix-like OSes -- this is a fast // way to exclude Windows. - // - // Error suppression on is_readable() in case of an open_basedir or - // safe_mode failure. All we care about is whether or not we can - // read it at this point. If the PHP environment is going to panic - // over trying to see if the file can be read in the first place, - // that is not helpful to us here. - - // See random_bytes_dev_urandom.php - require_once $RandomCompatDIR.'/random_bytes_dev_urandom.php'; + $RandomCompatUrandom = true; + $RandomCompat_basedir = ini_get('open_basedir'); + + if (!empty($RandomCompat_basedir)) { + $RandomCompat_open_basedir = explode( + PATH_SEPARATOR, + strtolower($RandomCompat_basedir) + ); + $RandomCompatUrandom = in_array( + '/dev', + $RandomCompat_open_basedir + ); + $RandomCompat_open_basedir = null; + } + + if ( + !function_exists('random_bytes') + && + $RandomCompatUrandom + && + @is_readable('/dev/urandom') + ) { + // Error suppression on is_readable() in case of an open_basedir + // or safe_mode failure. All we care about is whether or not we + // can read it at this point. If the PHP environment is going to + // panic over trying to see if the file can be read in the first + // place, that is not helpful to us here. + + // See random_bytes_dev_urandom.php + require_once $RandomCompatDIR.'/random_bytes_dev_urandom.php'; + } + // Unset variables after use + $RandomCompatUrandom = null; + $RandomCompat_basedir = null; } + + /** + * mcrypt_create_iv() + */ if ( - !function_exists('random_bytes') && - PHP_VERSION_ID >= 50307 && + !function_exists('random_bytes') + && + PHP_VERSION_ID >= 50307 + && extension_loaded('mcrypt') ) { // See random_bytes_mcrypt.php require_once $RandomCompatDIR.'/random_bytes_mcrypt.php'; } + if ( - !function_exists('random_bytes') && - extension_loaded('com_dotnet') && + !function_exists('random_bytes') + && + extension_loaded('com_dotnet') + && class_exists('COM') ) { - try { - $RandomCompatCOMtest = new COM('CAPICOM.Utilities.1'); - if (method_exists($RandomCompatCOMtest, 'GetRandom')) { - // See random_bytes_com_dotnet.php - require_once $RandomCompatDIR.'/random_bytes_com_dotnet.php'; + $RandomCompat_disabled_classes = preg_split( + '#\s*,\s*#', + strtolower(ini_get('disable_classes')) + ); + + if (!in_array('com', $RandomCompat_disabled_classes)) { + try { + $RandomCompatCOMtest = new COM('CAPICOM.Utilities.1'); + if (method_exists($RandomCompatCOMtest, 'GetRandom')) { + // See random_bytes_com_dotnet.php + require_once $RandomCompatDIR.'/random_bytes_com_dotnet.php'; + } + } catch (com_exception $e) { + // Don't try to use it. } - } catch (com_exception $e) { - // Don't try to use it. } + $RandomCompat_disabled_classes = null; $RandomCompatCOMtest = null; } + + /** + * openssl_random_pseudo_bytes() + */ if ( - !function_exists('random_bytes') && - extension_loaded('openssl') && ( // Unix-like with PHP >= 5.3.0 or ( - DIRECTORY_SEPARATOR === '/' && + DIRECTORY_SEPARATOR === '/' + && PHP_VERSION_ID >= 50300 - ) || - // Windows with PHP >= 5.3.4 - PHP_VERSION_ID >= 50304 + ) + || + // Windows with PHP >= 5.4.1 + PHP_VERSION_ID >= 50401 ) + && + !function_exists('random_bytes') + && + extension_loaded('openssl') ) { // See random_bytes_openssl.php require_once $RandomCompatDIR.'/random_bytes_openssl.php'; } + + /** + * throw new Exception + */ if (!function_exists('random_bytes')) { /** * We don't have any more options, so let's throw an exception right now * and hope the developer won't let it fail silently. */ - function random_bytes() + function random_bytes($length) { throw new Exception( 'There is no suitable CSPRNG installed on your system' @@ -130,8 +198,10 @@ if (PHP_VERSION_ID < 70000) { } } } + if (!function_exists('random_int')) { require_once $RandomCompatDIR.'/random_int.php'; } + $RandomCompatDIR = null; } diff --git a/vendor/paragonie/random_compat/lib/random_bytes_com_dotnet.php b/vendor/paragonie/random_compat/lib/random_bytes_com_dotnet.php index c0ae639..3422825 100644 --- a/vendor/paragonie/random_compat/lib/random_bytes_com_dotnet.php +++ b/vendor/paragonie/random_compat/lib/random_bytes_com_dotnet.php @@ -46,14 +46,17 @@ function random_bytes($bytes) 'random_bytes(): $bytes must be an integer' ); } + if ($bytes < 1) { throw new Error( 'Length must be greater than 0' ); } + $buf = ''; $util = new COM('CAPICOM.Utilities.1'); $execCount = 0; + /** * Let's not let it loop forever. If we run N times and fail to * get N bytes of random data, then CAPICOM has failed us. @@ -68,10 +71,11 @@ function random_bytes($bytes) } ++$execCount; } while ($execCount < $bytes); + /** * If we reach here, PHP has failed us. */ throw new Exception( - 'PHP failed to generate random data.' + 'Could not gather sufficient random data' ); } diff --git a/vendor/paragonie/random_compat/lib/random_bytes_dev_urandom.php b/vendor/paragonie/random_compat/lib/random_bytes_dev_urandom.php index 5606dbb..db93b07 100644 --- a/vendor/paragonie/random_compat/lib/random_bytes_dev_urandom.php +++ b/vendor/paragonie/random_compat/lib/random_bytes_dev_urandom.php @@ -62,18 +62,25 @@ function random_bytes($bytes) $fp = false; } } - /** - * stream_set_read_buffer() does not exist in HHVM - * - * If we don't set the stream's read buffer to 0, PHP will - * internally buffer 8192 bytes, which can waste entropy - * - * stream_set_read_buffer returns 0 on success - */ - if (!empty($fp) && function_exists('stream_set_read_buffer')) { - stream_set_read_buffer($fp, RANDOM_COMPAT_READ_BUFFER); + + if (!empty($fp)) { + /** + * stream_set_read_buffer() does not exist in HHVM + * + * If we don't set the stream's read buffer to 0, PHP will + * internally buffer 8192 bytes, which can waste entropy + * + * stream_set_read_buffer returns 0 on success + */ + if (function_exists('stream_set_read_buffer')) { + stream_set_read_buffer($fp, RANDOM_COMPAT_READ_BUFFER); + } + if (function_exists('stream_set_chunk_size')) { + stream_set_chunk_size($fp, RANDOM_COMPAT_READ_BUFFER); + } } } + try { $bytes = RandomCompat_intval($bytes); } catch (TypeError $ex) { @@ -81,11 +88,13 @@ function random_bytes($bytes) 'random_bytes(): $bytes must be an integer' ); } + if ($bytes < 1) { throw new Error( 'Length must be greater than 0' ); } + /** * This if() block only runs if we managed to open a file handle * @@ -96,6 +105,7 @@ function random_bytes($bytes) if (!empty($fp)) { $remaining = $bytes; $buf = ''; + /** * We use fread() in a loop to protect against partial reads */ @@ -128,10 +138,11 @@ function random_bytes($bytes) } } } + /** * If we reach here, PHP has failed us. */ throw new Exception( - 'PHP failed to generate random data.' + 'Error reading from source device' ); } diff --git a/vendor/paragonie/random_compat/lib/random_bytes_libsodium.php b/vendor/paragonie/random_compat/lib/random_bytes_libsodium.php index 796ba6a..f802d4e 100644 --- a/vendor/paragonie/random_compat/lib/random_bytes_libsodium.php +++ b/vendor/paragonie/random_compat/lib/random_bytes_libsodium.php @@ -48,11 +48,13 @@ function random_bytes($bytes) 'random_bytes(): $bytes must be an integer' ); } + if ($bytes < 1) { throw new Error( 'Length must be greater than 0' ); } + /** * \Sodium\randombytes_buf() doesn't allow more than 2147483647 bytes to be * generated in one invocation. @@ -79,6 +81,6 @@ function random_bytes($bytes) * If we reach here, PHP has failed us. */ throw new Exception( - 'PHP failed to generate random data.' + 'Could not gather sufficient random data' ); } diff --git a/vendor/paragonie/random_compat/lib/random_bytes_mcrypt.php b/vendor/paragonie/random_compat/lib/random_bytes_mcrypt.php index 8524c52..7ac9d91 100644 --- a/vendor/paragonie/random_compat/lib/random_bytes_mcrypt.php +++ b/vendor/paragonie/random_compat/lib/random_bytes_mcrypt.php @@ -48,6 +48,7 @@ function random_bytes($bytes) 'random_bytes(): $bytes must be an integer' ); } + if ($bytes < 1) { throw new Error( 'Length must be greater than 0' @@ -55,18 +56,21 @@ function random_bytes($bytes) } $buf = @mcrypt_create_iv($bytes, MCRYPT_DEV_URANDOM); - if ($buf !== false) { - if (RandomCompat_strlen($buf) === $bytes) { - /** - * Return our random entropy buffer here: - */ - return $buf; - } + if ( + $buf !== false + && + RandomCompat_strlen($buf) === $bytes + ) { + /** + * Return our random entropy buffer here: + */ + return $buf; } + /** * If we reach here, PHP has failed us. */ throw new Exception( - 'PHP failed to generate random data.' + 'Could not gather sufficient random data' ); } diff --git a/vendor/paragonie/random_compat/lib/random_bytes_openssl.php b/vendor/paragonie/random_compat/lib/random_bytes_openssl.php index db05e1f..62bf770 100644 --- a/vendor/paragonie/random_compat/lib/random_bytes_openssl.php +++ b/vendor/paragonie/random_compat/lib/random_bytes_openssl.php @@ -48,12 +48,13 @@ function random_bytes($bytes) 'random_bytes(): $bytes must be an integer' ); } + if ($bytes < 1) { throw new Error( 'Length must be greater than 0' ); } - $secure = true; + /** * $secure is passed by reference. If it's set to false, fail. Note * that this will only return false if this function fails to return @@ -61,16 +62,22 @@ function random_bytes($bytes) * * @ref https://github.com/paragonie/random_compat/issues/6#issuecomment-119564973 */ + $secure = true; $buf = openssl_random_pseudo_bytes($bytes, $secure); - if ($buf !== false && $secure) { - if (RandomCompat_strlen($buf) === $bytes) { - return $buf; - } + if ( + $buf !== false + && + $secure + && + RandomCompat_strlen($buf) === $bytes + ) { + return $buf; } + /** * If we reach here, PHP has failed us. */ throw new Exception( - 'PHP failed to generate random data.' + 'Could not gather sufficient random data' ); } diff --git a/vendor/paragonie/random_compat/lib/random_int.php b/vendor/paragonie/random_compat/lib/random_int.php index 6c91dbc..fd3ef87 100644 --- a/vendor/paragonie/random_compat/lib/random_int.php +++ b/vendor/paragonie/random_compat/lib/random_int.php @@ -55,6 +55,7 @@ function random_int($min, $max) 'random_int(): $min must be an integer' ); } + try { $max = RandomCompat_intval($max); } catch (TypeError $ex) { @@ -73,6 +74,7 @@ function random_int($min, $max) 'Minimum value must be less than or equal to the maximum value' ); } + if ($max === $min) { return $min; } @@ -98,6 +100,7 @@ function random_int($min, $max) * Test for integer overflow: */ if (!is_int($range)) { + /** * Still safely calculate wider ranges. * Provided by @CodesInChaos, @oittaa @@ -111,7 +114,9 @@ function random_int($min, $max) */ $bytes = PHP_INT_SIZE; $mask = ~0; + } else { + /** * $bits is effectively ceil(log($range, 2)) without dealing with * type juggling @@ -181,5 +186,6 @@ function random_int($min, $max) * then try again. */ } while (!is_int($val) || $val > $max || $val < $min); + return (int) $val; } diff --git a/vendor/paragonie/random_compat/tests/full/DieHardTest.php b/vendor/paragonie/random_compat/tests/full/DieHardTest.php deleted file mode 100644 index 2e6dc70..0000000 --- a/vendor/paragonie/random_compat/tests/full/DieHardTest.php +++ /dev/null @@ -1,61 +0,0 @@ - $i, - 'value' => $buckets[$i], - 'min' => $min, - 'nums' => $nums_to_generate, - 'reason' => 'below min' - ]); - } - if ($buckets[$i] >= $max ) { - var_dump([ - 'bucket' => $i, - 'value' => $buckets[$i], - 'maax' => $max, - 'nums' => $nums_to_generate, - 'reason' => 'above max' - ]); - } - - $this->assertTrue($buckets[$i] < $max && $buckets[$i] > $min); - } - } - } -} \ No newline at end of file diff --git a/vendor/paragonie/random_compat/tests/full/StatTest.php b/vendor/paragonie/random_compat/tests/full/StatTest.php deleted file mode 100644 index e78eb14..0000000 --- a/vendor/paragonie/random_compat/tests/full/StatTest.php +++ /dev/null @@ -1,52 +0,0 @@ - 30% but less than 170% - * - * This also catches 0 and 1000 - */ - public function testDistribution() - { - $integers = array_fill(0, 100, 0); - for ($i = 0; $i < 10000; ++$i) { - ++$integers[random_int(0,99)]; - } - for ($i = 0; $i < 100; ++$i) { - $this->assertFalse($integers[$i] < 30); - $this->assertFalse($integers[$i] > 170); - } - } - - /** - * This should be between 55% and 75%, always - */ - public function testCoverage() - { - $integers = array_fill(0, 2000, 0); - for ($i = 0; $i < 2000; ++$i) { - ++$integers[random_int(0,1999)]; - } - $coverage = 0; - for ($i = 0; $i < 2000; ++$i) { - if ($integers[$i] > 0) { - ++$coverage; - } - } - $this->assertTrue($coverage >= 1150); - $this->assertTrue($coverage <= 1350); - } - - public function testCompressionRatios() - { - $some_bytes = random_bytes(65536); - $compressed = gzcompress($some_bytes, 9); - if (function_exists('mb_strlen')) { - $length = mb_strlen($compressed, '8bit'); - } else { - $length = strlen($compressed); - } - $this->assertTrue($length >= 65000 && $length <= 67000); - } -} \ No newline at end of file diff --git a/vendor/paragonie/random_compat/tests/phpunit.sh b/vendor/paragonie/random_compat/tests/phpunit.sh deleted file mode 100755 index 93c9970..0000000 --- a/vendor/paragonie/random_compat/tests/phpunit.sh +++ /dev/null @@ -1,122 +0,0 @@ -#!/usr/bin/env bash - -if [ "$1" == 'full' ]; then - fulltest=1 -elif [ "$1" == 'each' ]; then - testeach=1 -else - fulltest=0 -fi -origdir=`pwd` -cdir=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) -cd $origdir -parentdir="$(dirname $cdir)" - -clean=0 # Clean up? - -gpg --fingerprint D8406D0D82947747293778314AA394086372C20A -if [ $? -ne 0 ]; then - echo -e "\033[33mDownloading PGP Public Key...\033[0m" - gpg --recv-keys D8406D0D82947747293778314AA394086372C20A - # Sebastian Bergmann - gpg --fingerprint D8406D0D82947747293778314AA394086372C20A - if [ $? -ne 0 ]; then - echo -e "\033[31mCould not download PGP public key for verification\033[0m" - exit - fi -fi - -if [ "$clean" -eq 1 ]; then - # Let's clean them up, if they exist - if [ -f phpunit.phar ]; then - rm -f phpunit.phar - fi - if [ -f phpunit.phar.asc ]; then - rm -f phpunit.phar.asc - fi -fi - -PHP_VERSION=$(php -r "echo PHP_VERSION_ID;") - -# Let's grab the latest release and its signature -if [ ! -f phpunit.phar ]; then - if [[ $PHP_VERSION -ge 50600 ]]; then - wget https://phar.phpunit.de/phpunit.phar - else - wget -O phpunit.phar https://phar.phpunit.de/phpunit-old.phar - fi -fi -if [ ! -f phpunit.phar.asc ]; then - if [[ $PHP_VERSION -ge 50600 ]]; then - wget https://phar.phpunit.de/phpunit.phar.asc - else - wget -O phpunit.phar.asc https://phar.phpunit.de/phpunit-old.phar.asc - fi -fi - -# Verify before running -gpg --verify phpunit.phar.asc phpunit.phar -if [ $? -eq 0 ]; then - echo - echo -e "\033[33mBegin Unit Testing\033[0m" - # Run the testing suite - echo "Basic test suite:" - php phpunit.phar --bootstrap "$parentdir/lib/random.php" "$parentdir/tests/unit" - if [ $? -ne 0 ]; then - # Test failure - exit 1 - fi - echo "With open_basedir enabled:" - php -d open_basedir=$parentdir phpunit.phar --bootstrap "$parentdir/vendor/autoload.php" "$parentdir/tests/unit" - if [ $? -ne 0 ]; then - # Test failure - exit 1 - fi - echo "With open_basedir enabled, allowing /dev:" - php -d open_basedir=$parentdir:/dev phpunit.phar --bootstrap "$parentdir/vendor/autoload.php" "$parentdir/tests/unit" - if [ $? -ne 0 ]; then - # Test failure - exit 1 - fi - echo "With mbstring.func_overload enabled:" - php -d mbstring.func_overload=7 phpunit.phar --bootstrap "$parentdir/vendor/autoload.php" "$parentdir/tests/unit" - if [ $? -ne 0 ]; then - # Test failure - exit 1 - fi - - if [[ "$testeach" == "1" ]]; then - echo " CAPICOM:" - php phpunit.phar --bootstrap "$parentdir/tests/specific/capicom.php" "$parentdir/tests/unit" - echo " /dev/urandom:" - php phpunit.phar --bootstrap "$parentdir/tests/specific/dev_urandom.php" "$parentdir/tests/unit" - echo " libsodium:" - php phpunit.phar --bootstrap "$parentdir/tests/specific/libsodium.php" "$parentdir/tests/unit" - echo " mcrypt:" - php phpunit.phar --bootstrap "$parentdir/tests/specific/mcrypt.php" "$parentdir/tests/unit" - echo " openssl:" - php phpunit.phar --bootstrap "$parentdir/tests/specific/openssl.php" "$parentdir/tests/unit" - fi - - # Should we perform full statistical analyses? - if [[ "$fulltest" == "1" ]]; then - php phpunit.phar --bootstrap "$parentdir/vendor/autoload.php" "$parentdir/tests/full" - if [ $? -ne 0 ]; then - # Test failure - exit 1 - fi - fi - # Cleanup - if [[ "$clean" == "1" ]]; then - echo -e "\033[32mCleaning Up!\033[0m" - rm -f phpunit.phar - rm -f phpunit.phar.asc - fi -else - echo - chmod -x phpunit.phar - mv phpunit.phar /tmp/bad-phpunit.phar - mv phpunit.phar.asc /tmp/bad-phpunit.phar.asc - echo -e "\033[31mSignature did not match! Check /tmp/bad-phpunit.phar for trojans\033[0m" - exit 1 -fi diff --git a/vendor/paragonie/random_compat/tests/specific/capicom.php b/vendor/paragonie/random_compat/tests/specific/capicom.php deleted file mode 100644 index 640be1b..0000000 --- a/vendor/paragonie/random_compat/tests/specific/capicom.php +++ /dev/null @@ -1,7 +0,0 @@ -assertTrue(function_exists('random_bytes')); - } - - public function testOutput() - { - $bytes = array( - random_bytes(12), - random_bytes(64), - random_bytes(64), - random_bytes(1.5) - ); - - $this->assertTrue( - strlen(bin2hex($bytes[0])) === 24 - ); - $this->assertTrue( - strlen(bin2hex($bytes[3])) === 2 - ); - - // This should never generate identical byte strings - $this->assertFalse( - $bytes[1] === $bytes[2] - ); - - try { - $x = random_bytes(~PHP_INT_MAX - 1000000000); - $this->assertTrue(false); - } catch (TypeError $ex) { - $this->assertTrue(true); - } catch (Error $ex) { - $this->assertTrue(true); - } catch (Exception $ex) { - $this->assertTrue(true); - } - - try { - $x = random_bytes(PHP_INT_MAX + 1000000000); - $this->assertTrue(false); - } catch (TypeError $ex) { - $this->assertTrue(true); - } catch (Error $ex) { - $this->assertTrue(true); - } catch (Exception $ex) { - $this->assertTrue(true); - } - } -} diff --git a/vendor/paragonie/random_compat/tests/unit/RandomIntTest.php b/vendor/paragonie/random_compat/tests/unit/RandomIntTest.php deleted file mode 100644 index f9fc3c3..0000000 --- a/vendor/paragonie/random_compat/tests/unit/RandomIntTest.php +++ /dev/null @@ -1,52 +0,0 @@ -assertTrue(function_exists('random_int')); - } - - public function testOutput() - { - $half_neg_max = (~PHP_INT_MAX / 2); - $integers = array( - random_int(0, 1000), - random_int(1001,2000), - random_int(-100, -10), - random_int(-1000, 1000), - random_int(~PHP_INT_MAX, PHP_INT_MAX), - random_int("0", "1"), - random_int(0.11111, 0.99999), - random_int($half_neg_max, PHP_INT_MAX), - random_int(0.0, 255.0), - random_int(-4.5, -4.5), - random_int("1337e3","1337e3") - ); - - $this->assertFalse($integers[0] === $integers[1]); - $this->assertTrue($integers[0] >= 0 && $integers[0] <= 1000); - $this->assertTrue($integers[1] >= 1001 && $integers[1] <= 2000); - $this->assertTrue($integers[2] >= -100 && $integers[2] <= -10); - $this->assertTrue($integers[3] >= -1000 && $integers[3] <= 1000); - $this->assertTrue($integers[4] >= ~PHP_INT_MAX && $integers[4] <= PHP_INT_MAX); - $this->assertTrue($integers[5] >= 0 && $integers[5] <= 1); - $this->assertTrue($integers[6] === 0); - $this->assertTrue($integers[7] >= $half_neg_max && $integers[7] <= PHP_INT_MAX); - $this->assertTrue($integers[8] >= 0 && $integers[8] <= 255); - $this->assertTrue($integers[9] === -4); - $this->assertTrue($integers[10] === 1337000); - - try { - $h = random_int("2147483648", "2147483647"); - $i = random_int("9223372036854775808", "9223372036854775807"); - $this->assertFalse(is_int($i)); - $h = random_int("-2147483648", "2147483647"); - $i = random_int("-9223372036854775808", "9223372036854775807"); - $this->assertFalse(true); - } catch (Error $ex) { - $this->assertTrue($ex instanceof Error); - } catch (Exception $ex) { - $this->assertTrue($ex instanceof Exception); - } - } -} diff --git a/vendor/paragonie/random_compat/tests/unit/UtilityTest.php b/vendor/paragonie/random_compat/tests/unit/UtilityTest.php deleted file mode 100644 index 294a801..0000000 --- a/vendor/paragonie/random_compat/tests/unit/UtilityTest.php +++ /dev/null @@ -1,95 +0,0 @@ -markTestSkipped( - 'We don\' need to test this in PHP 7.' - ); - } - $this->assertEquals(RandomCompat_strlen("\xF0\x9D\x92\xB3"), 4); - } - - public function testIntval() - { - if (!function_exists('RandomCompat_intval')) { - return $this->markTestSkipped( - 'We don\' need to test this in PHP 7.' - ); - } - // Equals - $this->assertEquals( - abs(RandomCompat_intval(-4.5)), - abs(RandomCompat_intval(4.5)) - ); - - // True - $this->assertTrue( - is_int(RandomCompat_intval(PHP_INT_MAX, true)) - ); - $this->assertTrue( - is_int(RandomCompat_intval(~PHP_INT_MAX, true)) - ); - $this->assertTrue( - is_int(RandomCompat_intval(~PHP_INT_MAX + 1, true)) - ); - $this->assertTrue( - is_int(RandomCompat_intval("1337e3", true)) - ); - $this->assertTrue( - is_int(RandomCompat_intval("1.", true)) - ); - - // False - $this->assertFalse( - is_int(RandomCompat_intval((float) PHP_INT_MAX, true)) - ); - $this->assertFalse( - is_int(RandomCompat_intval((float) ~PHP_INT_MAX, true)) - ); - $this->assertFalse( - is_int(RandomCompat_intval(PHP_INT_MAX + 1, true)) - ); - $this->assertFalse( - is_int(RandomCompat_intval(~PHP_INT_MAX - 1, true)) - ); - $this->assertFalse( - is_int(RandomCompat_intval(~PHP_INT_MAX - 0.1, true)) - ); - $this->assertFalse( - is_int(RandomCompat_intval(PHP_INT_MAX + 0.1, true)) - ); - $this->assertFalse( - is_int(RandomCompat_intval("hello", true)) - ); - - if (PHP_INT_SIZE === 8) { - $this->assertFalse( - is_int(RandomCompat_intval("-9223372036854775809", true)) - ); - $this->assertTrue( - is_int(RandomCompat_intval("-9223372036854775808", true)) - ); - $this->assertFalse( - is_int(RandomCompat_intval("9223372036854775808", true)) - ); - $this->assertTrue( - is_int(RandomCompat_intval("9223372036854775807", true)) - ); - } else { - $this->assertFalse( - is_int(RandomCompat_intval("2147483648", true)) - ); - $this->assertTrue( - is_int(RandomCompat_intval("2147483647", true)) - ); - $this->assertFalse( - is_int(RandomCompat_intval("-2147483649", true)) - ); - $this->assertTrue( - is_int(RandomCompat_intval("-2147483648", true)) - ); - } - } -} diff --git a/vendor/phpunit/php-code-coverage/.gitignore b/vendor/phpunit/php-code-coverage/.gitignore index b386531..4486ead 100644 --- a/vendor/phpunit/php-code-coverage/.gitignore +++ b/vendor/phpunit/php-code-coverage/.gitignore @@ -5,6 +5,7 @@ build/logs build/pdepend cache.properties phpunit.xml +/tests/_files/tmp /vendor /composer.lock /composer.phar diff --git a/vendor/phpunit/php-code-coverage/.travis.yml b/vendor/phpunit/php-code-coverage/.travis.yml index ad88a08..8bceea8 100644 --- a/vendor/phpunit/php-code-coverage/.travis.yml +++ b/vendor/phpunit/php-code-coverage/.travis.yml @@ -1,10 +1,6 @@ language: php php: - - 5.3.3 - - 5.3 - - 5.4 - - 5.5 - 5.6 before_script: diff --git a/vendor/phpunit/php-code-coverage/CONTRIBUTING.md b/vendor/phpunit/php-code-coverage/CONTRIBUTING.md index 40dbc25..76a4345 100644 --- a/vendor/phpunit/php-code-coverage/CONTRIBUTING.md +++ b/vendor/phpunit/php-code-coverage/CONTRIBUTING.md @@ -1,5 +1 @@ -Pull Requests for bug fixes should be made against the current release branch (2.0). - -Pull Requests for new features should be made against master. - -For further notes please refer to [https://github.com/sebastianbergmann/phpunit/blob/master/CONTRIBUTING.md](https://github.com/sebastianbergmann/phpunit/blob/master/CONTRIBUTING.md) +Please refer to [https://github.com/sebastianbergmann/phpunit/blob/master/CONTRIBUTING.md](https://github.com/sebastianbergmann/phpunit/blob/master/CONTRIBUTING.md) for details on how to contribute to this project. diff --git a/vendor/phpunit/php-code-coverage/README.md b/vendor/phpunit/php-code-coverage/README.md index 4411d7f..41e2534 100644 --- a/vendor/phpunit/php-code-coverage/README.md +++ b/vendor/phpunit/php-code-coverage/README.md @@ -7,11 +7,11 @@ ## Requirements -PHP 5.3.3 is required but using the latest version of PHP is highly recommended +PHP 5.6 is required but using the latest version of PHP is highly recommended ### PHP 5 -[Xdebug](http://xdebug.org/) is the only source of raw code coverage data supported for PHP 5. Version 2.1.3 of Xdebug is required but using the latest version is highly recommended. +[Xdebug](http://xdebug.org/) is the only source of raw code coverage data supported for PHP 5. Version 2.2.1 of Xdebug is required but using the latest version is highly recommended. ### PHP 7 @@ -23,11 +23,11 @@ A version of HHVM that implements the Xdebug API for code coverage (`xdebug_*_co ## Installation -To add PHP_CodeCoverage as a local, per-project dependency to your project, simply add a dependency on `phpunit/php-code-coverage` to your project's `composer.json` file. Here is a minimal example of a `composer.json` file that just defines a dependency on PHP_CodeCoverage 2.0: +To add PHP_CodeCoverage as a local, per-project dependency to your project, simply add a dependency on `phpunit/php-code-coverage` to your project's `composer.json` file. Here is a minimal example of a `composer.json` file that just defines a dependency on PHP_CodeCoverage 3.0: { "require": { - "phpunit/php-code-coverage": "^2" + "phpunit/php-code-coverage": "^3" } } diff --git a/vendor/phpunit/php-code-coverage/composer.json b/vendor/phpunit/php-code-coverage/composer.json index 55f9fd0..cb471cf 100644 --- a/vendor/phpunit/php-code-coverage/composer.json +++ b/vendor/phpunit/php-code-coverage/composer.json @@ -21,15 +21,16 @@ "irc": "irc://irc.freenode.net/phpunit" }, "require": { - "php": ">=5.3.3", + "php": ">=5.6", "phpunit/php-file-iterator": "~1.3", "phpunit/php-token-stream": "~1.3", "phpunit/php-text-template": "~1.2", + "sebastian/code-unit-reverse-lookup": "~1.0", "sebastian/environment": "^1.3.2", - "sebastian/version": "~1.0" + "sebastian/version": "~1.0|~2.0" }, "require-dev": { - "phpunit/phpunit": "~4", + "phpunit/phpunit": "~5", "ext-xdebug": ">=2.1.4" }, "suggest": { @@ -44,7 +45,7 @@ }, "extra": { "branch-alias": { - "dev-master": "2.2.x-dev" + "dev-master": "3.2.x-dev" } } } diff --git a/vendor/phpunit/php-code-coverage/scripts/auto_append.php b/vendor/phpunit/php-code-coverage/scripts/auto_append.php deleted file mode 100644 index 6cd768d..0000000 --- a/vendor/phpunit/php-code-coverage/scripts/auto_append.php +++ /dev/null @@ -1,5 +0,0 @@ -stop(); - -$writer = new PHP_CodeCoverage_Report_HTML; -$writer->process($coverage, '/tmp/coverage'); diff --git a/vendor/phpunit/php-code-coverage/scripts/auto_prepend.php b/vendor/phpunit/php-code-coverage/scripts/auto_prepend.php deleted file mode 100644 index 7a8887a..0000000 --- a/vendor/phpunit/php-code-coverage/scripts/auto_prepend.php +++ /dev/null @@ -1,10 +0,0 @@ -filter(); - -$filter->addFileToBlacklist(__FILE__); -$filter->addFileToBlacklist(dirname(__FILE__) . '/auto_append.php'); - -$coverage->start($_SERVER['SCRIPT_FILENAME']); diff --git a/vendor/phpunit/php-code-coverage/src/CodeCoverage.php b/vendor/phpunit/php-code-coverage/src/CodeCoverage.php index 88326f0..e623195 100644 --- a/vendor/phpunit/php-code-coverage/src/CodeCoverage.php +++ b/vendor/phpunit/php-code-coverage/src/CodeCoverage.php @@ -8,6 +8,7 @@ * file that was distributed with this source code. */ +use SebastianBergmann\CodeUnitReverseLookup\Wizard; use SebastianBergmann\Environment\Runtime; /** @@ -27,6 +28,11 @@ class PHP_CodeCoverage */ private $filter; + /** + * @var Wizard + */ + private $wizard; + /** * @var bool */ @@ -45,7 +51,12 @@ class PHP_CodeCoverage /** * @var bool */ - private $mapTestClassNameToCoveredClassName = false; + private $checkForUnexecutedCoveredCode = false; + + /** + * @var bool + */ + private $checkForMissingCoversAnnotation = false; /** * @var bool @@ -57,6 +68,11 @@ class PHP_CodeCoverage */ private $processUncoveredFilesFromWhitelist = false; + /** + * @var bool + */ + private $ignoreDeprecatedCode = false; + /** * @var mixed */ @@ -67,12 +83,12 @@ class PHP_CodeCoverage * * @var array */ - private $data = array(); + private $data = []; /** * @var array */ - private $ignoredLines = array(); + private $ignoredLines = []; /** * @var bool @@ -84,14 +100,14 @@ class PHP_CodeCoverage * * @var array */ - private $tests = array(); + private $tests = []; /** * Constructor. * - * @param PHP_CodeCoverage_Driver $driver - * @param PHP_CodeCoverage_Filter $filter - * @throws PHP_CodeCoverage_Exception + * @param PHP_CodeCoverage_Driver $driver + * @param PHP_CodeCoverage_Filter $filter + * @throws PHP_CodeCoverage_RuntimeException */ public function __construct(PHP_CodeCoverage_Driver $driver = null, PHP_CodeCoverage_Filter $filter = null) { @@ -105,6 +121,8 @@ class PHP_CodeCoverage $this->driver = $driver; $this->filter = $filter; + + $this->wizard = new Wizard; } /** @@ -127,8 +145,8 @@ class PHP_CodeCoverage public function clear() { $this->currentId = null; - $this->data = array(); - $this->tests = array(); + $this->data = []; + $this->tests = []; } /** @@ -155,12 +173,6 @@ class PHP_CodeCoverage $this->addUncoveredFilesFromWhitelist(); } - // We need to apply the blacklist filter a second time - // when no whitelist is used. - if (!$raw && !$this->filter->hasWhitelist()) { - $this->applyListsFilter($this->data); - } - return $this->data; } @@ -200,14 +212,14 @@ class PHP_CodeCoverage /** * Start collection of code coverage information. * - * @param mixed $id - * @param bool $clear - * @throws PHP_CodeCoverage_Exception + * @param mixed $id + * @param bool $clear + * @throws PHP_CodeCoverage_InvalidArgumentException */ public function start($id, $clear = false) { if (!is_bool($clear)) { - throw PHP_CodeCoverage_Util_InvalidArgumentHelper::factory( + throw PHP_CodeCoverage_InvalidArgumentException::create( 1, 'boolean' ); @@ -225,23 +237,23 @@ class PHP_CodeCoverage /** * Stop collection of code coverage information. * - * @param bool $append - * @param mixed $linesToBeCovered - * @param array $linesToBeUsed + * @param bool $append + * @param mixed $linesToBeCovered + * @param array $linesToBeUsed * @return array - * @throws PHP_CodeCoverage_Exception + * @throws PHP_CodeCoverage_InvalidArgumentException */ - public function stop($append = true, $linesToBeCovered = array(), array $linesToBeUsed = array()) + public function stop($append = true, $linesToBeCovered = [], array $linesToBeUsed = []) { if (!is_bool($append)) { - throw PHP_CodeCoverage_Util_InvalidArgumentHelper::factory( + throw PHP_CodeCoverage_InvalidArgumentException::create( 1, 'boolean' ); } if (!is_array($linesToBeCovered) && $linesToBeCovered !== false) { - throw PHP_CodeCoverage_Util_InvalidArgumentHelper::factory( + throw PHP_CodeCoverage_InvalidArgumentException::create( 2, 'array or false' ); @@ -258,21 +270,21 @@ class PHP_CodeCoverage /** * Appends code coverage data. * - * @param array $data - * @param mixed $id - * @param bool $append - * @param mixed $linesToBeCovered - * @param array $linesToBeUsed - * @throws PHP_CodeCoverage_Exception + * @param array $data + * @param mixed $id + * @param bool $append + * @param mixed $linesToBeCovered + * @param array $linesToBeUsed + * @throws PHP_CodeCoverage_RuntimeException */ - public function append(array $data, $id = null, $append = true, $linesToBeCovered = array(), array $linesToBeUsed = array()) + public function append(array $data, $id = null, $append = true, $linesToBeCovered = [], array $linesToBeUsed = []) { if ($id === null) { $id = $this->currentId; } if ($id === null) { - throw new PHP_CodeCoverage_Exception; + throw new PHP_CodeCoverage_RuntimeException; } $this->applyListsFilter($data); @@ -316,7 +328,7 @@ class PHP_CodeCoverage $id = $id->getName(); } - $this->tests[$id] = array('size' => $size, 'status' => $status); + $this->tests[$id] = ['size' => $size, 'status' => $status]; foreach ($data as $file => $lines) { if (!$this->filter->isFile($file)) { @@ -340,10 +352,6 @@ class PHP_CodeCoverage */ public function merge(PHP_CodeCoverage $that) { - $this->filter->setBlacklistedFiles( - array_merge($this->filter->getBlacklistedFiles(), $that->filter()->getBlacklistedFiles()) - ); - $this->filter->setWhitelistedFiles( array_merge($this->filter->getWhitelistedFiles(), $that->filter()->getWhitelistedFiles()) ); @@ -375,14 +383,14 @@ class PHP_CodeCoverage } /** - * @param bool $flag - * @throws PHP_CodeCoverage_Exception + * @param bool $flag + * @throws PHP_CodeCoverage_InvalidArgumentException * @since Method available since Release 1.1.0 */ public function setCacheTokens($flag) { if (!is_bool($flag)) { - throw PHP_CodeCoverage_Util_InvalidArgumentHelper::factory( + throw PHP_CodeCoverage_InvalidArgumentException::create( 1, 'boolean' ); @@ -400,14 +408,14 @@ class PHP_CodeCoverage } /** - * @param bool $flag - * @throws PHP_CodeCoverage_Exception + * @param bool $flag + * @throws PHP_CodeCoverage_InvalidArgumentException * @since Method available since Release 2.0.0 */ public function setCheckForUnintentionallyCoveredCode($flag) { if (!is_bool($flag)) { - throw PHP_CodeCoverage_Util_InvalidArgumentHelper::factory( + throw PHP_CodeCoverage_InvalidArgumentException::create( 1, 'boolean' ); @@ -417,13 +425,13 @@ class PHP_CodeCoverage } /** - * @param bool $flag - * @throws PHP_CodeCoverage_Exception + * @param bool $flag + * @throws PHP_CodeCoverage_InvalidArgumentException */ public function setForceCoversAnnotation($flag) { if (!is_bool($flag)) { - throw PHP_CodeCoverage_Util_InvalidArgumentHelper::factory( + throw PHP_CodeCoverage_InvalidArgumentException::create( 1, 'boolean' ); @@ -433,29 +441,55 @@ class PHP_CodeCoverage } /** - * @param bool $flag - * @throws PHP_CodeCoverage_Exception + * @param bool $flag + * @throws PHP_CodeCoverage_InvalidArgumentException + * @since Method available since Release 3.2.0 */ - public function setMapTestClassNameToCoveredClassName($flag) + public function setCheckForMissingCoversAnnotation($flag) { if (!is_bool($flag)) { - throw PHP_CodeCoverage_Util_InvalidArgumentHelper::factory( + throw PHP_CodeCoverage_InvalidArgumentException::create( 1, 'boolean' ); } - $this->mapTestClassNameToCoveredClassName = $flag; + $this->checkForMissingCoversAnnotation = $flag; } /** - * @param bool $flag - * @throws PHP_CodeCoverage_Exception + * @param bool $flag + * @throws PHP_CodeCoverage_InvalidArgumentException + */ + public function setCheckForUnexecutedCoveredCode($flag) + { + if (!is_bool($flag)) { + throw PHP_CodeCoverage_InvalidArgumentException::create( + 1, + 'boolean' + ); + } + + $this->checkForUnexecutedCoveredCode = $flag; + } + + /** + * @deprecated + * @param bool $flag + * @throws PHP_CodeCoverage_InvalidArgumentException + */ + public function setMapTestClassNameToCoveredClassName($flag) + { + } + + /** + * @param bool $flag + * @throws PHP_CodeCoverage_InvalidArgumentException */ public function setAddUncoveredFilesFromWhitelist($flag) { if (!is_bool($flag)) { - throw PHP_CodeCoverage_Util_InvalidArgumentHelper::factory( + throw PHP_CodeCoverage_InvalidArgumentException::create( 1, 'boolean' ); @@ -465,13 +499,13 @@ class PHP_CodeCoverage } /** - * @param bool $flag - * @throws PHP_CodeCoverage_Exception + * @param bool $flag + * @throws PHP_CodeCoverage_InvalidArgumentException */ public function setProcessUncoveredFilesFromWhitelist($flag) { if (!is_bool($flag)) { - throw PHP_CodeCoverage_Util_InvalidArgumentHelper::factory( + throw PHP_CodeCoverage_InvalidArgumentException::create( 1, 'boolean' ); @@ -481,13 +515,13 @@ class PHP_CodeCoverage } /** - * @param bool $flag - * @throws PHP_CodeCoverage_Exception + * @param bool $flag + * @throws PHP_CodeCoverage_InvalidArgumentException */ public function setDisableIgnoredLines($flag) { if (!is_bool($flag)) { - throw PHP_CodeCoverage_Util_InvalidArgumentHelper::factory( + throw PHP_CodeCoverage_InvalidArgumentException::create( 1, 'boolean' ); @@ -496,19 +530,41 @@ class PHP_CodeCoverage $this->disableIgnoredLines = $flag; } + /** + * @param bool $flag + * @throws PHP_CodeCoverage_InvalidArgumentException + * @since Method available since Release 3.0.2 + */ + public function setIgnoreDeprecatedCode($flag) + { + if (!is_bool($flag)) { + throw PHP_CodeCoverage_InvalidArgumentException::create( + 1, + 'boolean' + ); + } + + $this->ignoreDeprecatedCode = $flag; + } + /** * Applies the @covers annotation filtering. * - * @param array $data - * @param mixed $linesToBeCovered - * @param array $linesToBeUsed - * @throws PHP_CodeCoverage_Exception_UnintentionallyCoveredCode + * @param array $data + * @param mixed $linesToBeCovered + * @param array $linesToBeUsed + * @throws PHP_CodeCoverage_MissingCoversAnnotationException + * @throws PHP_CodeCoverage_UnintentionallyCoveredCodeException */ private function applyCoversAnnotationFilter(array &$data, $linesToBeCovered, array $linesToBeUsed) { if ($linesToBeCovered === false || ($this->forceCoversAnnotation && empty($linesToBeCovered))) { - $data = array(); + if ($this->checkForMissingCoversAnnotation) { + throw new PHP_CodeCoverage_MissingCoversAnnotationException; + } + + $data = []; return; } @@ -525,6 +581,10 @@ class PHP_CodeCoverage ); } + if ($this->checkForUnexecutedCoveredCode) { + $this->performUnexecutedCoveredCodeCheck($data, $linesToBeCovered, $linesToBeUsed); + } + $data = array_intersect_key($data, $linesToBeCovered); foreach (array_keys($data) as $filename) { @@ -538,7 +598,7 @@ class PHP_CodeCoverage } /** - * Applies the blacklist/whitelist filtering. + * Applies the whitelist filtering. * * @param array $data */ @@ -577,10 +637,10 @@ class PHP_CodeCoverage { foreach ($data as $file => $lines) { if ($this->filter->isFile($file) && !isset($this->data[$file])) { - $this->data[$file] = array(); + $this->data[$file] = []; foreach ($lines as $k => $v) { - $this->data[$file][$k] = $v == -2 ? null : array(); + $this->data[$file][$k] = $v == -2 ? null : []; } } } @@ -591,7 +651,7 @@ class PHP_CodeCoverage */ private function addUncoveredFilesFromWhitelist() { - $data = array(); + $data = []; $uncoveredFiles = array_diff( $this->filter->getWhitelist(), array_keys($this->data) @@ -609,7 +669,7 @@ class PHP_CodeCoverage $uncoveredFiles ); } else { - $data[$uncoveredFile] = array(); + $data[$uncoveredFile] = []; $lines = count(file($uncoveredFile)); @@ -650,22 +710,22 @@ class PHP_CodeCoverage /** * Returns the lines of a source file that should be ignored. * - * @param string $filename + * @param string $filename * @return array - * @throws PHP_CodeCoverage_Exception + * @throws PHP_CodeCoverage_InvalidArgumentException * @since Method available since Release 2.0.0 */ private function getLinesToBeIgnored($filename) { if (!is_string($filename)) { - throw PHP_CodeCoverage_Util_InvalidArgumentHelper::factory( + throw PHP_CodeCoverage_InvalidArgumentException::create( 1, 'string' ); } if (!isset($this->ignoredLines[$filename])) { - $this->ignoredLines[$filename] = array(); + $this->ignoredLines[$filename] = []; if ($this->disableIgnoredLines) { return $this->ignoredLines[$filename]; @@ -736,11 +796,13 @@ class PHP_CodeCoverage case 'PHP_Token_TRAIT': case 'PHP_Token_CLASS': case 'PHP_Token_FUNCTION': + /* @var PHP_Token_Interface $token */ + $docblock = $token->getDocblock(); $this->ignoredLines[$filename][] = $token->getLine(); - if (strpos($docblock, '@codeCoverageIgnore') || strpos($docblock, '@deprecated')) { + if (strpos($docblock, '@codeCoverageIgnore') || ($this->ignoreDeprecatedCode && strpos($docblock, '@deprecated'))) { $endLine = $token->getEndLine(); for ($i = $token->getLine(); $i <= $endLine; $i++) { @@ -820,10 +882,10 @@ class PHP_CodeCoverage } /** - * @param array $data - * @param array $linesToBeCovered - * @param array $linesToBeUsed - * @throws PHP_CodeCoverage_Exception_UnintentionallyCoveredCode + * @param array $data + * @param array $linesToBeCovered + * @param array $linesToBeUsed + * @throws PHP_CodeCoverage_UnintentionallyCoveredCodeException * @since Method available since Release 2.0.0 */ private function performUnintentionallyCoveredCodeCheck(array &$data, array $linesToBeCovered, array $linesToBeUsed) @@ -833,29 +895,67 @@ class PHP_CodeCoverage $linesToBeUsed ); - $message = ''; + $unintentionallyCoveredUnits = []; foreach ($data as $file => $_data) { foreach ($_data as $line => $flag) { - if ($flag == 1 && - (!isset($allowedLines[$file]) || - !isset($allowedLines[$file][$line]))) { - $message .= sprintf( - '- %s:%d' . PHP_EOL, - $file, - $line - ); + if ($flag == 1 && !isset($allowedLines[$file][$line])) { + $unintentionallyCoveredUnits[] = $this->wizard->lookup($file, $line); } } } - if (!empty($message)) { - throw new PHP_CodeCoverage_Exception_UnintentionallyCoveredCode( - $message + if (!empty($unintentionallyCoveredUnits)) { + $unintentionallyCoveredUnits = array_unique($unintentionallyCoveredUnits); + sort($unintentionallyCoveredUnits); + + throw new PHP_CodeCoverage_UnintentionallyCoveredCodeException( + $unintentionallyCoveredUnits ); } } + /** + * @param array $data + * @param array $linesToBeCovered + * @param array $linesToBeUsed + * @throws PHP_CodeCoverage_CoveredCodeNotExecutedException + */ + private function performUnexecutedCoveredCodeCheck(array &$data, array $linesToBeCovered, array $linesToBeUsed) + { + $expectedLines = $this->getAllowedLines( + $linesToBeCovered, + $linesToBeUsed + ); + + foreach ($data as $file => $_data) { + foreach (array_keys($_data) as $line) { + if (!isset($expectedLines[$file][$line])) { + continue; + } + + unset($expectedLines[$file][$line]); + } + } + + $message = ''; + + foreach ($expectedLines as $file => $lines) { + if (empty($lines)) { + continue; + } + + foreach (array_keys($lines) as $line) { + $message .= sprintf('- %s:%d' . PHP_EOL, $file, $line); + } + } + + if (!empty($message)) { + throw new PHP_CodeCoverage_CoveredCodeNotExecutedException($message); + } + + } + /** * @param array $linesToBeCovered * @param array $linesToBeUsed @@ -864,11 +964,11 @@ class PHP_CodeCoverage */ private function getAllowedLines(array $linesToBeCovered, array $linesToBeUsed) { - $allowedLines = array(); + $allowedLines = []; foreach (array_keys($linesToBeCovered) as $file) { if (!isset($allowedLines[$file])) { - $allowedLines[$file] = array(); + $allowedLines[$file] = []; } $allowedLines[$file] = array_merge( @@ -879,7 +979,7 @@ class PHP_CodeCoverage foreach (array_keys($linesToBeUsed) as $file) { if (!isset($allowedLines[$file])) { - $allowedLines[$file] = array(); + $allowedLines[$file] = []; } $allowedLines[$file] = array_merge( @@ -899,14 +999,14 @@ class PHP_CodeCoverage /** * @return PHP_CodeCoverage_Driver - * @throws PHP_CodeCoverage_Exception + * @throws PHP_CodeCoverage_RuntimeException */ private function selectDriver() { $runtime = new Runtime; if (!$runtime->canCollectCodeCoverage()) { - throw new PHP_CodeCoverage_Exception('No code coverage driver available'); + throw new PHP_CodeCoverage_RuntimeException('No code coverage driver available'); } if ($runtime->isHHVM()) { diff --git a/vendor/phpunit/php-code-coverage/src/CodeCoverage/Driver/PHPDBG.php b/vendor/phpunit/php-code-coverage/src/CodeCoverage/Driver/PHPDBG.php index f3eb621..2c39c8c 100644 --- a/vendor/phpunit/php-code-coverage/src/CodeCoverage/Driver/PHPDBG.php +++ b/vendor/phpunit/php-code-coverage/src/CodeCoverage/Driver/PHPDBG.php @@ -22,13 +22,13 @@ class PHP_CodeCoverage_Driver_PHPDBG implements PHP_CodeCoverage_Driver public function __construct() { if (PHP_SAPI !== 'phpdbg') { - throw new PHP_CodeCoverage_Exception( + throw new PHP_CodeCoverage_RuntimeException( 'This driver requires the PHPDBG SAPI' ); } if (!function_exists('phpdbg_start_oplog')) { - throw new PHP_CodeCoverage_Exception( + throw new PHP_CodeCoverage_RuntimeException( 'This build of PHPDBG does not support code coverage' ); } @@ -49,11 +49,11 @@ class PHP_CodeCoverage_Driver_PHPDBG implements PHP_CodeCoverage_Driver */ public function stop() { - static $fetchedLines = array(); + static $fetchedLines = []; $dbgData = phpdbg_end_oplog(); - if ($fetchedLines == array()) { + if ($fetchedLines == []) { $sourceLines = phpdbg_get_executable(); } else { $newFiles = array_diff( @@ -63,10 +63,10 @@ class PHP_CodeCoverage_Driver_PHPDBG implements PHP_CodeCoverage_Driver if ($newFiles) { $sourceLines = phpdbg_get_executable( - array('files' => $newFiles) + ['files' => $newFiles] ); } else { - $sourceLines = array(); + $sourceLines = []; } } diff --git a/vendor/phpunit/php-code-coverage/src/CodeCoverage/Driver/Xdebug.php b/vendor/phpunit/php-code-coverage/src/CodeCoverage/Driver/Xdebug.php index 0cd7b9a..069f16a 100644 --- a/vendor/phpunit/php-code-coverage/src/CodeCoverage/Driver/Xdebug.php +++ b/vendor/phpunit/php-code-coverage/src/CodeCoverage/Driver/Xdebug.php @@ -22,12 +22,12 @@ class PHP_CodeCoverage_Driver_Xdebug implements PHP_CodeCoverage_Driver public function __construct() { if (!extension_loaded('xdebug')) { - throw new PHP_CodeCoverage_Exception('This driver requires Xdebug'); + throw new PHP_CodeCoverage_RuntimeException('This driver requires Xdebug'); } - if (version_compare(phpversion('xdebug'), '2.2.0-dev', '>=') && + if (version_compare(phpversion('xdebug'), '2.2.1', '>=') && !ini_get('xdebug.coverage_enable')) { - throw new PHP_CodeCoverage_Exception( + throw new PHP_CodeCoverage_RuntimeException( 'xdebug.coverage_enable=On has to be set in php.ini' ); } @@ -68,7 +68,7 @@ class PHP_CodeCoverage_Driver_Xdebug implements PHP_CodeCoverage_Driver $numLines = $this->getNumberOfLinesInFile($file); foreach (array_keys($data[$file]) as $line) { - if (isset($data[$file][$line]) && $line > $numLines) { + if ($line > $numLines) { unset($data[$file][$line]); } } diff --git a/vendor/phpunit/php-code-coverage/src/CodeCoverage/Exception.php b/vendor/phpunit/php-code-coverage/src/CodeCoverage/Exception.php deleted file mode 100644 index bded3c0..0000000 --- a/vendor/phpunit/php-code-coverage/src/CodeCoverage/Exception.php +++ /dev/null @@ -1,18 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/** - * Exception class for PHP_CodeCoverage component. - * - * @since Class available since Release 1.1.0 - */ -class PHP_CodeCoverage_Exception extends RuntimeException -{ -} diff --git a/vendor/phpunit/php-code-coverage/src/CodeCoverage/Exception/UnintentionallyCoveredCode.php b/vendor/phpunit/php-code-coverage/src/CodeCoverage/Exception/UnintentionallyCoveredCode.php deleted file mode 100644 index 463785e..0000000 --- a/vendor/phpunit/php-code-coverage/src/CodeCoverage/Exception/UnintentionallyCoveredCode.php +++ /dev/null @@ -1,18 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/** - * Exception that is raised when code is unintentionally covered. - * - * @since Class available since Release 2.0.0 - */ -class PHP_CodeCoverage_Exception_UnintentionallyCoveredCode extends PHP_CodeCoverage_Exception -{ -} diff --git a/vendor/phpunit/php-code-coverage/src/CodeCoverage/Filter.php b/vendor/phpunit/php-code-coverage/src/CodeCoverage/Filter.php index bb4a251..467fd98 100644 --- a/vendor/phpunit/php-code-coverage/src/CodeCoverage/Filter.php +++ b/vendor/phpunit/php-code-coverage/src/CodeCoverage/Filter.php @@ -9,95 +9,18 @@ */ /** - * Filter for blacklisting and whitelisting of code coverage information. + * Filter for whitelisting of code coverage information. * * @since Class available since Release 1.0.0 */ class PHP_CodeCoverage_Filter { - /** - * Source files that are blacklisted. - * - * @var array - */ - private $blacklistedFiles = array(); - /** * Source files that are whitelisted. * * @var array */ - private $whitelistedFiles = array(); - - /** - * Adds a directory to the blacklist (recursively). - * - * @param string $directory - * @param string $suffix - * @param string $prefix - */ - public function addDirectoryToBlacklist($directory, $suffix = '.php', $prefix = '') - { - $facade = new File_Iterator_Facade; - $files = $facade->getFilesAsArray($directory, $suffix, $prefix); - - foreach ($files as $file) { - $this->addFileToBlacklist($file); - } - } - - /** - * Adds a file to the blacklist. - * - * @param string $filename - */ - public function addFileToBlacklist($filename) - { - $this->blacklistedFiles[realpath($filename)] = true; - } - - /** - * Adds files to the blacklist. - * - * @param array $files - */ - public function addFilesToBlacklist(array $files) - { - foreach ($files as $file) { - $this->addFileToBlacklist($file); - } - } - - /** - * Removes a directory from the blacklist (recursively). - * - * @param string $directory - * @param string $suffix - * @param string $prefix - */ - public function removeDirectoryFromBlacklist($directory, $suffix = '.php', $prefix = '') - { - $facade = new File_Iterator_Facade; - $files = $facade->getFilesAsArray($directory, $suffix, $prefix); - - foreach ($files as $file) { - $this->removeFileFromBlacklist($file); - } - } - - /** - * Removes a file from the blacklist. - * - * @param string $filename - */ - public function removeFileFromBlacklist($filename) - { - $filename = realpath($filename); - - if (isset($this->blacklistedFiles[$filename])) { - unset($this->blacklistedFiles[$filename]); - } - } + private $whitelistedFiles = []; /** * Adds a directory to the whitelist (recursively). @@ -164,9 +87,7 @@ class PHP_CodeCoverage_Filter { $filename = realpath($filename); - if (isset($this->whitelistedFiles[$filename])) { - unset($this->whitelistedFiles[$filename]); - } + unset($this->whitelistedFiles[$filename]); } /** @@ -194,12 +115,8 @@ class PHP_CodeCoverage_Filter /** * Checks whether or not a file is filtered. * - * When the whitelist is empty (default), blacklisting is used. - * When the whitelist is not empty, whitelisting is used. - * - * @param string $filename + * @param string $filename * @return bool - * @throws PHP_CodeCoverage_Exception */ public function isFiltered($filename) { @@ -209,21 +126,7 @@ class PHP_CodeCoverage_Filter $filename = realpath($filename); - if (!empty($this->whitelistedFiles)) { - return !isset($this->whitelistedFiles[$filename]); - } - - return isset($this->blacklistedFiles[$filename]); - } - - /** - * Returns the list of blacklisted files. - * - * @return array - */ - public function getBlacklist() - { - return array_keys($this->blacklistedFiles); + return !isset($this->whitelistedFiles[$filename]); } /** @@ -247,28 +150,6 @@ class PHP_CodeCoverage_Filter return !empty($this->whitelistedFiles); } - /** - * Returns the blacklisted files. - * - * @return array - * @since Method available since Release 2.0.0 - */ - public function getBlacklistedFiles() - { - return $this->blacklistedFiles; - } - - /** - * Sets the blacklisted files. - * - * @param array $blacklistedFiles - * @since Method available since Release 2.0.0 - */ - public function setBlacklistedFiles($blacklistedFiles) - { - $this->blacklistedFiles = $blacklistedFiles; - } - /** * Returns the whitelisted files. * diff --git a/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/Clover.php b/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/Clover.php index c0ea8d8..6c8fda1 100644 --- a/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/Clover.php +++ b/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/Clover.php @@ -39,13 +39,11 @@ class PHP_CodeCoverage_Report_Clover $xmlCoverage->appendChild($xmlProject); - $packages = array(); + $packages = []; $report = $coverage->getReport(); unset($coverage); foreach ($report as $item) { - $namespace = 'global'; - if (!$item instanceof PHP_CodeCoverage_Report_Node_File) { continue; } @@ -53,9 +51,10 @@ class PHP_CodeCoverage_Report_Clover $xmlFile = $xmlDocument->createElement('file'); $xmlFile->setAttribute('name', $item->getPath()); - $classes = $item->getClassesAndTraits(); - $coverage = $item->getCoverageData(); - $lines = array(); + $classes = $item->getClassesAndTraits(); + $coverage = $item->getCoverageData(); + $lines = []; + $namespace = 'global'; foreach ($classes as $className => $class) { $classStatements = 0; @@ -84,12 +83,14 @@ class PHP_CodeCoverage_Report_Clover } } - $lines[$method['startLine']] = array( - 'count' => $methodCount, - 'crap' => $method['crap'], - 'type' => 'method', - 'name' => $methodName - ); + $lines[$method['startLine']] = [ + 'ccn' => $method['ccn'], + 'count' => $methodCount, + 'crap' => $method['crap'], + 'type' => 'method', + 'visibility' => $method['visibility'], + 'name' => $methodName + ]; } if (!empty($class['package']['namespace'])) { @@ -131,6 +132,7 @@ class PHP_CodeCoverage_Report_Clover $xmlFile->appendChild($xmlClass); $xmlMetrics = $xmlDocument->createElement('metrics'); + $xmlMetrics->setAttribute('complexity', $class['ccn']); $xmlMetrics->setAttribute('methods', $classMethods); $xmlMetrics->setAttribute('coveredmethods', $coveredMethods); $xmlMetrics->setAttribute('conditionals', 0); @@ -160,9 +162,9 @@ class PHP_CodeCoverage_Report_Clover continue; } - $lines[$line] = array( + $lines[$line] = [ 'count' => count($data), 'type' => 'stmt' - ); + ]; } ksort($lines); @@ -176,6 +178,14 @@ class PHP_CodeCoverage_Report_Clover $xmlLine->setAttribute('name', $data['name']); } + if (isset($data['visibility'])) { + $xmlLine->setAttribute('visibility', $data['visibility']); + } + + if (isset($data['ccn'])) { + $xmlLine->setAttribute('complexity', $data['ccn']); + } + if (isset($data['crap'])) { $xmlLine->setAttribute('crap', $data['crap']); } diff --git a/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/Crap4j.php b/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/Crap4j.php index c006ea6..3801107 100644 --- a/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/Crap4j.php +++ b/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/Crap4j.php @@ -24,7 +24,7 @@ class PHP_CodeCoverage_Report_Crap4j public function __construct($threshold = 30) { if (!is_int($threshold)) { - throw PHP_CodeCoverage_Util_InvalidArgumentHelper::factory( + throw PHP_CodeCoverage_InvalidArgumentException::create( 1, 'integer' ); diff --git a/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/Factory.php b/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/Factory.php index b28964e..519e92e 100644 --- a/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/Factory.php +++ b/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/Factory.php @@ -105,7 +105,7 @@ class PHP_CodeCoverage_Report_Factory */ private function buildDirectoryStructure($files) { - $result = array(); + $result = []; foreach ($files as $path => $file) { $path = explode('/', $path); diff --git a/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML.php b/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML.php index 80916ef..4829dd6 100644 --- a/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML.php +++ b/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML.php @@ -153,9 +153,9 @@ class PHP_CodeCoverage_Report_HTML } /** - * @param string $directory + * @param string $directory * @return string - * @throws PHP_CodeCoverage_Exception + * @throws PHP_CodeCoverage_RuntimeException * @since Method available since Release 1.2.0 */ private function getDirectory($directory) @@ -172,7 +172,7 @@ class PHP_CodeCoverage_Report_HTML return $directory; } - throw new PHP_CodeCoverage_Exception( + throw new PHP_CodeCoverage_RuntimeException( sprintf( 'Directory "%s" does not exist.', $directory diff --git a/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer.php b/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer.php index 51aa15e..af2e48b 100644 --- a/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer.php +++ b/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer.php @@ -58,7 +58,7 @@ abstract class PHP_CodeCoverage_Report_HTML_Renderer */ public function __construct($templatePath, $generator, $date, $lowUpperBound, $highLowerBound) { - $version = new SebastianBergmann\Version('2.2.4', dirname(dirname(dirname(dirname(__DIR__))))); + $version = new SebastianBergmann\Version('3.2.0', dirname(dirname(dirname(dirname(__DIR__))))); $this->templatePath = $templatePath; $this->generator = $generator; @@ -125,7 +125,7 @@ abstract class PHP_CodeCoverage_Report_HTML_Renderer } $template->setVar( - array( + [ 'icon' => isset($data['icon']) ? $data['icon'] : '', 'crap' => isset($data['crap']) ? $data['crap'] : '', 'name' => $data['name'], @@ -141,7 +141,7 @@ abstract class PHP_CodeCoverage_Report_HTML_Renderer 'classes_tested_percent' => isset($data['testedClassesPercentAsString']) ? $data['testedClassesPercentAsString'] : '', 'classes_level' => $classesLevel, 'classes_number' => $classesNumber - ) + ] ); return $template->render(); @@ -156,7 +156,7 @@ abstract class PHP_CodeCoverage_Report_HTML_Renderer $runtime = new Runtime; $template->setVar( - array( + [ 'id' => $node->getId(), 'full_path' => $node->getPath(), 'path_to_root' => $this->getPathToRoot($node), @@ -169,7 +169,7 @@ abstract class PHP_CodeCoverage_Report_HTML_Renderer 'generator' => $this->generator, 'low_upper_bound' => $this->lowUpperBound, 'high_lower_bound' => $this->highLowerBound - ) + ] ); } @@ -177,7 +177,7 @@ abstract class PHP_CodeCoverage_Report_HTML_Renderer { $breadcrumbs = ''; $path = $node->getPathAsArray(); - $pathToRoot = array(); + $pathToRoot = []; $max = count($path); if ($node instanceof PHP_CodeCoverage_Report_Node_File) { @@ -248,7 +248,7 @@ abstract class PHP_CodeCoverage_Report_HTML_Renderer '}}' ); - $template->setVar(array('level' => $level, 'percent' => sprintf('%.2F', $percent))); + $template->setVar(['level' => $level, 'percent' => sprintf('%.2F', $percent)]); return $template->render(); } diff --git a/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Dashboard.php b/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Dashboard.php index f648097..b61766a 100644 --- a/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Dashboard.php +++ b/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Dashboard.php @@ -37,7 +37,7 @@ class PHP_CodeCoverage_Report_HTML_Renderer_Dashboard extends PHP_CodeCoverage_R $projectRisks = $this->projectRisks($classes, $baseLink); $template->setVar( - array( + [ 'insufficient_coverage_classes' => $insufficientCoverage['class'], 'insufficient_coverage_methods' => $insufficientCoverage['method'], 'project_risks_classes' => $projectRisks['class'], @@ -46,7 +46,7 @@ class PHP_CodeCoverage_Report_HTML_Renderer_Dashboard extends PHP_CodeCoverage_R 'complexity_method' => $complexity['method'], 'class_coverage_distribution' => $coverageDistribution['class'], 'method_coverage_distribution' => $coverageDistribution['method'] - ) + ] ); $template->renderTo($file); @@ -61,7 +61,7 @@ class PHP_CodeCoverage_Report_HTML_Renderer_Dashboard extends PHP_CodeCoverage_R */ protected function complexity(array $classes, $baseLink) { - $result = array('class' => array(), 'method' => array()); + $result = ['class' => [], 'method' => []]; foreach ($classes as $className => $class) { foreach ($class['methods'] as $methodName => $method) { @@ -69,7 +69,7 @@ class PHP_CodeCoverage_Report_HTML_Renderer_Dashboard extends PHP_CodeCoverage_R $methodName = $className . '::' . $methodName; } - $result['method'][] = array( + $result['method'][] = [ $method['coverage'], $method['ccn'], sprintf( @@ -77,10 +77,10 @@ class PHP_CodeCoverage_Report_HTML_Renderer_Dashboard extends PHP_CodeCoverage_R str_replace($baseLink, '', $method['link']), $methodName ) - ); + ]; } - $result['class'][] = array( + $result['class'][] = [ $class['coverage'], $class['ccn'], sprintf( @@ -88,13 +88,13 @@ class PHP_CodeCoverage_Report_HTML_Renderer_Dashboard extends PHP_CodeCoverage_R str_replace($baseLink, '', $class['link']), $className ) - ); + ]; } - return array( + return [ 'class' => json_encode($result['class']), 'method' => json_encode($result['method']) - ); + ]; } /** @@ -105,8 +105,8 @@ class PHP_CodeCoverage_Report_HTML_Renderer_Dashboard extends PHP_CodeCoverage_R */ protected function coverageDistribution(array $classes) { - $result = array( - 'class' => array( + $result = [ + 'class' => [ '0%' => 0, '0-10%' => 0, '10-20%' => 0, @@ -119,8 +119,8 @@ class PHP_CodeCoverage_Report_HTML_Renderer_Dashboard extends PHP_CodeCoverage_R '80-90%' => 0, '90-100%' => 0, '100%' => 0 - ), - 'method' => array( + ], + 'method' => [ '0%' => 0, '0-10%' => 0, '10-20%' => 0, @@ -133,8 +133,8 @@ class PHP_CodeCoverage_Report_HTML_Renderer_Dashboard extends PHP_CodeCoverage_R '80-90%' => 0, '90-100%' => 0, '100%' => 0 - ) - ); + ] + ]; foreach ($classes as $class) { foreach ($class['methods'] as $methodName => $method) { @@ -160,10 +160,10 @@ class PHP_CodeCoverage_Report_HTML_Renderer_Dashboard extends PHP_CodeCoverage_R } } - return array( + return [ 'class' => json_encode(array_values($result['class'])), 'method' => json_encode(array_values($result['method'])) - ); + ]; } /** @@ -175,9 +175,9 @@ class PHP_CodeCoverage_Report_HTML_Renderer_Dashboard extends PHP_CodeCoverage_R */ protected function insufficientCoverage(array $classes, $baseLink) { - $leastTestedClasses = array(); - $leastTestedMethods = array(); - $result = array('class' => '', 'method' => ''); + $leastTestedClasses = []; + $leastTestedMethods = []; + $result = ['class' => '', 'method' => '']; foreach ($classes as $className => $class) { foreach ($class['methods'] as $methodName => $method) { @@ -233,9 +233,9 @@ class PHP_CodeCoverage_Report_HTML_Renderer_Dashboard extends PHP_CodeCoverage_R */ protected function projectRisks(array $classes, $baseLink) { - $classRisks = array(); - $methodRisks = array(); - $result = array('class' => '', 'method' => ''); + $classRisks = []; + $methodRisks = []; + $result = ['class' => '', 'method' => '']; foreach ($classes as $className => $class) { foreach ($class['methods'] as $methodName => $method) { diff --git a/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Directory.php b/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Directory.php index 4415c52..b7c0d0d 100644 --- a/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Directory.php +++ b/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/Directory.php @@ -36,10 +36,10 @@ class PHP_CodeCoverage_Report_HTML_Renderer_Directory extends PHP_CodeCoverage_R } $template->setVar( - array( + [ 'id' => $node->getId(), 'items' => $items - ) + ] ); $template->renderTo($file); @@ -52,7 +52,7 @@ class PHP_CodeCoverage_Report_HTML_Renderer_Directory extends PHP_CodeCoverage_R */ protected function renderItem(PHP_CodeCoverage_Report_Node $item, $total = false) { - $data = array( + $data = [ 'numClasses' => $item->getNumClassesAndTraits(), 'numTestedClasses' => $item->getNumTestedClassesAndTraits(), 'numMethods' => $item->getNumMethods(), @@ -65,7 +65,7 @@ class PHP_CodeCoverage_Report_HTML_Renderer_Directory extends PHP_CodeCoverage_R 'testedMethodsPercentAsString' => $item->getTestedMethodsPercent(), 'testedClassesPercent' => $item->getTestedClassesAndTraitsPercent(false), 'testedClassesPercentAsString' => $item->getTestedClassesAndTraitsPercent() - ); + ]; if ($total) { $data['name'] = 'Total'; diff --git a/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/File.php b/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/File.php index d52345d..5ab20c5 100644 --- a/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/File.php +++ b/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/HTML/Renderer/File.php @@ -8,28 +8,6 @@ * file that was distributed with this source code. */ -// @codeCoverageIgnoreStart -if (!defined('T_TRAIT')) { - define('T_TRAIT', 1001); -} - -if (!defined('T_INSTEADOF')) { - define('T_INSTEADOF', 1002); -} - -if (!defined('T_CALLABLE')) { - define('T_CALLABLE', 1003); -} - -if (!defined('T_FINALLY')) { - define('T_FINALLY', 1004); -} - -if (!defined('T_YIELD')) { - define('T_YIELD', 1005); -} -// @codeCoverageIgnoreEnd - /** * Renders a PHP_CodeCoverage_Report_Node_File node. * @@ -63,9 +41,7 @@ class PHP_CodeCoverage_Report_HTML_Renderer_File extends PHP_CodeCoverage_Report $this->htmlspecialcharsFlags = ENT_COMPAT; - if (PHP_VERSION_ID >= 50400 && defined('ENT_SUBSTITUTE')) { - $this->htmlspecialcharsFlags = $this->htmlspecialcharsFlags | ENT_HTML401 | ENT_SUBSTITUTE; - } + $this->htmlspecialcharsFlags = $this->htmlspecialcharsFlags | ENT_HTML401 | ENT_SUBSTITUTE; } /** @@ -77,10 +53,10 @@ class PHP_CodeCoverage_Report_HTML_Renderer_File extends PHP_CodeCoverage_Report $template = new Text_Template($this->templatePath . 'file.html', '{{', '}}'); $template->setVar( - array( + [ 'items' => $this->renderItems($node), 'lines' => $this->renderSource($node) - ) + ] ); $this->setCommonTemplateVariables($template, $node); @@ -104,7 +80,7 @@ class PHP_CodeCoverage_Report_HTML_Renderer_File extends PHP_CodeCoverage_Report $items = $this->renderItemTemplate( $template, - array( + [ 'name' => 'Total', 'numClasses' => $node->getNumClassesAndTraits(), 'numTestedClasses' => $node->getNumTestedClassesAndTraits(), @@ -119,7 +95,7 @@ class PHP_CodeCoverage_Report_HTML_Renderer_File extends PHP_CodeCoverage_Report 'testedClassesPercent' => $node->getTestedClassesAndTraitsPercent(false), 'testedClassesPercentAsString' => $node->getTestedClassesAndTraitsPercent(), 'crap' => 'CRAP' - ) + ] ); $items .= $this->renderFunctionItems( @@ -168,7 +144,7 @@ class PHP_CodeCoverage_Report_HTML_Renderer_File extends PHP_CodeCoverage_Report $buffer .= $this->renderItemTemplate( $template, - array( + [ 'name' => $name, 'numClasses' => 1, 'numTestedClasses' => $numTestedMethods == $numMethods ? 1 : 0, @@ -207,7 +183,7 @@ class PHP_CodeCoverage_Report_HTML_Renderer_File extends PHP_CodeCoverage_Report true ), 'crap' => $item['crap'] - ) + ] ); foreach ($item['methods'] as $method) { @@ -255,7 +231,7 @@ class PHP_CodeCoverage_Report_HTML_Renderer_File extends PHP_CodeCoverage_Report return $this->renderItemTemplate( $template, - array( + [ 'name' => sprintf( '%s%s', $indent, @@ -288,7 +264,7 @@ class PHP_CodeCoverage_Report_HTML_Renderer_File extends PHP_CodeCoverage_Report true ), 'crap' => $item['crap'] - ) + ] ); } @@ -413,7 +389,7 @@ class PHP_CodeCoverage_Report_HTML_Renderer_File extends PHP_CodeCoverage_Report { $buffer = file_get_contents($file); $tokens = token_get_all($buffer); - $result = array(''); + $result = ['']; $i = 0; $stringFlag = false; $fileEndsWithNewLine = substr($buffer, -1) == "\n"; @@ -442,8 +418,8 @@ class PHP_CodeCoverage_Report_HTML_Renderer_File extends PHP_CodeCoverage_Report list($token, $value) = $token; $value = str_replace( - array("\t", ' '), - array('    ', ' '), + ["\t", ' '], + ['    ', ' '], htmlspecialchars($value, $this->htmlspecialcharsFlags) ); diff --git a/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/Node.php b/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/Node.php index c57f744..e515a84 100644 --- a/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/Node.php +++ b/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/Node.php @@ -111,7 +111,7 @@ abstract class PHP_CodeCoverage_Report_Node implements Countable { if ($this->pathArray === null) { if ($this->parent === null) { - $this->pathArray = array(); + $this->pathArray = []; } else { $this->pathArray = $this->parent->getPathAsArray(); } diff --git a/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/Node/Directory.php b/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/Node/Directory.php index dd71ecb..b3a650a 100644 --- a/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/Node/Directory.php +++ b/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/Node/Directory.php @@ -18,17 +18,17 @@ class PHP_CodeCoverage_Report_Node_Directory extends PHP_CodeCoverage_Report_Nod /** * @var PHP_CodeCoverage_Report_Node[] */ - protected $children = array(); + protected $children = []; /** * @var PHP_CodeCoverage_Report_Node_Directory[] */ - protected $directories = array(); + protected $directories = []; /** * @var PHP_CodeCoverage_Report_Node_File[] */ - protected $files = array(); + protected $files = []; /** * @var array @@ -155,12 +155,12 @@ class PHP_CodeCoverage_Report_Node_Directory extends PHP_CodeCoverage_Report_Nod /** * Adds a new file. * - * @param string $name - * @param array $coverageData - * @param array $testData - * @param bool $cacheTokens + * @param string $name + * @param array $coverageData + * @param array $testData + * @param bool $cacheTokens * @return PHP_CodeCoverage_Report_Node_File - * @throws PHP_CodeCoverage_Exception + * @throws PHP_CodeCoverage_InvalidArgumentException */ public function addFile($name, array $coverageData, array $testData, $cacheTokens) { @@ -219,7 +219,7 @@ class PHP_CodeCoverage_Report_Node_Directory extends PHP_CodeCoverage_Report_Nod public function getClasses() { if ($this->classes === null) { - $this->classes = array(); + $this->classes = []; foreach ($this->children as $child) { $this->classes = array_merge( @@ -240,7 +240,7 @@ class PHP_CodeCoverage_Report_Node_Directory extends PHP_CodeCoverage_Report_Nod public function getTraits() { if ($this->traits === null) { - $this->traits = array(); + $this->traits = []; foreach ($this->children as $child) { $this->traits = array_merge( @@ -261,7 +261,7 @@ class PHP_CodeCoverage_Report_Node_Directory extends PHP_CodeCoverage_Report_Nod public function getFunctions() { if ($this->functions === null) { - $this->functions = array(); + $this->functions = []; foreach ($this->children as $child) { $this->functions = array_merge( @@ -282,7 +282,7 @@ class PHP_CodeCoverage_Report_Node_Directory extends PHP_CodeCoverage_Report_Nod public function getLinesOfCode() { if ($this->linesOfCode === null) { - $this->linesOfCode = array('loc' => 0, 'cloc' => 0, 'ncloc' => 0); + $this->linesOfCode = ['loc' => 0, 'cloc' => 0, 'ncloc' => 0]; foreach ($this->children as $child) { $linesOfCode = $child->getLinesOfCode(); diff --git a/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/Node/File.php b/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/Node/File.php index 32e43a6..f5b2ffb 100644 --- a/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/Node/File.php +++ b/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/Node/File.php @@ -38,22 +38,22 @@ class PHP_CodeCoverage_Report_Node_File extends PHP_CodeCoverage_Report_Node /** * @var array */ - protected $classes = array(); + protected $classes = []; /** * @var array */ - protected $traits = array(); + protected $traits = []; /** * @var array */ - protected $functions = array(); + protected $functions = []; /** * @var array */ - protected $linesOfCode = array(); + protected $linesOfCode = []; /** * @var int @@ -83,12 +83,12 @@ class PHP_CodeCoverage_Report_Node_File extends PHP_CodeCoverage_Report_Node /** * @var array */ - protected $startLines = array(); + protected $startLines = []; /** * @var array */ - protected $endLines = array(); + protected $endLines = []; /** * @var bool @@ -98,17 +98,17 @@ class PHP_CodeCoverage_Report_Node_File extends PHP_CodeCoverage_Report_Node /** * Constructor. * - * @param string $name - * @param PHP_CodeCoverage_Report_Node $parent - * @param array $coverageData - * @param array $testData - * @param bool $cacheTokens - * @throws PHP_CodeCoverage_Exception + * @param string $name + * @param PHP_CodeCoverage_Report_Node $parent + * @param array $coverageData + * @param array $testData + * @param bool $cacheTokens + * @throws PHP_CodeCoverage_InvalidArgumentException */ public function __construct($name, PHP_CodeCoverage_Report_Node $parent, array $coverageData, array $testData, $cacheTokens) { if (!is_bool($cacheTokens)) { - throw PHP_CodeCoverage_Util_InvalidArgumentHelper::factory( + throw PHP_CodeCoverage_InvalidArgumentException::create( 1, 'boolean' ); @@ -351,7 +351,7 @@ class PHP_CodeCoverage_Report_Node_File extends PHP_CodeCoverage_Report_Node */ protected function calculateStatistics() { - $classStack = $functionStack = array(); + $classStack = $functionStack = []; if ($this->cacheTokens) { $tokens = PHP_Token_Stream_CachingFactory::get($this->getPath()); @@ -541,9 +541,9 @@ class PHP_CodeCoverage_Report_Node_File extends PHP_CodeCoverage_Report_Node $link = $this->getId() . '.html#'; foreach ($classes as $className => $class) { - $this->classes[$className] = array( + $this->classes[$className] = [ 'className' => $className, - 'methods' => array(), + 'methods' => [], 'startLine' => $class['startLine'], 'executableLines' => 0, 'executedLines' => 0, @@ -552,24 +552,13 @@ class PHP_CodeCoverage_Report_Node_File extends PHP_CodeCoverage_Report_Node 'crap' => 0, 'package' => $class['package'], 'link' => $link . $class['startLine'] - ); + ]; $this->startLines[$class['startLine']] = &$this->classes[$className]; $this->endLines[$class['endLine']] = &$this->classes[$className]; foreach ($class['methods'] as $methodName => $method) { - $this->classes[$className]['methods'][$methodName] = array( - 'methodName' => $methodName, - 'signature' => $method['signature'], - 'startLine' => $method['startLine'], - 'endLine' => $method['endLine'], - 'executableLines' => 0, - 'executedLines' => 0, - 'ccn' => $method['ccn'], - 'coverage' => 0, - 'crap' => 0, - 'link' => $link . $method['startLine'] - ); + $this->classes[$className]['methods'][$methodName] = $this->newMethod($methodName, $method, $link); $this->startLines[$method['startLine']] = &$this->classes[$className]['methods'][$methodName]; $this->endLines[$method['endLine']] = &$this->classes[$className]['methods'][$methodName]; @@ -588,9 +577,9 @@ class PHP_CodeCoverage_Report_Node_File extends PHP_CodeCoverage_Report_Node $link = $this->getId() . '.html#'; foreach ($traits as $traitName => $trait) { - $this->traits[$traitName] = array( + $this->traits[$traitName] = [ 'traitName' => $traitName, - 'methods' => array(), + 'methods' => [], 'startLine' => $trait['startLine'], 'executableLines' => 0, 'executedLines' => 0, @@ -599,24 +588,13 @@ class PHP_CodeCoverage_Report_Node_File extends PHP_CodeCoverage_Report_Node 'crap' => 0, 'package' => $trait['package'], 'link' => $link . $trait['startLine'] - ); + ]; $this->startLines[$trait['startLine']] = &$this->traits[$traitName]; $this->endLines[$trait['endLine']] = &$this->traits[$traitName]; foreach ($trait['methods'] as $methodName => $method) { - $this->traits[$traitName]['methods'][$methodName] = array( - 'methodName' => $methodName, - 'signature' => $method['signature'], - 'startLine' => $method['startLine'], - 'endLine' => $method['endLine'], - 'executableLines' => 0, - 'executedLines' => 0, - 'ccn' => $method['ccn'], - 'coverage' => 0, - 'crap' => 0, - 'link' => $link . $method['startLine'] - ); + $this->traits[$traitName]['methods'][$methodName] = $this->newMethod($methodName, $method, $link); $this->startLines[$method['startLine']] = &$this->traits[$traitName]['methods'][$methodName]; $this->endLines[$method['endLine']] = &$this->traits[$traitName]['methods'][$methodName]; @@ -635,7 +613,7 @@ class PHP_CodeCoverage_Report_Node_File extends PHP_CodeCoverage_Report_Node $link = $this->getId() . '.html#'; foreach ($functions as $functionName => $function) { - $this->functions[$functionName] = array( + $this->functions[$functionName] = [ 'functionName' => $functionName, 'signature' => $function['signature'], 'startLine' => $function['startLine'], @@ -645,7 +623,7 @@ class PHP_CodeCoverage_Report_Node_File extends PHP_CodeCoverage_Report_Node 'coverage' => 0, 'crap' => 0, 'link' => $link . $function['startLine'] - ); + ]; $this->startLines[$function['startLine']] = &$this->functions[$functionName]; $this->endLines[$function['endLine']] = &$this->functions[$functionName]; @@ -676,4 +654,28 @@ class PHP_CodeCoverage_Report_Node_File extends PHP_CodeCoverage_Report_Node pow($ccn, 2) * pow(1 - $coverage/100, 3) + $ccn ); } + + /** + * @param string $methodName + * @param array $method + * @param string $link + * + * @return array + */ + private function newMethod($methodName, array $method, $link) + { + return [ + 'methodName' => $methodName, + 'visibility' => $method['visibility'], + 'signature' => $method['signature'], + 'startLine' => $method['startLine'], + 'endLine' => $method['endLine'], + 'executableLines' => 0, + 'executedLines' => 0, + 'ccn' => $method['ccn'], + 'coverage' => 0, + 'crap' => 0, + 'link' => $link . $method['startLine'], + ]; + } } diff --git a/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/PHP.php b/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/PHP.php index f4e5a0f..5871975 100644 --- a/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/PHP.php +++ b/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/PHP.php @@ -31,13 +31,11 @@ $coverage->setData(%s); $coverage->setTests(%s); $filter = $coverage->filter(); -$filter->setBlacklistedFiles(%s); $filter->setWhitelistedFiles(%s); return $coverage;', var_export($coverage->getData(true), 1), var_export($coverage->getTests(), 1), - var_export($filter->getBlacklistedFiles(), 1), var_export($filter->getWhitelistedFiles(), 1) ); diff --git a/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/Text.php b/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/Text.php index 7dc2545..d37a6d7 100644 --- a/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/Text.php +++ b/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/Text.php @@ -22,14 +22,14 @@ class PHP_CodeCoverage_Report_Text protected $showUncoveredFiles; protected $showOnlySummary; - protected $colors = array( + protected $colors = [ 'green' => "\x1b[30;42m", 'yellow' => "\x1b[30;43m", 'red' => "\x1b[37;41m", 'header' => "\x1b[1;37;40m", 'reset' => "\x1b[0m", 'eol' => "\x1b[2K", - ); + ]; public function __construct($lowUpperBound, $highLowerBound, $showUncoveredFiles, $showOnlySummary) { @@ -50,14 +50,14 @@ class PHP_CodeCoverage_Report_Text $report = $coverage->getReport(); unset($coverage); - $colors = array( + $colors = [ 'header' => '', 'classes' => '', 'methods' => '', 'lines' => '', 'reset' => '', 'eol' => '' - ); + ]; if ($showColors) { $colors['classes'] = $this->getCoverageColor( @@ -110,7 +110,7 @@ class PHP_CodeCoverage_Report_Text $report->getNumExecutableLines() ); - $padding = max(array_map('strlen', array($classes, $methods, $lines))); + $padding = max(array_map('strlen', [$classes, $methods, $lines])); if ($this->showOnlySummary) { $title = 'Code Coverage Report Summary:'; @@ -135,7 +135,7 @@ class PHP_CodeCoverage_Report_Text return $output . PHP_EOL; } - $classCoverage = array(); + $classCoverage = []; foreach ($report as $item) { if (!$item instanceof PHP_CodeCoverage_Report_Node_File) { @@ -171,14 +171,14 @@ class PHP_CodeCoverage_Report_Text $namespace = ''; } - $classCoverage[$namespace . $className] = array( + $classCoverage[$namespace . $className] = [ 'namespace' => $namespace, 'className ' => $className, 'methodsCovered' => $coveredMethods, 'methodCount' => $classMethods, 'statementsCovered' => $coveredClassStatements, 'statementCount' => $classStatements, - ); + ]; } } @@ -223,9 +223,9 @@ class PHP_CodeCoverage_Report_Text return $this->colors['red']; } - protected function printCoverageCounts($numberOfCoveredElements, $totalNumberOfElements, $presicion) + protected function printCoverageCounts($numberOfCoveredElements, $totalNumberOfElements, $precision) { - $format = '%' . $presicion . 's'; + $format = '%' . $precision . 's'; return PHP_CodeCoverage_Util::percent( $numberOfCoveredElements, diff --git a/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/XML.php b/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/XML.php index 5177b2b..ebdd7e2 100644 --- a/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/XML.php +++ b/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/XML.php @@ -51,18 +51,18 @@ class PHP_CodeCoverage_Report_XML { if (file_exists($dir)) { if (!is_dir($dir)) { - throw new PHP_CodeCoverage_Exception( + throw new PHP_CodeCoverage_RuntimeException( "'$dir' exists but is not a directory." ); } if (!is_writable($dir)) { - throw new PHP_CodeCoverage_Exception( + throw new PHP_CodeCoverage_RuntimeException( "'$dir' exists but is not writable." ); } } elseif (!@mkdir($dir, 0777, true)) { - throw new PHP_CodeCoverage_Exception( + throw new PHP_CodeCoverage_RuntimeException( "'$dir' could not be created." ); } @@ -85,7 +85,7 @@ class PHP_CodeCoverage_Report_XML continue; } - throw new PHP_CodeCoverage_Exception( + throw new PHP_CodeCoverage_RuntimeException( 'Unknown node type for XML report' ); } diff --git a/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/File/Coverage.php b/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/File/Coverage.php index 29a4e2b..9649248 100644 --- a/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/File/Coverage.php +++ b/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/File/Coverage.php @@ -41,7 +41,7 @@ class PHP_CodeCoverage_Report_XML_File_Coverage public function addTest($test) { if ($this->finalized) { - throw new PHP_CodeCoverage_Exception('Coverage Report already finalized'); + throw new PHP_CodeCoverage_RuntimeException('Coverage Report already finalized'); } $this->writer->startElement('covered'); diff --git a/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/Tests.php b/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/Tests.php index 4621467..8ff352c 100644 --- a/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/Tests.php +++ b/vendor/phpunit/php-code-coverage/src/CodeCoverage/Report/XML/Tests.php @@ -15,14 +15,14 @@ class PHP_CodeCoverage_Report_XML_Tests { private $contextNode; - private $codeMap = array( + private $codeMap = [ 0 => 'PASSED', // PHPUnit_Runner_BaseTestRunner::STATUS_PASSED 1 => 'SKIPPED', // PHPUnit_Runner_BaseTestRunner::STATUS_SKIPPED 2 => 'INCOMPLETE', // PHPUnit_Runner_BaseTestRunner::STATUS_INCOMPLETE 3 => 'FAILURE', // PHPUnit_Runner_BaseTestRunner::STATUS_FAILURE 4 => 'ERROR', // PHPUnit_Runner_BaseTestRunner::STATUS_ERROR 5 => 'RISKY' // PHPUnit_Runner_BaseTestRunner::STATUS_RISKY - ); + ]; public function __construct(DOMElement $context) { diff --git a/vendor/phpunit/php-code-coverage/src/CodeCoverage/Util.php b/vendor/phpunit/php-code-coverage/src/CodeCoverage/Util.php index eadb3c9..3ae47e5 100644 --- a/vendor/phpunit/php-code-coverage/src/CodeCoverage/Util.php +++ b/vendor/phpunit/php-code-coverage/src/CodeCoverage/Util.php @@ -16,9 +16,11 @@ class PHP_CodeCoverage_Util { /** - * @param float $a - * @param float $b - * @return float ($a / $b) * 100 + * @param float $a + * @param float $b + * @param bool $asString + * @param bool $fixedWidth + * @return float|int|string */ public static function percent($a, $b, $asString = false, $fixedWidth = false) { diff --git a/vendor/phpunit/php-code-coverage/src/CodeCoverage/Util/InvalidArgumentHelper.php b/vendor/phpunit/php-code-coverage/src/CodeCoverage/Util/InvalidArgumentHelper.php deleted file mode 100644 index d66e499..0000000 --- a/vendor/phpunit/php-code-coverage/src/CodeCoverage/Util/InvalidArgumentHelper.php +++ /dev/null @@ -1,39 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -/** - * Factory for PHP_CodeCoverage_Exception objects that are used to describe - * invalid arguments passed to a function or method. - * - * @since Class available since Release 1.2.0 - */ -class PHP_CodeCoverage_Util_InvalidArgumentHelper -{ - /** - * @param int $argument - * @param string $type - * @param mixed $value - */ - public static function factory($argument, $type, $value = null) - { - $stack = debug_backtrace(false); - - return new PHP_CodeCoverage_Exception( - sprintf( - 'Argument #%d%sof %s::%s() must be a %s', - $argument, - $value !== null ? ' (' . gettype($value) . '#' . $value . ')' : ' (No Value) ', - $stack[1]['class'], - $stack[1]['function'], - $type - ) - ); - } -} diff --git a/vendor/phpunit/php-code-coverage/tests/PHP/CodeCoverage/FilterTest.php b/vendor/phpunit/php-code-coverage/tests/PHP/CodeCoverage/FilterTest.php index 66f8bb4..f39b95c 100644 --- a/vendor/phpunit/php-code-coverage/tests/PHP/CodeCoverage/FilterTest.php +++ b/vendor/phpunit/php-code-coverage/tests/PHP/CodeCoverage/FilterTest.php @@ -8,13 +8,7 @@ * file that was distributed with this source code. */ -if (!defined('TEST_FILES_PATH')) { - define( - 'TEST_FILES_PATH', - dirname(dirname(dirname(__FILE__))) . DIRECTORY_SEPARATOR . - '_files' . DIRECTORY_SEPARATOR - ); -} +require_once dirname(dirname(dirname(__FILE__))) . DIRECTORY_SEPARATOR . 'TestCase.php'; /** * Tests for the PHP_CodeCoverage_Filter class. @@ -30,7 +24,7 @@ class PHP_CodeCoverage_FilterTest extends PHPUnit_Framework_TestCase { $this->filter = unserialize('O:23:"PHP_CodeCoverage_Filter":0:{}'); - $this->files = array( + $this->files = [ TEST_FILES_PATH . 'BankAccount.php', TEST_FILES_PATH . 'BankAccountTest.php', TEST_FILES_PATH . 'CoverageClassExtendedTest.php', @@ -72,81 +66,7 @@ class PHP_CodeCoverage_FilterTest extends PHPUnit_Framework_TestCase TEST_FILES_PATH . 'source_with_oneline_annotations.php', TEST_FILES_PATH . 'source_without_ignore.php', TEST_FILES_PATH . 'source_without_namespace.php' - ); - } - - /** - * @covers PHP_CodeCoverage_Filter::addFileToBlacklist - * @covers PHP_CodeCoverage_Filter::getBlacklist - */ - public function testAddingAFileToTheBlacklistWorks() - { - $this->filter->addFileToBlacklist($this->files[0]); - - $this->assertEquals( - array($this->files[0]), - $this->filter->getBlacklist() - ); - } - - /** - * @covers PHP_CodeCoverage_Filter::removeFileFromBlacklist - * @covers PHP_CodeCoverage_Filter::getBlacklist - */ - public function testRemovingAFileFromTheBlacklistWorks() - { - $this->filter->addFileToBlacklist($this->files[0]); - $this->filter->removeFileFromBlacklist($this->files[0]); - - $this->assertEquals(array(), $this->filter->getBlacklist()); - } - - /** - * @covers PHP_CodeCoverage_Filter::addDirectoryToBlacklist - * @covers PHP_CodeCoverage_Filter::getBlacklist - * @depends testAddingAFileToTheBlacklistWorks - */ - public function testAddingADirectoryToTheBlacklistWorks() - { - $this->filter->addDirectoryToBlacklist(TEST_FILES_PATH); - - $blacklist = $this->filter->getBlacklist(); - sort($blacklist); - - $this->assertEquals($this->files, $blacklist); - } - - /** - * @covers PHP_CodeCoverage_Filter::addFilesToBlacklist - * @covers PHP_CodeCoverage_Filter::getBlacklist - */ - public function testAddingFilesToTheBlacklistWorks() - { - $facade = new File_Iterator_Facade; - $files = $facade->getFilesAsArray( - TEST_FILES_PATH, - $suffixes = '.php' - ); - - $this->filter->addFilesToBlacklist($files); - - $blacklist = $this->filter->getBlacklist(); - sort($blacklist); - - $this->assertEquals($this->files, $blacklist); - } - - /** - * @covers PHP_CodeCoverage_Filter::removeDirectoryFromBlacklist - * @covers PHP_CodeCoverage_Filter::getBlacklist - * @depends testAddingADirectoryToTheBlacklistWorks - */ - public function testRemovingADirectoryFromTheBlacklistWorks() - { - $this->filter->addDirectoryToBlacklist(TEST_FILES_PATH); - $this->filter->removeDirectoryFromBlacklist(TEST_FILES_PATH); - - $this->assertEquals(array(), $this->filter->getBlacklist()); + ]; } /** @@ -158,7 +78,7 @@ class PHP_CodeCoverage_FilterTest extends PHPUnit_Framework_TestCase $this->filter->addFileToWhitelist($this->files[0]); $this->assertEquals( - array($this->files[0]), + [$this->files[0]], $this->filter->getWhitelist() ); } @@ -172,7 +92,7 @@ class PHP_CodeCoverage_FilterTest extends PHPUnit_Framework_TestCase $this->filter->addFileToWhitelist($this->files[0]); $this->filter->removeFileFromWhitelist($this->files[0]); - $this->assertEquals(array(), $this->filter->getWhitelist()); + $this->assertEquals([], $this->filter->getWhitelist()); } /** @@ -192,7 +112,7 @@ class PHP_CodeCoverage_FilterTest extends PHPUnit_Framework_TestCase /** * @covers PHP_CodeCoverage_Filter::addFilesToWhitelist - * @covers PHP_CodeCoverage_Filter::getBlacklist + * @covers PHP_CodeCoverage_Filter::getWhitelist */ public function testAddingFilesToTheWhitelistWorks() { @@ -220,7 +140,7 @@ class PHP_CodeCoverage_FilterTest extends PHPUnit_Framework_TestCase $this->filter->addDirectoryToWhitelist(TEST_FILES_PATH); $this->filter->removeDirectoryFromWhitelist(TEST_FILES_PATH); - $this->assertEquals(array(), $this->filter->getWhitelist()); + $this->assertEquals([], $this->filter->getWhitelist()); } /** @@ -237,15 +157,6 @@ class PHP_CodeCoverage_FilterTest extends PHPUnit_Framework_TestCase $this->assertTrue($this->filter->isFile(__FILE__)); } - /** - * @covers PHP_CodeCoverage_Filter::isFiltered - */ - public function testBlacklistedFileIsFiltered() - { - $this->filter->addFileToBlacklist($this->files[0]); - $this->assertTrue($this->filter->isFiltered($this->files[0])); - } - /** * @covers PHP_CodeCoverage_Filter::isFiltered */ @@ -276,6 +187,5 @@ class PHP_CodeCoverage_FilterTest extends PHPUnit_Framework_TestCase $this->assertTrue($this->filter->isFiltered('runtime-created function')); $this->assertTrue($this->filter->isFiltered('assert code')); $this->assertTrue($this->filter->isFiltered('regexp code')); - $this->assertFalse($this->filter->isFiltered(__FILE__)); } } diff --git a/vendor/phpunit/php-code-coverage/tests/PHP/CodeCoverage/Report/CloverTest.php b/vendor/phpunit/php-code-coverage/tests/PHP/CodeCoverage/Report/CloverTest.php index 8d860bd..1b2174e 100644 --- a/vendor/phpunit/php-code-coverage/tests/PHP/CodeCoverage/Report/CloverTest.php +++ b/vendor/phpunit/php-code-coverage/tests/PHP/CodeCoverage/Report/CloverTest.php @@ -8,15 +8,7 @@ * file that was distributed with this source code. */ -if (!defined('TEST_FILES_PATH')) { - define( - 'TEST_FILES_PATH', - dirname(dirname(dirname(__FILE__))) . DIRECTORY_SEPARATOR . - '_files' . DIRECTORY_SEPARATOR - ); -} - -require_once TEST_FILES_PATH . '../TestCase.php'; +require_once dirname(dirname(dirname(dirname(__FILE__)))) . DIRECTORY_SEPARATOR . 'TestCase.php'; /** * Tests for the PHP_CodeCoverage_Report_Clover class. diff --git a/vendor/phpunit/php-code-coverage/tests/PHP/CodeCoverage/Report/FactoryTest.php b/vendor/phpunit/php-code-coverage/tests/PHP/CodeCoverage/Report/FactoryTest.php index 84f14ae..9d1aeba 100644 --- a/vendor/phpunit/php-code-coverage/tests/PHP/CodeCoverage/Report/FactoryTest.php +++ b/vendor/phpunit/php-code-coverage/tests/PHP/CodeCoverage/Report/FactoryTest.php @@ -8,15 +8,7 @@ * file that was distributed with this source code. */ -if (!defined('TEST_FILES_PATH')) { - define( - 'TEST_FILES_PATH', - dirname(dirname(dirname(dirname(__FILE__)))) . DIRECTORY_SEPARATOR . - '_files' . DIRECTORY_SEPARATOR - ); -} - -require_once TEST_FILES_PATH . '../TestCase.php'; +require_once dirname(dirname(dirname(dirname(__FILE__)))) . DIRECTORY_SEPARATOR . 'TestCase.php'; /** * Tests for the PHP_CodeCoverage_Report_Factory class. @@ -51,15 +43,15 @@ class PHP_CodeCoverage_Report_FactoryTest extends PHP_CodeCoverage_TestCase $this->assertEquals(0, $root->getNumFunctions()); $this->assertEquals(0, $root->getNumTestedFunctions()); $this->assertNull($root->getParent()); - $this->assertEquals(array(), $root->getDirectories()); + $this->assertEquals([], $root->getDirectories()); #$this->assertEquals(array(), $root->getFiles()); #$this->assertEquals(array(), $root->getChildNodes()); $this->assertEquals( - array( - 'BankAccount' => array( - 'methods' => array( - 'getBalance' => array( + [ + 'BankAccount' => [ + 'methods' => [ + 'getBalance' => [ 'signature' => 'getBalance()', 'startLine' => 6, 'endLine' => 9, @@ -69,9 +61,10 @@ class PHP_CodeCoverage_Report_FactoryTest extends PHP_CodeCoverage_TestCase 'coverage' => 100, 'crap' => '1', 'link' => 'BankAccount.php.html#6', - 'methodName' => 'getBalance' - ), - 'setBalance' => array( + 'methodName' => 'getBalance', + 'visibility' => 'public', + ], + 'setBalance' => [ 'signature' => 'setBalance($balance)', 'startLine' => 11, 'endLine' => 18, @@ -81,9 +74,10 @@ class PHP_CodeCoverage_Report_FactoryTest extends PHP_CodeCoverage_TestCase 'coverage' => 0, 'crap' => 6, 'link' => 'BankAccount.php.html#11', - 'methodName' => 'setBalance' - ), - 'depositMoney' => array( + 'methodName' => 'setBalance', + 'visibility' => 'protected', + ], + 'depositMoney' => [ 'signature' => 'depositMoney($balance)', 'startLine' => 20, 'endLine' => 25, @@ -93,9 +87,10 @@ class PHP_CodeCoverage_Report_FactoryTest extends PHP_CodeCoverage_TestCase 'coverage' => 100, 'crap' => '1', 'link' => 'BankAccount.php.html#20', - 'methodName' => 'depositMoney' - ), - 'withdrawMoney' => array( + 'methodName' => 'depositMoney', + 'visibility' => 'public', + ], + 'withdrawMoney' => [ 'signature' => 'withdrawMoney($balance)', 'startLine' => 27, 'endLine' => 32, @@ -105,30 +100,31 @@ class PHP_CodeCoverage_Report_FactoryTest extends PHP_CodeCoverage_TestCase 'coverage' => 100, 'crap' => '1', 'link' => 'BankAccount.php.html#27', - 'methodName' => 'withdrawMoney' - ), - ), + 'methodName' => 'withdrawMoney', + 'visibility' => 'public', + ], + ], 'startLine' => 2, 'executableLines' => 10, 'executedLines' => 5, 'ccn' => 5, 'coverage' => 50, 'crap' => '8.12', - 'package' => array( + 'package' => [ 'namespace' => '', 'fullPackage' => '', 'category' => '', 'package' => '', 'subpackage' => '' - ), + ], 'link' => 'BankAccount.php.html#2', 'className' => 'BankAccount' - ) - ), + ] + ], $root->getClasses() ); - $this->assertEquals(array(), $root->getFunctions()); + $this->assertEquals([], $root->getFunctions()); } /** @@ -144,15 +140,15 @@ class PHP_CodeCoverage_Report_FactoryTest extends PHP_CodeCoverage_TestCase $method->setAccessible(true); $this->assertEquals( - array( - 'src' => array( - 'Money.php/f' => array(), - 'MoneyBag.php/f' => array() - ) - ), + [ + 'src' => [ + 'Money.php/f' => [], + 'MoneyBag.php/f' => [] + ] + ], $method->invoke( $this->factory, - array('src/Money.php' => array(), 'src/MoneyBag.php' => array()) + ['src/Money.php' => [], 'src/MoneyBag.php' => []] ) ); } @@ -170,7 +166,7 @@ class PHP_CodeCoverage_Report_FactoryTest extends PHP_CodeCoverage_TestCase $method->setAccessible(true); - $_commonPath = $method->invokeArgs($this->factory, array(&$paths)); + $_commonPath = $method->invokeArgs($this->factory, [&$paths]); $this->assertEquals($reducedPaths, $paths); $this->assertEquals($commonPath, $_commonPath); @@ -178,45 +174,45 @@ class PHP_CodeCoverage_Report_FactoryTest extends PHP_CodeCoverage_TestCase public function reducePathsProvider() { - return array( - array( - array( - 'Money.php' => array(), - 'MoneyBag.php' => array() - ), + return [ + [ + [ + 'Money.php' => [], + 'MoneyBag.php' => [] + ], '/home/sb/Money', - array( - '/home/sb/Money/Money.php' => array(), - '/home/sb/Money/MoneyBag.php' => array() - ) - ), - array( - array( - 'Money.php' => array() - ), + [ + '/home/sb/Money/Money.php' => [], + '/home/sb/Money/MoneyBag.php' => [] + ] + ], + [ + [ + 'Money.php' => [] + ], '/home/sb/Money/', - array( - '/home/sb/Money/Money.php' => array() - ) - ), - array( - array(), + [ + '/home/sb/Money/Money.php' => [] + ] + ], + [ + [], '.', - array() - ), - array( - array( - 'Money.php' => array(), - 'MoneyBag.php' => array(), - 'Cash.phar/Cash.php' => array(), - ), + [] + ], + [ + [ + 'Money.php' => [], + 'MoneyBag.php' => [], + 'Cash.phar/Cash.php' => [], + ], '/home/sb/Money', - array( - '/home/sb/Money/Money.php' => array(), - '/home/sb/Money/MoneyBag.php' => array(), - 'phar:///home/sb/Money/Cash.phar/Cash.php' => array(), - ), - ), - ); + [ + '/home/sb/Money/Money.php' => [], + '/home/sb/Money/MoneyBag.php' => [], + 'phar:///home/sb/Money/Cash.phar/Cash.php' => [], + ], + ], + ]; } } diff --git a/vendor/phpunit/php-code-coverage/tests/PHP/CodeCoverage/UtilTest.php b/vendor/phpunit/php-code-coverage/tests/PHP/CodeCoverage/UtilTest.php index 0b4caea..1cd8c20 100644 --- a/vendor/phpunit/php-code-coverage/tests/PHP/CodeCoverage/UtilTest.php +++ b/vendor/phpunit/php-code-coverage/tests/PHP/CodeCoverage/UtilTest.php @@ -8,6 +8,8 @@ * file that was distributed with this source code. */ +require_once dirname(dirname(dirname(__FILE__))) . DIRECTORY_SEPARATOR . 'TestCase.php'; + /** * Tests for the PHP_CodeCoverage_Util class. * diff --git a/vendor/phpunit/php-code-coverage/tests/PHP/CodeCoverageTest.php b/vendor/phpunit/php-code-coverage/tests/PHP/CodeCoverageTest.php index a755b88..76d7ac6 100644 --- a/vendor/phpunit/php-code-coverage/tests/PHP/CodeCoverageTest.php +++ b/vendor/phpunit/php-code-coverage/tests/PHP/CodeCoverageTest.php @@ -8,17 +8,7 @@ * file that was distributed with this source code. */ -if (!defined('TEST_FILES_PATH')) { - define( - 'TEST_FILES_PATH', - dirname(dirname(__FILE__)) . DIRECTORY_SEPARATOR . - '_files' . DIRECTORY_SEPARATOR - ); -} - -require_once TEST_FILES_PATH . '../TestCase.php'; -require_once TEST_FILES_PATH . 'BankAccount.php'; -require_once TEST_FILES_PATH . 'BankAccountTest.php'; +require_once dirname(dirname(__FILE__)) . DIRECTORY_SEPARATOR . 'TestCase.php'; /** * Tests for the PHP_CodeCoverage class. @@ -80,7 +70,7 @@ class PHP_CodeCoverageTest extends PHP_CodeCoverage_TestCase */ public function testStartThrowsExceptionForInvalidArgument() { - $this->coverage->start(null, array(), null); + $this->coverage->start(null, [], null); } /** @@ -107,7 +97,7 @@ class PHP_CodeCoverageTest extends PHP_CodeCoverage_TestCase */ public function testAppendThrowsExceptionForInvalidArgument() { - $this->coverage->append(array(), null); + $this->coverage->append([], null); } /** @@ -159,6 +149,28 @@ class PHP_CodeCoverageTest extends PHP_CodeCoverage_TestCase $this->coverage->setForceCoversAnnotation(null); } + /** + * @covers PHP_CodeCoverage::setCheckForMissingCoversAnnotation + */ + public function testSetCheckForMissingCoversAnnotation() + { + $this->coverage->setCheckForMissingCoversAnnotation(true); + $this->assertAttributeEquals( + true, + 'checkForMissingCoversAnnotation', + $this->coverage + ); + } + + /** + * @covers PHP_CodeCoverage::setCheckForMissingCoversAnnotation + * @expectedException PHP_CodeCoverage_Exception + */ + public function testSetCheckForMissingCoversAnnotationThrowsExceptionForInvalidArgument() + { + $this->coverage->setCheckForMissingCoversAnnotation(null); + } + /** * @covers PHP_CodeCoverage::setForceCoversAnnotation */ @@ -172,6 +184,28 @@ class PHP_CodeCoverageTest extends PHP_CodeCoverage_TestCase ); } + /** + * @covers PHP_CodeCoverage::setCheckForUnexecutedCoveredCode + * @expectedException PHP_CodeCoverage_Exception + */ + public function testSetCheckForUnexecutedCoveredCodeThrowsExceptionForInvalidArgument() + { + $this->coverage->setCheckForUnexecutedCoveredCode(null); + } + + /** + * @covers PHP_CodeCoverage::setCheckForUnexecutedCoveredCode + */ + public function testSetCheckForUnexecutedCoveredCode() + { + $this->coverage->setCheckForUnexecutedCoveredCode(true); + $this->assertAttributeEquals( + true, + 'checkForUnexecutedCoveredCode', + $this->coverage + ); + } + /** * @covers PHP_CodeCoverage::setAddUncoveredFilesFromWhitelist * @expectedException PHP_CodeCoverage_Exception @@ -217,25 +251,25 @@ class PHP_CodeCoverageTest extends PHP_CodeCoverage_TestCase } /** - * @covers PHP_CodeCoverage::setMapTestClassNameToCoveredClassName + * @covers PHP_CodeCoverage::setIgnoreDeprecatedCode */ - public function testSetMapTestClassNameToCoveredClassName() + public function testSetIgnoreDeprecatedCode() { - $this->coverage->setMapTestClassNameToCoveredClassName(true); + $this->coverage->setIgnoreDeprecatedCode(true); $this->assertAttributeEquals( true, - 'mapTestClassNameToCoveredClassName', + 'ignoreDeprecatedCode', $this->coverage ); } /** - * @covers PHP_CodeCoverage::setMapTestClassNameToCoveredClassName + * @covers PHP_CodeCoverage::setIgnoreDeprecatedCode * @expectedException PHP_CodeCoverage_Exception */ - public function testSetMapTestClassNameToCoveredClassNameThrowsExceptionForInvalidArgument() + public function testSetIgnoreDeprecatedCodeThrowsExceptionForInvalidArgument() { - $this->coverage->setMapTestClassNameToCoveredClassName(null); + $this->coverage->setIgnoreDeprecatedCode(null); } /** @@ -246,8 +280,8 @@ class PHP_CodeCoverageTest extends PHP_CodeCoverage_TestCase $this->coverage->clear(); $this->assertAttributeEquals(null, 'currentId', $this->coverage); - $this->assertAttributeEquals(array(), 'data', $this->coverage); - $this->assertAttributeEquals(array(), 'tests', $this->coverage); + $this->assertAttributeEquals([], 'data', $this->coverage); + $this->assertAttributeEquals([], 'tests', $this->coverage); } /** @@ -275,12 +309,12 @@ class PHP_CodeCoverageTest extends PHP_CodeCoverage_TestCase } $this->assertEquals( - array( - 'BankAccountTest::testBalanceIsInitiallyZero' => array('size' => $size, 'status' => null), - 'BankAccountTest::testBalanceCannotBecomeNegative' => array('size' => $size, 'status' => null), - 'BankAccountTest::testBalanceCannotBecomeNegative2' => array('size' => $size, 'status' => null), - 'BankAccountTest::testDepositWithdrawMoney' => array('size' => $size, 'status' => null) - ), + [ + 'BankAccountTest::testBalanceIsInitiallyZero' => ['size' => $size, 'status' => null], + 'BankAccountTest::testBalanceCannotBecomeNegative' => ['size' => $size, 'status' => null], + 'BankAccountTest::testBalanceCannotBecomeNegative2' => ['size' => $size, 'status' => null], + 'BankAccountTest::testDepositWithdrawMoney' => ['size' => $size, 'status' => null] + ], $coverage->getTests() ); } @@ -325,7 +359,7 @@ class PHP_CodeCoverageTest extends PHP_CodeCoverage_TestCase public function testGetLinesToBeIgnored() { $this->assertEquals( - array( + [ 1, 3, 4, @@ -360,7 +394,7 @@ class PHP_CodeCoverageTest extends PHP_CodeCoverage_TestCase 36, 37, 38 - ), + ], $this->getLinesToBeIgnored()->invoke( $this->coverage, TEST_FILES_PATH . 'source_with_ignore.php' @@ -374,7 +408,7 @@ class PHP_CodeCoverageTest extends PHP_CodeCoverage_TestCase public function testGetLinesToBeIgnored2() { $this->assertEquals( - array(1, 5), + [1, 5], $this->getLinesToBeIgnored()->invoke( $this->coverage, TEST_FILES_PATH . 'source_without_ignore.php' @@ -388,7 +422,7 @@ class PHP_CodeCoverageTest extends PHP_CodeCoverage_TestCase public function testGetLinesToBeIgnored3() { $this->assertEquals( - array( + [ 1, 2, 3, @@ -400,7 +434,7 @@ class PHP_CodeCoverageTest extends PHP_CodeCoverage_TestCase 16, 19, 20 - ), + ], $this->getLinesToBeIgnored()->invoke( $this->coverage, TEST_FILES_PATH . 'source_with_class_and_anonymous_function.php' @@ -414,7 +448,7 @@ class PHP_CodeCoverageTest extends PHP_CodeCoverage_TestCase public function testGetLinesToBeIgnoredOneLineAnnotations() { $this->assertEquals( - array( + [ 1, 2, 3, @@ -446,7 +480,7 @@ class PHP_CodeCoverageTest extends PHP_CodeCoverage_TestCase 33, 34, 37 - ), + ], $this->getLinesToBeIgnored()->invoke( $this->coverage, TEST_FILES_PATH . 'source_with_oneline_annotations.php' @@ -477,11 +511,66 @@ class PHP_CodeCoverageTest extends PHP_CodeCoverage_TestCase $this->coverage->setDisableIgnoredLines(true); $this->assertEquals( - array(), + [], $this->getLinesToBeIgnored()->invoke( $this->coverage, TEST_FILES_PATH . 'source_with_ignore.php' ) ); } + + /** + * @covers PHP_CodeCoverage::performUnexecutedCoveredCodeCheck + * @expectedException PHP_CodeCoverage_CoveredCodeNotExecutedException + */ + public function testAppendThrowsExceptionIfCoveredCodeWasNotExecuted() + { + $this->coverage->filter()->addDirectoryToWhitelist(TEST_FILES_PATH); + $this->coverage->setCheckForUnexecutedCoveredCode(true); + $data = [ + TEST_FILES_PATH . 'BankAccount.php' => [ + 29 => -1, + 31 => -1 + ] + ]; + $linesToBeCovered = [ + TEST_FILES_PATH . 'BankAccount.php' => [ + 22, + 24 + ] + ]; + $linesToBeUsed = []; + + $this->coverage->append($data, 'File1.php', true, $linesToBeCovered, $linesToBeUsed); + } + + /** + * @covers PHP_CodeCoverage::performUnexecutedCoveredCodeCheck + * @expectedException PHP_CodeCoverage_CoveredCodeNotExecutedException + */ + public function testAppendThrowsExceptionIfUsedCodeWasNotExecuted() + { + $this->coverage->filter()->addDirectoryToWhitelist(TEST_FILES_PATH); + $this->coverage->setCheckForUnexecutedCoveredCode(true); + $data = [ + TEST_FILES_PATH . 'BankAccount.php' => [ + 29 => -1, + 31 => -1 + ] + ]; + $linesToBeCovered = [ + TEST_FILES_PATH . 'BankAccount.php' => [ + 29, + 31 + ] + ]; + $linesToBeUsed = [ + TEST_FILES_PATH . 'BankAccount.php' => [ + 22, + 24 + ] + ]; + + $this->coverage->append($data, 'File1.php', true, $linesToBeCovered, $linesToBeUsed); + } } diff --git a/vendor/phpunit/php-code-coverage/tests/TestCase.php b/vendor/phpunit/php-code-coverage/tests/TestCase.php index f982428..d03585c 100644 --- a/vendor/phpunit/php-code-coverage/tests/TestCase.php +++ b/vendor/phpunit/php-code-coverage/tests/TestCase.php @@ -8,6 +8,10 @@ * file that was distributed with this source code. */ +if (!defined('TEST_FILES_PATH')) { + define('TEST_FILES_PATH', dirname(__FILE__) . DIRECTORY_SEPARATOR . '_files' . DIRECTORY_SEPARATOR); +} + /** * Abstract base class for test case classes. * @@ -15,11 +19,18 @@ */ abstract class PHP_CodeCoverage_TestCase extends PHPUnit_Framework_TestCase { + static protected $TEST_TMP_PATH; + + public static function setUpBeforeClass() + { + self::$TEST_TMP_PATH = TEST_FILES_PATH . 'tmp'; + } + protected function getXdebugDataForBankAccount() { - return array( - array( - TEST_FILES_PATH . 'BankAccount.php' => array( + return [ + [ + TEST_FILES_PATH . 'BankAccount.php' => [ 8 => 1, 9 => -2, 13 => -1, @@ -33,26 +44,26 @@ abstract class PHP_CodeCoverage_TestCase extends PHPUnit_Framework_TestCase 29 => -1, 31 => -1, 32 => -2 - ) - ), - array( - TEST_FILES_PATH . 'BankAccount.php' => array( + ] + ], + [ + TEST_FILES_PATH . 'BankAccount.php' => [ 8 => 1, 13 => 1, 16 => 1, 29 => 1, - ) - ), - array( - TEST_FILES_PATH . 'BankAccount.php' => array( + ] + ], + [ + TEST_FILES_PATH . 'BankAccount.php' => [ 8 => 1, 13 => 1, 16 => 1, 22 => 1, - ) - ), - array( - TEST_FILES_PATH . 'BankAccount.php' => array( + ] + ], + [ + TEST_FILES_PATH . 'BankAccount.php' => [ 8 => 1, 13 => 1, 14 => 1, @@ -62,14 +73,15 @@ abstract class PHP_CodeCoverage_TestCase extends PHPUnit_Framework_TestCase 24 => 1, 29 => 1, 31 => 1, - ) - ) - ); + ] + ] + ]; } protected function getCoverageForBankAccount() { $data = $this->getXdebugDataForBankAccount(); + require_once TEST_FILES_PATH . 'BankAccountTest.php'; $stub = $this->getMock('PHP_CodeCoverage_Driver_Xdebug'); $stub->expects($this->any()) @@ -81,7 +93,10 @@ abstract class PHP_CodeCoverage_TestCase extends PHPUnit_Framework_TestCase $data[3] )); - $coverage = new PHP_CodeCoverage($stub, new PHP_CodeCoverage_Filter); + $filter = new PHP_CodeCoverage_Filter; + $filter->addFileToWhitelist(TEST_FILES_PATH . 'BankAccount.php'); + + $coverage = new PHP_CodeCoverage($stub, $filter); $coverage->start( new BankAccountTest('testBalanceIsInitiallyZero'), @@ -90,7 +105,7 @@ abstract class PHP_CodeCoverage_TestCase extends PHPUnit_Framework_TestCase $coverage->stop( true, - array(TEST_FILES_PATH . 'BankAccount.php' => range(6, 9)) + [TEST_FILES_PATH . 'BankAccount.php' => range(6, 9)] ); $coverage->start( @@ -99,7 +114,7 @@ abstract class PHP_CodeCoverage_TestCase extends PHPUnit_Framework_TestCase $coverage->stop( true, - array(TEST_FILES_PATH . 'BankAccount.php' => range(27, 32)) + [TEST_FILES_PATH . 'BankAccount.php' => range(27, 32)] ); $coverage->start( @@ -108,7 +123,7 @@ abstract class PHP_CodeCoverage_TestCase extends PHPUnit_Framework_TestCase $coverage->stop( true, - array(TEST_FILES_PATH . 'BankAccount.php' => range(20, 25)) + [TEST_FILES_PATH . 'BankAccount.php' => range(20, 25)] ); $coverage->start( @@ -117,13 +132,13 @@ abstract class PHP_CodeCoverage_TestCase extends PHPUnit_Framework_TestCase $coverage->stop( true, - array( + [ TEST_FILES_PATH . 'BankAccount.php' => array_merge( range(6, 9), range(20, 25), range(27, 32) ) - ) + ] ); return $coverage; @@ -141,7 +156,10 @@ abstract class PHP_CodeCoverage_TestCase extends PHPUnit_Framework_TestCase $data[1] )); - $coverage = new PHP_CodeCoverage($stub, new PHP_CodeCoverage_Filter); + $filter = new PHP_CodeCoverage_Filter; + $filter->addFileToWhitelist(TEST_FILES_PATH . 'BankAccount.php'); + + $coverage = new PHP_CodeCoverage($stub, $filter); $coverage->start( new BankAccountTest('testBalanceIsInitiallyZero'), @@ -150,7 +168,7 @@ abstract class PHP_CodeCoverage_TestCase extends PHPUnit_Framework_TestCase $coverage->stop( true, - array(TEST_FILES_PATH . 'BankAccount.php' => range(6, 9)) + [TEST_FILES_PATH . 'BankAccount.php' => range(6, 9)] ); $coverage->start( @@ -159,7 +177,7 @@ abstract class PHP_CodeCoverage_TestCase extends PHPUnit_Framework_TestCase $coverage->stop( true, - array(TEST_FILES_PATH . 'BankAccount.php' => range(27, 32)) + [TEST_FILES_PATH . 'BankAccount.php' => range(27, 32)] ); return $coverage; @@ -177,7 +195,10 @@ abstract class PHP_CodeCoverage_TestCase extends PHPUnit_Framework_TestCase $data[3] )); - $coverage = new PHP_CodeCoverage($stub, new PHP_CodeCoverage_Filter); + $filter = new PHP_CodeCoverage_Filter; + $filter->addFileToWhitelist(TEST_FILES_PATH . 'BankAccount.php'); + + $coverage = new PHP_CodeCoverage($stub, $filter); $coverage->start( new BankAccountTest('testBalanceCannotBecomeNegative2') @@ -185,7 +206,7 @@ abstract class PHP_CodeCoverage_TestCase extends PHPUnit_Framework_TestCase $coverage->stop( true, - array(TEST_FILES_PATH . 'BankAccount.php' => range(20, 25)) + [TEST_FILES_PATH . 'BankAccount.php' => range(20, 25)] ); $coverage->start( @@ -194,13 +215,13 @@ abstract class PHP_CodeCoverage_TestCase extends PHPUnit_Framework_TestCase $coverage->stop( true, - array( + [ TEST_FILES_PATH . 'BankAccount.php' => array_merge( range(6, 9), range(20, 25), range(27, 32) ) - ) + ] ); return $coverage; @@ -208,43 +229,46 @@ abstract class PHP_CodeCoverage_TestCase extends PHPUnit_Framework_TestCase protected function getExpectedDataArrayForBankAccount() { - return array( - TEST_FILES_PATH . 'BankAccount.php' => array( - 8 => array( + return [ + TEST_FILES_PATH . 'BankAccount.php' => [ + 8 => [ 0 => 'BankAccountTest::testBalanceIsInitiallyZero', 1 => 'BankAccountTest::testDepositWithdrawMoney' - ), + ], 9 => null, - 13 => array(), - 14 => array(), - 15 => array(), - 16 => array(), - 18 => array(), - 22 => array( + 13 => [], + 14 => [], + 15 => [], + 16 => [], + 18 => [], + 22 => [ 0 => 'BankAccountTest::testBalanceCannotBecomeNegative2', 1 => 'BankAccountTest::testDepositWithdrawMoney' - ), - 24 => array( + ], + 24 => [ 0 => 'BankAccountTest::testDepositWithdrawMoney', - ), + ], 25 => null, - 29 => array( + 29 => [ 0 => 'BankAccountTest::testBalanceCannotBecomeNegative', 1 => 'BankAccountTest::testDepositWithdrawMoney' - ), - 31 => array( + ], + 31 => [ 0 => 'BankAccountTest::testDepositWithdrawMoney' - ), + ], 32 => null - ) - ); + ] + ]; } protected function getCoverageForFileWithIgnoredLines() { + $filter = new PHP_CodeCoverage_Filter; + $filter->addFileToWhitelist(TEST_FILES_PATH . 'source_with_ignore.php'); + $coverage = new PHP_CodeCoverage( $this->setUpXdebugStubForFileWithIgnoredLines(), - new PHP_CodeCoverage_Filter + $filter ); $coverage->start('FileWithIgnoredLines', true); @@ -259,14 +283,14 @@ abstract class PHP_CodeCoverage_TestCase extends PHPUnit_Framework_TestCase $stub->expects($this->any()) ->method('stop') ->will($this->returnValue( - array( - TEST_FILES_PATH . 'source_with_ignore.php' => array( + [ + TEST_FILES_PATH . 'source_with_ignore.php' => [ 2 => 1, 4 => -1, 6 => -1, 7 => 1 - ) - ) + ] + ] )); return $stub; @@ -274,9 +298,12 @@ abstract class PHP_CodeCoverage_TestCase extends PHPUnit_Framework_TestCase protected function getCoverageForClassWithAnonymousFunction() { + $filter = new PHP_CodeCoverage_Filter; + $filter->addFileToWhitelist(TEST_FILES_PATH . 'source_with_class_and_anonymous_function.php'); + $coverage = new PHP_CodeCoverage( $this->setUpXdebugStubForClassWithAnonymousFunction(), - new PHP_CodeCoverage_Filter + $filter ); $coverage->start('ClassWithAnonymousFunction', true); @@ -291,8 +318,8 @@ abstract class PHP_CodeCoverage_TestCase extends PHPUnit_Framework_TestCase $stub->expects($this->any()) ->method('stop') ->will($this->returnValue( - array( - TEST_FILES_PATH . 'source_with_class_and_anonymous_function.php' => array( + [ + TEST_FILES_PATH . 'source_with_class_and_anonymous_function.php' => [ 7 => 1, 9 => 1, 10 => -1, @@ -302,8 +329,8 @@ abstract class PHP_CodeCoverage_TestCase extends PHPUnit_Framework_TestCase 14 => 1, 17 => 1, 18 => 1 - ) - ) + ] + ] )); return $stub; diff --git a/vendor/phpunit/php-code-coverage/tests/_files/BankAccount-clover.xml b/vendor/phpunit/php-code-coverage/tests/_files/BankAccount-clover.xml index 578a7cc..0986fdf 100644 --- a/vendor/phpunit/php-code-coverage/tests/_files/BankAccount-clover.xml +++ b/vendor/phpunit/php-code-coverage/tests/_files/BankAccount-clover.xml @@ -3,20 +3,20 @@ - + - + - + - + - + diff --git a/vendor/phpunit/php-code-coverage/tests/_files/class-with-anonymous-function-clover.xml b/vendor/phpunit/php-code-coverage/tests/_files/class-with-anonymous-function-clover.xml index ac43b80..d6a8b40 100644 --- a/vendor/phpunit/php-code-coverage/tests/_files/class-with-anonymous-function-clover.xml +++ b/vendor/phpunit/php-code-coverage/tests/_files/class-with-anonymous-function-clover.xml @@ -3,13 +3,13 @@ - + - + - + diff --git a/vendor/phpunit/php-code-coverage/tests/_files/ignored-lines-clover.xml b/vendor/phpunit/php-code-coverage/tests/_files/ignored-lines-clover.xml index cda929c..81a9aaa 100644 --- a/vendor/phpunit/php-code-coverage/tests/_files/ignored-lines-clover.xml +++ b/vendor/phpunit/php-code-coverage/tests/_files/ignored-lines-clover.xml @@ -3,10 +3,10 @@ - + - + diff --git a/vendor/phpunit/php-code-coverage/tests/_files/source_with_class_and_anonymous_function.php b/vendor/phpunit/php-code-coverage/tests/_files/source_with_class_and_anonymous_function.php index eaba387..72aa938 100644 --- a/vendor/phpunit/php-code-coverage/tests/_files/source_with_class_and_anonymous_function.php +++ b/vendor/phpunit/php-code-coverage/tests/_files/source_with_class_and_anonymous_function.php @@ -4,7 +4,7 @@ class CoveredClassWithAnonymousFunctionInStaticMethod { public static function runAnonymous() { - $filter = array('abc124', 'abc123', '123'); + $filter = ['abc124', 'abc123', '123']; array_walk( $filter, diff --git a/vendor/phpunit/phpunit-mock-objects/.travis.yml b/vendor/phpunit/phpunit-mock-objects/.travis.yml index 127bb65..95ffa23 100644 --- a/vendor/phpunit/phpunit-mock-objects/.travis.yml +++ b/vendor/phpunit/phpunit-mock-objects/.travis.yml @@ -7,10 +7,6 @@ before_script: script: ./vendor/bin/phpunit --configuration ./build/travis-ci.xml php: - - 5.3.3 - - 5.3 - - 5.4 - - 5.5 - 5.6 - 7.0 - hhvm diff --git a/vendor/phpunit/phpunit-mock-objects/CONTRIBUTING.md b/vendor/phpunit/phpunit-mock-objects/CONTRIBUTING.md index b290539..76a4345 100644 --- a/vendor/phpunit/phpunit-mock-objects/CONTRIBUTING.md +++ b/vendor/phpunit/phpunit-mock-objects/CONTRIBUTING.md @@ -1,5 +1 @@ -Pull Requests for bug fixes should be made against the current release branch (1.2). - -Pull Requests for new features should be made against master. - -For further notes please refer to [https://github.com/sebastianbergmann/phpunit/blob/master/CONTRIBUTING.md](https://github.com/sebastianbergmann/phpunit/blob/master/CONTRIBUTING.md) +Please refer to [https://github.com/sebastianbergmann/phpunit/blob/master/CONTRIBUTING.md](https://github.com/sebastianbergmann/phpunit/blob/master/CONTRIBUTING.md) for details on how to contribute to this project. diff --git a/vendor/phpunit/phpunit-mock-objects/README.md b/vendor/phpunit/phpunit-mock-objects/README.md index 5222da7..5dea6b1 100644 --- a/vendor/phpunit/phpunit-mock-objects/README.md +++ b/vendor/phpunit/phpunit-mock-objects/README.md @@ -1,4 +1,4 @@ -[![Build Status](https://img.shields.io/travis/sebastianbergmann/phpunit-mock-objects/2.3.svg?style=flat-square)](https://travis-ci.org/sebastianbergmann/phpunit-mock-objects) +[![Build Status](https://img.shields.io/travis/sebastianbergmann/phpunit-mock-objects/master.svg?style=flat-square)](https://travis-ci.org/sebastianbergmann/phpunit-mock-objects) [![Latest Stable Version](https://img.shields.io/packagist/v/phpunit/phpunit-mock-objects.svg?style=flat-square)](https://packagist.org/packages/phpunit/phpunit-mock-objects) # PHPUnit_MockObject diff --git a/vendor/phpunit/phpunit-mock-objects/composer.json b/vendor/phpunit/phpunit-mock-objects/composer.json index 12fb934..0f9d445 100644 --- a/vendor/phpunit/phpunit-mock-objects/composer.json +++ b/vendor/phpunit/phpunit-mock-objects/composer.json @@ -20,13 +20,13 @@ "irc": "irc://irc.freenode.net/phpunit" }, "require": { - "php": ">=5.3.3", + "php": ">=5.6", "phpunit/php-text-template": "~1.2", "doctrine/instantiator": "^1.0.2", "sebastian/exporter": "~1.2" }, "require-dev": { - "phpunit/phpunit": "~4.4" + "phpunit/phpunit": "~5" }, "suggest": { "ext-soap": "*" @@ -43,7 +43,7 @@ }, "extra": { "branch-alias": { - "dev-master": "2.3.x-dev" + "dev-master": "3.0.x-dev" } } } diff --git a/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/InvocationMocker.php b/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/InvocationMocker.php index 865c6b2..c20347b 100644 --- a/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/InvocationMocker.php +++ b/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Builder/InvocationMocker.php @@ -76,13 +76,16 @@ class PHPUnit_Framework_MockObject_Builder_InvocationMocker implements PHPUnit_F /** * @param mixed $value + * @param mixed $nextValues, ... * @return PHPUnit_Framework_MockObject_Builder_InvocationMocker */ - public function willReturn($value) + public function willReturn($value, ...$nextValues) { - $stub = new PHPUnit_Framework_MockObject_Stub_Return( - $value - ); + $stub = count($nextValues) === 0 ? + new PHPUnit_Framework_MockObject_Stub_Return($value) : + new PHPUnit_Framework_MockObject_Stub_ConsecutiveCalls( + array_merge([$value], $nextValues) + ); return $this->will($stub); } @@ -131,20 +134,18 @@ class PHPUnit_Framework_MockObject_Builder_InvocationMocker implements PHPUnit_F */ public function willReturnSelf() { - $stub = new PHPUnit_Framework_MockObject_Stub_ReturnSelf(); + $stub = new PHPUnit_Framework_MockObject_Stub_ReturnSelf; return $this->will($stub); } /** - * @param mixed $value, ... + * @param mixed $values, ... * @return PHPUnit_Framework_MockObject_Builder_InvocationMocker */ - public function willReturnOnConsecutiveCalls() + public function willReturnOnConsecutiveCalls(...$values) { - $args = func_get_args(); - - $stub = new PHPUnit_Framework_MockObject_Stub_ConsecutiveCalls($args); + $stub = new PHPUnit_Framework_MockObject_Stub_ConsecutiveCalls($values); return $this->will($stub); } diff --git a/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Generator.php b/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Generator.php index 3df3abb..4f70003 100644 --- a/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Generator.php +++ b/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Generator.php @@ -12,13 +12,6 @@ use Doctrine\Instantiator\Instantiator; use Doctrine\Instantiator\Exception\InvalidArgumentException as InstantiatorInvalidArgumentException; use Doctrine\Instantiator\Exception\UnexpectedValueException as InstantiatorUnexpectedValueException; -if (!function_exists('trait_exists')) { - function trait_exists($traitname, $autoload = true) - { - return false; - } -} - /** * Mock Object Code Generator * @@ -29,88 +22,104 @@ class PHPUnit_Framework_MockObject_Generator /** * @var array */ - private static $cache = array(); + private static $cache = []; /** * @var array */ - protected $blacklistedMethodNames = array( - '__CLASS__' => true, - '__DIR__' => true, - '__FILE__' => true, - '__FUNCTION__' => true, - '__LINE__' => true, - '__METHOD__' => true, - '__NAMESPACE__' => true, - '__TRAIT__' => true, - '__clone' => true, - '__halt_compiler' => true, - 'abstract' => true, - 'and' => true, - 'array' => true, - 'as' => true, - 'break' => true, - 'callable' => true, - 'case' => true, - 'catch' => true, - 'class' => true, - 'clone' => true, - 'const' => true, - 'continue' => true, - 'declare' => true, - 'default' => true, - 'die' => true, - 'do' => true, - 'echo' => true, - 'else' => true, - 'elseif' => true, - 'empty' => true, - 'enddeclare' => true, - 'endfor' => true, - 'endforeach' => true, - 'endif' => true, - 'endswitch' => true, - 'endwhile' => true, - 'eval' => true, - 'exit' => true, - 'expects' => true, - 'extends' => true, - 'final' => true, - 'for' => true, - 'foreach' => true, - 'function' => true, - 'global' => true, - 'goto' => true, - 'if' => true, - 'implements' => true, - 'include' => true, - 'include_once' => true, - 'instanceof' => true, - 'insteadof' => true, - 'interface' => true, - 'isset' => true, - 'list' => true, - 'namespace' => true, - 'new' => true, - 'or' => true, - 'print' => true, - 'private' => true, - 'protected' => true, - 'public' => true, - 'require' => true, - 'require_once' => true, - 'return' => true, - 'static' => true, - 'switch' => true, - 'throw' => true, - 'trait' => true, - 'try' => true, - 'unset' => true, - 'use' => true, - 'var' => true, - 'while' => true, - 'xor' => true - ); + private $legacyBlacklistedMethodNames = [ + '__CLASS__' => true, + '__DIR__' => true, + '__FILE__' => true, + '__FUNCTION__' => true, + '__LINE__' => true, + '__METHOD__' => true, + '__NAMESPACE__' => true, + '__TRAIT__' => true, + '__clone' => true, + '__halt_compiler' => true, + 'abstract' => true, + 'and' => true, + 'array' => true, + 'as' => true, + 'break' => true, + 'callable' => true, + 'case' => true, + 'catch' => true, + 'class' => true, + 'clone' => true, + 'const' => true, + 'continue' => true, + 'declare' => true, + 'default' => true, + 'die' => true, + 'do' => true, + 'echo' => true, + 'else' => true, + 'elseif' => true, + 'empty' => true, + 'enddeclare' => true, + 'endfor' => true, + 'endforeach' => true, + 'endif' => true, + 'endswitch' => true, + 'endwhile' => true, + 'eval' => true, + 'exit' => true, + 'expects' => true, + 'extends' => true, + 'final' => true, + 'for' => true, + 'foreach' => true, + 'function' => true, + 'global' => true, + 'goto' => true, + 'if' => true, + 'implements' => true, + 'include' => true, + 'include_once' => true, + 'instanceof' => true, + 'insteadof' => true, + 'interface' => true, + 'isset' => true, + 'list' => true, + 'namespace' => true, + 'new' => true, + 'or' => true, + 'print' => true, + 'private' => true, + 'protected' => true, + 'public' => true, + 'require' => true, + 'require_once' => true, + 'return' => true, + 'static' => true, + 'switch' => true, + 'throw' => true, + 'trait' => true, + 'try' => true, + 'unset' => true, + 'use' => true, + 'var' => true, + 'while' => true, + 'xor' => true + ]; + + /** + * @var array + */ + private $blacklistedMethodNames = [ + '__CLASS__' => true, + '__DIR__' => true, + '__FILE__' => true, + '__FUNCTION__' => true, + '__LINE__' => true, + '__METHOD__' => true, + '__NAMESPACE__' => true, + '__TRAIT__' => true, + '__clone' => true, + '__halt_compiler' => true, + ]; /** * Returns a mock object for the specified class. @@ -131,7 +140,7 @@ class PHPUnit_Framework_MockObject_Generator * @throws PHPUnit_Framework_MockObject_RuntimeException * @since Method available since Release 1.0.0 */ - public function getMock($type, $methods = array(), array $arguments = array(), $mockClassName = '', $callOriginalConstructor = true, $callOriginalClone = true, $callAutoload = true, $cloneArguments = true, $callOriginalMethods = false, $proxyTarget = null) + public function getMock($type, $methods = [], array $arguments = [], $mockClassName = '', $callOriginalConstructor = true, $callOriginalClone = true, $callAutoload = true, $cloneArguments = true, $callOriginalMethods = false, $proxyTarget = null) { if (!is_array($type) && !is_string($type)) { throw PHPUnit_Util_InvalidArgumentHelper::factory(1, 'array or string'); @@ -142,7 +151,7 @@ class PHPUnit_Framework_MockObject_Generator } if (!is_array($methods) && !is_null($methods)) { - throw new InvalidArgumentException; + throw PHPUnit_Util_InvalidArgumentHelper::factory(2, 'array', $methods); } if ($type === 'Traversable' || $type === '\\Traversable') { @@ -199,6 +208,12 @@ class PHPUnit_Framework_MockObject_Generator } } + if ($callOriginalConstructor === false && $callOriginalMethods === true) { + throw new PHPUnit_Framework_MockObject_RuntimeException( + 'Proxying to original methods requires invoking the original constructor' + ); + } + $mock = $this->generate( $type, $methods, @@ -232,7 +247,7 @@ class PHPUnit_Framework_MockObject_Generator * @param object $proxyTarget * @return object */ - protected function getObject($code, $className, $type = '', $callOriginalConstructor = false, $callAutoload = false, array $arguments = array(), $callOriginalMethods = false, $proxyTarget = null) + private function getObject($code, $className, $type = '', $callOriginalConstructor = false, $callAutoload = false, array $arguments = [], $callOriginalMethods = false, $proxyTarget = null) { $this->evalClass($code, $className); @@ -284,7 +299,7 @@ class PHPUnit_Framework_MockObject_Generator * @param string $code * @param string $className */ - protected function evalClass($code, $className) + private function evalClass($code, $className) { if (!class_exists($className, false)) { eval($code); @@ -309,7 +324,7 @@ class PHPUnit_Framework_MockObject_Generator * @throws PHPUnit_Framework_MockObject_RuntimeException * @throws PHPUnit_Framework_Exception */ - public function getMockForAbstractClass($originalClassName, array $arguments = array(), $mockClassName = '', $callOriginalConstructor = true, $callOriginalClone = true, $callAutoload = true, $mockedMethods = array(), $cloneArguments = true) + public function getMockForAbstractClass($originalClassName, array $arguments = [], $mockClassName = '', $callOriginalConstructor = true, $callOriginalClone = true, $callAutoload = true, $mockedMethods = [], $cloneArguments = true) { if (!is_string($originalClassName)) { throw PHPUnit_Util_InvalidArgumentHelper::factory(1, 'string'); @@ -369,7 +384,7 @@ class PHPUnit_Framework_MockObject_Generator * @throws PHPUnit_Framework_MockObject_RuntimeException * @throws PHPUnit_Framework_Exception */ - public function getMockForTrait($traitName, array $arguments = array(), $mockClassName = '', $callOriginalConstructor = true, $callOriginalClone = true, $callAutoload = true, $mockedMethods = array(), $cloneArguments = true) + public function getMockForTrait($traitName, array $arguments = [], $mockClassName = '', $callOriginalConstructor = true, $callOriginalClone = true, $callAutoload = true, $mockedMethods = [], $cloneArguments = true) { if (!is_string($traitName)) { throw PHPUnit_Util_InvalidArgumentHelper::factory(1, 'string'); @@ -401,11 +416,11 @@ class PHPUnit_Framework_MockObject_Generator ); $classTemplate->setVar( - array( + [ 'prologue' => 'abstract ', 'class_name' => $className['className'], 'trait_name' => $traitName - ) + ] ); $this->evalClass( @@ -430,7 +445,7 @@ class PHPUnit_Framework_MockObject_Generator * @throws PHPUnit_Framework_MockObject_RuntimeException * @throws PHPUnit_Framework_Exception */ - public function getObjectForTrait($traitName, array $arguments = array(), $traitClassName = '', $callOriginalConstructor = true, $callOriginalClone = true, $callAutoload = true) + public function getObjectForTrait($traitName, array $arguments = [], $traitClassName = '', $callOriginalConstructor = true, $callOriginalClone = true, $callAutoload = true) { if (!is_string($traitName)) { throw PHPUnit_Util_InvalidArgumentHelper::factory(1, 'string'); @@ -462,11 +477,11 @@ class PHPUnit_Framework_MockObject_Generator ); $classTemplate->setVar( - array( + [ 'prologue' => '', 'class_name' => $className['className'], 'trait_name' => $traitName - ) + ] ); return $this->getObject( @@ -530,7 +545,7 @@ class PHPUnit_Framework_MockObject_Generator * @return string * @throws PHPUnit_Framework_MockObject_RuntimeException */ - public function generateClassFromWsdl($wsdlFile, $className, array $methods = array(), array $options = array()) + public function generateClassFromWsdl($wsdlFile, $className, array $methods = [], array $options = []) { if (!extension_loaded('soap')) { throw new PHPUnit_Framework_MockObject_RuntimeException( @@ -538,7 +553,7 @@ class PHPUnit_Framework_MockObject_Generator ); } - $options = array_merge($options, array('cache_wsdl' => WSDL_CACHE_NONE)); + $options = array_merge($options, ['cache_wsdl' => WSDL_CACHE_NONE]); $client = new SoapClient($wsdlFile, $options); $_methods = array_unique($client->__getFunctions()); unset($client); @@ -570,10 +585,10 @@ class PHPUnit_Framework_MockObject_Generator } $methodTemplate->setVar( - array( + [ 'method_name' => $name, 'arguments' => implode(', ', $args) - ) + ] ); $methodsBuffer .= $methodTemplate->render(); @@ -598,13 +613,13 @@ class PHPUnit_Framework_MockObject_Generator } $classTemplate->setVar( - array( + [ 'namespace' => $namespace, 'class_name' => $className, 'wsdl' => $wsdlFile, 'options' => $optionsBuffer, 'methods' => $methodsBuffer - ) + ] ); return $classTemplate->render(); @@ -621,7 +636,7 @@ class PHPUnit_Framework_MockObject_Generator * @return array * @throws PHPUnit_Framework_Exception */ - protected function generateMock($type, $methods, $mockClassName, $callOriginalClone, $callAutoload, $cloneArguments, $callOriginalMethods) + private function generateMock($type, $methods, $mockClassName, $callOriginalClone, $callAutoload, $cloneArguments, $callOriginalMethods) { $templateDir = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'Generator' . DIRECTORY_SEPARATOR; @@ -629,7 +644,7 @@ class PHPUnit_Framework_MockObject_Generator $templateDir . 'mocked_class.tpl' ); - $additionalInterfaces = array(); + $additionalInterfaces = []; $cloneTemplate = ''; $isClass = false; $isInterface = false; @@ -734,7 +749,7 @@ class PHPUnit_Framework_MockObject_Generator } if (!is_array($methods)) { - $methods = array(); + $methods = []; } $mockedMethods = ''; @@ -791,7 +806,7 @@ class PHPUnit_Framework_MockObject_Generator } $classTemplate->setVar( - array( + [ 'prologue' => isset($prologue) ? $prologue : '', 'epilogue' => isset($epilogue) ? $epilogue : '', 'class_declaration' => $this->generateMockClassDeclaration( @@ -803,13 +818,13 @@ class PHPUnit_Framework_MockObject_Generator 'mock_class_name' => $mockClassName['className'], 'mocked_methods' => $mockedMethods, 'method' => $method - ) + ] ); - return array( + return [ 'code' => $classTemplate->render(), 'mockClassName' => $mockClassName['className'] - ); + ]; } /** @@ -818,7 +833,7 @@ class PHPUnit_Framework_MockObject_Generator * @param string $prefix * @return array */ - protected function generateClassName($type, $className, $prefix) + private function generateClassName($type, $className, $prefix) { if (is_array($type)) { $type = implode('_', $type); @@ -846,12 +861,12 @@ class PHPUnit_Framework_MockObject_Generator } while (class_exists($className, false)); } - return array( + return [ 'className' => $className, 'originalClassName' => $type, 'fullClassName' => $fullClassName, 'namespaceName' => $namespaceName - ); + ]; } /** @@ -860,7 +875,7 @@ class PHPUnit_Framework_MockObject_Generator * @param array $additionalInterfaces * @return array */ - protected function generateMockClassDeclaration(array $mockClassName, $isInterface, array $additionalInterfaces = array()) + private function generateMockClassDeclaration(array $mockClassName, $isInterface, array $additionalInterfaces = []) { $buffer = 'class '; @@ -903,7 +918,7 @@ class PHPUnit_Framework_MockObject_Generator * @param bool $callOriginalMethods * @return string */ - protected function generateMockedMethodDefinitionFromExisting($templateDir, ReflectionMethod $method, $cloneArguments, $callOriginalMethods) + private function generateMockedMethodDefinitionFromExisting($templateDir, ReflectionMethod $method, $cloneArguments, $callOriginalMethods) { if ($method->isPrivate()) { $modifier = 'private'; @@ -923,6 +938,12 @@ class PHPUnit_Framework_MockObject_Generator $reference = ''; } + if ($this->hasReturnType($method)) { + $returnType = (string) $method->getReturnType(); + } else { + $returnType = ''; + } + return $this->generateMockedMethodDefinition( $templateDir, $method->getDeclaringClass()->getName(), @@ -931,6 +952,7 @@ class PHPUnit_Framework_MockObject_Generator $modifier, $this->getMethodParameters($method), $this->getMethodParameters($method, true), + $returnType, $reference, $callOriginalMethods, $method->isStatic() @@ -945,12 +967,13 @@ class PHPUnit_Framework_MockObject_Generator * @param string $modifier * @param string $arguments_decl * @param string $arguments_call + * @param string $return_type * @param string $reference * @param bool $callOriginalMethods * @param bool $static * @return string */ - protected function generateMockedMethodDefinition($templateDir, $className, $methodName, $cloneArguments = true, $modifier = 'public', $arguments_decl = '', $arguments_call = '', $reference = '', $callOriginalMethods = false, $static = false) + private function generateMockedMethodDefinition($templateDir, $className, $methodName, $cloneArguments = true, $modifier = 'public', $arguments_decl = '', $arguments_call = '', $return_type = '', $reference = '', $callOriginalMethods = false, $static = false) { if ($static) { $templateFile = 'mocked_static_method.tpl'; @@ -961,19 +984,28 @@ class PHPUnit_Framework_MockObject_Generator ); } + // Mocked interfaces returning 'self' must explicitly declare the + // interface name as the return type. See + // https://bugs.php.net/bug.php?id=70722 + if ($return_type === 'self') { + $return_type = $className; + } + $template = new Text_Template($templateDir . $templateFile); $template->setVar( - array( + [ 'arguments_decl' => $arguments_decl, 'arguments_call' => $arguments_call, + 'return_delim' => $return_type ? ': ' : '', + 'return_type' => $return_type, 'arguments_count' => !empty($arguments_call) ? count(explode(',', $arguments_call)) : 0, 'class_name' => $className, 'method_name' => $methodName, 'modifier' => $modifier, 'reference' => $reference, - 'clone_arguments' => $cloneArguments ? 'TRUE' : 'FALSE' - ) + 'clone_arguments' => $cloneArguments ? 'true' : 'false' + ] ); return $template->render(); @@ -983,18 +1015,39 @@ class PHPUnit_Framework_MockObject_Generator * @param ReflectionMethod $method * @return bool */ - protected function canMockMethod(ReflectionMethod $method) + private function canMockMethod(ReflectionMethod $method) { if ($method->isConstructor() || $method->isFinal() || $method->isPrivate() || - isset($this->blacklistedMethodNames[$method->getName()])) { + $this->isMethodNameBlacklisted($method->getName())) { return false; } return true; } + /** + * Returns whether i method name is blacklisted + * + * Since PHP 7 the only names that are still reserved for method names are the ones that start with an underscore + * + * @param string $name + * @return bool + */ + private function isMethodNameBlacklisted($name) + { + if (PHP_MAJOR_VERSION < 7 && isset($this->legacyBlacklistedMethodNames[$name])) { + return true; + } + + if (PHP_MAJOR_VERSION >= 7 && isset($this->blacklistedMethodNames[$name])) { + return true; + } + + return false; + } + /** * Returns the parameters of a function or method. * @@ -1004,9 +1057,9 @@ class PHPUnit_Framework_MockObject_Generator * @throws PHPUnit_Framework_MockObject_RuntimeException * @since Method available since Release 2.0.0 */ - protected function getMethodParameters(ReflectionMethod $method, $forCall = false) + private function getMethodParameters(ReflectionMethod $method, $forCall = false) { - $parameters = array(); + $parameters = []; foreach ($method->getParameters() as $i => $parameter) { $name = '$' . $parameter->getName(); @@ -1035,8 +1088,7 @@ class PHPUnit_Framework_MockObject_Generator $typeDeclaration = (string) $parameter->getType() . ' '; } elseif ($parameter->isArray()) { $typeDeclaration = 'array '; - } elseif ((defined('HHVM_VERSION') || version_compare(PHP_VERSION, '5.4.0', '>=')) - && $parameter->isCallable()) { + } elseif ($parameter->isCallable()) { $typeDeclaration = 'callable '; } else { try { @@ -1099,6 +1151,15 @@ class PHPUnit_Framework_MockObject_Generator return method_exists('ReflectionParameter', 'hasType') && $parameter->hasType(); } + /** + * @param ReflectionMethod $method + * @return bool + */ + private function hasReturnType(ReflectionMethod $method) + { + return method_exists('ReflectionMethod', 'hasReturnType') && $method->hasReturnType(); + } + /** * @param string $className * @return array @@ -1107,10 +1168,10 @@ class PHPUnit_Framework_MockObject_Generator private function getClassMethods($className) { $class = new ReflectionClass($className); - $methods = array(); + $methods = []; foreach ($class->getMethods() as $method) { - if (($method->isPublic() || $method->isAbstract()) && !in_array($method->getName(), $methods)) { + if ($method->isPublic() || $method->isAbstract()) { $methods[] = $method->getName(); } } diff --git a/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Generator/mocked_class.tpl.dist b/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Generator/mocked_class.tpl.dist index a9a94cd..4b781a1 100644 --- a/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Generator/mocked_class.tpl.dist +++ b/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Generator/mocked_class.tpl.dist @@ -16,7 +16,7 @@ public function __phpunit_getInvocationMocker() { - if ($this->__phpunit_invocationMocker === NULL) { + if ($this->__phpunit_invocationMocker === null) { $this->__phpunit_invocationMocker = new PHPUnit_Framework_MockObject_InvocationMocker; } @@ -28,9 +28,12 @@ return $this->__phpunit_getInvocationMocker()->hasMatchers(); } - public function __phpunit_verify() + public function __phpunit_verify($unsetInvocationMocker = true) { $this->__phpunit_getInvocationMocker()->verify(); - $this->__phpunit_invocationMocker = NULL; + + if ($unsetInvocationMocker) { + $this->__phpunit_invocationMocker = null; + } } }{epilogue} diff --git a/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Generator/mocked_method.tpl.dist b/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Generator/mocked_method.tpl.dist index e2f55d9..9364d27 100644 --- a/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Generator/mocked_method.tpl.dist +++ b/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Generator/mocked_method.tpl.dist @@ -1,5 +1,5 @@ - {modifier} function {reference}{method_name}({arguments_decl}) + {modifier} function {reference}{method_name}({arguments_decl}){return_delim}{return_type} { $arguments = array({arguments_call}); $count = func_num_args(); @@ -13,9 +13,9 @@ } $result = $this->__phpunit_getInvocationMocker()->invoke( - new PHPUnit_Framework_MockObject_Invocation_Object( - '{class_name}', '{method_name}', $arguments, $this, {clone_arguments} - ) + new PHPUnit_Framework_MockObject_Invocation_Object( + '{class_name}', '{method_name}', $arguments, '{return_type}', $this, {clone_arguments} + ) ); return $result; diff --git a/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Generator/mocked_static_method.tpl.dist b/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Generator/mocked_static_method.tpl.dist index 5454b2f..9e56b71 100644 --- a/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Generator/mocked_static_method.tpl.dist +++ b/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Generator/mocked_static_method.tpl.dist @@ -1,5 +1,5 @@ - {modifier} function {reference}{method_name}({arguments_decl}) + {modifier} function {reference}{method_name}({arguments_decl}){return_delim}{return_type} { throw new PHPUnit_Framework_MockObject_BadMethodCallException; } diff --git a/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Generator/proxied_method.tpl.dist b/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Generator/proxied_method.tpl.dist index 15e89bd..4b9cce8 100644 --- a/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Generator/proxied_method.tpl.dist +++ b/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Generator/proxied_method.tpl.dist @@ -1,5 +1,5 @@ - {modifier} function {reference}{method_name}({arguments_decl}) + {modifier} function {reference}{method_name}({arguments_decl}){return_delim}{return_type} { $arguments = array({arguments_call}); $count = func_num_args(); @@ -13,9 +13,9 @@ } $this->__phpunit_getInvocationMocker()->invoke( - new PHPUnit_Framework_MockObject_Invocation_Object( - '{class_name}', '{method_name}', $arguments, $this, {clone_arguments} - ) + new PHPUnit_Framework_MockObject_Invocation_Object( + '{class_name}', '{method_name}', $arguments, '{return_type}', $this, {clone_arguments} + ) ); return call_user_func_array(array($this->__phpunit_originalObject, "{method_name}"), $arguments); diff --git a/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Invocation.php b/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Invocation.php index 055707d..34da11a 100644 --- a/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Invocation.php +++ b/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Invocation.php @@ -15,4 +15,8 @@ */ interface PHPUnit_Framework_MockObject_Invocation { + /** + * @return mixed Mocked return value. + */ + public function generateReturnValue(); } diff --git a/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Invocation/Object.php b/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Invocation/Object.php index 575c13c..3a7ab22 100644 --- a/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Invocation/Object.php +++ b/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Invocation/Object.php @@ -24,12 +24,13 @@ class PHPUnit_Framework_MockObject_Invocation_Object extends PHPUnit_Framework_M * @param string $className * @param string $methodname * @param array $parameters + * @param string $returnType * @param object $object * @param object $cloneObjects */ - public function __construct($className, $methodName, array $parameters, $object, $cloneObjects = false) + public function __construct($className, $methodName, array $parameters, $returnType, $object, $cloneObjects = false) { - parent::__construct($className, $methodName, $parameters, $cloneObjects); + parent::__construct($className, $methodName, $parameters, $returnType, $cloneObjects); $this->object = $object; } } diff --git a/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Invocation/Static.php b/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Invocation/Static.php index 3d295e5..0f0f74e 100644 --- a/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Invocation/Static.php +++ b/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Invocation/Static.php @@ -20,19 +20,19 @@ class PHPUnit_Framework_MockObject_Invocation_Static implements PHPUnit_Framewor /** * @var array */ - protected static $uncloneableExtensions = array( + protected static $uncloneableExtensions = [ 'mysqli' => true, 'SQLite' => true, 'sqlite3' => true, 'tidy' => true, 'xmlwriter' => true, 'xsl' => true - ); + ]; /** * @var array */ - protected static $uncloneableClasses = array( + protected static $uncloneableClasses = [ 'Closure', 'COMPersistHelper', 'IteratorIterator', @@ -40,7 +40,7 @@ class PHPUnit_Framework_MockObject_Invocation_Static implements PHPUnit_Framewor 'SplFileObject', 'PDORow', 'ZipArchive' - ); + ]; /** * @var string @@ -57,17 +57,24 @@ class PHPUnit_Framework_MockObject_Invocation_Static implements PHPUnit_Framewor */ public $parameters; + /** + * @var string + */ + public $returnType; + /** * @param string $className * @param string $methodname * @param array $parameters + * @param string $returnType * @param bool $cloneObjects */ - public function __construct($className, $methodName, array $parameters, $cloneObjects = false) + public function __construct($className, $methodName, array $parameters, $returnType, $cloneObjects = false) { $this->className = $className; $this->methodName = $methodName; $this->parameters = $parameters; + $this->returnType = $returnType; if (!$cloneObjects) { return; @@ -88,19 +95,50 @@ class PHPUnit_Framework_MockObject_Invocation_Static implements PHPUnit_Framewor $exporter = new Exporter; return sprintf( - '%s::%s(%s)', + '%s::%s(%s)%s', $this->className, $this->methodName, implode( ', ', array_map( - array($exporter, 'shortenedExport'), + [$exporter, 'shortenedExport'], $this->parameters ) - ) + ), + $this->returnType ? sprintf(': %s', $this->returnType) : '' ); } + /** + * @return mixed Mocked return value. + */ + public function generateReturnValue() + { + switch ($this->returnType) { + case '': return; + case 'string': return ''; + case 'float': return 0.0; + case 'int': return 0; + case 'bool': return false; + case 'array': return []; + + case 'callable': + case 'Closure': + return function () {}; + + case 'Traversable': + case 'Generator': + $generator = function () { yield; }; + + return $generator(); + + default: + $generator = new PHPUnit_Framework_MockObject_Generator; + + return $generator->getMock($this->returnType, [], [], '', false); + } + } + /** * @param object $original * @return object diff --git a/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/InvocationMocker.php b/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/InvocationMocker.php index 4bec5d6..434e11d 100644 --- a/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/InvocationMocker.php +++ b/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/InvocationMocker.php @@ -22,12 +22,12 @@ class PHPUnit_Framework_MockObject_InvocationMocker implements PHPUnit_Framework /** * @var PHPUnit_Framework_MockObject_Matcher_Invocation[] */ - protected $matchers = array(); + protected $matchers = []; /** * @var PHPUnit_Framework_MockObject_Builder_Match[] */ - protected $builderMap = array(); + protected $builderMap = []; /** * @param PHPUnit_Framework_MockObject_Matcher_Invocation $matcher @@ -100,12 +100,7 @@ class PHPUnit_Framework_MockObject_InvocationMocker implements PHPUnit_Framework { $exception = null; $hasReturnValue = false; - - if (strtolower($invocation->methodName) == '__tostring') { - $returnValue = ''; - } else { - $returnValue = null; - } + $returnValue = null; foreach ($this->matchers as $match) { try { @@ -126,7 +121,13 @@ class PHPUnit_Framework_MockObject_InvocationMocker implements PHPUnit_Framework throw $exception; } - return $returnValue; + if ($hasReturnValue) { + return $returnValue; + } elseif (strtolower($invocation->methodName) == '__tostring') { + return ''; + } + + return $invocation->generateReturnValue(); } /** diff --git a/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher.php b/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher.php index da3bcde..6423b14 100644 --- a/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher.php +++ b/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher.php @@ -64,7 +64,7 @@ class PHPUnit_Framework_MockObject_Matcher implements PHPUnit_Framework_MockObje */ public function toString() { - $list = array(); + $list = []; if ($this->invocationMatcher !== null) { $list[] = $this->invocationMatcher->toString(); @@ -149,7 +149,7 @@ class PHPUnit_Framework_MockObject_Matcher implements PHPUnit_Framework_MockObje return $this->stub->invoke($invocation); } - return; + return $invocation->generateReturnValue(); } /** diff --git a/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/ConsecutiveParameters.php b/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/ConsecutiveParameters.php index adf74bb..c849665 100644 --- a/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/ConsecutiveParameters.php +++ b/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/ConsecutiveParameters.php @@ -23,12 +23,12 @@ class PHPUnit_Framework_MockObject_Matcher_ConsecutiveParameters extends PHPUnit /** * @var array */ - private $_parameterGroups = array(); + private $_parameterGroups = []; /** * @var array */ - private $_invocations = array(); + private $_invocations = []; /** * @param array $parameterGroups diff --git a/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/InvokedRecorder.php b/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/InvokedRecorder.php index d652f2d..d6cae5e 100644 --- a/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/InvokedRecorder.php +++ b/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/InvokedRecorder.php @@ -22,7 +22,7 @@ abstract class PHPUnit_Framework_MockObject_Matcher_InvokedRecorder implements P /** * @var PHPUnit_Framework_MockObject_Invocation[] */ - protected $invocations = array(); + protected $invocations = []; /** * @return int diff --git a/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/Parameters.php b/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/Parameters.php index cd8aa85..bec0ab9 100644 --- a/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/Parameters.php +++ b/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Matcher/Parameters.php @@ -22,7 +22,7 @@ class PHPUnit_Framework_MockObject_Matcher_Parameters extends PHPUnit_Framework_ /** * @var PHPUnit_Framework_Constraint[] */ - protected $parameters = array(); + protected $parameters = []; /** * @var PHPUnit_Framework_MockObject_Invocation diff --git a/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/MockBuilder.php b/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/MockBuilder.php index 9f8a380..fe49774 100644 --- a/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/MockBuilder.php +++ b/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/MockBuilder.php @@ -28,7 +28,7 @@ class PHPUnit_Framework_MockObject_MockBuilder /** * @var array */ - private $methods = array(); + private $methods = []; /** * @var string @@ -38,7 +38,7 @@ class PHPUnit_Framework_MockObject_MockBuilder /** * @var array */ - private $constructorArgs = array(); + private $constructorArgs = []; /** * @var bool diff --git a/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/MockObject.php b/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/MockObject.php index 4f1dc0d..927fd79 100644 --- a/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/MockObject.php +++ b/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/MockObject.php @@ -44,4 +44,9 @@ interface PHPUnit_Framework_MockObject_MockObject /*extends PHPUnit_Framework_Mo * @throws PHPUnit_Framework_ExpectationFailedException */ public function __phpunit_verify(); + + /** + * @return bool + */ + public function __phpunit_hasMatchers(); } diff --git a/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/Exception.php b/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/Exception.php index 7f9359c..fc0178b 100644 --- a/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/Exception.php +++ b/vendor/phpunit/phpunit-mock-objects/src/Framework/MockObject/Stub/Exception.php @@ -19,8 +19,15 @@ class PHPUnit_Framework_MockObject_Stub_Exception implements PHPUnit_Framework_M { protected $exception; - public function __construct(Exception $exception) + public function __construct($exception) { + // TODO Replace check with type declaration when support for PHP 5 is dropped + if (!$exception instanceof Throwable && !$exception instanceof Exception) { + throw new PHPUnit_Framework_Exception( + 'Exception must be an instance of Throwable (PHP 7) or Exception (PHP 5)' + ); + } + $this->exception = $exception; } diff --git a/vendor/phpunit/phpunit-mock-objects/tests/GeneratorTest.php b/vendor/phpunit/phpunit-mock-objects/tests/GeneratorTest.php index 51bd20c..28e562f 100644 --- a/vendor/phpunit/phpunit-mock-objects/tests/GeneratorTest.php +++ b/vendor/phpunit/phpunit-mock-objects/tests/GeneratorTest.php @@ -17,7 +17,7 @@ class Framework_MockObject_GeneratorTest extends PHPUnit_Framework_TestCase */ public function testGetMockFailsWhenInvalidFunctionNameIsPassedInAsAFunctionToMock() { - $this->generator->getMock('StdClass', array(0)); + $this->generator->getMock(StdClass::class, [0]); } /** @@ -25,7 +25,8 @@ class Framework_MockObject_GeneratorTest extends PHPUnit_Framework_TestCase */ public function testGetMockCanCreateNonExistingFunctions() { - $mock = $this->generator->getMock('StdClass', array('testFunction')); + $mock = $this->generator->getMock(StdClass::class, ['testFunction']); + $this->assertTrue(method_exists($mock, 'testFunction')); } @@ -36,7 +37,20 @@ class Framework_MockObject_GeneratorTest extends PHPUnit_Framework_TestCase */ public function testGetMockGeneratorFails() { - $mock = $this->generator->getMock('StdClass', array('foo', 'foo')); + $this->generator->getMock(StdClass::class, ['foo', 'foo']); + } + + /** + * @covers PHPUnit_Framework_MockObject_Generator::getMock + * @covers PHPUnit_Framework_MockObject_Generator::isMethodNameBlacklisted + * @requires PHP 7 + */ + public function testGetMockBlacklistedMethodNamesPhp7() + { + $mock = $this->generator->getMock(InterfaceWithSemiReservedMethodName::class); + + $this->assertTrue(method_exists($mock, 'unset')); + $this->assertInstanceOf(InterfaceWithSemiReservedMethodName::class, $mock); } /** @@ -44,7 +58,8 @@ class Framework_MockObject_GeneratorTest extends PHPUnit_Framework_TestCase */ public function testGetMockForAbstractClassDoesNotFailWhenFakingInterfaces() { - $mock = $this->generator->getMockForAbstractClass('Countable'); + $mock = $this->generator->getMockForAbstractClass(Countable::class); + $this->assertTrue(method_exists($mock, 'count')); } @@ -53,7 +68,8 @@ class Framework_MockObject_GeneratorTest extends PHPUnit_Framework_TestCase */ public function testGetMockForAbstractClassStubbingAbstractClass() { - $mock = $this->generator->getMockForAbstractClass('AbstractMockTestClass'); + $mock = $this->generator->getMockForAbstractClass(AbstractMockTestClass::class); + $this->assertTrue(method_exists($mock, 'doSomething')); } @@ -63,13 +79,13 @@ class Framework_MockObject_GeneratorTest extends PHPUnit_Framework_TestCase public function testGetMockForAbstractClassWithNonExistentMethods() { $mock = $this->generator->getMockForAbstractClass( - 'AbstractMockTestClass', - array(), + AbstractMockTestClass::class, + [], '', true, true, true, - array('nonexistentMethod') + ['nonexistentMethod'] ); $this->assertTrue(method_exists($mock, 'nonexistentMethod')); @@ -81,7 +97,7 @@ class Framework_MockObject_GeneratorTest extends PHPUnit_Framework_TestCase */ public function testGetMockForAbstractClassShouldCreateStubsOnlyForAbstractMethodWhenNoMethodsWereInformed() { - $mock = $this->generator->getMockForAbstractClass('AbstractMockTestClass'); + $mock = $this->generator->getMockForAbstractClass(AbstractMockTestClass::class); $mock->expects($this->any()) ->method('doSomething') @@ -98,7 +114,7 @@ class Framework_MockObject_GeneratorTest extends PHPUnit_Framework_TestCase */ public function testGetMockForAbstractClassExpectingInvalidArgumentException($className, $mockClassName) { - $mock = $this->generator->getMockForAbstractClass($className, array(), $mockClassName); + $this->generator->getMockForAbstractClass($className, [], $mockClassName); } /** @@ -107,34 +123,30 @@ class Framework_MockObject_GeneratorTest extends PHPUnit_Framework_TestCase */ public function testGetMockForAbstractClassAbstractClassDoesNotExist() { - $mock = $this->generator->getMockForAbstractClass('Tux'); + $this->generator->getMockForAbstractClass('Tux'); } - /** - * Dataprovider for test "testGetMockForAbstractClassExpectingInvalidArgumentException" - */ - public static function getMockForAbstractClassExpectsInvalidArgumentExceptionDataprovider() + public function getMockForAbstractClassExpectsInvalidArgumentExceptionDataprovider() { - return array( - 'className not a string' => array(array(), ''), - 'mockClassName not a string' => array('Countable', new StdClass), - ); + return [ + 'className not a string' => [[], ''], + 'mockClassName not a string' => [Countable::class, new StdClass], + ]; } /** * @covers PHPUnit_Framework_MockObject_Generator::getMockForTrait - * @requires PHP 5.4.0 */ public function testGetMockForTraitWithNonExistentMethodsAndNonAbstractMethods() { $mock = $this->generator->getMockForTrait( - 'AbstractTrait', - array(), + AbstractTrait::class, + [], '', true, true, true, - array('nonexistentMethod') + ['nonexistentMethod'] ); $this->assertTrue(method_exists($mock, 'nonexistentMethod')); @@ -144,57 +156,28 @@ class Framework_MockObject_GeneratorTest extends PHPUnit_Framework_TestCase } /** - * @covers PHPUnit_Framework_MockObject_Generator::getMockForTrait - * @requires PHP 5.4.0 + * @covers PHPUnit_Framework_MockObject_Generator::getMockForTrait */ public function testGetMockForTraitStubbingAbstractMethod() { - $mock = $this->generator->getMockForTrait('AbstractTrait'); + $mock = $this->generator->getMockForTrait(AbstractTrait::class); + $this->assertTrue(method_exists($mock, 'doSomething')); } - /** - * @requires PHP 5.4.0 - */ public function testGetMockForSingletonWithReflectionSuccess() { - // Probably, this should be moved to tests/autoload.php - require_once __DIR__ . '/_fixture/SingletonClass.php'; + $mock = $this->generator->getMock(SingletonClass::class, ['doSomething'], [], '', false); - $mock = $this->generator->getMock('SingletonClass', array('doSomething'), array(), '', false); $this->assertInstanceOf('SingletonClass', $mock); } /** - * Same as "testGetMockForSingletonWithReflectionSuccess", but we expect - * warning for PHP < 5.4.0 since PHPUnit will try to execute private __wakeup - * on unserialize + * @covers PHPUnit_Framework_MockObject_Generator::getMock + * @expectedException PHPUnit_Framework_MockObject_RuntimeException */ - public function testGetMockForSingletonWithUnserializeFail() + public function testExceptionIsRaisedForMutuallyExclusiveOptions() { - if (version_compare(PHP_VERSION, '5.4.0', '>=')) { - $this->markTestSkipped('Only for PHP < 5.4.0'); - } - - $this->setExpectedException('PHPUnit_Framework_MockObject_RuntimeException'); - - // Probably, this should be moved to tests/autoload.php - require_once __DIR__ . '/_fixture/SingletonClass.php'; - - $mock = $this->generator->getMock('SingletonClass', array('doSomething'), array(), '', false); - } - - /** - * ReflectionClass::getMethods for SoapClient on PHP 5.3 produces PHP Fatal Error - * @runInSeparateProcess - */ - public function testGetMockForSoapClientReflectionMethodsDuplication() - { - if (version_compare(PHP_VERSION, '5.4.0', '>=')) { - $this->markTestSkipped('Only for PHP < 5.4.0'); - } - - $mock = $this->generator->getMock('SoapClient', array(), array(), '', false); - $this->assertInstanceOf('SoapClient', $mock); + $this->generator->getMock(StdClass::class, [], [], '', false, true, true, true, true); } } diff --git a/vendor/phpunit/phpunit-mock-objects/tests/MockBuilderTest.php b/vendor/phpunit/phpunit-mock-objects/tests/MockBuilderTest.php index ef4a0cc..c4dd63d 100644 --- a/vendor/phpunit/phpunit-mock-objects/tests/MockBuilderTest.php +++ b/vendor/phpunit/phpunit-mock-objects/tests/MockBuilderTest.php @@ -31,7 +31,7 @@ class Framework_MockBuilderTest extends PHPUnit_Framework_TestCase public function testMethodsToMockCanBeSpecified() { $spec = $this->getMockBuilder('Mockable'); - $spec->setMethods(array('mockableMethod')); + $spec->setMethods(['mockableMethod']); $mock = $spec->getMock(); $this->assertNull($mock->mockableMethod()); $this->assertTrue($mock->anotherMockableMethod()); @@ -41,7 +41,7 @@ class Framework_MockBuilderTest extends PHPUnit_Framework_TestCase { $spec = $this->getMockBuilder('Mockable'); $mock = $spec->getMock(); - $this->assertEquals(array(null, null), $mock->constructorArgs); + $this->assertEquals([null, null], $mock->constructorArgs); } public function testMockClassNameCanBeSpecified() @@ -55,7 +55,7 @@ class Framework_MockBuilderTest extends PHPUnit_Framework_TestCase public function testConstructorArgumentsCanBeSpecified() { $spec = $this->getMockBuilder('Mockable'); - $spec->setConstructorArgs($expected = array(23, 42)); + $spec->setConstructorArgs($expected = [23, 42]); $mock = $spec->getMock(); $this->assertEquals($expected, $mock->constructorArgs); } @@ -70,8 +70,8 @@ class Framework_MockBuilderTest extends PHPUnit_Framework_TestCase public function testByDefaultOriginalCloneIsPreserved() { - $spec = $this->getMockBuilder('Mockable'); - $mock = $spec->getMock(); + $spec = $this->getMockBuilder('Mockable'); + $mock = $spec->getMock(); $cloned = clone $mock; $this->assertTrue($cloned->cloned); } @@ -80,9 +80,9 @@ class Framework_MockBuilderTest extends PHPUnit_Framework_TestCase { $spec = $this->getMockBuilder('Mockable'); $spec->disableOriginalClone(); - $mock = $spec->getMock(); + $mock = $spec->getMock(); $mock->cloned = false; - $cloned = clone $mock; + $cloned = clone $mock; $this->assertFalse($cloned->cloned); } @@ -96,8 +96,8 @@ class Framework_MockBuilderTest extends PHPUnit_Framework_TestCase public function testProvidesAFluentInterface() { $spec = $this->getMockBuilder('Mockable') - ->setMethods(array('mockableMethod')) - ->setConstructorArgs(array()) + ->setMethods(['mockableMethod']) + ->setConstructorArgs([]) ->setMockClassName('DummyClassName') ->disableOriginalConstructor() ->disableOriginalClone() diff --git a/vendor/phpunit/phpunit-mock-objects/tests/MockObject/232.phpt b/vendor/phpunit/phpunit-mock-objects/tests/MockObject/232.phpt index 3426e89..e02762e 100644 --- a/vendor/phpunit/phpunit-mock-objects/tests/MockObject/232.phpt +++ b/vendor/phpunit/phpunit-mock-objects/tests/MockObject/232.phpt @@ -1,9 +1,5 @@ --TEST-- -PHPUnit_Framework_MockObject_Generator::generate('Foo', array(), 'MockFoo', TRUE, TRUE) ---SKIPIF-- -= 5.4.0 required'; -?> +PHPUnit_Framework_MockObject_Generator::generate('Foo', array(), 'MockFoo', true, true) --FILE-- generate( - 'Foo', - array(), - 'MockFoo', - TRUE, - TRUE + 'Foo', + array(), + 'MockFoo', + true, + true ); print $mock['code']; @@ -81,9 +77,9 @@ class MockFoo extends Foo implements PHPUnit_Framework_MockObject_MockObject } $result = $this->__phpunit_getInvocationMocker()->invoke( - new PHPUnit_Framework_MockObject_Invocation_Object( - 'Foo', 'speak', $arguments, $this, TRUE - ) + new PHPUnit_Framework_MockObject_Invocation_Object( + 'Foo', 'speak', $arguments, '', $this, true + ) ); return $result; @@ -108,7 +104,7 @@ class MockFoo extends Foo implements PHPUnit_Framework_MockObject_MockObject public function __phpunit_getInvocationMocker() { - if ($this->__phpunit_invocationMocker === NULL) { + if ($this->__phpunit_invocationMocker === null) { $this->__phpunit_invocationMocker = new PHPUnit_Framework_MockObject_InvocationMocker; } @@ -120,10 +116,13 @@ class MockFoo extends Foo implements PHPUnit_Framework_MockObject_MockObject return $this->__phpunit_getInvocationMocker()->hasMatchers(); } - public function __phpunit_verify() + public function __phpunit_verify($unsetInvocationMocker = true) { $this->__phpunit_getInvocationMocker()->verify(); - $this->__phpunit_invocationMocker = NULL; + + if ($unsetInvocationMocker) { + $this->__phpunit_invocationMocker = null; + } } } diff --git a/vendor/phpunit/phpunit-mock-objects/tests/MockObject/Invocation/ObjectTest.php b/vendor/phpunit/phpunit-mock-objects/tests/MockObject/Invocation/ObjectTest.php index a957491..94ba45a 100644 --- a/vendor/phpunit/phpunit-mock-objects/tests/MockObject/Invocation/ObjectTest.php +++ b/vendor/phpunit/phpunit-mock-objects/tests/MockObject/Invocation/ObjectTest.php @@ -7,8 +7,9 @@ class Framework_MockObject_Invocation_ObjectTest extends PHPUnit_Framework_TestC new PHPUnit_Framework_MockObject_Invocation_Object( 'FooClass', 'FooMethod', - array('an_argument'), - new StdClass + ['an_argument'], + 'ReturnType', + new StdClass ); } @@ -17,7 +18,8 @@ class Framework_MockObject_Invocation_ObjectTest extends PHPUnit_Framework_TestC $invocation = new PHPUnit_Framework_MockObject_Invocation_Object( 'FooClass', 'FooMethod', - array('an_argument'), + ['an_argument'], + 'ReturnType', new StdClass ); @@ -29,7 +31,8 @@ class Framework_MockObject_Invocation_ObjectTest extends PHPUnit_Framework_TestC $invocation = new PHPUnit_Framework_MockObject_Invocation_Object( 'FooClass', 'FooMethod', - array('an_argument'), + ['an_argument'], + 'ReturnType', new StdClass ); @@ -43,7 +46,8 @@ class Framework_MockObject_Invocation_ObjectTest extends PHPUnit_Framework_TestC $invocation = new PHPUnit_Framework_MockObject_Invocation_Object( 'FooClass', 'FooMethod', - array('an_argument'), + ['an_argument'], + 'ReturnType', $expectedObject ); @@ -52,14 +56,15 @@ class Framework_MockObject_Invocation_ObjectTest extends PHPUnit_Framework_TestC public function testAllowToGetMethodParametersSetInConstructor() { - $expectedParameters = array( - 'foo', 5, array('a', 'b'), new StdClass, null, false - ); + $expectedParameters = [ + 'foo', 5, ['a', 'b'], new StdClass, null, false + ]; $invocation = new PHPUnit_Framework_MockObject_Invocation_Object( 'FooClass', 'FooMethod', $expectedParameters, + 'ReturnType', new StdClass ); @@ -68,13 +73,14 @@ class Framework_MockObject_Invocation_ObjectTest extends PHPUnit_Framework_TestC public function testConstructorAllowToSetFlagCloneObjectsInParameters() { - $parameters = array(new StdClass); + $parameters = [new StdClass]; $cloneObjects = true; $invocation = new PHPUnit_Framework_MockObject_Invocation_Object( 'FooClass', 'FooMethod', $parameters, + 'ReturnType', new StdClass, $cloneObjects ); @@ -82,4 +88,19 @@ class Framework_MockObject_Invocation_ObjectTest extends PHPUnit_Framework_TestC $this->assertEquals($parameters, $invocation->parameters); $this->assertNotSame($parameters, $invocation->parameters); } + + public function testAllowToGetReturnTypeSetInConstructor() + { + $expectedReturnType = 'string'; + + $invocation = new PHPUnit_Framework_MockObject_Invocation_Object( + 'FooClass', + 'FooMethod', + ['an_argument'], + $expectedReturnType, + new StdClass + ); + + $this->assertSame($expectedReturnType, $invocation->returnType); + } } diff --git a/vendor/phpunit/phpunit-mock-objects/tests/MockObject/Invocation/StaticTest.php b/vendor/phpunit/phpunit-mock-objects/tests/MockObject/Invocation/StaticTest.php index b965da1..fb16c80 100644 --- a/vendor/phpunit/phpunit-mock-objects/tests/MockObject/Invocation/StaticTest.php +++ b/vendor/phpunit/phpunit-mock-objects/tests/MockObject/Invocation/StaticTest.php @@ -4,33 +4,49 @@ class Framework_MockObject_Invocation_StaticTest extends PHPUnit_Framework_TestC { public function testConstructorRequiresClassAndMethodAndParameters() { - new PHPUnit_Framework_MockObject_Invocation_Static('FooClass', 'FooMethod', array('an_argument')); + new PHPUnit_Framework_MockObject_Invocation_Static( + 'FooClass', + 'FooMethod', + ['an_argument'], + 'ReturnType' + ); } public function testAllowToGetClassNameSetInConstructor() { - $invocation = new PHPUnit_Framework_MockObject_Invocation_Static('FooClass', 'FooMethod', array('an_argument')); + $invocation = new PHPUnit_Framework_MockObject_Invocation_Static( + 'FooClass', + 'FooMethod', + ['an_argument'], + 'ReturnType' + ); $this->assertSame('FooClass', $invocation->className); } public function testAllowToGetMethodNameSetInConstructor() { - $invocation = new PHPUnit_Framework_MockObject_Invocation_Static('FooClass', 'FooMethod', array('an_argument')); + $invocation = new PHPUnit_Framework_MockObject_Invocation_Static( + 'FooClass', + 'FooMethod', + ['an_argument'], + 'ReturnType' + ); $this->assertSame('FooMethod', $invocation->methodName); } public function testAllowToGetMethodParametersSetInConstructor() { - $expectedParameters = array( - 'foo', 5, array('a', 'b'), new StdClass, null, false - ); + $expectedParameters = [ + 'foo', 5, ['a', 'b'], new StdClass, null, false + ]; $invocation = new PHPUnit_Framework_MockObject_Invocation_Static( 'FooClass', 'FooMethod', - $expectedParameters + $expectedParameters, + 'ReturnType' ); $this->assertSame($expectedParameters, $invocation->parameters); @@ -38,17 +54,33 @@ class Framework_MockObject_Invocation_StaticTest extends PHPUnit_Framework_TestC public function testConstructorAllowToSetFlagCloneObjectsInParameters() { - $parameters = array(new StdClass); + $parameters = [new StdClass]; $cloneObjects = true; $invocation = new PHPUnit_Framework_MockObject_Invocation_Static( 'FooClass', 'FooMethod', $parameters, + 'ReturnType', $cloneObjects ); $this->assertEquals($parameters, $invocation->parameters); $this->assertNotSame($parameters, $invocation->parameters); } + + public function testAllowToGetReturnTypeSetInConstructor() + { + $expectedReturnType = 'string'; + + $invocation = new PHPUnit_Framework_MockObject_Invocation_Static( + 'FooClass', + 'FooMethod', + ['an_argument'], + $expectedReturnType + ); + + $this->assertSame($expectedReturnType, $invocation->returnType); + } + } diff --git a/vendor/phpunit/phpunit-mock-objects/tests/MockObject/Matcher/ConsecutiveParametersTest.php b/vendor/phpunit/phpunit-mock-objects/tests/MockObject/Matcher/ConsecutiveParametersTest.php index ae26b76..38ad2b7 100644 --- a/vendor/phpunit/phpunit-mock-objects/tests/MockObject/Matcher/ConsecutiveParametersTest.php +++ b/vendor/phpunit/phpunit-mock-objects/tests/MockObject/Matcher/ConsecutiveParametersTest.php @@ -3,13 +3,13 @@ class Framework_MockObject_Matcher_ConsecutiveParametersTest extends PHPUnit_Fra { public function testIntegration() { - $mock = $this->getMock('stdClass', array('foo')); + $mock = $this->getMock('stdClass', ['foo']); $mock ->expects($this->any()) ->method('foo') ->withConsecutive( - array('bar'), - array(21, 42) + ['bar'], + [21, 42] ); $mock->foo('bar'); $mock->foo(21, 42); @@ -17,12 +17,12 @@ class Framework_MockObject_Matcher_ConsecutiveParametersTest extends PHPUnit_Fra public function testIntegrationWithLessAssertionsThenMethodCalls() { - $mock = $this->getMock('stdClass', array('foo')); + $mock = $this->getMock('stdClass', ['foo']); $mock ->expects($this->any()) ->method('foo') ->withConsecutive( - array('bar') + ['bar'] ); $mock->foo('bar'); $mock->foo(21, 42); @@ -30,13 +30,13 @@ class Framework_MockObject_Matcher_ConsecutiveParametersTest extends PHPUnit_Fra public function testIntegrationExpectingException() { - $mock = $this->getMock('stdClass', array('foo')); + $mock = $this->getMock('stdClass', ['foo']); $mock ->expects($this->any()) ->method('foo') ->withConsecutive( - array('bar'), - array(21, 42) + ['bar'], + [21, 42] ); $mock->foo('bar'); $this->setExpectedException('PHPUnit_Framework_ExpectationFailedException'); diff --git a/vendor/phpunit/phpunit-mock-objects/tests/MockObject/abstract_class.phpt b/vendor/phpunit/phpunit-mock-objects/tests/MockObject/abstract_class.phpt index 72450c5..8e4f384 100644 --- a/vendor/phpunit/phpunit-mock-objects/tests/MockObject/abstract_class.phpt +++ b/vendor/phpunit/phpunit-mock-objects/tests/MockObject/abstract_class.phpt @@ -1,5 +1,5 @@ --TEST-- -PHPUnit_Framework_MockObject_Generator::generate('Foo', array(), 'MockFoo', TRUE, TRUE) +PHPUnit_Framework_MockObject_Generator::generate('Foo', array(), 'MockFoo', true, true) --FILE-- generate( - 'Foo', - array(), - 'MockFoo', - TRUE, - TRUE + 'Foo', + array(), + 'MockFoo', + true, + true ); print $mock['code']; @@ -52,9 +52,9 @@ class MockFoo extends Foo implements PHPUnit_Framework_MockObject_MockObject } $result = $this->__phpunit_getInvocationMocker()->invoke( - new PHPUnit_Framework_MockObject_Invocation_Object( - 'Foo', 'one', $arguments, $this, TRUE - ) + new PHPUnit_Framework_MockObject_Invocation_Object( + 'Foo', 'one', $arguments, '', $this, true + ) ); return $result; @@ -74,9 +74,9 @@ class MockFoo extends Foo implements PHPUnit_Framework_MockObject_MockObject } $result = $this->__phpunit_getInvocationMocker()->invoke( - new PHPUnit_Framework_MockObject_Invocation_Object( - 'Foo', 'two', $arguments, $this, TRUE - ) + new PHPUnit_Framework_MockObject_Invocation_Object( + 'Foo', 'two', $arguments, '', $this, true + ) ); return $result; @@ -96,9 +96,9 @@ class MockFoo extends Foo implements PHPUnit_Framework_MockObject_MockObject } $result = $this->__phpunit_getInvocationMocker()->invoke( - new PHPUnit_Framework_MockObject_Invocation_Object( - 'Foo', 'three', $arguments, $this, TRUE - ) + new PHPUnit_Framework_MockObject_Invocation_Object( + 'Foo', 'three', $arguments, '', $this, true + ) ); return $result; @@ -123,7 +123,7 @@ class MockFoo extends Foo implements PHPUnit_Framework_MockObject_MockObject public function __phpunit_getInvocationMocker() { - if ($this->__phpunit_invocationMocker === NULL) { + if ($this->__phpunit_invocationMocker === null) { $this->__phpunit_invocationMocker = new PHPUnit_Framework_MockObject_InvocationMocker; } @@ -135,9 +135,12 @@ class MockFoo extends Foo implements PHPUnit_Framework_MockObject_MockObject return $this->__phpunit_getInvocationMocker()->hasMatchers(); } - public function __phpunit_verify() + public function __phpunit_verify($unsetInvocationMocker = true) { $this->__phpunit_getInvocationMocker()->verify(); - $this->__phpunit_invocationMocker = NULL; + + if ($unsetInvocationMocker) { + $this->__phpunit_invocationMocker = null; + } } } diff --git a/vendor/phpunit/phpunit-mock-objects/tests/MockObject/class.phpt b/vendor/phpunit/phpunit-mock-objects/tests/MockObject/class.phpt index 2e40328..73cc793 100644 --- a/vendor/phpunit/phpunit-mock-objects/tests/MockObject/class.phpt +++ b/vendor/phpunit/phpunit-mock-objects/tests/MockObject/class.phpt @@ -1,5 +1,5 @@ --TEST-- -PHPUnit_Framework_MockObject_Generator::generate('Foo', array(), 'MockFoo', TRUE, TRUE) +PHPUnit_Framework_MockObject_Generator::generate('Foo', array(), 'MockFoo', true, true) --FILE-- generate( - 'Foo', - array(), - 'MockFoo', - TRUE, - TRUE + 'Foo', + array(), + 'MockFoo', + true, + true ); print $mock['code']; @@ -52,9 +52,9 @@ class MockFoo extends Foo implements PHPUnit_Framework_MockObject_MockObject } $result = $this->__phpunit_getInvocationMocker()->invoke( - new PHPUnit_Framework_MockObject_Invocation_Object( - 'Foo', 'bar', $arguments, $this, TRUE - ) + new PHPUnit_Framework_MockObject_Invocation_Object( + 'Foo', 'bar', $arguments, '', $this, true + ) ); return $result; @@ -74,9 +74,9 @@ class MockFoo extends Foo implements PHPUnit_Framework_MockObject_MockObject } $result = $this->__phpunit_getInvocationMocker()->invoke( - new PHPUnit_Framework_MockObject_Invocation_Object( - 'Foo', 'baz', $arguments, $this, TRUE - ) + new PHPUnit_Framework_MockObject_Invocation_Object( + 'Foo', 'baz', $arguments, '', $this, true + ) ); return $result; @@ -101,7 +101,7 @@ class MockFoo extends Foo implements PHPUnit_Framework_MockObject_MockObject public function __phpunit_getInvocationMocker() { - if ($this->__phpunit_invocationMocker === NULL) { + if ($this->__phpunit_invocationMocker === null) { $this->__phpunit_invocationMocker = new PHPUnit_Framework_MockObject_InvocationMocker; } @@ -113,9 +113,12 @@ class MockFoo extends Foo implements PHPUnit_Framework_MockObject_MockObject return $this->__phpunit_getInvocationMocker()->hasMatchers(); } - public function __phpunit_verify() + public function __phpunit_verify($unsetInvocationMocker = true) { $this->__phpunit_getInvocationMocker()->verify(); - $this->__phpunit_invocationMocker = NULL; + + if ($unsetInvocationMocker) { + $this->__phpunit_invocationMocker = null; + } } } diff --git a/vendor/phpunit/phpunit-mock-objects/tests/MockObject/class_call_parent_clone.phpt b/vendor/phpunit/phpunit-mock-objects/tests/MockObject/class_call_parent_clone.phpt index 0f91a98..d0dc024 100644 --- a/vendor/phpunit/phpunit-mock-objects/tests/MockObject/class_call_parent_clone.phpt +++ b/vendor/phpunit/phpunit-mock-objects/tests/MockObject/class_call_parent_clone.phpt @@ -1,5 +1,5 @@ --TEST-- -PHPUnit_Framework_MockObject_Generator::generate('Foo', array(), 'MockFoo', TRUE) +PHPUnit_Framework_MockObject_Generator::generate('Foo', array(), 'MockFoo', true) --FILE-- generate( - 'Foo', - array(), - 'MockFoo', - TRUE + 'Foo', + array(), + 'MockFoo', + true ); print $mock['code']; @@ -53,7 +53,7 @@ class MockFoo extends Foo implements PHPUnit_Framework_MockObject_MockObject public function __phpunit_getInvocationMocker() { - if ($this->__phpunit_invocationMocker === NULL) { + if ($this->__phpunit_invocationMocker === null) { $this->__phpunit_invocationMocker = new PHPUnit_Framework_MockObject_InvocationMocker; } @@ -65,9 +65,12 @@ class MockFoo extends Foo implements PHPUnit_Framework_MockObject_MockObject return $this->__phpunit_getInvocationMocker()->hasMatchers(); } - public function __phpunit_verify() + public function __phpunit_verify($unsetInvocationMocker = true) { $this->__phpunit_getInvocationMocker()->verify(); - $this->__phpunit_invocationMocker = NULL; + + if ($unsetInvocationMocker) { + $this->__phpunit_invocationMocker = null; + } } } diff --git a/vendor/phpunit/phpunit-mock-objects/tests/MockObject/class_call_parent_constructor.phpt b/vendor/phpunit/phpunit-mock-objects/tests/MockObject/class_call_parent_constructor.phpt index 6f037ee..07437c1 100644 --- a/vendor/phpunit/phpunit-mock-objects/tests/MockObject/class_call_parent_constructor.phpt +++ b/vendor/phpunit/phpunit-mock-objects/tests/MockObject/class_call_parent_constructor.phpt @@ -1,5 +1,5 @@ --TEST-- -PHPUnit_Framework_MockObject_Generator::generate('Foo', array(), 'MockFoo', TRUE) +PHPUnit_Framework_MockObject_Generator::generate('Foo', array(), 'MockFoo', true) --FILE-- generate( - 'Foo', - array(), - 'MockFoo', - TRUE + 'Foo', + array(), + 'MockFoo', + true ); print $mock['code']; @@ -52,7 +52,7 @@ class MockFoo extends Foo implements PHPUnit_Framework_MockObject_MockObject public function __phpunit_getInvocationMocker() { - if ($this->__phpunit_invocationMocker === NULL) { + if ($this->__phpunit_invocationMocker === null) { $this->__phpunit_invocationMocker = new PHPUnit_Framework_MockObject_InvocationMocker; } @@ -64,9 +64,12 @@ class MockFoo extends Foo implements PHPUnit_Framework_MockObject_MockObject return $this->__phpunit_getInvocationMocker()->hasMatchers(); } - public function __phpunit_verify() + public function __phpunit_verify($unsetInvocationMocker = true) { $this->__phpunit_getInvocationMocker()->verify(); - $this->__phpunit_invocationMocker = NULL; + + if ($unsetInvocationMocker) { + $this->__phpunit_invocationMocker = null; + } } } diff --git a/vendor/phpunit/phpunit-mock-objects/tests/MockObject/class_dont_call_parent_clone.phpt b/vendor/phpunit/phpunit-mock-objects/tests/MockObject/class_dont_call_parent_clone.phpt index dc82938..854c31e 100644 --- a/vendor/phpunit/phpunit-mock-objects/tests/MockObject/class_dont_call_parent_clone.phpt +++ b/vendor/phpunit/phpunit-mock-objects/tests/MockObject/class_dont_call_parent_clone.phpt @@ -1,5 +1,5 @@ --TEST-- -PHPUnit_Framework_MockObject_Generator::generate('Foo', array(), 'MockFoo', FALSE) +PHPUnit_Framework_MockObject_Generator::generate('Foo', array(), 'MockFoo', false) --FILE-- generate( - 'Foo', - array(), - 'MockFoo', - FALSE + 'Foo', + array(), + 'MockFoo', + false ); print $mock['code']; @@ -52,7 +52,7 @@ class MockFoo extends Foo implements PHPUnit_Framework_MockObject_MockObject public function __phpunit_getInvocationMocker() { - if ($this->__phpunit_invocationMocker === NULL) { + if ($this->__phpunit_invocationMocker === null) { $this->__phpunit_invocationMocker = new PHPUnit_Framework_MockObject_InvocationMocker; } @@ -64,9 +64,12 @@ class MockFoo extends Foo implements PHPUnit_Framework_MockObject_MockObject return $this->__phpunit_getInvocationMocker()->hasMatchers(); } - public function __phpunit_verify() + public function __phpunit_verify($unsetInvocationMocker = true) { $this->__phpunit_getInvocationMocker()->verify(); - $this->__phpunit_invocationMocker = NULL; + + if ($unsetInvocationMocker) { + $this->__phpunit_invocationMocker = null; + } } } diff --git a/vendor/phpunit/phpunit-mock-objects/tests/MockObject/class_dont_call_parent_constructor.phpt b/vendor/phpunit/phpunit-mock-objects/tests/MockObject/class_dont_call_parent_constructor.phpt index 6f037ee..07437c1 100644 --- a/vendor/phpunit/phpunit-mock-objects/tests/MockObject/class_dont_call_parent_constructor.phpt +++ b/vendor/phpunit/phpunit-mock-objects/tests/MockObject/class_dont_call_parent_constructor.phpt @@ -1,5 +1,5 @@ --TEST-- -PHPUnit_Framework_MockObject_Generator::generate('Foo', array(), 'MockFoo', TRUE) +PHPUnit_Framework_MockObject_Generator::generate('Foo', array(), 'MockFoo', true) --FILE-- generate( - 'Foo', - array(), - 'MockFoo', - TRUE + 'Foo', + array(), + 'MockFoo', + true ); print $mock['code']; @@ -52,7 +52,7 @@ class MockFoo extends Foo implements PHPUnit_Framework_MockObject_MockObject public function __phpunit_getInvocationMocker() { - if ($this->__phpunit_invocationMocker === NULL) { + if ($this->__phpunit_invocationMocker === null) { $this->__phpunit_invocationMocker = new PHPUnit_Framework_MockObject_InvocationMocker; } @@ -64,9 +64,12 @@ class MockFoo extends Foo implements PHPUnit_Framework_MockObject_MockObject return $this->__phpunit_getInvocationMocker()->hasMatchers(); } - public function __phpunit_verify() + public function __phpunit_verify($unsetInvocationMocker = true) { $this->__phpunit_getInvocationMocker()->verify(); - $this->__phpunit_invocationMocker = NULL; + + if ($unsetInvocationMocker) { + $this->__phpunit_invocationMocker = null; + } } } diff --git a/vendor/phpunit/phpunit-mock-objects/tests/MockObject/class_implementing_interface_call_parent_constructor.phpt b/vendor/phpunit/phpunit-mock-objects/tests/MockObject/class_implementing_interface_call_parent_constructor.phpt index cfc43d8..ea98a4e 100644 --- a/vendor/phpunit/phpunit-mock-objects/tests/MockObject/class_implementing_interface_call_parent_constructor.phpt +++ b/vendor/phpunit/phpunit-mock-objects/tests/MockObject/class_implementing_interface_call_parent_constructor.phpt @@ -1,5 +1,5 @@ --TEST-- -PHPUnit_Framework_MockObject_Generator::generate('Foo', array(), 'MockFoo', TRUE) +PHPUnit_Framework_MockObject_Generator::generate('Foo', array(), 'MockFoo', true) --FILE-- generate( - 'Foo', - array(), - 'MockFoo', - TRUE + 'Foo', + array(), + 'MockFoo', + true ); print $mock['code']; @@ -57,7 +57,7 @@ class MockFoo extends Foo implements PHPUnit_Framework_MockObject_MockObject public function __phpunit_getInvocationMocker() { - if ($this->__phpunit_invocationMocker === NULL) { + if ($this->__phpunit_invocationMocker === null) { $this->__phpunit_invocationMocker = new PHPUnit_Framework_MockObject_InvocationMocker; } @@ -69,9 +69,12 @@ class MockFoo extends Foo implements PHPUnit_Framework_MockObject_MockObject return $this->__phpunit_getInvocationMocker()->hasMatchers(); } - public function __phpunit_verify() + public function __phpunit_verify($unsetInvocationMocker = true) { $this->__phpunit_getInvocationMocker()->verify(); - $this->__phpunit_invocationMocker = NULL; + + if ($unsetInvocationMocker) { + $this->__phpunit_invocationMocker = null; + } } } diff --git a/vendor/phpunit/phpunit-mock-objects/tests/MockObject/class_implementing_interface_dont_call_parent_constructor.phpt b/vendor/phpunit/phpunit-mock-objects/tests/MockObject/class_implementing_interface_dont_call_parent_constructor.phpt index cfc43d8..ea98a4e 100644 --- a/vendor/phpunit/phpunit-mock-objects/tests/MockObject/class_implementing_interface_dont_call_parent_constructor.phpt +++ b/vendor/phpunit/phpunit-mock-objects/tests/MockObject/class_implementing_interface_dont_call_parent_constructor.phpt @@ -1,5 +1,5 @@ --TEST-- -PHPUnit_Framework_MockObject_Generator::generate('Foo', array(), 'MockFoo', TRUE) +PHPUnit_Framework_MockObject_Generator::generate('Foo', array(), 'MockFoo', true) --FILE-- generate( - 'Foo', - array(), - 'MockFoo', - TRUE + 'Foo', + array(), + 'MockFoo', + true ); print $mock['code']; @@ -57,7 +57,7 @@ class MockFoo extends Foo implements PHPUnit_Framework_MockObject_MockObject public function __phpunit_getInvocationMocker() { - if ($this->__phpunit_invocationMocker === NULL) { + if ($this->__phpunit_invocationMocker === null) { $this->__phpunit_invocationMocker = new PHPUnit_Framework_MockObject_InvocationMocker; } @@ -69,9 +69,12 @@ class MockFoo extends Foo implements PHPUnit_Framework_MockObject_MockObject return $this->__phpunit_getInvocationMocker()->hasMatchers(); } - public function __phpunit_verify() + public function __phpunit_verify($unsetInvocationMocker = true) { $this->__phpunit_getInvocationMocker()->verify(); - $this->__phpunit_invocationMocker = NULL; + + if ($unsetInvocationMocker) { + $this->__phpunit_invocationMocker = null; + } } } diff --git a/vendor/phpunit/phpunit-mock-objects/tests/MockObject/class_partial.phpt b/vendor/phpunit/phpunit-mock-objects/tests/MockObject/class_partial.phpt index b8332ae..74e2174 100644 --- a/vendor/phpunit/phpunit-mock-objects/tests/MockObject/class_partial.phpt +++ b/vendor/phpunit/phpunit-mock-objects/tests/MockObject/class_partial.phpt @@ -1,5 +1,5 @@ --TEST-- -PHPUnit_Framework_MockObject_Generator::generate('Foo', array('bar'), 'MockFoo', TRUE, TRUE) +PHPUnit_Framework_MockObject_Generator::generate('Foo', array('bar'), 'MockFoo', true, true) --FILE-- generate( - 'Foo', - array('bar'), - 'MockFoo', - TRUE, - TRUE + 'Foo', + array('bar'), + 'MockFoo', + true, + true ); print $mock['code']; @@ -52,9 +52,9 @@ class MockFoo extends Foo implements PHPUnit_Framework_MockObject_MockObject } $result = $this->__phpunit_getInvocationMocker()->invoke( - new PHPUnit_Framework_MockObject_Invocation_Object( - 'Foo', 'bar', $arguments, $this, TRUE - ) + new PHPUnit_Framework_MockObject_Invocation_Object( + 'Foo', 'bar', $arguments, '', $this, true + ) ); return $result; @@ -79,7 +79,7 @@ class MockFoo extends Foo implements PHPUnit_Framework_MockObject_MockObject public function __phpunit_getInvocationMocker() { - if ($this->__phpunit_invocationMocker === NULL) { + if ($this->__phpunit_invocationMocker === null) { $this->__phpunit_invocationMocker = new PHPUnit_Framework_MockObject_InvocationMocker; } @@ -91,9 +91,12 @@ class MockFoo extends Foo implements PHPUnit_Framework_MockObject_MockObject return $this->__phpunit_getInvocationMocker()->hasMatchers(); } - public function __phpunit_verify() + public function __phpunit_verify($unsetInvocationMocker = true) { $this->__phpunit_getInvocationMocker()->verify(); - $this->__phpunit_invocationMocker = NULL; + + if ($unsetInvocationMocker) { + $this->__phpunit_invocationMocker = null; + } } } diff --git a/vendor/phpunit/phpunit-mock-objects/tests/MockObject/class_with_method_named_method.phpt b/vendor/phpunit/phpunit-mock-objects/tests/MockObject/class_with_method_named_method.phpt index 6e1ddf6..9306220 100644 --- a/vendor/phpunit/phpunit-mock-objects/tests/MockObject/class_with_method_named_method.phpt +++ b/vendor/phpunit/phpunit-mock-objects/tests/MockObject/class_with_method_named_method.phpt @@ -1,5 +1,5 @@ --TEST-- -PHPUnit_Framework_MockObject_Generator::generate('Foo', array(), 'MockFoo', TRUE, TRUE) +PHPUnit_Framework_MockObject_Generator::generate('Foo', array(), 'MockFoo', true, true) --FILE-- generate( - 'Foo', - array(), - 'MockFoo', - TRUE, - TRUE + 'Foo', + array(), + 'MockFoo', + true, + true ); print $mock['code']; @@ -48,9 +48,9 @@ class MockFoo extends Foo implements PHPUnit_Framework_MockObject_MockObject } $result = $this->__phpunit_getInvocationMocker()->invoke( - new PHPUnit_Framework_MockObject_Invocation_Object( - 'Foo', 'method', $arguments, $this, TRUE - ) + new PHPUnit_Framework_MockObject_Invocation_Object( + 'Foo', 'method', $arguments, '', $this, true + ) ); return $result; @@ -68,7 +68,7 @@ class MockFoo extends Foo implements PHPUnit_Framework_MockObject_MockObject public function __phpunit_getInvocationMocker() { - if ($this->__phpunit_invocationMocker === NULL) { + if ($this->__phpunit_invocationMocker === null) { $this->__phpunit_invocationMocker = new PHPUnit_Framework_MockObject_InvocationMocker; } @@ -80,9 +80,12 @@ class MockFoo extends Foo implements PHPUnit_Framework_MockObject_MockObject return $this->__phpunit_getInvocationMocker()->hasMatchers(); } - public function __phpunit_verify() + public function __phpunit_verify($unsetInvocationMocker = true) { $this->__phpunit_getInvocationMocker()->verify(); - $this->__phpunit_invocationMocker = NULL; + + if ($unsetInvocationMocker) { + $this->__phpunit_invocationMocker = null; + } } } diff --git a/vendor/phpunit/phpunit-mock-objects/tests/MockObject/class_with_method_with_variadic_arguments.phpt b/vendor/phpunit/phpunit-mock-objects/tests/MockObject/class_with_method_with_variadic_arguments.phpt index 8fb9a3c..3c1b1db 100644 --- a/vendor/phpunit/phpunit-mock-objects/tests/MockObject/class_with_method_with_variadic_arguments.phpt +++ b/vendor/phpunit/phpunit-mock-objects/tests/MockObject/class_with_method_with_variadic_arguments.phpt @@ -1,9 +1,5 @@ --TEST-- -PHPUnit_Framework_MockObject_Generator::generate('ClassWithMethodWithVariadicArguments', array(), 'MockFoo', TRUE, TRUE) ---SKIPIF-- -= 5.6.0 required'; -?> +PHPUnit_Framework_MockObject_Generator::generate('ClassWithMethodWithVariadicArguments', array(), 'MockFoo', true, true) --FILE-- generate( - 'ClassWithMethodWithVariadicArguments', - array(), - 'MockFoo', - TRUE, - TRUE + 'ClassWithMethodWithVariadicArguments', + array(), + 'MockFoo', + true, + true ); print $mock['code']; @@ -52,9 +48,9 @@ class MockFoo extends ClassWithMethodWithVariadicArguments implements PHPUnit_Fr } $result = $this->__phpunit_getInvocationMocker()->invoke( - new PHPUnit_Framework_MockObject_Invocation_Object( - 'ClassWithMethodWithVariadicArguments', 'methodWithVariadicArguments', $arguments, $this, TRUE - ) + new PHPUnit_Framework_MockObject_Invocation_Object( + 'ClassWithMethodWithVariadicArguments', 'methodWithVariadicArguments', $arguments, '', $this, true + ) ); return $result; @@ -79,7 +75,7 @@ class MockFoo extends ClassWithMethodWithVariadicArguments implements PHPUnit_Fr public function __phpunit_getInvocationMocker() { - if ($this->__phpunit_invocationMocker === NULL) { + if ($this->__phpunit_invocationMocker === null) { $this->__phpunit_invocationMocker = new PHPUnit_Framework_MockObject_InvocationMocker; } @@ -91,9 +87,12 @@ class MockFoo extends ClassWithMethodWithVariadicArguments implements PHPUnit_Fr return $this->__phpunit_getInvocationMocker()->hasMatchers(); } - public function __phpunit_verify() + public function __phpunit_verify($unsetInvocationMocker = true) { $this->__phpunit_getInvocationMocker()->verify(); - $this->__phpunit_invocationMocker = NULL; + + if ($unsetInvocationMocker) { + $this->__phpunit_invocationMocker = null; + } } } diff --git a/vendor/phpunit/phpunit-mock-objects/tests/MockObject/interface.phpt b/vendor/phpunit/phpunit-mock-objects/tests/MockObject/interface.phpt index 2d38209..4d27e6e 100644 --- a/vendor/phpunit/phpunit-mock-objects/tests/MockObject/interface.phpt +++ b/vendor/phpunit/phpunit-mock-objects/tests/MockObject/interface.phpt @@ -1,5 +1,5 @@ --TEST-- -PHPUnit_Framework_MockObject_Generator::generate('Foo', array(), 'MockFoo', TRUE, TRUE) +PHPUnit_Framework_MockObject_Generator::generate('Foo', array(), 'MockFoo', true, true) --FILE-- generate( - 'Foo', - array(), - 'MockFoo', - TRUE, - TRUE + 'Foo', + array(), + 'MockFoo', + true, + true ); print $mock['code']; @@ -46,9 +46,9 @@ class MockFoo implements PHPUnit_Framework_MockObject_MockObject, Foo } $result = $this->__phpunit_getInvocationMocker()->invoke( - new PHPUnit_Framework_MockObject_Invocation_Object( - 'Foo', 'bar', $arguments, $this, TRUE - ) + new PHPUnit_Framework_MockObject_Invocation_Object( + 'Foo', 'bar', $arguments, '', $this, true + ) ); return $result; @@ -73,7 +73,7 @@ class MockFoo implements PHPUnit_Framework_MockObject_MockObject, Foo public function __phpunit_getInvocationMocker() { - if ($this->__phpunit_invocationMocker === NULL) { + if ($this->__phpunit_invocationMocker === null) { $this->__phpunit_invocationMocker = new PHPUnit_Framework_MockObject_InvocationMocker; } @@ -85,9 +85,12 @@ class MockFoo implements PHPUnit_Framework_MockObject_MockObject, Foo return $this->__phpunit_getInvocationMocker()->hasMatchers(); } - public function __phpunit_verify() + public function __phpunit_verify($unsetInvocationMocker = true) { $this->__phpunit_getInvocationMocker()->verify(); - $this->__phpunit_invocationMocker = NULL; + + if ($unsetInvocationMocker) { + $this->__phpunit_invocationMocker = null; + } } } diff --git a/vendor/phpunit/phpunit-mock-objects/tests/MockObject/invocation_object_clone_object.phpt b/vendor/phpunit/phpunit-mock-objects/tests/MockObject/invocation_object_clone_object.phpt index 87a979e..5b489c5 100644 --- a/vendor/phpunit/phpunit-mock-objects/tests/MockObject/invocation_object_clone_object.phpt +++ b/vendor/phpunit/phpunit-mock-objects/tests/MockObject/invocation_object_clone_object.phpt @@ -1,5 +1,5 @@ --TEST-- -PHPUnit_Framework_MockObject_Generator::generate('Foo', array(), 'MockFoo', TRUE, TRUE, TRUE) +PHPUnit_Framework_MockObject_Generator::generate('Foo', array(), 'MockFoo', true, true, true) --FILE-- generate( - 'Foo', - array(), - 'MockFoo', - TRUE, - TRUE, - TRUE + 'Foo', + array(), + 'MockFoo', + true, + true, + true ); print $mock['code']; @@ -53,9 +53,9 @@ class MockFoo extends Foo implements PHPUnit_Framework_MockObject_MockObject } $result = $this->__phpunit_getInvocationMocker()->invoke( - new PHPUnit_Framework_MockObject_Invocation_Object( - 'Foo', 'bar', $arguments, $this, TRUE - ) + new PHPUnit_Framework_MockObject_Invocation_Object( + 'Foo', 'bar', $arguments, '', $this, true + ) ); return $result; @@ -75,9 +75,9 @@ class MockFoo extends Foo implements PHPUnit_Framework_MockObject_MockObject } $result = $this->__phpunit_getInvocationMocker()->invoke( - new PHPUnit_Framework_MockObject_Invocation_Object( - 'Foo', 'baz', $arguments, $this, TRUE - ) + new PHPUnit_Framework_MockObject_Invocation_Object( + 'Foo', 'baz', $arguments, '', $this, true + ) ); return $result; @@ -102,7 +102,7 @@ class MockFoo extends Foo implements PHPUnit_Framework_MockObject_MockObject public function __phpunit_getInvocationMocker() { - if ($this->__phpunit_invocationMocker === NULL) { + if ($this->__phpunit_invocationMocker === null) { $this->__phpunit_invocationMocker = new PHPUnit_Framework_MockObject_InvocationMocker; } @@ -114,9 +114,12 @@ class MockFoo extends Foo implements PHPUnit_Framework_MockObject_MockObject return $this->__phpunit_getInvocationMocker()->hasMatchers(); } - public function __phpunit_verify() + public function __phpunit_verify($unsetInvocationMocker = true) { $this->__phpunit_getInvocationMocker()->verify(); - $this->__phpunit_invocationMocker = NULL; + + if ($unsetInvocationMocker) { + $this->__phpunit_invocationMocker = null; + } } } diff --git a/vendor/phpunit/phpunit-mock-objects/tests/MockObject/namespaced_class.phpt b/vendor/phpunit/phpunit-mock-objects/tests/MockObject/namespaced_class.phpt index e30bddc..3a88530 100644 --- a/vendor/phpunit/phpunit-mock-objects/tests/MockObject/namespaced_class.phpt +++ b/vendor/phpunit/phpunit-mock-objects/tests/MockObject/namespaced_class.phpt @@ -1,5 +1,5 @@ --TEST-- -PHPUnit_Framework_MockObject_Generator::generate('NS\Foo', array(), 'MockFoo', TRUE, TRUE) +PHPUnit_Framework_MockObject_Generator::generate('NS\Foo', array(), 'MockFoo', true, true) --FILE-- generate( - 'NS\Foo', - array(), - 'MockFoo', - TRUE, - TRUE + 'NS\Foo', + array(), + 'MockFoo', + true, + true ); print $mock['code']; @@ -54,9 +54,9 @@ class MockFoo extends NS\Foo implements PHPUnit_Framework_MockObject_MockObject } $result = $this->__phpunit_getInvocationMocker()->invoke( - new PHPUnit_Framework_MockObject_Invocation_Object( - 'NS\Foo', 'bar', $arguments, $this, TRUE - ) + new PHPUnit_Framework_MockObject_Invocation_Object( + 'NS\Foo', 'bar', $arguments, '', $this, true + ) ); return $result; @@ -76,9 +76,9 @@ class MockFoo extends NS\Foo implements PHPUnit_Framework_MockObject_MockObject } $result = $this->__phpunit_getInvocationMocker()->invoke( - new PHPUnit_Framework_MockObject_Invocation_Object( - 'NS\Foo', 'baz', $arguments, $this, TRUE - ) + new PHPUnit_Framework_MockObject_Invocation_Object( + 'NS\Foo', 'baz', $arguments, '', $this, true + ) ); return $result; @@ -103,7 +103,7 @@ class MockFoo extends NS\Foo implements PHPUnit_Framework_MockObject_MockObject public function __phpunit_getInvocationMocker() { - if ($this->__phpunit_invocationMocker === NULL) { + if ($this->__phpunit_invocationMocker === null) { $this->__phpunit_invocationMocker = new PHPUnit_Framework_MockObject_InvocationMocker; } @@ -115,9 +115,12 @@ class MockFoo extends NS\Foo implements PHPUnit_Framework_MockObject_MockObject return $this->__phpunit_getInvocationMocker()->hasMatchers(); } - public function __phpunit_verify() + public function __phpunit_verify($unsetInvocationMocker = true) { $this->__phpunit_getInvocationMocker()->verify(); - $this->__phpunit_invocationMocker = NULL; + + if ($unsetInvocationMocker) { + $this->__phpunit_invocationMocker = null; + } } } diff --git a/vendor/phpunit/phpunit-mock-objects/tests/MockObject/namespaced_class_call_parent_clone.phpt b/vendor/phpunit/phpunit-mock-objects/tests/MockObject/namespaced_class_call_parent_clone.phpt index 3dee9c9..a4cdd20 100644 --- a/vendor/phpunit/phpunit-mock-objects/tests/MockObject/namespaced_class_call_parent_clone.phpt +++ b/vendor/phpunit/phpunit-mock-objects/tests/MockObject/namespaced_class_call_parent_clone.phpt @@ -1,5 +1,5 @@ --TEST-- -PHPUnit_Framework_MockObject_Generator::generate('NS\Foo', array(), 'MockFoo', TRUE) +PHPUnit_Framework_MockObject_Generator::generate('NS\Foo', array(), 'MockFoo', true) --FILE-- generate( - 'NS\Foo', - array(), - 'MockFoo', - TRUE + 'NS\Foo', + array(), + 'MockFoo', + true ); print $mock['code']; @@ -55,7 +55,7 @@ class MockFoo extends NS\Foo implements PHPUnit_Framework_MockObject_MockObject public function __phpunit_getInvocationMocker() { - if ($this->__phpunit_invocationMocker === NULL) { + if ($this->__phpunit_invocationMocker === null) { $this->__phpunit_invocationMocker = new PHPUnit_Framework_MockObject_InvocationMocker; } @@ -67,9 +67,12 @@ class MockFoo extends NS\Foo implements PHPUnit_Framework_MockObject_MockObject return $this->__phpunit_getInvocationMocker()->hasMatchers(); } - public function __phpunit_verify() + public function __phpunit_verify($unsetInvocationMocker = true) { $this->__phpunit_getInvocationMocker()->verify(); - $this->__phpunit_invocationMocker = NULL; + + if ($unsetInvocationMocker) { + $this->__phpunit_invocationMocker = null; + } } } diff --git a/vendor/phpunit/phpunit-mock-objects/tests/MockObject/namespaced_class_call_parent_constructor.phpt b/vendor/phpunit/phpunit-mock-objects/tests/MockObject/namespaced_class_call_parent_constructor.phpt index 105a372..c88f766 100644 --- a/vendor/phpunit/phpunit-mock-objects/tests/MockObject/namespaced_class_call_parent_constructor.phpt +++ b/vendor/phpunit/phpunit-mock-objects/tests/MockObject/namespaced_class_call_parent_constructor.phpt @@ -1,5 +1,5 @@ --TEST-- -PHPUnit_Framework_MockObject_Generator::generate('NS\Foo', array(), 'MockFoo', TRUE) +PHPUnit_Framework_MockObject_Generator::generate('NS\Foo', array(), 'MockFoo', true) --FILE-- generate( - 'NS\Foo', - array(), - 'MockFoo', - TRUE + 'NS\Foo', + array(), + 'MockFoo', + true ); print $mock['code']; @@ -54,7 +54,7 @@ class MockFoo extends NS\Foo implements PHPUnit_Framework_MockObject_MockObject public function __phpunit_getInvocationMocker() { - if ($this->__phpunit_invocationMocker === NULL) { + if ($this->__phpunit_invocationMocker === null) { $this->__phpunit_invocationMocker = new PHPUnit_Framework_MockObject_InvocationMocker; } @@ -66,9 +66,12 @@ class MockFoo extends NS\Foo implements PHPUnit_Framework_MockObject_MockObject return $this->__phpunit_getInvocationMocker()->hasMatchers(); } - public function __phpunit_verify() + public function __phpunit_verify($unsetInvocationMocker = true) { $this->__phpunit_getInvocationMocker()->verify(); - $this->__phpunit_invocationMocker = NULL; + + if ($unsetInvocationMocker) { + $this->__phpunit_invocationMocker = null; + } } } diff --git a/vendor/phpunit/phpunit-mock-objects/tests/MockObject/namespaced_class_dont_call_parent_clone.phpt b/vendor/phpunit/phpunit-mock-objects/tests/MockObject/namespaced_class_dont_call_parent_clone.phpt index 1de9253..e104e74 100644 --- a/vendor/phpunit/phpunit-mock-objects/tests/MockObject/namespaced_class_dont_call_parent_clone.phpt +++ b/vendor/phpunit/phpunit-mock-objects/tests/MockObject/namespaced_class_dont_call_parent_clone.phpt @@ -1,5 +1,5 @@ --TEST-- -PHPUnit_Framework_MockObject_Generator::generate('NS\Foo', array(), 'MockFoo', FALSE) +PHPUnit_Framework_MockObject_Generator::generate('NS\Foo', array(), 'MockFoo', false) --FILE-- generate( - 'NS\Foo', - array(), - 'MockFoo', - FALSE + 'NS\Foo', + array(), + 'MockFoo', + false ); print $mock['code']; @@ -54,7 +54,7 @@ class MockFoo extends NS\Foo implements PHPUnit_Framework_MockObject_MockObject public function __phpunit_getInvocationMocker() { - if ($this->__phpunit_invocationMocker === NULL) { + if ($this->__phpunit_invocationMocker === null) { $this->__phpunit_invocationMocker = new PHPUnit_Framework_MockObject_InvocationMocker; } @@ -66,9 +66,12 @@ class MockFoo extends NS\Foo implements PHPUnit_Framework_MockObject_MockObject return $this->__phpunit_getInvocationMocker()->hasMatchers(); } - public function __phpunit_verify() + public function __phpunit_verify($unsetInvocationMocker = true) { $this->__phpunit_getInvocationMocker()->verify(); - $this->__phpunit_invocationMocker = NULL; + + if ($unsetInvocationMocker) { + $this->__phpunit_invocationMocker = null; + } } } diff --git a/vendor/phpunit/phpunit-mock-objects/tests/MockObject/namespaced_class_dont_call_parent_constructor.phpt b/vendor/phpunit/phpunit-mock-objects/tests/MockObject/namespaced_class_dont_call_parent_constructor.phpt index 105a372..c88f766 100644 --- a/vendor/phpunit/phpunit-mock-objects/tests/MockObject/namespaced_class_dont_call_parent_constructor.phpt +++ b/vendor/phpunit/phpunit-mock-objects/tests/MockObject/namespaced_class_dont_call_parent_constructor.phpt @@ -1,5 +1,5 @@ --TEST-- -PHPUnit_Framework_MockObject_Generator::generate('NS\Foo', array(), 'MockFoo', TRUE) +PHPUnit_Framework_MockObject_Generator::generate('NS\Foo', array(), 'MockFoo', true) --FILE-- generate( - 'NS\Foo', - array(), - 'MockFoo', - TRUE + 'NS\Foo', + array(), + 'MockFoo', + true ); print $mock['code']; @@ -54,7 +54,7 @@ class MockFoo extends NS\Foo implements PHPUnit_Framework_MockObject_MockObject public function __phpunit_getInvocationMocker() { - if ($this->__phpunit_invocationMocker === NULL) { + if ($this->__phpunit_invocationMocker === null) { $this->__phpunit_invocationMocker = new PHPUnit_Framework_MockObject_InvocationMocker; } @@ -66,9 +66,12 @@ class MockFoo extends NS\Foo implements PHPUnit_Framework_MockObject_MockObject return $this->__phpunit_getInvocationMocker()->hasMatchers(); } - public function __phpunit_verify() + public function __phpunit_verify($unsetInvocationMocker = true) { $this->__phpunit_getInvocationMocker()->verify(); - $this->__phpunit_invocationMocker = NULL; + + if ($unsetInvocationMocker) { + $this->__phpunit_invocationMocker = null; + } } } diff --git a/vendor/phpunit/phpunit-mock-objects/tests/MockObject/namespaced_class_implementing_interface_call_parent_constructor.phpt b/vendor/phpunit/phpunit-mock-objects/tests/MockObject/namespaced_class_implementing_interface_call_parent_constructor.phpt index 6b9f6bc..9343250 100644 --- a/vendor/phpunit/phpunit-mock-objects/tests/MockObject/namespaced_class_implementing_interface_call_parent_constructor.phpt +++ b/vendor/phpunit/phpunit-mock-objects/tests/MockObject/namespaced_class_implementing_interface_call_parent_constructor.phpt @@ -1,5 +1,5 @@ --TEST-- -PHPUnit_Framework_MockObject_Generator::generate('NS\Foo', array(), 'MockFoo', TRUE) +PHPUnit_Framework_MockObject_Generator::generate('NS\Foo', array(), 'MockFoo', true) --FILE-- generate( - 'NS\Foo', - array(), - 'MockFoo', - TRUE + 'NS\Foo', + array(), + 'MockFoo', + true ); print $mock['code']; @@ -59,7 +59,7 @@ class MockFoo extends NS\Foo implements PHPUnit_Framework_MockObject_MockObject public function __phpunit_getInvocationMocker() { - if ($this->__phpunit_invocationMocker === NULL) { + if ($this->__phpunit_invocationMocker === null) { $this->__phpunit_invocationMocker = new PHPUnit_Framework_MockObject_InvocationMocker; } @@ -71,9 +71,12 @@ class MockFoo extends NS\Foo implements PHPUnit_Framework_MockObject_MockObject return $this->__phpunit_getInvocationMocker()->hasMatchers(); } - public function __phpunit_verify() + public function __phpunit_verify($unsetInvocationMocker = true) { $this->__phpunit_getInvocationMocker()->verify(); - $this->__phpunit_invocationMocker = NULL; + + if ($unsetInvocationMocker) { + $this->__phpunit_invocationMocker = null; + } } } diff --git a/vendor/phpunit/phpunit-mock-objects/tests/MockObject/namespaced_class_implementing_interface_dont_call_parent_constructor.phpt b/vendor/phpunit/phpunit-mock-objects/tests/MockObject/namespaced_class_implementing_interface_dont_call_parent_constructor.phpt index 6b9f6bc..9343250 100644 --- a/vendor/phpunit/phpunit-mock-objects/tests/MockObject/namespaced_class_implementing_interface_dont_call_parent_constructor.phpt +++ b/vendor/phpunit/phpunit-mock-objects/tests/MockObject/namespaced_class_implementing_interface_dont_call_parent_constructor.phpt @@ -1,5 +1,5 @@ --TEST-- -PHPUnit_Framework_MockObject_Generator::generate('NS\Foo', array(), 'MockFoo', TRUE) +PHPUnit_Framework_MockObject_Generator::generate('NS\Foo', array(), 'MockFoo', true) --FILE-- generate( - 'NS\Foo', - array(), - 'MockFoo', - TRUE + 'NS\Foo', + array(), + 'MockFoo', + true ); print $mock['code']; @@ -59,7 +59,7 @@ class MockFoo extends NS\Foo implements PHPUnit_Framework_MockObject_MockObject public function __phpunit_getInvocationMocker() { - if ($this->__phpunit_invocationMocker === NULL) { + if ($this->__phpunit_invocationMocker === null) { $this->__phpunit_invocationMocker = new PHPUnit_Framework_MockObject_InvocationMocker; } @@ -71,9 +71,12 @@ class MockFoo extends NS\Foo implements PHPUnit_Framework_MockObject_MockObject return $this->__phpunit_getInvocationMocker()->hasMatchers(); } - public function __phpunit_verify() + public function __phpunit_verify($unsetInvocationMocker = true) { $this->__phpunit_getInvocationMocker()->verify(); - $this->__phpunit_invocationMocker = NULL; + + if ($unsetInvocationMocker) { + $this->__phpunit_invocationMocker = null; + } } } diff --git a/vendor/phpunit/phpunit-mock-objects/tests/MockObject/namespaced_class_partial.phpt b/vendor/phpunit/phpunit-mock-objects/tests/MockObject/namespaced_class_partial.phpt index 86fee1c..75f3859 100644 --- a/vendor/phpunit/phpunit-mock-objects/tests/MockObject/namespaced_class_partial.phpt +++ b/vendor/phpunit/phpunit-mock-objects/tests/MockObject/namespaced_class_partial.phpt @@ -1,5 +1,5 @@ --TEST-- -PHPUnit_Framework_MockObject_Generator::generate('NS\Foo', array('bar'), 'MockFoo', TRUE, TRUE) +PHPUnit_Framework_MockObject_Generator::generate('NS\Foo', array('bar'), 'MockFoo', true, true) --FILE-- generate( - 'NS\Foo', - array('bar'), - 'MockFoo', - TRUE, - TRUE + 'NS\Foo', + array('bar'), + 'MockFoo', + true, + true ); print $mock['code']; @@ -54,9 +54,9 @@ class MockFoo extends NS\Foo implements PHPUnit_Framework_MockObject_MockObject } $result = $this->__phpunit_getInvocationMocker()->invoke( - new PHPUnit_Framework_MockObject_Invocation_Object( - 'NS\Foo', 'bar', $arguments, $this, TRUE - ) + new PHPUnit_Framework_MockObject_Invocation_Object( + 'NS\Foo', 'bar', $arguments, '', $this, true + ) ); return $result; @@ -81,7 +81,7 @@ class MockFoo extends NS\Foo implements PHPUnit_Framework_MockObject_MockObject public function __phpunit_getInvocationMocker() { - if ($this->__phpunit_invocationMocker === NULL) { + if ($this->__phpunit_invocationMocker === null) { $this->__phpunit_invocationMocker = new PHPUnit_Framework_MockObject_InvocationMocker; } @@ -93,9 +93,12 @@ class MockFoo extends NS\Foo implements PHPUnit_Framework_MockObject_MockObject return $this->__phpunit_getInvocationMocker()->hasMatchers(); } - public function __phpunit_verify() + public function __phpunit_verify($unsetInvocationMocker = true) { $this->__phpunit_getInvocationMocker()->verify(); - $this->__phpunit_invocationMocker = NULL; + + if ($unsetInvocationMocker) { + $this->__phpunit_invocationMocker = null; + } } } diff --git a/vendor/phpunit/phpunit-mock-objects/tests/MockObject/namespaced_interface.phpt b/vendor/phpunit/phpunit-mock-objects/tests/MockObject/namespaced_interface.phpt index 8048646..d414711 100644 --- a/vendor/phpunit/phpunit-mock-objects/tests/MockObject/namespaced_interface.phpt +++ b/vendor/phpunit/phpunit-mock-objects/tests/MockObject/namespaced_interface.phpt @@ -1,5 +1,5 @@ --TEST-- -PHPUnit_Framework_MockObject_Generator::generate('NS\Foo', array(), 'MockFoo', TRUE, TRUE) +PHPUnit_Framework_MockObject_Generator::generate('NS\Foo', array(), 'MockFoo', true, true) --FILE-- generate( - 'NS\Foo', - array(), - 'MockFoo', - TRUE, - TRUE + 'NS\Foo', + array(), + 'MockFoo', + true, + true ); print $mock['code']; @@ -48,9 +48,9 @@ class MockFoo implements PHPUnit_Framework_MockObject_MockObject, NS\Foo } $result = $this->__phpunit_getInvocationMocker()->invoke( - new PHPUnit_Framework_MockObject_Invocation_Object( - 'NS\Foo', 'bar', $arguments, $this, TRUE - ) + new PHPUnit_Framework_MockObject_Invocation_Object( + 'NS\Foo', 'bar', $arguments, '', $this, true + ) ); return $result; @@ -75,7 +75,7 @@ class MockFoo implements PHPUnit_Framework_MockObject_MockObject, NS\Foo public function __phpunit_getInvocationMocker() { - if ($this->__phpunit_invocationMocker === NULL) { + if ($this->__phpunit_invocationMocker === null) { $this->__phpunit_invocationMocker = new PHPUnit_Framework_MockObject_InvocationMocker; } @@ -87,9 +87,12 @@ class MockFoo implements PHPUnit_Framework_MockObject_MockObject, NS\Foo return $this->__phpunit_getInvocationMocker()->hasMatchers(); } - public function __phpunit_verify() + public function __phpunit_verify($unsetInvocationMocker = true) { $this->__phpunit_getInvocationMocker()->verify(); - $this->__phpunit_invocationMocker = NULL; + + if ($unsetInvocationMocker) { + $this->__phpunit_invocationMocker = null; + } } } diff --git a/vendor/phpunit/phpunit-mock-objects/tests/MockObject/nonexistent_class.phpt b/vendor/phpunit/phpunit-mock-objects/tests/MockObject/nonexistent_class.phpt index 8c01de0..348a854 100644 --- a/vendor/phpunit/phpunit-mock-objects/tests/MockObject/nonexistent_class.phpt +++ b/vendor/phpunit/phpunit-mock-objects/tests/MockObject/nonexistent_class.phpt @@ -1,5 +1,5 @@ --TEST-- -PHPUnit_Framework_MockObject_Generator::generate('NonExistentClass', array(), 'MockFoo', TRUE, TRUE) +PHPUnit_Framework_MockObject_Generator::generate('NonExistentClass', array(), 'MockFoo', true, true) --FILE-- generate( - 'NonExistentClass', - array(), - 'MockFoo', - TRUE, - TRUE + 'NonExistentClass', + array(), + 'MockFoo', + true, + true ); print $mock['code']; @@ -50,7 +50,7 @@ class MockFoo extends NonExistentClass implements PHPUnit_Framework_MockObject_M public function __phpunit_getInvocationMocker() { - if ($this->__phpunit_invocationMocker === NULL) { + if ($this->__phpunit_invocationMocker === null) { $this->__phpunit_invocationMocker = new PHPUnit_Framework_MockObject_InvocationMocker; } @@ -62,9 +62,12 @@ class MockFoo extends NonExistentClass implements PHPUnit_Framework_MockObject_M return $this->__phpunit_getInvocationMocker()->hasMatchers(); } - public function __phpunit_verify() + public function __phpunit_verify($unsetInvocationMocker = true) { $this->__phpunit_getInvocationMocker()->verify(); - $this->__phpunit_invocationMocker = NULL; + + if ($unsetInvocationMocker) { + $this->__phpunit_invocationMocker = null; + } } } diff --git a/vendor/phpunit/phpunit-mock-objects/tests/MockObject/nonexistent_class_with_namespace.phpt b/vendor/phpunit/phpunit-mock-objects/tests/MockObject/nonexistent_class_with_namespace.phpt index 7868977..38dd2cd 100644 --- a/vendor/phpunit/phpunit-mock-objects/tests/MockObject/nonexistent_class_with_namespace.phpt +++ b/vendor/phpunit/phpunit-mock-objects/tests/MockObject/nonexistent_class_with_namespace.phpt @@ -1,5 +1,5 @@ --TEST-- -PHPUnit_Framework_MockObject_Generator::generate('Foo', array(), 'MockFoo', TRUE, TRUE) +PHPUnit_Framework_MockObject_Generator::generate('Foo', array(), 'MockFoo', true, true) --FILE-- generate( - 'NS\Foo', - array(), - 'MockFoo', - TRUE, - TRUE + 'NS\Foo', + array(), + 'MockFoo', + true, + true ); print $mock['code']; @@ -56,7 +56,7 @@ class MockFoo extends NS\Foo implements PHPUnit_Framework_MockObject_MockObject public function __phpunit_getInvocationMocker() { - if ($this->__phpunit_invocationMocker === NULL) { + if ($this->__phpunit_invocationMocker === null) { $this->__phpunit_invocationMocker = new PHPUnit_Framework_MockObject_InvocationMocker; } @@ -68,10 +68,13 @@ class MockFoo extends NS\Foo implements PHPUnit_Framework_MockObject_MockObject return $this->__phpunit_getInvocationMocker()->hasMatchers(); } - public function __phpunit_verify() + public function __phpunit_verify($unsetInvocationMocker = true) { $this->__phpunit_getInvocationMocker()->verify(); - $this->__phpunit_invocationMocker = NULL; + + if ($unsetInvocationMocker) { + $this->__phpunit_invocationMocker = null; + } } } diff --git a/vendor/phpunit/phpunit-mock-objects/tests/MockObject/nonexistent_class_with_namespace_starting_with_separator.phpt b/vendor/phpunit/phpunit-mock-objects/tests/MockObject/nonexistent_class_with_namespace_starting_with_separator.phpt index b59d1dd..514796e 100644 --- a/vendor/phpunit/phpunit-mock-objects/tests/MockObject/nonexistent_class_with_namespace_starting_with_separator.phpt +++ b/vendor/phpunit/phpunit-mock-objects/tests/MockObject/nonexistent_class_with_namespace_starting_with_separator.phpt @@ -1,5 +1,5 @@ --TEST-- -PHPUnit_Framework_MockObject_Generator::generate('Foo', array(), 'MockFoo', TRUE, TRUE) +PHPUnit_Framework_MockObject_Generator::generate('Foo', array(), 'MockFoo', true, true) --FILE-- generate( - '\NS\Foo', - array(), - 'MockFoo', - TRUE, - TRUE + '\NS\Foo', + array(), + 'MockFoo', + true, + true ); print $mock['code']; @@ -56,7 +56,7 @@ class MockFoo extends NS\Foo implements PHPUnit_Framework_MockObject_MockObject public function __phpunit_getInvocationMocker() { - if ($this->__phpunit_invocationMocker === NULL) { + if ($this->__phpunit_invocationMocker === null) { $this->__phpunit_invocationMocker = new PHPUnit_Framework_MockObject_InvocationMocker; } @@ -68,10 +68,13 @@ class MockFoo extends NS\Foo implements PHPUnit_Framework_MockObject_MockObject return $this->__phpunit_getInvocationMocker()->hasMatchers(); } - public function __phpunit_verify() + public function __phpunit_verify($unsetInvocationMocker = true) { $this->__phpunit_getInvocationMocker()->verify(); - $this->__phpunit_invocationMocker = NULL; + + if ($unsetInvocationMocker) { + $this->__phpunit_invocationMocker = null; + } } } diff --git a/vendor/phpunit/phpunit-mock-objects/tests/MockObject/proxy.phpt b/vendor/phpunit/phpunit-mock-objects/tests/MockObject/proxy.phpt index f31bf3f..0e83a82 100644 --- a/vendor/phpunit/phpunit-mock-objects/tests/MockObject/proxy.phpt +++ b/vendor/phpunit/phpunit-mock-objects/tests/MockObject/proxy.phpt @@ -1,5 +1,5 @@ --TEST-- -PHPUnit_Framework_MockObject_Generator::generate('Foo', NULL, 'ProxyFoo', TRUE, TRUE, TRUE, TRUE) +PHPUnit_Framework_MockObject_Generator::generate('Foo', null, 'ProxyFoo', true, true, true, true) --FILE-- generate( - 'Foo', array(), 'ProxyFoo', TRUE, TRUE, TRUE, TRUE + 'Foo', array(), 'ProxyFoo', true, true, true, true ); print $mock['code']; @@ -48,9 +48,9 @@ class ProxyFoo extends Foo implements PHPUnit_Framework_MockObject_MockObject } $this->__phpunit_getInvocationMocker()->invoke( - new PHPUnit_Framework_MockObject_Invocation_Object( - 'Foo', 'bar', $arguments, $this, TRUE - ) + new PHPUnit_Framework_MockObject_Invocation_Object( + 'Foo', 'bar', $arguments, '', $this, true + ) ); return call_user_func_array(array($this->__phpunit_originalObject, "bar"), $arguments); @@ -70,9 +70,9 @@ class ProxyFoo extends Foo implements PHPUnit_Framework_MockObject_MockObject } $this->__phpunit_getInvocationMocker()->invoke( - new PHPUnit_Framework_MockObject_Invocation_Object( - 'Foo', 'baz', $arguments, $this, TRUE - ) + new PHPUnit_Framework_MockObject_Invocation_Object( + 'Foo', 'baz', $arguments, '', $this, true + ) ); return call_user_func_array(array($this->__phpunit_originalObject, "baz"), $arguments); @@ -97,7 +97,7 @@ class ProxyFoo extends Foo implements PHPUnit_Framework_MockObject_MockObject public function __phpunit_getInvocationMocker() { - if ($this->__phpunit_invocationMocker === NULL) { + if ($this->__phpunit_invocationMocker === null) { $this->__phpunit_invocationMocker = new PHPUnit_Framework_MockObject_InvocationMocker; } @@ -109,9 +109,12 @@ class ProxyFoo extends Foo implements PHPUnit_Framework_MockObject_MockObject return $this->__phpunit_getInvocationMocker()->hasMatchers(); } - public function __phpunit_verify() + public function __phpunit_verify($unsetInvocationMocker = true) { $this->__phpunit_getInvocationMocker()->verify(); - $this->__phpunit_invocationMocker = NULL; + + if ($unsetInvocationMocker) { + $this->__phpunit_invocationMocker = null; + } } } diff --git a/vendor/phpunit/phpunit-mock-objects/tests/MockObject/scalar_type_declarations.phpt b/vendor/phpunit/phpunit-mock-objects/tests/MockObject/scalar_type_declarations.phpt index 3ad84db..fea0949 100644 --- a/vendor/phpunit/phpunit-mock-objects/tests/MockObject/scalar_type_declarations.phpt +++ b/vendor/phpunit/phpunit-mock-objects/tests/MockObject/scalar_type_declarations.phpt @@ -1,5 +1,5 @@ --TEST-- -PHPUnit_Framework_MockObject_Generator::generate('Foo', array(), 'MockFoo', TRUE, TRUE) +PHPUnit_Framework_MockObject_Generator::generate('Foo', array(), 'MockFoo', true, true) --SKIPIF-- = 7.0.0 required'; @@ -18,11 +18,11 @@ require __DIR__ . '/../../vendor/autoload.php'; $generator = new PHPUnit_Framework_MockObject_Generator; $mock = $generator->generate( - 'Foo', - array(), - 'MockFoo', - TRUE, - TRUE + 'Foo', + array(), + 'MockFoo', + true, + true ); print $mock['code']; @@ -52,9 +52,9 @@ class MockFoo extends Foo implements PHPUnit_Framework_MockObject_MockObject } $result = $this->__phpunit_getInvocationMocker()->invoke( - new PHPUnit_Framework_MockObject_Invocation_Object( - 'Foo', 'bar', $arguments, $this, TRUE - ) + new PHPUnit_Framework_MockObject_Invocation_Object( + 'Foo', 'bar', $arguments, '', $this, true + ) ); return $result; @@ -79,7 +79,7 @@ class MockFoo extends Foo implements PHPUnit_Framework_MockObject_MockObject public function __phpunit_getInvocationMocker() { - if ($this->__phpunit_invocationMocker === NULL) { + if ($this->__phpunit_invocationMocker === null) { $this->__phpunit_invocationMocker = new PHPUnit_Framework_MockObject_InvocationMocker; } @@ -91,9 +91,12 @@ class MockFoo extends Foo implements PHPUnit_Framework_MockObject_MockObject return $this->__phpunit_getInvocationMocker()->hasMatchers(); } - public function __phpunit_verify() + public function __phpunit_verify($unsetInvocationMocker = true) { $this->__phpunit_getInvocationMocker()->verify(); - $this->__phpunit_invocationMocker = NULL; + + if ($unsetInvocationMocker) { + $this->__phpunit_invocationMocker = null; + } } } diff --git a/vendor/phpunit/phpunit-mock-objects/tests/MockObject/wsdl_class.phpt b/vendor/phpunit/phpunit-mock-objects/tests/MockObject/wsdl_class.phpt index 06b255f..38a752d 100644 --- a/vendor/phpunit/phpunit-mock-objects/tests/MockObject/wsdl_class.phpt +++ b/vendor/phpunit/phpunit-mock-objects/tests/MockObject/wsdl_class.phpt @@ -11,8 +11,8 @@ require __DIR__ . '/../../vendor/autoload.php'; $generator = new PHPUnit_Framework_MockObject_Generator; print $generator->generateClassFromWsdl( - dirname(dirname(__FILE__)) . '/_fixture/GoogleSearch.wsdl', - 'GoogleSearch' + dirname(dirname(__FILE__)) . '/_fixture/GoogleSearch.wsdl', + 'GoogleSearch' ); ?> --EXPECTF-- diff --git a/vendor/phpunit/phpunit-mock-objects/tests/MockObject/wsdl_class_namespace.phpt b/vendor/phpunit/phpunit-mock-objects/tests/MockObject/wsdl_class_namespace.phpt index 9460e6b..d35ed09 100644 --- a/vendor/phpunit/phpunit-mock-objects/tests/MockObject/wsdl_class_namespace.phpt +++ b/vendor/phpunit/phpunit-mock-objects/tests/MockObject/wsdl_class_namespace.phpt @@ -11,8 +11,8 @@ require __DIR__ . '/../../vendor/autoload.php'; $generator = new PHPUnit_Framework_MockObject_Generator; print $generator->generateClassFromWsdl( - dirname(dirname(__FILE__)) . '/_fixture/GoogleSearch.wsdl', - 'My\\Space\\GoogleSearch' + dirname(dirname(__FILE__)) . '/_fixture/GoogleSearch.wsdl', + 'My\\Space\\GoogleSearch' ); ?> --EXPECTF-- diff --git a/vendor/phpunit/phpunit-mock-objects/tests/MockObject/wsdl_class_partial.phpt b/vendor/phpunit/phpunit-mock-objects/tests/MockObject/wsdl_class_partial.phpt index fc814bd..8ca943f 100644 --- a/vendor/phpunit/phpunit-mock-objects/tests/MockObject/wsdl_class_partial.phpt +++ b/vendor/phpunit/phpunit-mock-objects/tests/MockObject/wsdl_class_partial.phpt @@ -11,9 +11,9 @@ require __DIR__ . '/../../vendor/autoload.php'; $generator = new PHPUnit_Framework_MockObject_Generator; print $generator->generateClassFromWsdl( - dirname(dirname(__FILE__)) . '/_fixture/GoogleSearch.wsdl', - 'GoogleSearch', - array('doGoogleSearch') + dirname(dirname(__FILE__)) . '/_fixture/GoogleSearch.wsdl', + 'GoogleSearch', + array('doGoogleSearch') ); ?> --EXPECTF-- diff --git a/vendor/phpunit/phpunit-mock-objects/tests/MockObjectTest.php b/vendor/phpunit/phpunit-mock-objects/tests/MockObjectTest.php index 802c133..b6c5e80 100644 --- a/vendor/phpunit/phpunit-mock-objects/tests/MockObjectTest.php +++ b/vendor/phpunit/phpunit-mock-objects/tests/MockObjectTest.php @@ -9,8 +9,6 @@ */ /** - * - * * @since Class available since Release 3.0.0 */ class Framework_MockObjectTest extends PHPUnit_Framework_TestCase @@ -184,10 +182,10 @@ class Framework_MockObjectTest extends PHPUnit_Framework_TestCase public function testStubbedReturnValueMap() { - $map = array( - array('a', 'b', 'c', 'd'), - array('e', 'f', 'g', 'h') - ); + $map = [ + ['a', 'b', 'c', 'd'], + ['e', 'f', 'g', 'h'] + ]; $mock = $this->getMock('AnInterface'); $mock->expects($this->any()) @@ -227,14 +225,14 @@ class Framework_MockObjectTest extends PHPUnit_Framework_TestCase public function testFunctionCallback() { - $mock = $this->getMock('SomeClass', array('doSomething'), array(), '', false); + $mock = $this->getMock('SomeClass', ['doSomething'], [], '', false); $mock->expects($this->once()) ->method('doSomething') ->will($this->returnCallback('functionCallback')); $this->assertEquals('pass', $mock->doSomething('foo', 'bar')); - $mock = $this->getMock('SomeClass', array('doSomething'), array(), '', false); + $mock = $this->getMock('SomeClass', ['doSomething'], [], '', false); $mock->expects($this->once()) ->method('doSomething') ->willReturnCallback('functionCallback'); @@ -282,20 +280,20 @@ class Framework_MockObjectTest extends PHPUnit_Framework_TestCase public function testStaticMethodCallback() { - $mock = $this->getMock('SomeClass', array('doSomething'), array(), '', false); + $mock = $this->getMock('SomeClass', ['doSomething'], [], '', false); $mock->expects($this->once()) ->method('doSomething') - ->will($this->returnCallback(array('MethodCallback', 'staticCallback'))); + ->will($this->returnCallback(['MethodCallback', 'staticCallback'])); $this->assertEquals('pass', $mock->doSomething('foo', 'bar')); } public function testPublicMethodCallback() { - $mock = $this->getMock('SomeClass', array('doSomething'), array(), '', false); + $mock = $this->getMock('SomeClass', ['doSomething'], [], '', false); $mock->expects($this->once()) ->method('doSomething') - ->will($this->returnCallback(array(new MethodCallback, 'nonStaticCallback'))); + ->will($this->returnCallback([new MethodCallback, 'nonStaticCallback'])); $this->assertEquals('pass', $mock->doSomething('foo', 'bar')); } @@ -311,10 +309,10 @@ class Framework_MockObjectTest extends PHPUnit_Framework_TestCase public function testMockClassDifferentForPartialMocks() { $mock1 = $this->getMock('PartialMockTestClass'); - $mock2 = $this->getMock('PartialMockTestClass', array('doSomething')); - $mock3 = $this->getMock('PartialMockTestClass', array('doSomething')); - $mock4 = $this->getMock('PartialMockTestClass', array('doAnotherThing')); - $mock5 = $this->getMock('PartialMockTestClass', array('doAnotherThing')); + $mock2 = $this->getMock('PartialMockTestClass', ['doSomething']); + $mock3 = $this->getMock('PartialMockTestClass', ['doSomething']); + $mock4 = $this->getMock('PartialMockTestClass', ['doAnotherThing']); + $mock5 = $this->getMock('PartialMockTestClass', ['doAnotherThing']); $this->assertNotEquals(get_class($mock1), get_class($mock2)); $this->assertNotEquals(get_class($mock1), get_class($mock3)); @@ -329,10 +327,10 @@ class Framework_MockObjectTest extends PHPUnit_Framework_TestCase public function testMockClassStoreOverrulable() { $mock1 = $this->getMock('PartialMockTestClass'); - $mock2 = $this->getMock('PartialMockTestClass', array(), array(), 'MyMockClassNameForPartialMockTestClass1'); + $mock2 = $this->getMock('PartialMockTestClass', [], [], 'MyMockClassNameForPartialMockTestClass1'); $mock3 = $this->getMock('PartialMockTestClass'); - $mock4 = $this->getMock('PartialMockTestClass', array('doSomething'), array(), 'AnotherMockClassNameForPartialMockTestClass'); - $mock5 = $this->getMock('PartialMockTestClass', array(), array(), 'MyMockClassNameForPartialMockTestClass2'); + $mock4 = $this->getMock('PartialMockTestClass', ['doSomething'], [], 'AnotherMockClassNameForPartialMockTestClass'); + $mock5 = $this->getMock('PartialMockTestClass', [], [], 'MyMockClassNameForPartialMockTestClass2'); $this->assertNotEquals(get_class($mock1), get_class($mock2)); $this->assertEquals(get_class($mock1), get_class($mock3)); @@ -358,7 +356,7 @@ class Framework_MockObjectTest extends PHPUnit_Framework_TestCase public function testOriginalConstructorSettingConsidered() { $mock1 = $this->getMock('PartialMockTestClass'); - $mock2 = $this->getMock('PartialMockTestClass', array(), array(), '', false); + $mock2 = $this->getMock('PartialMockTestClass', [], [], '', false); $this->assertTrue($mock1->constructorCalled); $this->assertFalse($mock2->constructorCalled); @@ -367,7 +365,7 @@ class Framework_MockObjectTest extends PHPUnit_Framework_TestCase public function testOriginalCloneSettingConsidered() { $mock1 = $this->getMock('PartialMockTestClass'); - $mock2 = $this->getMock('PartialMockTestClass', array(), array(), '', true, false); + $mock2 = $this->getMock('PartialMockTestClass', [], [], '', true, false); $this->assertNotEquals(get_class($mock1), get_class($mock2)); } @@ -381,14 +379,14 @@ class Framework_MockObjectTest extends PHPUnit_Framework_TestCase public function traversableProvider() { - return array( - array('Traversable'), - array('\Traversable'), - array('TraversableMockTestInterface'), - array(array('Traversable')), - array(array('Iterator','Traversable')), - array(array('\Iterator','\Traversable')) - ); + return [ + ['Traversable'], + ['\Traversable'], + ['TraversableMockTestInterface'], + [['Traversable']], + [['Iterator','Traversable']], + [['\Iterator','\Traversable']] + ]; } /** @@ -402,14 +400,11 @@ class Framework_MockObjectTest extends PHPUnit_Framework_TestCase public function testMultipleInterfacesCanBeMockedInSingleObject() { - $mock = $this->getMock(array('AnInterface', 'AnotherInterface')); + $mock = $this->getMock(['AnInterface', 'AnotherInterface']); $this->assertInstanceOf('AnInterface', $mock); $this->assertInstanceOf('AnotherInterface', $mock); } - /** - * @requires PHP 5.4.0 - */ public function testGetMockForTrait() { $mock = $this->getMockForTrait('AbstractTrait'); @@ -447,7 +442,7 @@ class Framework_MockObjectTest extends PHPUnit_Framework_TestCase $x = $this->getMock('stdClass'); $y = clone $x; - $mock = $this->getMock('stdClass', array('foo')); + $mock = $this->getMock('stdClass', ['foo']); $mock->expects($this->once())->method('foo')->with($this->equalTo($x)); $mock->foo($y); } @@ -457,7 +452,7 @@ class Framework_MockObjectTest extends PHPUnit_Framework_TestCase $x = $this->getMock('stdClass'); $y = clone $x; - $mock = $this->getMock('stdClass', array('foo')); + $mock = $this->getMock('stdClass', ['foo']); $mock->expects($this->once())->method('foo')->with($this->logicalNot($this->identicalTo($x))); $mock->foo($y); } @@ -467,11 +462,11 @@ class Framework_MockObjectTest extends PHPUnit_Framework_TestCase $expectedObject = new StdClass; $mock = $this->getMockBuilder('SomeClass') - ->setMethods(array('doSomethingElse')) + ->setMethods(['doSomethingElse']) ->enableArgumentCloning() ->getMock(); - $actualArguments = array(); + $actualArguments = []; $mock->expects($this->any()) ->method('doSomethingElse') @@ -491,11 +486,11 @@ class Framework_MockObjectTest extends PHPUnit_Framework_TestCase $expectedObject = new StdClass; $mock = $this->getMockBuilder('SomeClass') - ->setMethods(array('doSomethingElse')) + ->setMethods(['doSomethingElse']) ->disableArgumentCloning() ->getMock(); - $actualArguments = array(); + $actualArguments = []; $mock->expects($this->any()) ->method('doSomethingElse') @@ -512,12 +507,12 @@ class Framework_MockObjectTest extends PHPUnit_Framework_TestCase public function testArgumentCloningOptionGeneratesUniqueMock() { $mockWithCloning = $this->getMockBuilder('SomeClass') - ->setMethods(array('doSomethingElse')) + ->setMethods(['doSomethingElse']) ->enableArgumentCloning() ->getMock(); $mockWithoutCloning = $this->getMockBuilder('SomeClass') - ->setMethods(array('doSomethingElse')) + ->setMethods(['doSomethingElse']) ->disableArgumentCloning() ->getMock(); @@ -526,7 +521,7 @@ class Framework_MockObjectTest extends PHPUnit_Framework_TestCase public function testVerificationOfMethodNameFailsWithoutParameters() { - $mock = $this->getMock('SomeClass', array('right', 'wrong'), array(), '', true, true, true); + $mock = $this->getMock('SomeClass', ['right', 'wrong'], [], '', true, true, true); $mock->expects($this->once()) ->method('right'); @@ -547,7 +542,7 @@ class Framework_MockObjectTest extends PHPUnit_Framework_TestCase public function testVerificationOfMethodNameFailsWithParameters() { - $mock = $this->getMock('SomeClass', array('right', 'wrong'), array(), '', true, true, true); + $mock = $this->getMock('SomeClass', ['right', 'wrong'], [], '', true, true, true); $mock->expects($this->once()) ->method('right'); @@ -568,18 +563,18 @@ class Framework_MockObjectTest extends PHPUnit_Framework_TestCase public function testVerificationOfMethodNameFailsWithWrongParameters() { - $mock = $this->getMock('SomeClass', array('right', 'wrong'), array(), '', true, true, true); + $mock = $this->getMock('SomeClass', ['right', 'wrong'], [], '', true, true, true); $mock->expects($this->once()) ->method('right') - ->with(array('first', 'second')); + ->with(['first', 'second']); try { - $mock->right(array('second')); + $mock->right(['second']); } catch (PHPUnit_Framework_ExpectationFailedException $e) { $this->assertSame( "Expectation failed for method name is equal to when invoked 1 time(s)\n" . "Parameter 0 for invocation SomeClass::right(Array (...)) does not match expected value.\n" - . "Failed asserting that two arrays are equal.", + . 'Failed asserting that two arrays are equal.', $e->getMessage() ); } @@ -609,7 +604,7 @@ class Framework_MockObjectTest extends PHPUnit_Framework_TestCase public function testVerificationOfNeverFailsWithEmptyParameters() { - $mock = $this->getMock('SomeClass', array('right', 'wrong'), array(), '', true, true, true); + $mock = $this->getMock('SomeClass', ['right', 'wrong'], [], '', true, true, true); $mock->expects($this->never()) ->method('right') ->with(); @@ -629,7 +624,7 @@ class Framework_MockObjectTest extends PHPUnit_Framework_TestCase public function testVerificationOfNeverFailsWithAnyParameters() { - $mock = $this->getMock('SomeClass', array('right', 'wrong'), array(), '', true, true, true); + $mock = $this->getMock('SomeClass', ['right', 'wrong'], [], '', true, true, true); $mock->expects($this->never()) ->method('right') ->withAnyParameters(); @@ -652,7 +647,7 @@ class Framework_MockObjectTest extends PHPUnit_Framework_TestCase */ public function testWithAnythingInsteadOfWithAnyParameters() { - $mock = $this->getMock('SomeClass', array('right'), array(), '', true, true, true); + $mock = $this->getMock('SomeClass', ['right'], [], '', true, true, true); $mock->expects($this->once()) ->method('right') ->with($this->anything()); @@ -664,7 +659,7 @@ class Framework_MockObjectTest extends PHPUnit_Framework_TestCase $this->assertSame( "Expectation failed for method name is equal to when invoked 1 time(s)\n" . "Parameter count for invocation SomeClass::right() is too low.\n" . - "To allow 0 or more parameters with any value, omit ->with() or use ->withAnyParameters() instead.", + 'To allow 0 or more parameters with any value, omit ->with() or use ->withAnyParameters() instead.', $e->getMessage() ); } @@ -678,14 +673,14 @@ class Framework_MockObjectTest extends PHPUnit_Framework_TestCase public function testMockArgumentsPassedByReference() { $foo = $this->getMockBuilder('MethodCallbackByReference') - ->setMethods(array('bar')) + ->setMethods(['bar']) ->disableOriginalConstructor() ->disableArgumentCloning() ->getMock(); $foo->expects($this->any()) ->method('bar') - ->will($this->returnCallback(array($foo, 'callback'))); + ->will($this->returnCallback([$foo, 'callback'])); $a = $b = $c = 0; @@ -725,7 +720,7 @@ class Framework_MockObjectTest extends PHPUnit_Framework_TestCase public function testMockArgumentsPassedByReference3() { $foo = $this->getMockBuilder('MethodCallbackByReference') - ->setMethods(array('bar')) + ->setMethods(['bar']) ->disableOriginalConstructor() ->disableArgumentCloning() ->getMock(); @@ -736,7 +731,7 @@ class Framework_MockObjectTest extends PHPUnit_Framework_TestCase $foo->expects($this->any()) ->method('bar') ->with($a, $b, $c) - ->will($this->returnCallback(array($foo, 'callback'))); + ->will($this->returnCallback([$foo, 'callback'])); $foo->bar($a, $b, $c); } @@ -747,7 +742,7 @@ class Framework_MockObjectTest extends PHPUnit_Framework_TestCase public function testMockArgumentsPassedByReference4() { $foo = $this->getMockBuilder('MethodCallbackByReference') - ->setMethods(array('bar')) + ->setMethods(['bar']) ->disableOriginalConstructor() ->disableArgumentCloning() ->getMock(); @@ -757,8 +752,8 @@ class Framework_MockObjectTest extends PHPUnit_Framework_TestCase $foo->expects($this->any()) ->method('bar') - ->with($this->isInstanceOf("stdClass"), $b, $c) - ->will($this->returnCallback(array($foo, 'callback'))); + ->with($this->isInstanceOf('stdClass'), $b, $c) + ->will($this->returnCallback([$foo, 'callback'])); $foo->bar($a, $b, $c); } @@ -837,6 +832,21 @@ class Framework_MockObjectTest extends PHPUnit_Framework_TestCase $refl = $refl->getParentClass(); $prop = $refl->getProperty('mockObjects'); $prop->setAccessible(true); - $prop->setValue($this, array()); + $prop->setValue($this, []); + } + + public function testStringableClassDoesNotThrow() + { + $mock = $this->getMock('StringableClass'); + + $this->assertInternalType('string', (string) $mock); + } + + public function testStringableClassCanBeMocked() + { + $mock = $this->getMock('StringableClass'); + $mock->method('__toString')->willReturn('foo'); + + $this->assertSame('foo', (string) $mock); } } diff --git a/vendor/phpunit/phpunit-mock-objects/tests/_fixture/FunctionCallback.php b/vendor/phpunit/phpunit-mock-objects/tests/_fixture/FunctionCallback.php index c12ac6c..2353c81 100644 --- a/vendor/phpunit/phpunit-mock-objects/tests/_fixture/FunctionCallback.php +++ b/vendor/phpunit/phpunit-mock-objects/tests/_fixture/FunctionCallback.php @@ -3,7 +3,7 @@ function functionCallback() { $args = func_get_args(); - if ($args == array('foo', 'bar')) { + if ($args == ['foo', 'bar']) { return 'pass'; } } diff --git a/vendor/phpunit/phpunit-mock-objects/tests/_fixture/MethodCallback.php b/vendor/phpunit/phpunit-mock-objects/tests/_fixture/MethodCallback.php index f8db62e..d8cba53 100644 --- a/vendor/phpunit/phpunit-mock-objects/tests/_fixture/MethodCallback.php +++ b/vendor/phpunit/phpunit-mock-objects/tests/_fixture/MethodCallback.php @@ -5,7 +5,7 @@ class MethodCallback { $args = func_get_args(); - if ($args == array('foo', 'bar')) { + if ($args == ['foo', 'bar']) { return 'pass'; } } @@ -14,7 +14,7 @@ class MethodCallback { $args = func_get_args(); - if ($args == array('foo', 'bar')) { + if ($args == ['foo', 'bar']) { return 'pass'; } } diff --git a/vendor/phpunit/phpunit-mock-objects/tests/_fixture/Mockable.php b/vendor/phpunit/phpunit-mock-objects/tests/_fixture/Mockable.php index 3d826dd..a7b1825 100644 --- a/vendor/phpunit/phpunit-mock-objects/tests/_fixture/Mockable.php +++ b/vendor/phpunit/phpunit-mock-objects/tests/_fixture/Mockable.php @@ -6,7 +6,7 @@ class Mockable public function __construct($arg1 = null, $arg2 = null) { - $this->constructorArgs = array($arg1, $arg2); + $this->constructorArgs = [$arg1, $arg2]; } public function mockableMethod() diff --git a/vendor/phpunit/phpunit-mock-objects/tests/_fixture/SomeClass.php b/vendor/phpunit/phpunit-mock-objects/tests/_fixture/SomeClass.php index ba83b28..a6e5f4c 100644 --- a/vendor/phpunit/phpunit-mock-objects/tests/_fixture/SomeClass.php +++ b/vendor/phpunit/phpunit-mock-objects/tests/_fixture/SomeClass.php @@ -3,11 +3,11 @@ class SomeClass { public function doSomething($a, $b) { - return null; + return; } public function doSomethingElse($c) { - return null; + return; } } diff --git a/vendor/phpunit/phpunit/.php_cs b/vendor/phpunit/phpunit/.php_cs index e0d5fd6..6bf7433 100644 --- a/vendor/phpunit/phpunit/.php_cs +++ b/vendor/phpunit/phpunit/.php_cs @@ -28,7 +28,6 @@ return Symfony\CS\Config\Config::create() 'line_after_namespace', 'linefeed', 'list_commas', - 'long_array_syntax', 'lowercase_constants', 'lowercase_keywords', 'method_argument_space', @@ -52,6 +51,7 @@ return Symfony\CS\Config\Config::create() 'remove_lines_between_uses', 'return', 'self_accessor', + 'short_array_syntax', 'short_tag', 'single_line_after_imports', 'single_quote', diff --git a/vendor/phpunit/phpunit/.travis.yml b/vendor/phpunit/phpunit/.travis.yml index 3be518e..e8d9632 100644 --- a/vendor/phpunit/phpunit/.travis.yml +++ b/vendor/phpunit/phpunit/.travis.yml @@ -1,17 +1,12 @@ language: php php: - - 5.3.3 - - 5.3 - - 5.4 - - 5.5 - 5.6 - 7.0 - hhvm matrix: allow_failures: - - php: 7.0 - php: hhvm sudo: false diff --git a/vendor/phpunit/phpunit/CODE_OF_CONDUCT.md b/vendor/phpunit/phpunit/CODE_OF_CONDUCT.md index a4abb84..d39d536 100644 --- a/vendor/phpunit/phpunit/CODE_OF_CONDUCT.md +++ b/vendor/phpunit/phpunit/CODE_OF_CONDUCT.md @@ -1,14 +1,28 @@ # Contributor Code of Conduct -As contributors and maintainers of this project, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities. +As contributors and maintainers of this project, and in the interest of fostering an open and welcoming community, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities. -We are committed to making participation in this project a harassment-free experience for everyone, regardless of level of experience, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, ethnicity, age, or religion. +We are committed to making participation in this project a harassment-free experience for everyone, regardless of level of experience, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, ethnicity, age, religion, or nationality. -Examples of unacceptable behavior by participants include the use of sexual language or imagery, derogatory comments or personal attacks, trolling, public or private harassment, insults, or other unprofessional conduct. +Examples of unacceptable behavior by participants include: -Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct. Project maintainers who do not follow the Code of Conduct may be removed from the project team. +* The use of sexualized language or imagery +* Personal attacks +* Trolling or insulting/derogatory comments +* Public or private harassment +* Publishing other's private information, such as physical or electronic + addresses, without explicit permission +* Other unethical or unprofessional conduct -Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by opening an issue or contacting one or more of the project maintainers. +Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful. -This Code of Conduct is adapted from the [Contributor Covenant](http://contributor-covenant.org/), version 1.0.0, available at [http://contributor-covenant.org/version/1/0/0/](http://contributor-covenant.org/version/1/0/0/) +By adopting this Code of Conduct, project maintainers commit themselves to fairly and consistently applying these principles to every aspect of managing this project. Project maintainers who do not follow or enforce the Code of Conduct may be permanently removed from the project team. +This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. + +Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project maintainer at sebastian@phpunit.de. All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. Maintainers are obligated to maintain confidentiality with regard to the reporter of an incident. + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.3.0, available at [http://contributor-covenant.org/version/1/3/0/][version] + +[homepage]: http://contributor-covenant.org +[version]: http://contributor-covenant.org/version/1/3/0/ diff --git a/vendor/phpunit/phpunit/CONTRIBUTING.md b/vendor/phpunit/phpunit/CONTRIBUTING.md index aee139f..74a0622 100644 --- a/vendor/phpunit/phpunit/CONTRIBUTING.md +++ b/vendor/phpunit/phpunit/CONTRIBUTING.md @@ -13,7 +13,7 @@ Please note that this project is released with a [Contributor Code of Conduct](C Please make sure that you have [set up your user name and email address](http://git-scm.com/book/en/v2/Getting-Started-First-Time-Git-Setup) for use with Git. Strings such as `silly nick name ` look really stupid in the commit history of a project. -Pull requests for bug fixes must be based on the current stable branch whereas pull requests for new features must be based on the current alpha branch (when `5.0` is the current stable branch, then `5.1` is the current beta branch and `5.2` is the current alpha branch). +Pull requests for bug fixes must be based on the current stable branch whereas pull requests for new features must be based on the current alpha branch (when `5.0` is the current stable branch, then `5.1` is the current beta branch and `master` is the current alpha branch). We are trying to keep backwards compatibility breaks in PHPUnit to an absolute minimum. Please take this into account when proposing changes. @@ -61,7 +61,6 @@ Please use the most specific issue tracker to search for existing tickets and to * [Code Coverage](https://github.com/sebastianbergmann/php-code-coverage/issues) * [Stub and Mock Objects](https://github.com/sebastianbergmann/phpunit-mock-objects/issues) * [DbUnit](https://github.com/sebastianbergmann/dbunit/issues) -* [PHPUnit_Selenium](https://github.com/sebastianbergmann/phpunit-selenium/issues) * [Documentation](https://github.com/sebastianbergmann/phpunit-documentation/issues) * [Website](https://github.com/sebastianbergmann/phpunit-website/issues) diff --git a/vendor/phpunit/phpunit/ChangeLog-4.8.md b/vendor/phpunit/phpunit/ChangeLog-4.8.md index 560232a..0dd0bd7 100644 --- a/vendor/phpunit/phpunit/ChangeLog-4.8.md +++ b/vendor/phpunit/phpunit/ChangeLog-4.8.md @@ -2,6 +2,55 @@ All notable changes of the PHPUnit 4.8 release series are documented in this file using the [Keep a CHANGELOG](http://keepachangelog.com/) principles. +## [4.8.23] - 2016-02-11 + +### Fixed + +* Fixed [#2072](https://github.com/sebastianbergmann/phpunit/issues/2072): Paths in XML configuration file were not handled correctly when they have whitespace around them + +## [4.8.22] - 2016-02-02 + +### Fixed + +* Fixed [#2050](https://github.com/sebastianbergmann/phpunit/issues/2050): `PHPUnit_Util_XML::load()` raises exception with empty message when XML string is empty +* Fixed a bug in `PHPUnit_Runner_Version::series()` + +## [4.8.21] - 2015-12-12 + +### Changed + +* Reverted the changes introduced in PHPUnit 4.8.20 as the only thing the new version constraint in `composer.json` achieved was locking PHP 7 users to PHPUnit 4.8.19 + +## [4.8.20] - 2015-12-10 + +### Changed + +* Changed PHP version constraint in `composer.json` to prevent installing PHPUnit 4.8 on PHP 7 +* `phpunit.phar` will now refuse to work on PHP 7 + +## [4.8.19] - 2015-11-30 + +### Fixed + +* Fixed [#1955](https://github.com/sebastianbergmann/phpunit/issues/1955): Process isolation fails when running tests with `phpdbg -qrr` + +## [4.8.18] - 2015-11-11 + +### Changed + +* DbUnit 1.4 is bundled again in the PHAR distribution + +## [4.8.17] - 2015-11-10 + +### Fixed + +* Fixed [#1935](https://github.com/sebastianbergmann/phpunit/issues/1935): `PHP_CodeCoverage_Exception` not handled properly +* Fixed [#1948](https://github.com/sebastianbergmann/phpunit/issues/1948): Unable to use PHAR due to unsupported signature error + +### Changed + +* DbUnit >= 2.0.2 is now bundled in the PHAR distribution + ## [4.8.16] - 2015-10-23 ### Added @@ -120,6 +169,13 @@ New PHAR release due to updated dependencies * Made the argument check of `assertContains()` and `assertNotContains()` more strict to prevent undefined behavior such as [#1808](https://github.com/sebastianbergmann/phpunit/issues/1808) * Changed the name of the default group from `__nogroup__` to `default` +[4.8.23]: https://github.com/sebastianbergmann/phpunit/compare/4.8.22...4.8.23 +[4.8.22]: https://github.com/sebastianbergmann/phpunit/compare/4.8.21...4.8.22 +[4.8.21]: https://github.com/sebastianbergmann/phpunit/compare/4.8.20...4.8.21 +[4.8.20]: https://github.com/sebastianbergmann/phpunit/compare/4.8.19...4.8.20 +[4.8.19]: https://github.com/sebastianbergmann/phpunit/compare/4.8.18...4.8.19 +[4.8.18]: https://github.com/sebastianbergmann/phpunit/compare/4.8.17...4.8.18 +[4.8.17]: https://github.com/sebastianbergmann/phpunit/compare/4.8.16...4.8.17 [4.8.16]: https://github.com/sebastianbergmann/phpunit/compare/4.8.15...4.8.16 [4.8.15]: https://github.com/sebastianbergmann/phpunit/compare/4.8.14...4.8.15 [4.8.14]: https://github.com/sebastianbergmann/phpunit/compare/4.8.13...4.8.14 diff --git a/vendor/phpunit/phpunit/LICENSE b/vendor/phpunit/phpunit/LICENSE index 32ddc8e..1a8c18d 100644 --- a/vendor/phpunit/phpunit/LICENSE +++ b/vendor/phpunit/phpunit/LICENSE @@ -1,6 +1,6 @@ PHPUnit -Copyright (c) 2001-2015, Sebastian Bergmann . +Copyright (c) 2001-2016, Sebastian Bergmann . All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/vendor/phpunit/phpunit/README.md b/vendor/phpunit/phpunit/README.md index d1b5f30..8deda24 100644 --- a/vendor/phpunit/phpunit/README.md +++ b/vendor/phpunit/phpunit/README.md @@ -3,8 +3,8 @@ PHPUnit is a programmer-oriented testing framework for PHP. It is an instance of the xUnit architecture for unit testing frameworks. [![Latest Stable Version](https://img.shields.io/packagist/v/phpunit/phpunit.svg?style=flat-square)](https://packagist.org/packages/phpunit/phpunit) -[![Minimum PHP Version](https://img.shields.io/badge/php-%3E%3D%205.3.3-8892BF.svg?style=flat-square)](https://php.net/) -[![Build Status](https://img.shields.io/travis/sebastianbergmann/phpunit/4.8.svg?style=flat-square)](https://travis-ci.org/sebastianbergmann/phpunit) +[![Minimum PHP Version](https://img.shields.io/badge/php-%3E%3D%205.6-8892BF.svg?style=flat-square)](https://php.net/) +[![Build Status](https://img.shields.io/travis/sebastianbergmann/phpunit/5.2.svg?style=flat-square)](https://travis-ci.org/sebastianbergmann/phpunit) ## Installation diff --git a/vendor/phpunit/phpunit/build.xml b/vendor/phpunit/phpunit/build.xml index e5cbbb0..5e65457 100644 --- a/vendor/phpunit/phpunit/build.xml +++ b/vendor/phpunit/phpunit/build.xml @@ -91,8 +91,7 @@ - - + @@ -143,6 +142,13 @@ + + + + + + + @@ -178,6 +184,13 @@ + + + + + + + @@ -208,9 +221,8 @@ - + - @@ -220,13 +232,6 @@ - - - - - - - @@ -240,6 +245,13 @@ + + + + + + + @@ -259,6 +271,8 @@ + + @@ -268,8 +282,11 @@ + + + diff --git a/vendor/phpunit/phpunit/build/bin/phpab b/vendor/phpunit/phpunit/build/bin/phpab index 9dcc3bc..80eaec4 100755 --- a/vendor/phpunit/phpunit/build/bin/phpab +++ b/vendor/phpunit/phpunit/build/bin/phpab @@ -147,25 +147,24 @@ spl_autoload_register( ); Phar::mapPhar('phpab.phar'); -define('PHPAB_VERSION', '1.20.3'); +define('PHPAB_VERSION', '1.21.0'); $factory = new \TheSeer\Autoload\Factory(); $factory->getCLI()->run(); exit(0); __HALT_COMPILER(); ?> ) -phpab.phar8vendor/theseer/directoryscanner/src/directoryscanner.php"VA P7vendor/theseer/directoryscanner/src/filesonlyfilter.php -VAf<vendor/theseer/directoryscanner/src/includeexcludefilter.php^VTBl1vendor/theseer/directoryscanner/src/phpfilter.php VFA'vendor/zetacomponents/base/src/base.phpYV\0vendor/zetacomponents/base/src/base_autoload.phpNVH¬Lvendor/zetacomponents/base/src/exceptions/double_class_repository_prefix.phpVV6w7vendor/zetacomponents/base/src/exceptions/exception.phpV CTsAvendor/zetacomponents/base/src/exceptions/extension_not_found.php6V~9 <vendor/zetacomponents/base/src/exceptions/file_exception.php-V5vendor/zetacomponents/base/src/exceptions/file_io.phpVO;<vendor/zetacomponents/base/src/exceptions/file_not_found.phpJV,T]DX=vendor/zetacomponents/base/src/exceptions/file_permission.php VDg7Ivendor/zetacomponents/base/src/exceptions/functionality_not_supported.php>V V&JFvendor/zetacomponents/base/src/exceptions/init_callback_configured.phpV: Dvendor/zetacomponents/base/src/exceptions/invalid_callback_class.php_V -Z»Bvendor/zetacomponents/base/src/exceptions/invalid_parent_class.phpEV@vendor/zetacomponents/base/src/exceptions/property_not_found.phpV"yAAvendor/zetacomponents/base/src/exceptions/property_permission.phpfVW>D?vendor/zetacomponents/base/src/exceptions/setting_not_found.phpTVH[Y;vendor/zetacomponents/base/src/exceptions/setting_value.php[V3vendor/zetacomponents/base/src/exceptions/value.phpV.Ѷ6vendor/zetacomponents/base/src/exceptions/whatever.php V8K0vendor/zetacomponents/base/src/ezc_bootstrap.php|VMɶ+vendor/zetacomponents/base/src/features.php.V -''vendor/zetacomponents/base/src/file.php_HV ^'vendor/zetacomponents/base/src/init.phpVVukoGvendor/zetacomponents/base/src/interfaces/configuration_initializer.phpVE8vendor/zetacomponents/base/src/interfaces/exportable.phpVB59vendor/zetacomponents/base/src/interfaces/persistable.phpV9J +vendor/zetacomponents/base/src/metadata.phpVb0vendor/zetacomponents/base/src/metadata/pear.phpV<3vendor/zetacomponents/base/src/metadata/tarball.phpV g^*vendor/zetacomponents/base/src/options.phpVy*Ll)vendor/zetacomponents/base/src/struct.php?Vt<vendor/zetacomponents/base/src/structs/file_find_context.php V-њ?vendor/zetacomponents/base/src/structs/repository_directory.php VL8'U<vendor/zetacomponents/console-tools/src/console_autoload.phprVi>vendor/zetacomponents/console-tools/src/dialog/menu_dialog.phpV1wԶBvendor/zetacomponents/console-tools/src/dialog/question_dialog.php"V tQvendor/zetacomponents/console-tools/src/dialog/validators/menu_dialog_default.phpV+Xvendor/zetacomponents/console-tools/src/dialog/validators/question_dialog_collection.phpVONUvendor/zetacomponents/console-tools/src/dialog/validators/question_dialog_mapping.phpVFSvendor/zetacomponents/console-tools/src/dialog/validators/question_dialog_regex.phpV{Rvendor/zetacomponents/console-tools/src/dialog/validators/question_dialog_type.phpCV(9vendor/zetacomponents/console-tools/src/dialog_viewer.php" -V?R28?vendor/zetacomponents/console-tools/src/exceptions/argument.phpVX ζRvendor/zetacomponents/console-tools/src/exceptions/argument_already_registered.phpE V/wm'Svendor/zetacomponents/console-tools/src/exceptions/argument_mandatory_violation.phpV Hvendor/zetacomponents/console-tools/src/exceptions/argument_too_many.phpV*Y۶Nvendor/zetacomponents/console-tools/src/exceptions/argument_type_violation.phpsVu[:MCvendor/zetacomponents/console-tools/src/exceptions/dialog_abort.phpV"@vendor/zetacomponents/console-tools/src/exceptions/exception.phpVP[ Jvendor/zetacomponents/console-tools/src/exceptions/invalid_option_name.phpVdLvendor/zetacomponents/console-tools/src/exceptions/invalid_output_target.phpV]vmwIvendor/zetacomponents/console-tools/src/exceptions/no_position_stored.phpVRGyMvendor/zetacomponents/console-tools/src/exceptions/no_valid_dialog_result.phpVX=vendor/zetacomponents/console-tools/src/exceptions/option.phpV}YPvendor/zetacomponents/console-tools/src/exceptions/option_already_registered.phpV-/߶Qvendor/zetacomponents/console-tools/src/exceptions/option_arguments_violation.phpV~xRvendor/zetacomponents/console-tools/src/exceptions/option_dependency_violation.phpVrQvendor/zetacomponents/console-tools/src/exceptions/option_exclusion_violation.phpVhVmQvendor/zetacomponents/console-tools/src/exceptions/option_mandatory_violation.phphVYXpAKvendor/zetacomponents/console-tools/src/exceptions/option_missing_value.phpVF^Fvendor/zetacomponents/console-tools/src/exceptions/option_no_alias.php VHvendor/zetacomponents/console-tools/src/exceptions/option_not_exists.php$V6ESvendor/zetacomponents/console-tools/src/exceptions/option_string_not_wellformed.php V0Mvendor/zetacomponents/console-tools/src/exceptions/option_too_many_values.phpwVLvendor/zetacomponents/console-tools/src/exceptions/option_type_violation.phpVD/1vendor/zetacomponents/console-tools/src/input.phpKV&}h:vendor/zetacomponents/console-tools/src/input/argument.phpVh";vendor/zetacomponents/console-tools/src/input/arguments.phpb!VJESJvendor/zetacomponents/console-tools/src/input/help_generators/standard.php9VBj8vendor/zetacomponents/console-tools/src/input/option.phpOVS~Evendor/zetacomponents/console-tools/src/input/validators/standard.phpV x=vendor/zetacomponents/console-tools/src/interfaces/dialog.phpT V*/Z;Gvendor/zetacomponents/console-tools/src/interfaces/dialog_validator.phpV 5Kvendor/zetacomponents/console-tools/src/interfaces/input_help_generator.phpVtӁFvendor/zetacomponents/console-tools/src/interfaces/input_validator.phpyVeutovLvendor/zetacomponents/console-tools/src/interfaces/menu_dialog_validator.phpVTPvendor/zetacomponents/console-tools/src/interfaces/question_dialog_validator.phpV&cֶ:vendor/zetacomponents/console-tools/src/options/dialog.php2 V3Y?vendor/zetacomponents/console-tools/src/options/menu_dialog.phpV1vf:vendor/zetacomponents/console-tools/src/options/output.phpV0ِI?vendor/zetacomponents/console-tools/src/options/progressbar.phpVte%Cvendor/zetacomponents/console-tools/src/options/progressmonitor.phpF V Cvendor/zetacomponents/console-tools/src/options/question_dialog.phpVWia=vendor/zetacomponents/console-tools/src/options/statusbar.php Vp~[9vendor/zetacomponents/console-tools/src/options/table.phpL"VseK2vendor/zetacomponents/console-tools/src/output.phpMVW?7vendor/zetacomponents/console-tools/src/progressbar.php:Vdm|;vendor/zetacomponents/console-tools/src/progressmonitor.phpZVq5vendor/zetacomponents/console-tools/src/statusbar.php Vj rM?vendor/zetacomponents/console-tools/src/structs/option_rule.phpV Avendor/zetacomponents/console-tools/src/structs/output_format.phpkVh+-Bvendor/zetacomponents/console-tools/src/structs/output_formats.php+VD1vendor/zetacomponents/console-tools/src/table.php)sVsB16vendor/zetacomponents/console-tools/src/table/cell.phpV+(Կ5vendor/zetacomponents/console-tools/src/table/row.phpw/V -h%ڶ8vendor/zetacomponents/console-tools/src/tools/string.phpVF)phpab/Application.php@ VD -p4^phpab/AutoloadRenderer.phpb#V -B" phpab/CLI.phpVVPʶphpab/Cache.php@V "9phpab/CacheEntry.phpVжphpab/CachingParser.phpVPI!phpab/Collector.phpe V*gLqphpab/CollectorResult.php -V8[ phpab/ComposerIterator.phpyVRphpab/Config.php8-V -;s9phpab/DependencySorter.phpmVo0&_phpab/Factory.php;V+Զphpab/Logger.phpV!phpab/ParseResult.phpgVWߪphpab/Parser.php CV -lPphpab/ParserInterface.phpVphpab/PathComparator.phpfVhaphpab/PharBuilder.php,Vbζphpab/SourceFile.phpV%phpab/StaticRenderer.phpV,phpab/Version.php -V?"phpab/templates/ci/default.php.tplV/]iphpab/templates/ci/phar.php.tplV~ phpab/templates/ci/php52.php.tplV ^@N"phpab/templates/cs/default.php.tplVBw#phpab/templates/cs/phar.php.tplV2q$ phpab/templates/cs/php52.php.tplV&N˶phpab/templates/static.php.tplVp휺"phpab/templates/staticphar.php.tplWVT.ֶYsbk CL^_j?[!QI4F6ۻ{:&)nwo{{_~[<,Nޝ;ċURhLÇ??DB/zI*?3JZp'{4 4#"CɄ7 Ld.Z'La4x$E2Â' M$~ +phpab.phar8vendor/theseer/directoryscanner/src/directoryscanner.php"\BVA P7vendor/theseer/directoryscanner/src/filesonlyfilter.php +\BVAf<vendor/theseer/directoryscanner/src/includeexcludefilter.php^\BVTBl1vendor/theseer/directoryscanner/src/phpfilter.php \BVFA'vendor/zetacomponents/base/src/base.phpY\BV\0vendor/zetacomponents/base/src/base_autoload.phpN\BVH¬Lvendor/zetacomponents/base/src/exceptions/double_class_repository_prefix.phpV\BV6w7vendor/zetacomponents/base/src/exceptions/exception.php\BV CTsAvendor/zetacomponents/base/src/exceptions/extension_not_found.php6\BV~9 <vendor/zetacomponents/base/src/exceptions/file_exception.php-\BV5vendor/zetacomponents/base/src/exceptions/file_io.php\BVO;<vendor/zetacomponents/base/src/exceptions/file_not_found.phpJ\BV,T]DX=vendor/zetacomponents/base/src/exceptions/file_permission.php \BVDg7Ivendor/zetacomponents/base/src/exceptions/functionality_not_supported.php>\BV V&JFvendor/zetacomponents/base/src/exceptions/init_callback_configured.php\BV: Dvendor/zetacomponents/base/src/exceptions/invalid_callback_class.php_\BV +Z»Bvendor/zetacomponents/base/src/exceptions/invalid_parent_class.phpE\BV@vendor/zetacomponents/base/src/exceptions/property_not_found.php\BV"yAAvendor/zetacomponents/base/src/exceptions/property_permission.phpf\BVW>D?vendor/zetacomponents/base/src/exceptions/setting_not_found.phpT\BVH[Y;vendor/zetacomponents/base/src/exceptions/setting_value.php[\BV3vendor/zetacomponents/base/src/exceptions/value.php\BV.Ѷ6vendor/zetacomponents/base/src/exceptions/whatever.php \BV8K0vendor/zetacomponents/base/src/ezc_bootstrap.php|\BVMɶ+vendor/zetacomponents/base/src/features.php.\BV +''vendor/zetacomponents/base/src/file.php_H\BV ^'vendor/zetacomponents/base/src/init.phpV\BVukoGvendor/zetacomponents/base/src/interfaces/configuration_initializer.php\BVE8vendor/zetacomponents/base/src/interfaces/exportable.php\BVB59vendor/zetacomponents/base/src/interfaces/persistable.php\BV9J +vendor/zetacomponents/base/src/metadata.php\BVb0vendor/zetacomponents/base/src/metadata/pear.php\BV<3vendor/zetacomponents/base/src/metadata/tarball.php\BV g^*vendor/zetacomponents/base/src/options.php\BVy*Ll)vendor/zetacomponents/base/src/struct.php?\BVt<vendor/zetacomponents/base/src/structs/file_find_context.php \BV-њ?vendor/zetacomponents/base/src/structs/repository_directory.php \BVL8'U<vendor/zetacomponents/console-tools/src/console_autoload.phpr\BVi>vendor/zetacomponents/console-tools/src/dialog/menu_dialog.php\BV1wԶBvendor/zetacomponents/console-tools/src/dialog/question_dialog.php"\BV tQvendor/zetacomponents/console-tools/src/dialog/validators/menu_dialog_default.php\BV+Xvendor/zetacomponents/console-tools/src/dialog/validators/question_dialog_collection.php\BVONUvendor/zetacomponents/console-tools/src/dialog/validators/question_dialog_mapping.php\BVFSvendor/zetacomponents/console-tools/src/dialog/validators/question_dialog_regex.php\BV{Rvendor/zetacomponents/console-tools/src/dialog/validators/question_dialog_type.phpC\BV(9vendor/zetacomponents/console-tools/src/dialog_viewer.php" +\BV?R28?vendor/zetacomponents/console-tools/src/exceptions/argument.php\BVX ζRvendor/zetacomponents/console-tools/src/exceptions/argument_already_registered.phpE \BV/wm'Svendor/zetacomponents/console-tools/src/exceptions/argument_mandatory_violation.php\BV Hvendor/zetacomponents/console-tools/src/exceptions/argument_too_many.php\BV*Y۶Nvendor/zetacomponents/console-tools/src/exceptions/argument_type_violation.phps\BVu[:MCvendor/zetacomponents/console-tools/src/exceptions/dialog_abort.php\BV"@vendor/zetacomponents/console-tools/src/exceptions/exception.php\BVP[ Jvendor/zetacomponents/console-tools/src/exceptions/invalid_option_name.php\BVdLvendor/zetacomponents/console-tools/src/exceptions/invalid_output_target.php\BV]vmwIvendor/zetacomponents/console-tools/src/exceptions/no_position_stored.php\BVRGyMvendor/zetacomponents/console-tools/src/exceptions/no_valid_dialog_result.php\BVX=vendor/zetacomponents/console-tools/src/exceptions/option.php\BV}YPvendor/zetacomponents/console-tools/src/exceptions/option_already_registered.php\BV-/߶Qvendor/zetacomponents/console-tools/src/exceptions/option_arguments_violation.php\BV~xRvendor/zetacomponents/console-tools/src/exceptions/option_dependency_violation.php\BVrQvendor/zetacomponents/console-tools/src/exceptions/option_exclusion_violation.php\BVhVmQvendor/zetacomponents/console-tools/src/exceptions/option_mandatory_violation.phph\BVYXpAKvendor/zetacomponents/console-tools/src/exceptions/option_missing_value.php\BVF^Fvendor/zetacomponents/console-tools/src/exceptions/option_no_alias.php \BVHvendor/zetacomponents/console-tools/src/exceptions/option_not_exists.php$\BV6ESvendor/zetacomponents/console-tools/src/exceptions/option_string_not_wellformed.php \BV0Mvendor/zetacomponents/console-tools/src/exceptions/option_too_many_values.phpw\BVLvendor/zetacomponents/console-tools/src/exceptions/option_type_violation.php\BVD/1vendor/zetacomponents/console-tools/src/input.phpK\BV&}h:vendor/zetacomponents/console-tools/src/input/argument.php\BVh";vendor/zetacomponents/console-tools/src/input/arguments.phpb!\BVJESJvendor/zetacomponents/console-tools/src/input/help_generators/standard.php9\BVBj8vendor/zetacomponents/console-tools/src/input/option.phpO\BVS~Evendor/zetacomponents/console-tools/src/input/validators/standard.php\BV x=vendor/zetacomponents/console-tools/src/interfaces/dialog.phpT \BV*/Z;Gvendor/zetacomponents/console-tools/src/interfaces/dialog_validator.php\BV 5Kvendor/zetacomponents/console-tools/src/interfaces/input_help_generator.php\BVtӁFvendor/zetacomponents/console-tools/src/interfaces/input_validator.phpy\BVeutovLvendor/zetacomponents/console-tools/src/interfaces/menu_dialog_validator.php\BVTPvendor/zetacomponents/console-tools/src/interfaces/question_dialog_validator.php\BV&cֶ:vendor/zetacomponents/console-tools/src/options/dialog.php2 \BV3Y?vendor/zetacomponents/console-tools/src/options/menu_dialog.php\BV1vf:vendor/zetacomponents/console-tools/src/options/output.php\BV0ِI?vendor/zetacomponents/console-tools/src/options/progressbar.php\BVte%Cvendor/zetacomponents/console-tools/src/options/progressmonitor.phpF \BV Cvendor/zetacomponents/console-tools/src/options/question_dialog.php\BVWia=vendor/zetacomponents/console-tools/src/options/statusbar.php \BVp~[9vendor/zetacomponents/console-tools/src/options/table.phpL"\BVseK2vendor/zetacomponents/console-tools/src/output.phpM\BVW?7vendor/zetacomponents/console-tools/src/progressbar.php:\BVdm|;vendor/zetacomponents/console-tools/src/progressmonitor.phpZ\BVq5vendor/zetacomponents/console-tools/src/statusbar.php \BVj rM?vendor/zetacomponents/console-tools/src/structs/option_rule.php\BV Avendor/zetacomponents/console-tools/src/structs/output_format.phpk\BVh+-Bvendor/zetacomponents/console-tools/src/structs/output_formats.php+\BVD1vendor/zetacomponents/console-tools/src/table.php)s\BVsB16vendor/zetacomponents/console-tools/src/table/cell.php\BV+(Կ5vendor/zetacomponents/console-tools/src/table/row.phpw/\BV +h%ڶ8vendor/zetacomponents/console-tools/src/tools/string.php\BVF)phpab/Application.php \BVa +K䛶phpab/AutoloadRenderer.phpb#\BV +B" phpab/CLI.phpY\BV'޶phpab/Cache.php@\BV "9phpab/CacheEntry.php\BVжphpab/CachingParser.php\BVPI!phpab/Collector.phpe \BV*gLqphpab/CollectorResult.php +\BV8[ phpab/ComposerIterator.phpy\BVRphpab/Config.php/0\BVk öphpab/DependencySorter.phpm\BVo0&_phpab/Factory.php;\BV+Զphpab/Logger.php\BV!phpab/ParseResult.phpg\BVWߪphpab/Parser.php C\BV +lPphpab/ParserInterface.php\BVphpab/PathComparator.phpf\BVhaphpab/PharBuilder.phpw\BVDLBphpab/SourceFile.php\BV%phpab/StaticRenderer.php\BV,phpab/Version.php +\BV?"phpab/templates/ci/default.php.tpl\BV/]iphpab/templates/ci/phar.php.tpl\BV~ phpab/templates/ci/php52.php.tpl\BV ^@N"phpab/templates/cs/default.php.tpl\BVBw#phpab/templates/cs/phar.php.tpl\BV2q$ phpab/templates/cs/php52.php.tpl\BV&N˶phpab/templates/static.php.tpl\BVp휺"phpab/templates/staticphar.php.tplW\BVT.ֶYsbk CL^_j?[!QI4F6ۻ{:&)nwo{{_~[<,Nޝ;ċURhLÇ??DB/zI*?3JZp'{4 4#"CɄ7 Ld.Z'La4x$E2Â' M$~ |^8 9f0#? >!<=Wzni$z)Rēz,M喊4V& $@S\8KZ᪓ <9; ZK (~;7]U{kҊ=\Rfzghh6I 0 ]g3TvL0*#"\xPY`r۬ͨvD%8i0D!det8]]#F@%됓:CIqGepmY]iyٷz9`X4a-\Z4Rj8㫡Hn̶W&-jݕLe$!]тLd8;nWE{`kCffѬEt5ehٺC4z+ t ܒZV'3bh]ue|g|ZxGoi[uOpӮE<Z"]ijpU"bf邑=C.lۘINDf)}}-?NNHdJ  &x!%f8e+9, gct|uu<NFpq/Nx$?:24cAN R\>9 -6N2?=t/'laqk"bK DSLtRI-}Kl5Qiw6Sz=?tg^O/BmCRLF9sojX.AzեIZa&^+L;C1jM XbQ@c1e<1 UK S;?dbfZt%X$ӵ[Ęle n˳Kh. ,1<<Ԅ/؝*"qjL>λL4z|zS ZC/UqNWӦrNbcTE2uG79M܇. #_얃L`BqACX QK`r1VCsY%um) 4ݖ'^U"B+׌۵ c1P:j~:RRhku&e!WF|pw4;>DzzWdgg稕.3MQ}88$*)}:K^cIeVzܰUncQR10o؞86R q|؁Sij SJvҜv\gLT!8^*l:IT`\eIbnnD )lӏt?׵"K!)kl>|L @k!8'~-~xQ5^%J?rxR+dEN'dx+S*|{V+Rכ+vEIbKz6(hT#zYcѵeorF&xJ1`H^|6[J 6rkI$^U2%4i.¹XHpyxd_0dT=M ^j m//R1JWLw\u7Oɵ{mqv0נᛘMX&j,:([?qF6O8aBrS "9y voc0lmp%`urP:yZ,a4#)Xy3/*K,&b& Tl O?KXm˺kї1Tѥӥ^5@wΥ#eM0RdqO)0f3|LkUs6gK–Ae8zczZ~q̅6]ej^%_dt^\"d2Q(T_v۔,V RQIѦzJw9\Q觪u-4IL|.>1h5-epx̓c"r I]~v֏+BR _ud.P<ҫ㋙L5SCIan-Hd{A>,˒HSV-Qz?:iDd]⨞PW$g$,e4Wn1RY/K.5SmJ͗ˠ[fzJjj|(ry!b̲I'~ 3fR@ϙ5U"++V'ŗC/Riak|5MDXGDa毥eīH@~,%;z1VrVTK9^7 Rr6ayjL9.`7CV b_unu9q_pmdG 74&[d{/KT}snϩ]͟(=yM[^P{ٙQUC69)"5RkV[dq;/zV5YMuc63_{wNX93! .tV19&Md+ -"< ׇuMֈLjWő֦x[; nVϴQ'g+kbwYgT(uՆYk ~1,k<ࢉNjisk,=Hdu-m2o&.7SbAn/V\Fcu6% -b7ML=XBF#]oോu쒕@p?Jq_!JWқb$H*"?k~,F8v5utG7cT8["wu9[t4r%PtGV!/Ci>K?hMߠpN73@IU5 -kwyK]ݛ2Cб#M\HYCG;6bY}ִ:{5pKh?P`ҫ:J*FKi8O?_ YmsH_J-"l8VNI\%` I5߯GB L.Y>y4 o%Gq( Y^x?^2 N,7>~o[6:)R!ż d0ͳ 搧83+ #,bL[dK su'BE`0^kՒR$:->h Z>(I{73{ǿGQ'W?ԚǏ8<3I("LRE </l-R_,OaUP8jj){5 AJΦ+,"O͗= zH߸*Ђwx&ZUCR5`h-:j04zݪ u].'xYw|襬|5Ͳ0d{qԕvvFMbk#av8CNQ 8VvyEAYvg<1/L_¼m{n}(JpSZw}>դC /²r@*Ya.'|z)b8nbCt嶺5<mrQHnRt7ty~TI"VA#k؏%Hpt1濜7U/bLGј#U4DAwιjSr_*D5q?]}Xf]O~ÇǿtDDs_ςd)m#c;-*5.*(s+׸CouP$ERg ;t8.M9#0B[6bY}LMJ%j>կ[[~>y)G)OW^?}P~/u^.X?R~/YmsH_J-"l8VNI\%` I5߯GB L.Y>y4 o%Gq( Y^x?^2 N,7>~o[6:)R!ż d0ͳ 搧83+ #,bL[dK ua}58-E 9o_-pe9K}ۻf7 (҄xvw74;kسnߴ^@`}fb4l.1X[Jܳe.J[M' -2kik{=+m4*U!'uǎuEω;= .#Zk صZ(3[ j;c&=,<{8h"!Dc=й&/-\Gp&"]"^XX}t-z;$Fmjrh9K{l%d>; uSpnk>&f D.Wq@_gğ7Č c~9&9(UV]!V(e:n_|urt5U WE+ =:"Gԧ,Fc휅9U |²5TpЌ~¼N ~` KsaJ3MY {/%` q'vh# *+~KųzzF 31V;28+?a/#!%%RP ?L|3+)G$=yF6eE0čOii*ㄅã 20йśvVe:^a9LD:+qEF&6cn& 1SL(zM)\FpC]QA `6h!@ -FbaN>]NTU: b#E S_Bj <Z64=Q4>4*N'g>OՠRh!_e,p]3Bw8TlKՎ]՜EptOtd$c'43z8NȣF:J.c2\UC ^,X 1joDyKU"Q$ &o@@wˏ[_Jf/Ǭ g ?J7|MY4q%9_u~/2J, яDN7PFiȴ04"!T7"a~$0U` *tS<`k:Le|'"tJ4@u-.<A}`p8<ROc9؜Uv֙x(h KS[4gxpJB `C]*kLVen|F; n! }hV%1/*K✪qwBAU@ť{s VMӋ?Z'G)MX]~8 s$kp-nE"qg>-o*NeyMX6i^u6^`*pnAXQrviSjtuàd͌.'۫{rŸVԨ%U_ LYh;'B78uSu+RCl n(㪏^o2tTܸx ]&soM&u x aoVWW;`Fծ[d\ccܢ lo^n{5F-onv=¸@9T=&7ϓkwLb)ͱ7t - rH?\#ԵGHmX zN|oX#kP%6 Nղ䫘15t$5u%lc}]6۪;5Oz)W9fk󴲧zz=/OW|?ksŜkSכG%zsk*lW.YBb56Iخ[~tw{Gjػoq_Y38;uM`LӍ~ht]FЂ\ۇvD87=fz6[ X8,fp!3q,p6 Cny;6Nw,߳4aC2 O4SoAfy֔燎)`. D3W4X:h^ Y{OAt< iX}41v p6{#i_G0sԫK֌`;gƠu_N{G]x$ڭq9@L E^4;\AfC5BZG`Sgþj 9J,`<gg'RPJ;hx`\"sD5GxdOi~h >[=􆤸ШQxF!vwd @ _@CiH׽. "^Tξ\ޥPk:(9>G aYi2-G{K{hȵ!iK_@yр7gdZ>gͳmd^N&uWOsӺ3o9.&X7mzn.`(?QDhb?=AXG~=12g)r\i*=v܂(Zwա -EEHjiԚ2T;am8z%eO*Uڐ]?Wr ^F`PdQw8iT|.DQkq,@zg ]fy-E0 L<͑؂U/JSt Sƣ&38ZPu@u1o\}K2b;-ݕ`]ySl$TϟtH@w|=:2PyNjW~6UP/`7b)ZMBiMyȃ2܈j37(B fGz..lρ8n?8 sY՘ruA,)\[Ofת3%)>S[xT#H[ ETp9Em$(k/b8gIuW,Z4#bK&f橆,FR.6 *eSZ{V`؃;QEip9sNS-Y{v9j SM9zQH5:v 0ckbfg5Fc6[>䳹G\hT\Ĉ7.éC4\H~|oZy\ޫDMKX0A:,WxL[Q@E" :Tjc`,^}ob\A:TC?ĖUUa^ .: -J9aqAz +˓WnWJF33쇼u,Dxי(𲕯ܨ]pw+>Sdu(OKP좊J)%Dg ȜHNՉ Ѩ7'0 PsEOQЂzOTqě!;ߣ) uA,Qs `c8~47Q<8UGa &>-ԧ,tjBvpC @0`nqKĎx2iUP~ -皪8 Ϫz. -8H08B>a#d:ؙO7rߎc[Tw@YRRI$@)[pu/8Ag'@N;0}CLTǎJuj~XbKj2y@WAuPl#o:ȘA;#F1>y \J|"q+;FêxSKE%"8z"ho"0{T('rh AsTN_uc<>r+ͥ)# ;1lUz9~WSXm/o=RY:V4hZ"wu?k&tGE7ߗD_T~t{_3yKGkwVv-t383ɼF^I(PW0YNϩNx^C_kȼa!m߻aW?mu[O]Ol13]GE#\YQ$sy_(P$ })@hZq>ժ+6YVrEw<ԓv@o~)5yf>^{һks]?^ЙQ,Vo{yK~=.HK`툕#.mT]O0}ϯ"TE04mo PeŚk[}iB'$Ͻğt Ih5ew-"kPEa0Ab2a_ـIg^6:2:B9Z5jQwH$8K渒X0%39Prxҵܞ_v=45t ߹79 :o$<)%D# + rH?\#ԵGHmX zN|oX#kP%6 Nղ䫘15t$5u%lc}]6۪;5Oz)W9fk󴲧zz=/OW|?84#^1ӳJpxLM`! _o;S2AqgK,06[c ?x3f /M0|fD&0hkk{6 reᇜI5>wdS4oȴ%A н x&ܹNe3:Adr HG<MJze4sqY`źissk,VnG9j% E;م dtʺ+ Q9R3ooApcN-B#% ]ہ +qrD RiCY;+3_ rZьŠ&}L-@rn%4ﳃs. oya]G"*mޚ;3҉YS9)MWEITU(#(%>opj|T ~_O^&-[ob3|/_J`UkIOO,%XC\Vks9c eوַ)y3J+W+Z8;>>fH>žw䱓9{'Jj6i^ZYq<7SgQ~_\g57'˷ >~PÍnϲX8`r骢 +EEHjiԚ3T:am[&F~,V2S~u͛llͧ 70c{(S؃#X[ZD&۴ +BY?>'V>%:Em]/F;t~77o+.Bp䊷J\DIJ[Rts)nƛ|Lf czV0'HR(HAq@_Z%Ybi'ئ;Q+GPWXi}^}Xm#҂N4~sh\,= ȥxw9$.tӝ]~_ Vۅ{!(9VBYYL׍D) td)" T^yf +ykXy"UsvY<`@nY榘ܙ|qƕ~ě"JU{EѴ|\2HlEU%Fܠm'W, ̏"ܛy>j0 +3̇Ɣc'Ȥfo +I:r~0N~A5Q)HqLA<*ȁxƽ/Aj΅rEY.o$ DY}9K5bѢ1*dl<ѐH&A#<)i=|0䝨#ha:ލȧZ*IJ{v9* 隫=op]ޕ#j;FEBx,VqlC,?@Jwrsh5vˇ|tO/@x; 2N:yK3 OYTw6xPD+Ok+[F|o-Sô)~+ +HUTgJ JBҟpwTd_W^,EP0A9UD_`RvByp 4#.: +J9f~Az +]>O(!o+:ެ:S^U(2}]bcT=x?yڱXJ*78+ѩ 5nNB$'Dyht,73 SOQЊuo \ÇFl4/_[GL9pi?<8MGApPx`Xߣi2&/ g҆mh5wnHX_XǠg>6)`hČ V㨎Yw?Ոt `pq쑣F?\,U +o93(ɇYߓ fZ< KcgYxirѨ)HZL%ȋTD|MAZh@y }Rv+ȟ19`TL:*J-;"oY`+LYUQuS%ڈ6?3vӅLAՕ*AjT' PV\h+\E й:N@!&:֏J ˖Xպ4u ݌ FcqtTG H>DXw`&SPJ8!dݥD\<,}lBU#Dj ȹF{ + #ދegjzZ*{YLY0#^k;%(>Z\qH8YU=rMhi1kS -AKD:^դtE#U!7mN9DL /hJ&Š:4c_2G{t?5ρڍ( v,'D#7ǻ$52̵.kݰ8JkɼlrV΅#|eq,ary<}Z/yuUHA3 W-_ԢY%= *FO ^d\x׺ R~Z$d+CĀм^Z1Mf1cL j: 2y-(2EAt-&W_L?o_kLρTmƩWnNX-}G.PU6iR#ΣR&ŝ'=V9J͊ S('s< /Qb/d^,&e lɹ%ԙ"_՜s< .=VۢgXxZHL]'X2ږ&/+ +/w ZNʻpy'W*Q6uQ@\T(ёhZv^FaIi{M4Ѵmbd[c7(sxpI`(>5 ?6ҍEۓL:yX¶963=<{ +mC%Rl96yi{gE _&R ;ܻ](5p +B5)Em;bf񔨟)_1zWp?hGQ +7klU!lGIoYHW}Rlϯ5D#::9ƷeAt[)-T.vtQ;Iźea_Q/޳-6z9S`-"zC?I)r ?r>Ġ{W9쪜^ +)ErPkVI9_[d.O86oUCD9?hMC+Bg}׫Y%WTp+C=@`;6}yqJ\~˱-G{-(Cg]E1 +r<Jm@'"-ق%~|&VK"U{@T]O0}ϯ"TE04mo PeŚk[}iB'$Ͻğt Ih5ew-"kPEa0Ab2a_ـIg^6:2:B9Z5jQwH$8K渒X0%39Prxҵܞ_v=45t ߹79 :o$<)%D# 4um D痿tѿ!7@>qkё=c5.G'>):!ˎ.5`>jǓ'۹$֨yPǒ,er(/-GJL=HXgٓJKΑ|u})Pcq I#^sbL'5Xn \ݢrRp{x+P{/-N АjOOj|\nöun0 y 8jM;H5RI#ABNk;X5_b%|39eqOޡ&d&{"/NJAU:Ga:>K!2,=ȇ\owl(Lv3EL@pF.|F.X-^8h <7Q#S5k=//H>] Lvo-wUXOQ@(֢~GcɀtKIg!y 2=+frDŽ7Y%6"ޚIS;8\]W4%%(}dPha44d )] ,z*wu*!Qi5,Bq;6̷&ugdZ5u2>ΞxUEe+͝A/lQWo|N`x?i:CQO)(@=Xjm3S%hȩOI<|amh6yf쑆pFxQGŸ@?%tawaA&Vulԯ1iDn = `!FsS)sp; M+^|.*{O o@7tM5Hu40qlEũܒ|klJe4 3n#tGx!b]+Vϲm (M- SCS`X18V(&Ul. [Oe@ 1(/moYȾՐ[v}+?*+]]Z_ڠcFZo=Ŵj\N[s[bc7UD`spfo ^0gfwggvj{r a} -U Ӆ_o~5mq.Vk#YG zQzw |}vχ(؅-woO Mԃ^ ] cC[n8f.ls%^1ǐz|{ph\mX.{"('pzŨOl#XbkԕYba QVPTgm{РT.! Huuga~̍1āg8/cz:*&O-("8eK4aR 2  -$$h M3H̄\ؑX$ -w\ lE[:ñ,(4.uغV }n>#m7ةp61K .gfNG: |aͰj|`:& ЯCZf@'>֜Y0ѯt )Y/Il W1O\ :֭)IHaD5|agH7UF}rAM-0/D1*!K 5OD*< mhf '=0P/ 5R!EΦFz:*UC4\87-ZX\f#nyS3>C| 0 -#v~KZa,>vh!DluFc͌KSуK qڧT2Z"%JE{Z0.&6j;#F׺u2thD>4Ė -˹ǧ1:O@Vs1LO[ym+w:]np|;Q>^ň^ #:7G0I>g' h֊_3 BExk#z@8cS{Oz!sЁyxҕСⱷ&flu$tەz)q}<;2GTF}Ō%C)3D(#6Jd"!f7I]\jO0ظth'Iltc!񴧓yQ$v:hz.?–Ƴnݼ(h,|5;M{;%N(<;RȀBd`|>D Y1be0€MBL!MAC˝x 0QT2dtѣRC]q"2L B3|{_`x]a`yVq?땈X|.nXkV輸%(RqSC]{;z%e-[gT/Xd%n#'ga"y?b۫h |2p<+Θ6fBeu#~iUFB*d/E -׳+M^ܱ+YԥS@ o%̋YU9˴guEu&'Fr$4oOAXBGF=$,fQ0a[ 21au= jZF{&{S~=.#/t5,;# [!!?IQe+L[wN qZY$}Zy}mU`*XKLN1JJLC9?8!57nB)‹؋/&[ -2gvӓp?Zl1yܒ2C}5BJGx7i}0OO)% t2{W|!CɼTX~)$~ubZW0&r>߼ -53JBl4Vsmi[G[I :B,գ$2GFf'%@@5D hޚ#aγTk0A ;qOW"y?fPȎ,=ɓjWh."!-K"g-6o`W\$\^E89%d7y-eqXڼ-a,2JJvWW[Kk2OKol +%} R yk[BT%\,B _ Mw$gJߕ&F]7y.dvm=mYqm~{M'T]s?+%ϖx\ܲD]b~1 }#ms:BU%&(Dس0H.f?hAy \S9g`r<\ vU\w*X}lOs-m -#|ʳ=JθVK+G~y4a;wN|d|ҭ J0\ZZ|KtVskEpYcK\젏LUB%Q=ƶƥ -RH+]-Yl_|iiQU9E]ݑU`po9yc5vH)fNz-O -Y!lQo3RNP 0)&RbD,N&b0QK|L/{7Ax^_Ի観!yR ƎUK 1ìv'*?^U u4^{TWm}RH~ t*C#juL+ZBՊEVZQ/4A7ޫ{<VmoH_1U:%/4`+aNUa]beq~3 8-Iw3<3;?EK.۬n܃7''9y"Ϣ(J#|?4G@fVP%[:m"IUYe<䲈^yTTse]Z@\0I:M Œ +_Yy[>rDŽ7Y%6"ޚIS;8\]W4%%(}dPha44d )] ,z*wu*!Qi5,Bq;6̷&ugdZ5u2>ΞxUEe+͝A/lQWo|N`x?i:CQO)(@=Xjm3S%hȩOI<|amh6yf쑆pFxQGŸ@?%tawaA&Vulԯ1iDn = `!FsS)sp; M+^|.*{O o@7tM5Hu40qlEũܒ|klJe4 3n#tGx!b]+Vϲm (M- SCS`X18V(&Ul. [Oe@ 1(/moYȾՐ[v}+?*+]]Z_ڠcFZoJ=Ŷոr6Rts[b=ܼ}0c.8ISY-`Yj3ݝ68~}B^<6&'gowz@8"em GˮK舄4#Ў](>v|M%G"Z wр<9!cmgX&2 O3$Ήcj x=qa@Y (}b"[s?bWf)ϏnH= +Zh8lAR9dh@[{OH[bf! @1ݨ6ql4:l,x" +;J'0ʀg@PφNkL:D&~Ր1˖YP updEqD_\7x^jT[Td+\-fSEӉ)8Pxj@͊ @D_*Hn08ʟ+~2KQbJSYsPb,+Wul3íteB y|UR熢i.}0 X0zl3X 1T ͕0sp2CN = NY2W.g2(ػ@F7TiD W>4;M;XQD˴!0 h{I5&0@SfY,'&W$]r}:bS٥>aMZ-t2oy|&ɇЋ7GQelV"9oТʃ: +r6D{1NOu ߇1][!~?:2R_$+q- <}"K9WDsyno>qDRW\zQġ.fe3aiUB*d'oGGX7yiOr/qaQ"GIqRrƙ4\MN< loONXBG=$uf4Q9aW 21a +U=M\F{&{SvE NG,-<#O;!A?Kpg'L8b,>`<+?ZЮ*0cN1 +R7LC9?!ܖ 5ocɫW cR&;L2gHo (H~ZlR֢qޒ2:}r!h;x΁yDX[2:,bg$Z&oyobdA,uI:b9B4ѕSdP4QcvMOڇm(pxg3N) =wTZQz@xF J=;Bl>3GĜS _q]'DZ^>WGSvxyq̈O~ϯI|7Ci+p6`#vŵMYU[''\AÎe^մ,[h2 w`^i;4NFIi; ؚ楋BJ, ѐncѻoȿd ˮxl(}xwITdّ~%y7`OgK'ކzm9gc%yn+XI?~Yہ+E5n2nTm6 so 6Հ]>?o*;(pI!hI iI P dҲVj\Hw-nBgҳvUoEi T f4S:@tGA>t`?" {ld4 U7шfnXLri_x'9xc16pM7ލp;hhY` ޟ50`?qARG!7bؚuG#omްoOU\UKKkΉ*Mn(P:kKQQ8.e&=*:GUEh,U kB~5+ K2v#-5@:"?.pM!5#]6#V3ah"jg{\T-q..imabF샀 da4^j'Qւ]p_t +U١@Om{?AQol1-6d0] vflm;a0OLQ4WK{+ +>T}.Ǯ˾P)\%_8ӹjZQ-v"D> -U>:j»VN k*XI#$qDj ]GǕ@{+6M1p+.M`'ȋ[~&>ٞ+[(?Dž[5k|*X| _p^C_tMOs|/bnm˩\r5q`U! Ma\dERR+3e <JU+iqۑy8!92Rep^~yYo߄P27"Q`B-H.=l56<%Xa#U1s5 x QL7Qe0)D36=SX4F5,+P0ܐ@4WjZF׭+qF -bݖ  R(&1:iMCe{,O ''yuWAxƚ&;;"25\´K&Un\)SnhYkfp%NwyF0$V>Q= ni'wn+'6O\f^c_,3(N[ E>9fiG8E>EAއYgEQ-k;e?T"5*bw],x?X]o}_Qdg$M63m% 8hwM;F\*jCwթӧ :Ku4LU>. -ɿ>}9|JzKD"~YߧQ VzB)̞epL\yӲDPK -cʓ2I52 chd\a$SIY2 y8 U"l (͒0MH`EQ3iAȾrZ⬑c;Ϝy, Uj,gx1Myb0Np&",)(cՓFYw]F9tck<2{mz:u7Kw+;A\n#dO޵nYգz@2aQtUZyccht~[-3=-lhW /p7\sYy7qFj5<ý5wN)"'!k<$i&|Vx;c;0u y{LZ C3:ԡ_Ftp -'۸+<0؝[鹦v:;Lq}[KG&6 yaƛ 7+IS1{t(vN؟zz[K{G#t8W Y?΅B$ I]BEY͍LVLq:i٠ #t -/tge:+,YW\uNk؅&P6 -=H"T_ݜUnXN$x@7ߖm9DTC6 5 {y=\7tELmĖ ㅏ(L!W}^WB`V d[n%z 0[W -x%VG#Vzzw@`F} (l ϒ|gش䫌0~e?)'{֮̉ [{Xiy;^9f+F9oR/dO,fC;oY$)z_=i5ppe[]b+FΜa{P7^ZxS:0LҲFoXzG {Z=_= ݽ7*Zɶ**دPص5κvɏ}x?-mS97Vk\) €ICu#+ |Z&m/,^c{[;>&3iXzL2SzF"H$fq\'D\;;\D|]N8X 7lftڒ"~^>M +bݖ  R(&1:iMCe{,O ''yuWAxƚ&;;"25\´K&Un\)SnhYkfp%NwyF0$V>Q= ni'wn+'6O\f^c_,3(N[ E>9fiG8E>EAއYgEQ-k;e?T"5*bw],x?Xmo_qZʸIZ)Wd$A/d(,'k]s@.l9̙YoS7]q6iӧ>|:xFFA$\P|.8& )Rd"<"#gxGiBAR +252 [4R(Qt< i4 @/pLBd(EH,}B ǏV/QH4 #֕Ji.u;%IBk)s0qSE4&B!"I1@lDV,ʓ8"F2XPWa".a8\$JH'[ +A.(.9* +P˶&\V&nZnXc,5V4L:xHB욧u`PXGH) 1a^B?bfLdMJ)[ˇ;rt7x4:VWoWX֠Vw7m0tg۳n߰n1dޙOލ7zgʮ^,ؾNZ|ci3}z }B23nkUV';t[v*a-t8= tאַ]PT c!yH"qzdzlt#bBO߱>06FG㠃-L!],c8uߺ6ɳ[Rϵ(^ jʛI0pA , edS<0$V 5jB (6mcLh02x_΂n"xeȝV*·Zts1.94}H}܊4]& F8pѪHƷTW>#$aZ~nywG[B21%J,%O;[]$6JF*})""|hx|,}Dw+yaC#{TD,:ė|D%qEOIp[hZ:*q:R-F}j[C + CAnymk/UU7hG\]_Yg[xd8s9ՎQ,XrPʝ|#I%O%y^dEU4ecNwo/բ/s +8컨VAw)ZQ{EB,uD.j)%~)G"YuQH8He<^fE0iuQ +$^o#Ɓgr&oa,l+JnYJI 2CCZ~l:$Y-TFZ~UgyWmoH_QEk:L(Tߴi:Zl@gri+(CS*Mˆ2*.:-t]JCHY֍Cw2429Wtc ^e[zeSx ׷Fspl$8mX7 a/ͩOİ Mk mtc5G>#kFA:y3sd"ýS ˞9OcƸFCPNh7sŦ-t8cżg]xgp: X6sbؖ5Mם|˙@-BNJkg0,ǽcLJNHTb&`:<8ے @@ -894,4 +888,4 @@ I7N`* Ŋ Ld*;␇K̽aru=hJeI_ :S}G'w: a@Ld4E(aiX~2)km*ݳ:-O3.OT%z؁ff :Ήx%8,+Ӻ.adv?=hMzkrmRmZ߉QaA :'t&6.򇦨Y uA -@ Es\@@BQpgCh8PSo{?벆T$OBXiYP|Q~3jfK3,n>HAԀXH) q8HAԀXH) q8')) { + fwrite( + STDERR, + 'This version of PHPUnit requires PHP 5.6; using the latest version of PHP is highly recommended.' . PHP_EOL + ); + + die(1); +} + if (__FILE__ == realpath($GLOBALS['_SERVER']['SCRIPT_NAME'])) { $execute = true; } else { @@ -14,15 +23,6 @@ Phar::mapPhar('___PHAR___'); ___FILELIST___ if ($execute) { - if (version_compare('5.3.3', PHP_VERSION, '>')) { - fwrite( - STDERR, - 'This version of PHPUnit requires PHP 5.3.3; using the latest version of PHP is highly recommended.' . PHP_EOL - ); - - die(1); - } - if (isset($_SERVER['argv'][1]) && $_SERVER['argv'][1] == '--manifest') { print file_get_contents(__PHPUNIT_PHAR_ROOT__ . '/manifest.txt'); exit; diff --git a/vendor/phpunit/phpunit/composer.json b/vendor/phpunit/phpunit/composer.json index 8bff2d1..d8e4002 100644 --- a/vendor/phpunit/phpunit/composer.json +++ b/vendor/phpunit/phpunit/composer.json @@ -21,12 +21,12 @@ "irc": "irc://irc.freenode.net/phpunit" }, "require": { - "php": ">=5.3.3", + "php": ">=5.6", "phpunit/php-file-iterator": "~1.4", "phpunit/php-text-template": "~1.2", - "phpunit/php-code-coverage": "~2.1", + "phpunit/php-code-coverage": "~3.2", "phpunit/php-timer": ">=1.0.6", - "phpunit/phpunit-mock-objects": "~2.3", + "phpunit/phpunit-mock-objects": ">=3.0.5", "phpspec/prophecy": "^1.3.1", "symfony/yaml": "~2.1|~3.0", "sebastian/comparator": "~1.1", @@ -34,13 +34,20 @@ "sebastian/environment": "~1.3", "sebastian/exporter": "~1.2", "sebastian/global-state": "~1.0", - "sebastian/version": "~1.0", + "sebastian/resource-operations": "~1.0", + "sebastian/version": "~1.0|~2.0", + "myclabs/deep-copy": "~1.3", "ext-dom": "*", "ext-json": "*", "ext-pcre": "*", "ext-reflection": "*", "ext-spl": "*" }, + "config": { + "platform": { + "php": "5.6.0" + } + }, "suggest": { "phpunit/php-invoker": "~1.1" }, @@ -63,7 +70,7 @@ }, "extra": { "branch-alias": { - "dev-master": "4.8.x-dev" + "dev-master": "5.2.x-dev" } } } diff --git a/vendor/phpunit/phpunit/phpunit b/vendor/phpunit/phpunit/phpunit index 8948f6e..704e54c 100755 --- a/vendor/phpunit/phpunit/phpunit +++ b/vendor/phpunit/phpunit/phpunit @@ -9,10 +9,10 @@ * file that was distributed with this source code. */ -if (version_compare('5.3.3', PHP_VERSION, '>')) { +if (version_compare('5.6.0', PHP_VERSION, '>')) { fwrite( STDERR, - 'This version of PHPUnit requires PHP 5.3.3; using the latest version of PHP is highly recommended.' . PHP_EOL + 'This version of PHPUnit requires PHP 5.6; using the latest version of PHP is highly recommended.' . PHP_EOL ); die(1); diff --git a/vendor/phpunit/phpunit/phpunit.xsd b/vendor/phpunit/phpunit/phpunit.xsd index 19e9743..5e81ed5 100644 --- a/vendor/phpunit/phpunit/phpunit.xsd +++ b/vendor/phpunit/phpunit/phpunit.xsd @@ -1,8 +1,8 @@ - - This Schema file defines the rules by which the XML configuration file of PHPUnit 4.8 may be structured. + + This Schema file defines the rules by which the XML configuration file of PHPUnit 5.2 may be structured. @@ -14,7 +14,6 @@ - @@ -118,9 +117,11 @@ + + @@ -196,29 +197,33 @@ - + - - - - + + + + + + + - - - + + + + @@ -228,21 +233,8 @@ - - - - - - - - - - - - - diff --git a/vendor/phpunit/phpunit/src/Extensions/GroupTestSuite.php b/vendor/phpunit/phpunit/src/Extensions/GroupTestSuite.php index e448897..86601d4 100644 --- a/vendor/phpunit/phpunit/src/Extensions/GroupTestSuite.php +++ b/vendor/phpunit/phpunit/src/Extensions/GroupTestSuite.php @@ -27,7 +27,7 @@ class PHPUnit_Extensions_GroupTestSuite extends PHPUnit_Framework_TestSuite { public function __construct(PHPUnit_Framework_TestSuite $suite, array $groups) { - $groupSuites = array(); + $groupSuites = []; $name = $suite->getName(); foreach ($groups as $group) { diff --git a/vendor/phpunit/phpunit/src/Extensions/PhptTestCase.php b/vendor/phpunit/phpunit/src/Extensions/PhptTestCase.php index 4ac8fd8..7e3bed2 100644 --- a/vendor/phpunit/phpunit/src/Extensions/PhptTestCase.php +++ b/vendor/phpunit/phpunit/src/Extensions/PhptTestCase.php @@ -20,10 +20,15 @@ class PHPUnit_Extensions_PhptTestCase implements PHPUnit_Framework_Test, PHPUnit */ private $filename; + /** + * @var PHPUnit_Util_PHP + */ + private $phpUtil; + /** * @var array */ - private $settings = array( + private $settings = [ 'allow_url_fopen=1', 'auto_append_file=', 'auto_prepend_file=', @@ -45,16 +50,17 @@ class PHPUnit_Extensions_PhptTestCase implements PHPUnit_Framework_Test, PHPUnit 'safe_mode=0', 'track_errors=1', 'xdebug.default_enable=0' - ); + ]; /** * Constructs a test case with the given filename. * - * @param string $filename + * @param string $filename + * @param PHPUnit_Util_PHP $phpUtil * * @throws PHPUnit_Framework_Exception */ - public function __construct($filename) + public function __construct($filename, $phpUtil = null) { if (!is_string($filename)) { throw PHPUnit_Util_InvalidArgumentHelper::factory(1, 'string'); @@ -70,6 +76,7 @@ class PHPUnit_Extensions_PhptTestCase implements PHPUnit_Framework_Test, PHPUnit } $this->filename = $filename; + $this->phpUtil = $phpUtil ?: PHPUnit_Util_PHP::factory(); } /** @@ -82,6 +89,32 @@ class PHPUnit_Extensions_PhptTestCase implements PHPUnit_Framework_Test, PHPUnit return 1; } + /** + * @param array $sections + * @param string $output + */ + private function assertPhptExpectation(array $sections, $output) + { + $assertions = [ + 'EXPECT' => 'assertEquals', + 'EXPECTF' => 'assertStringMatchesFormat', + 'EXPECTREGEX' => 'assertRegExp', + ]; + + $actual = preg_replace('/\r\n/', "\n", trim($output)); + foreach ($assertions as $sectionName => $sectionAssertion) { + if (isset($sections[$sectionName])) { + $sectionContent = preg_replace('/\r\n/', "\n", trim($sections[$sectionName])); + $assertion = $sectionAssertion; + $expected = $sectionName == 'EXPECTREGEX' ? "/{$sectionContent}/" : $sectionContent; + + break; + } + } + + PHPUnit_Framework_Assert::$assertion($expected, $actual); + } + /** * Runs a test and collects its result in a TestResult instance. * @@ -98,7 +131,6 @@ class PHPUnit_Extensions_PhptTestCase implements PHPUnit_Framework_Test, PHPUnit $result = new PHPUnit_Framework_TestResult; } - $php = PHPUnit_Util_PHP::factory(); $skip = false; $time = 0; $settings = $this->settings; @@ -109,8 +141,11 @@ class PHPUnit_Extensions_PhptTestCase implements PHPUnit_Framework_Test, PHPUnit $settings = array_merge($settings, $this->parseIniSection($sections['INI'])); } + // Redirects STDERR to STDOUT + $this->phpUtil->setUseStderrRedirection(true); + if (isset($sections['SKIPIF'])) { - $jobResult = $php->runJob($sections['SKIPIF'], $settings); + $jobResult = $this->phpUtil->runJob($sections['SKIPIF'], $settings); if (!strncasecmp('skip', ltrim($jobResult['stdout']), 4)) { if (preg_match('/^\s*skip\s*(.+)\s*/i', $jobResult['stdout'], $message)) { @@ -127,22 +162,12 @@ class PHPUnit_Extensions_PhptTestCase implements PHPUnit_Framework_Test, PHPUnit if (!$skip) { PHP_Timer::start(); - $jobResult = $php->runJob($code, $settings); + + $jobResult = $this->phpUtil->runJob($code, $settings); $time = PHP_Timer::stop(); - if (isset($sections['EXPECT'])) { - $assertion = 'assertEquals'; - $expected = $sections['EXPECT']; - } else { - $assertion = 'assertStringMatchesFormat'; - $expected = $sections['EXPECTF']; - } - - $output = preg_replace('/\r\n/', "\n", trim($jobResult['stdout'])); - $expected = preg_replace('/\r\n/', "\n", trim($expected)); - try { - PHPUnit_Framework_Assert::$assertion($expected, $output); + $this->assertPhptExpectation($sections, $jobResult['stdout']); } catch (PHPUnit_Framework_AssertionFailedError $e) { $result->addFailure($this, $e, $time); } catch (Throwable $t) { @@ -150,6 +175,12 @@ class PHPUnit_Extensions_PhptTestCase implements PHPUnit_Framework_Test, PHPUnit } catch (Exception $e) { $result->addError($this, $e, $time); } + + if (isset($sections['CLEAN'])) { + $cleanCode = $this->render($sections['CLEAN']); + + $this->phpUtil->runJob($cleanCode, $this->settings); + } } $result->endTest($this, $time); @@ -184,13 +215,14 @@ class PHPUnit_Extensions_PhptTestCase implements PHPUnit_Framework_Test, PHPUnit */ private function parse() { - $sections = array(); + $sections = []; $section = ''; foreach (file($this->filename) as $line) { if (preg_match('/^--([_A-Z]+)--/', $line, $result)) { $section = $result[1]; $sections[$section] = ''; + continue; } elseif (empty($section)) { throw new PHPUnit_Framework_Exception('Invalid PHPT file'); @@ -200,7 +232,7 @@ class PHPUnit_Extensions_PhptTestCase implements PHPUnit_Framework_Test, PHPUnit } if (!isset($sections['FILE']) || - (!isset($sections['EXPECT']) && !isset($sections['EXPECTF']))) { + (!isset($sections['EXPECT']) && !isset($sections['EXPECTF']) && !isset($sections['EXPECTREGEX']))) { throw new PHPUnit_Framework_Exception('Invalid PHPT file'); } @@ -215,14 +247,14 @@ class PHPUnit_Extensions_PhptTestCase implements PHPUnit_Framework_Test, PHPUnit private function render($code) { return str_replace( - array( - '__DIR__', - '__FILE__' - ), - array( - "'" . dirname($this->filename) . "'", - "'" . $this->filename . "'" - ), + [ + '__DIR__', + '__FILE__' + ], + [ + "'" . dirname($this->filename) . "'", + "'" . $this->filename . "'" + ], $code ); } diff --git a/vendor/phpunit/phpunit/src/Extensions/TicketListener.php b/vendor/phpunit/phpunit/src/Extensions/TicketListener.php index e282f8b..4d700c0 100644 --- a/vendor/phpunit/phpunit/src/Extensions/TicketListener.php +++ b/vendor/phpunit/phpunit/src/Extensions/TicketListener.php @@ -18,7 +18,7 @@ abstract class PHPUnit_Extensions_TicketListener implements PHPUnit_Framework_Te /** * @var array */ - protected $ticketCounts = array(); + protected $ticketCounts = []; /** * @var bool @@ -113,7 +113,7 @@ abstract class PHPUnit_Extensions_TicketListener implements PHPUnit_Framework_Te */ public function startTest(PHPUnit_Framework_Test $test) { - if (!$test instanceof PHPUnit_Framework_Warning) { + if (!$test instanceof PHPUnit_Framework_WarningTestCase) { if ($this->ran) { return; } @@ -137,15 +137,15 @@ abstract class PHPUnit_Extensions_TicketListener implements PHPUnit_Framework_Te */ public function endTest(PHPUnit_Framework_Test $test, $time) { - if (!$test instanceof PHPUnit_Framework_Warning) { + if (!$test instanceof PHPUnit_Framework_WarningTestCase) { if ($test->getStatus() == PHPUnit_Runner_BaseTestRunner::STATUS_PASSED) { - $ifStatus = array('assigned', 'new', 'reopened'); + $ifStatus = ['assigned', 'new', 'reopened']; $newStatus = 'closed'; $message = 'Automatically closed by PHPUnit (test passed).'; $resolution = 'fixed'; $cumulative = true; } elseif ($test->getStatus() == PHPUnit_Runner_BaseTestRunner::STATUS_FAILURE) { - $ifStatus = array('closed'); + $ifStatus = ['closed']; $newStatus = 'reopened'; $message = 'Automatically reopened by PHPUnit (test failed).'; $resolution = ''; diff --git a/vendor/phpunit/phpunit/src/Framework/Assert.php b/vendor/phpunit/phpunit/src/Framework/Assert.php index 1e1125d..892ff0a 100644 --- a/vendor/phpunit/phpunit/src/Framework/Assert.php +++ b/vendor/phpunit/phpunit/src/Framework/Assert.php @@ -1013,6 +1013,39 @@ abstract class PHPUnit_Framework_Assert self::assertThat($actual, self::isNull(), $message); } + /** + * Asserts that a variable is finite. + * + * @param mixed $actual + * @param string $message + */ + public static function assertFinite($actual, $message = '') + { + self::assertThat($actual, self::isFinite(), $message); + } + + /** + * Asserts that a variable is infinite. + * + * @param mixed $actual + * @param string $message + */ + public static function assertInfinite($actual, $message = '') + { + self::assertThat($actual, self::isInfinite(), $message); + } + + /** + * Asserts that a variable is nan. + * + * @param mixed $actual + * @param string $message + */ + public static function assertNan($actual, $message = '') + { + self::assertThat($actual, self::isNan(), $message); + } + /** * Asserts that a class has a specified attribute. * @@ -1931,314 +1964,6 @@ abstract class PHPUnit_Framework_Assert } } - /** - * Assert the presence, absence, or count of elements in a document matching - * the CSS $selector, regardless of the contents of those elements. - * - * The first argument, $selector, is the CSS selector used to match - * the elements in the $actual document. - * - * The second argument, $count, can be either boolean or numeric. - * When boolean, it asserts for presence of elements matching the selector - * (true) or absence of elements (false). - * When numeric, it asserts the count of elements. - * - * assertSelectCount("#binder", true, $xml); // any? - * assertSelectCount(".binder", 3, $xml); // exactly 3? - * - * @param array $selector - * @param int|bool|array $count - * @param mixed $actual - * @param string $message - * @param bool $isHtml - * - * @since Method available since Release 3.3.0 - * @deprecated - * @codeCoverageIgnore - */ - public static function assertSelectCount($selector, $count, $actual, $message = '', $isHtml = true) - { - trigger_error(__METHOD__ . ' is deprecated', E_USER_DEPRECATED); - - self::assertSelectEquals( - $selector, - true, - $count, - $actual, - $message, - $isHtml - ); - } - - /** - * assertSelectRegExp("#binder .name", "/Mike|Derek/", true, $xml); // any? - * assertSelectRegExp("#binder .name", "/Mike|Derek/", 3, $xml); // 3? - * - * @param array $selector - * @param string $pattern - * @param int|bool|array $count - * @param mixed $actual - * @param string $message - * @param bool $isHtml - * - * @since Method available since Release 3.3.0 - * @deprecated - * @codeCoverageIgnore - */ - public static function assertSelectRegExp($selector, $pattern, $count, $actual, $message = '', $isHtml = true) - { - trigger_error(__METHOD__ . ' is deprecated', E_USER_DEPRECATED); - - self::assertSelectEquals( - $selector, - "regexp:$pattern", - $count, - $actual, - $message, - $isHtml - ); - } - - /** - * assertSelectEquals("#binder .name", "Chuck", true, $xml); // any? - * assertSelectEquals("#binder .name", "Chuck", false, $xml); // none? - * - * @param array $selector - * @param string $content - * @param int|bool|array $count - * @param mixed $actual - * @param string $message - * @param bool $isHtml - * - * @since Method available since Release 3.3.0 - * @deprecated - * @codeCoverageIgnore - */ - public static function assertSelectEquals($selector, $content, $count, $actual, $message = '', $isHtml = true) - { - trigger_error(__METHOD__ . ' is deprecated', E_USER_DEPRECATED); - - $tags = PHPUnit_Util_XML::cssSelect( - $selector, - $content, - $actual, - $isHtml - ); - - // assert specific number of elements - if (is_numeric($count)) { - $counted = $tags ? count($tags) : 0; - self::assertEquals($count, $counted, $message); - } // assert any elements exist if true, assert no elements exist if false - elseif (is_bool($count)) { - $any = count($tags) > 0 && $tags[0] instanceof DOMNode; - - if ($count) { - self::assertTrue($any, $message); - } else { - self::assertFalse($any, $message); - } - } // check for range number of elements - elseif (is_array($count) && - (isset($count['>']) || isset($count['<']) || - isset($count['>=']) || isset($count['<=']))) { - $counted = $tags ? count($tags) : 0; - - if (isset($count['>'])) { - self::assertTrue($counted > $count['>'], $message); - } - - if (isset($count['>='])) { - self::assertTrue($counted >= $count['>='], $message); - } - - if (isset($count['<'])) { - self::assertTrue($counted < $count['<'], $message); - } - - if (isset($count['<='])) { - self::assertTrue($counted <= $count['<='], $message); - } - } else { - throw new PHPUnit_Framework_Exception; - } - } - - /** - * Evaluate an HTML or XML string and assert its structure and/or contents. - * - * The first argument ($matcher) is an associative array that specifies the - * match criteria for the assertion: - * - * - `id` : the node with the given id attribute must match the - * corresponding value. - * - `tag` : the node type must match the corresponding value. - * - `attributes` : a hash. The node's attributes must match the - * corresponding values in the hash. - * - `content` : The text content must match the given value. - * - `parent` : a hash. The node's parent must match the - * corresponding hash. - * - `child` : a hash. At least one of the node's immediate children - * must meet the criteria described by the hash. - * - `ancestor` : a hash. At least one of the node's ancestors must - * meet the criteria described by the hash. - * - `descendant` : a hash. At least one of the node's descendants must - * meet the criteria described by the hash. - * - `children` : a hash, for counting children of a node. - * Accepts the keys: - * - `count` : a number which must equal the number of children - * that match - * - `less_than` : the number of matching children must be greater - * than this number - * - `greater_than` : the number of matching children must be less than - * this number - * - `only` : another hash consisting of the keys to use to match - * on the children, and only matching children will be - * counted - * - * - * // Matcher that asserts that there is an element with an id="my_id". - * $matcher = array('id' => 'my_id'); - * - * // Matcher that asserts that there is a "span" tag. - * $matcher = array('tag' => 'span'); - * - * // Matcher that asserts that there is a "span" tag with the content - * // "Hello World". - * $matcher = array('tag' => 'span', 'content' => 'Hello World'); - * - * // Matcher that asserts that there is a "span" tag with content matching - * // the regular expression pattern. - * $matcher = array('tag' => 'span', 'content' => 'regexp:/Try P(HP|ython)/'); - * - * // Matcher that asserts that there is a "span" with an "list" class - * // attribute. - * $matcher = array( - * 'tag' => 'span', - * 'attributes' => array('class' => 'list') - * ); - * - * // Matcher that asserts that there is a "span" inside of a "div". - * $matcher = array( - * 'tag' => 'span', - * 'parent' => array('tag' => 'div') - * ); - * - * // Matcher that asserts that there is a "span" somewhere inside a - * // "table". - * $matcher = array( - * 'tag' => 'span', - * 'ancestor' => array('tag' => 'table') - * ); - * - * // Matcher that asserts that there is a "span" with at least one "em" - * // child. - * $matcher = array( - * 'tag' => 'span', - * 'child' => array('tag' => 'em') - * ); - * - * // Matcher that asserts that there is a "span" containing a (possibly - * // nested) "strong" tag. - * $matcher = array( - * 'tag' => 'span', - * 'descendant' => array('tag' => 'strong') - * ); - * - * // Matcher that asserts that there is a "span" containing 5-10 "em" tags - * // as immediate children. - * $matcher = array( - * 'tag' => 'span', - * 'children' => array( - * 'less_than' => 11, - * 'greater_than' => 4, - * 'only' => array('tag' => 'em') - * ) - * ); - * - * // Matcher that asserts that there is a "div", with an "ul" ancestor and - * // a "li" parent (with class="enum"), and containing a "span" descendant - * // that contains an element with id="my_test" and the text "Hello World". - * $matcher = array( - * 'tag' => 'div', - * 'ancestor' => array('tag' => 'ul'), - * 'parent' => array( - * 'tag' => 'li', - * 'attributes' => array('class' => 'enum') - * ), - * 'descendant' => array( - * 'tag' => 'span', - * 'child' => array( - * 'id' => 'my_test', - * 'content' => 'Hello World' - * ) - * ) - * ); - * - * // Use assertTag() to apply a $matcher to a piece of $html. - * $this->assertTag($matcher, $html); - * - * // Use assertTag() to apply a $matcher to a piece of $xml. - * $this->assertTag($matcher, $xml, '', false); - * - * - * The second argument ($actual) is a string containing either HTML or - * XML text to be tested. - * - * The third argument ($message) is an optional message that will be - * used if the assertion fails. - * - * The fourth argument ($html) is an optional flag specifying whether - * to load the $actual string into a DOMDocument using the HTML or - * XML load strategy. It is true by default, which assumes the HTML - * load strategy. In many cases, this will be acceptable for XML as well. - * - * @param array $matcher - * @param string $actual - * @param string $message - * @param bool $isHtml - * - * @since Method available since Release 3.3.0 - * @deprecated - * @codeCoverageIgnore - */ - public static function assertTag($matcher, $actual, $message = '', $isHtml = true) - { - trigger_error(__METHOD__ . ' is deprecated', E_USER_DEPRECATED); - - $dom = PHPUnit_Util_XML::load($actual, $isHtml); - $tags = PHPUnit_Util_XML::findNodes($dom, $matcher, $isHtml); - $matched = count($tags) > 0 && $tags[0] instanceof DOMNode; - - self::assertTrue($matched, $message); - } - - /** - * This assertion is the exact opposite of assertTag(). - * - * Rather than asserting that $matcher results in a match, it asserts that - * $matcher does not match. - * - * @param array $matcher - * @param string $actual - * @param string $message - * @param bool $isHtml - * - * @since Method available since Release 3.3.0 - * @deprecated - * @codeCoverageIgnore - */ - public static function assertNotTag($matcher, $actual, $message = '', $isHtml = true) - { - trigger_error(__METHOD__ . ' is deprecated', E_USER_DEPRECATED); - - $dom = PHPUnit_Util_XML::load($actual, $isHtml); - $tags = PHPUnit_Util_XML::findNodes($dom, $matcher, $isHtml); - $matched = count($tags) > 0 && $tags[0] instanceof DOMNode; - - self::assertFalse($matched, $message); - } - /** * Evaluates a PHPUnit_Framework_Constraint matcher object. * @@ -2549,6 +2274,42 @@ abstract class PHPUnit_Framework_Assert return new PHPUnit_Framework_Constraint_IsNull; } + /** + * Returns a PHPUnit_Framework_Constraint_IsFinite matcher object. + * + * @return PHPUnit_Framework_Constraint_IsFinite + * + * @since Method available since Release 5.0.0 + */ + public static function isFinite() + { + return new PHPUnit_Framework_Constraint_IsFinite; + } + + /** + * Returns a PHPUnit_Framework_Constraint_IsInfinite matcher object. + * + * @return PHPUnit_Framework_Constraint_IsInfinite + * + * @since Method available since Release 5.0.0 + */ + public static function isInfinite() + { + return new PHPUnit_Framework_Constraint_IsInfinite; + } + + /** + * Returns a PHPUnit_Framework_Constraint_IsNan matcher object. + * + * @return PHPUnit_Framework_Constraint_IsNan + * + * @since Method available since Release 5.0.0 + */ + public static function isNan() + { + return new PHPUnit_Framework_Constraint_IsNan; + } + /** * Returns a PHPUnit_Framework_Constraint_Attribute matcher object. * diff --git a/vendor/phpunit/phpunit/src/Framework/Assert/Functions.php b/vendor/phpunit/phpunit/src/Framework/Assert/Functions.php index d19b574..4cf6f20 100644 --- a/vendor/phpunit/phpunit/src/Framework/Assert/Functions.php +++ b/vendor/phpunit/phpunit/src/Framework/Assert/Functions.php @@ -852,7 +852,7 @@ function assertInternalType($expected, $actual, $message = '') * @param string $actualJson * @param string $message * - * @since Method available since Release 3.7.20 + * @since Method available since Release 3.7.20 */ function assertJson($actualJson, $message = '') { @@ -986,6 +986,48 @@ function assertLessThanOrEqual($expected, $actual, $message = '') ); } +/** + * Asserts that a variable is finite. + * + * @param mixed $actual + * @param string $message + */ +function assertFinite($actual, $message = '') +{ + return call_user_func_array( + 'PHPUnit_Framework_Assert::assertFinite', + func_get_args() + ); +} + +/** + * Asserts that a variable is infinite. + * + * @param mixed $actual + * @param string $message + */ +function assertInfinite($actual, $message = '') +{ + return call_user_func_array( + 'PHPUnit_Framework_Assert::assertInfinite', + func_get_args() + ); +} + +/** + * Asserts that a variable is nan. + * + * @param mixed $actual + * @param string $message + */ +function assertNan($actual, $message = '') +{ + return call_user_func_array( + 'PHPUnit_Framework_Assert::assertNan', + func_get_args() + ); +} + /** * Asserts that a haystack does not contain a needle. * @@ -1190,27 +1232,6 @@ function assertNotSameSize($expected, $actual, $message = '') ); } -/** - * This assertion is the exact opposite of assertTag(). - * - * Rather than asserting that $matcher results in a match, it asserts that - * $matcher does not match. - * - * @param array $matcher - * @param string $actual - * @param string $message - * @param bool $isHtml - * - * @since Method available since Release 3.3.0 - */ -function assertNotTag($matcher, $actual, $message = '', $isHtml = true) -{ - return call_user_func_array( - 'PHPUnit_Framework_Assert::assertNotTag', - func_get_args() - ); -} - /** * Asserts that a variable is null. * @@ -1307,79 +1328,6 @@ function assertSameSize($expected, $actual, $message = '') ); } -/** - * Assert the presence, absence, or count of elements in a document matching - * the CSS $selector, regardless of the contents of those elements. - * - * The first argument, $selector, is the CSS selector used to match - * the elements in the $actual document. - * - * The second argument, $count, can be either boolean or numeric. - * When boolean, it asserts for presence of elements matching the selector - * (true) or absence of elements (false). - * When numeric, it asserts the count of elements. - * - * assertSelectCount("#binder", true, $xml); // any? - * assertSelectCount(".binder", 3, $xml); // exactly 3? - * - * @param array $selector - * @param int $count - * @param mixed $actual - * @param string $message - * @param bool $isHtml - * - * @since Method available since Release 3.3.0 - */ -function assertSelectCount($selector, $count, $actual, $message = '', $isHtml = true) -{ - return call_user_func_array( - 'PHPUnit_Framework_Assert::assertSelectCount', - func_get_args() - ); -} - -/** - * assertSelectEquals("#binder .name", "Chuck", true, $xml); // any? - * assertSelectEquals("#binder .name", "Chuck", false, $xml); // none? - * - * @param array $selector - * @param string $content - * @param int $count - * @param mixed $actual - * @param string $message - * @param bool $isHtml - * - * @since Method available since Release 3.3.0 - */ -function assertSelectEquals($selector, $content, $count, $actual, $message = '', $isHtml = true) -{ - return call_user_func_array( - 'PHPUnit_Framework_Assert::assertSelectEquals', - func_get_args() - ); -} - -/** - * assertSelectRegExp("#binder .name", "/Mike|Derek/", true, $xml); // any? - * assertSelectRegExp("#binder .name", "/Mike|Derek/", 3, $xml);// 3? - * - * @param array $selector - * @param string $pattern - * @param int $count - * @param mixed $actual - * @param string $message - * @param bool $isHtml - * - * @since Method available since Release 3.3.0 - */ -function assertSelectRegExp($selector, $pattern, $count, $actual, $message = '', $isHtml = true) -{ - return call_user_func_array( - 'PHPUnit_Framework_Assert::assertSelectRegExp', - func_get_args() - ); -} - /** * Asserts that a string ends not with a given prefix. * @@ -1556,150 +1504,6 @@ function assertStringStartsWith($prefix, $string, $message = '') ); } -/** - * Evaluate an HTML or XML string and assert its structure and/or contents. - * - * The first argument ($matcher) is an associative array that specifies the - * match criteria for the assertion: - * - * - `id` : the node with the given id attribute must match the - * corresponding value. - * - `tag` : the node type must match the corresponding value. - * - `attributes` : a hash. The node's attributes must match the - * corresponding values in the hash. - * - `content` : The text content must match the given value. - * - `parent` : a hash. The node's parent must match the - * corresponding hash. - * - `child`: a hash. At least one of the node's immediate children - * must meet the criteria described by the hash. - * - `ancestor` : a hash. At least one of the node's ancestors must - * meet the criteria described by the hash. - * - `descendant` : a hash. At least one of the node's descendants must - * meet the criteria described by the hash. - * - `children` : a hash, for counting children of a node. - * Accepts the keys: - *- `count`: a number which must equal the number of children - * that match - *- `less_than`: the number of matching children must be greater - * than this number - *- `greater_than` : the number of matching children must be less than - * this number - *- `only` : another hash consisting of the keys to use to match - * on the children, and only matching children will be - * counted - * - * - * // Matcher that asserts that there is an element with an id="my_id". - * $matcher = array('id' => 'my_id'); - * - * // Matcher that asserts that there is a "span" tag. - * $matcher = array('tag' => 'span'); - * - * // Matcher that asserts that there is a "span" tag with the content - * // "Hello World". - * $matcher = array('tag' => 'span', 'content' => 'Hello World'); - * - * // Matcher that asserts that there is a "span" tag with content matching - * // the regular expression pattern. - * $matcher = array('tag' => 'span', 'content' => 'regexp:/Try P(HP|ython)/'); - * - * // Matcher that asserts that there is a "span" with an "list" class - * // attribute. - * $matcher = array( - * 'tag'=> 'span', - * 'attributes' => array('class' => 'list') - * ); - * - * // Matcher that asserts that there is a "span" inside of a "div". - * $matcher = array( - * 'tag'=> 'span', - * 'parent' => array('tag' => 'div') - * ); - * - * // Matcher that asserts that there is a "span" somewhere inside a - * // "table". - * $matcher = array( - * 'tag' => 'span', - * 'ancestor' => array('tag' => 'table') - * ); - * - * // Matcher that asserts that there is a "span" with at least one "em" - * // child. - * $matcher = array( - * 'tag' => 'span', - * 'child' => array('tag' => 'em') - * ); - * - * // Matcher that asserts that there is a "span" containing a (possibly - * // nested) "strong" tag. - * $matcher = array( - * 'tag'=> 'span', - * 'descendant' => array('tag' => 'strong') - * ); - * - * // Matcher that asserts that there is a "span" containing 5-10 "em" tags - * // as immediate children. - * $matcher = array( - * 'tag' => 'span', - * 'children' => array( - * 'less_than'=> 11, - * 'greater_than' => 4, - * 'only' => array('tag' => 'em') - * ) - * ); - * - * // Matcher that asserts that there is a "div", with an "ul" ancestor and - * // a "li" parent (with class="enum"), and containing a "span" descendant - * // that contains an element with id="my_test" and the text "Hello World". - * $matcher = array( - * 'tag'=> 'div', - * 'ancestor' => array('tag' => 'ul'), - * 'parent' => array( - * 'tag'=> 'li', - * 'attributes' => array('class' => 'enum') - * ), - * 'descendant' => array( - * 'tag' => 'span', - * 'child' => array( - * 'id' => 'my_test', - * 'content' => 'Hello World' - * ) - * ) - * ); - * - * // Use assertTag() to apply a $matcher to a piece of $html. - * $this->assertTag($matcher, $html); - * - * // Use assertTag() to apply a $matcher to a piece of $xml. - * $this->assertTag($matcher, $xml, '', false); - * - * - * The second argument ($actual) is a string containing either HTML or - * XML text to be tested. - * - * The third argument ($message) is an optional message that will be - * used if the assertion fails. - * - * The fourth argument ($html) is an optional flag specifying whether - * to load the $actual string into a DOMDocument using the HTML or - * XML load strategy. It is true by default, which assumes the HTML - * load strategy. In many cases, this will be acceptable for XML as well. - * - * @param array $matcher - * @param string $actual - * @param string $message - * @param bool $isHtml - * - * @since Method available since Release 3.3.0 - */ -function assertTag($matcher, $actual, $message = '', $isHtml = true) -{ - return call_user_func_array( - 'PHPUnit_Framework_Assert::assertTag', - func_get_args() - ); -} - /** * Evaluates a PHPUnit_Framework_Constraint matcher object. * diff --git a/vendor/phpunit/phpunit/src/Framework/BaseTestListener.php b/vendor/phpunit/phpunit/src/Framework/BaseTestListener.php index c6e5d77..b98e14f 100644 --- a/vendor/phpunit/phpunit/src/Framework/BaseTestListener.php +++ b/vendor/phpunit/phpunit/src/Framework/BaseTestListener.php @@ -21,6 +21,10 @@ abstract class PHPUnit_Framework_BaseTestListener implements PHPUnit_Framework_T { } + public function addWarning(PHPUnit_Framework_Test $test, PHPUnit_Framework_Warning $e, $time) + { + } + public function addFailure(PHPUnit_Framework_Test $test, PHPUnit_Framework_AssertionFailedError $e, $time) { } diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/And.php b/vendor/phpunit/phpunit/src/Framework/Constraint/And.php index e4fa32f..6d87df9 100644 --- a/vendor/phpunit/phpunit/src/Framework/Constraint/And.php +++ b/vendor/phpunit/phpunit/src/Framework/Constraint/And.php @@ -18,7 +18,7 @@ class PHPUnit_Framework_Constraint_And extends PHPUnit_Framework_Constraint /** * @var PHPUnit_Framework_Constraint[] */ - protected $constraints = array(); + protected $constraints = []; /** * @var PHPUnit_Framework_Constraint @@ -32,7 +32,7 @@ class PHPUnit_Framework_Constraint_And extends PHPUnit_Framework_Constraint */ public function setConstraints(array $constraints) { - $this->constraints = array(); + $this->constraints = []; foreach ($constraints as $constraint) { if (!($constraint instanceof PHPUnit_Framework_Constraint)) { diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/Exception.php b/vendor/phpunit/phpunit/src/Framework/Constraint/Exception.php index c05f172..0bed958 100644 --- a/vendor/phpunit/phpunit/src/Framework/Constraint/Exception.php +++ b/vendor/phpunit/phpunit/src/Framework/Constraint/Exception.php @@ -54,9 +54,9 @@ class PHPUnit_Framework_Constraint_Exception extends PHPUnit_Framework_Constrain { if ($other !== null) { $message = ''; - if ($other instanceof Exception) { + if ($other instanceof Exception || $other instanceof Throwable) { $message = '. Message was: "' . $other->getMessage() . '" at' - . "\n" . $other->getTraceAsString(); + . "\n" . PHPUnit_Util_Filter::getFilteredStacktrace($other); } return sprintf( diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/IsJson.php b/vendor/phpunit/phpunit/src/Framework/Constraint/IsJson.php index f6951ba..db85f1d 100644 --- a/vendor/phpunit/phpunit/src/Framework/Constraint/IsJson.php +++ b/vendor/phpunit/phpunit/src/Framework/Constraint/IsJson.php @@ -25,6 +25,10 @@ class PHPUnit_Framework_Constraint_IsJson extends PHPUnit_Framework_Constraint */ protected function matches($other) { + if ($other === '') { + return false; + } + json_decode($other); if (json_last_error()) { return false; @@ -45,6 +49,10 @@ class PHPUnit_Framework_Constraint_IsJson extends PHPUnit_Framework_Constraint */ protected function failureDescription($other) { + if ($other === '') { + return 'an empty string is valid JSON'; + } + json_decode($other); $error = PHPUnit_Framework_Constraint_JsonMatches_ErrorMessageProvider::determineJsonError( json_last_error() diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/IsType.php b/vendor/phpunit/phpunit/src/Framework/Constraint/IsType.php index 7f0499b..974328e 100644 --- a/vendor/phpunit/phpunit/src/Framework/Constraint/IsType.php +++ b/vendor/phpunit/phpunit/src/Framework/Constraint/IsType.php @@ -33,7 +33,7 @@ class PHPUnit_Framework_Constraint_IsType extends PHPUnit_Framework_Constraint /** * @var array */ - protected $types = array( + protected $types = [ 'array' => true, 'boolean' => true, 'bool' => true, @@ -49,7 +49,7 @@ class PHPUnit_Framework_Constraint_IsType extends PHPUnit_Framework_Constraint 'string' => true, 'scalar' => true, 'callable' => true - ); + ]; /** * @var string diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/Not.php b/vendor/phpunit/phpunit/src/Framework/Constraint/Not.php index 72e2548..953292f 100644 --- a/vendor/phpunit/phpunit/src/Framework/Constraint/Not.php +++ b/vendor/phpunit/phpunit/src/Framework/Constraint/Not.php @@ -42,7 +42,7 @@ class PHPUnit_Framework_Constraint_Not extends PHPUnit_Framework_Constraint public static function negate($string) { return str_replace( - array( + [ 'contains ', 'exists', 'has ', @@ -53,8 +53,8 @@ class PHPUnit_Framework_Constraint_Not extends PHPUnit_Framework_Constraint 'ends with ', 'reference ', 'not not ' - ), - array( + ], + [ 'does not contain ', 'does not exist', 'does not have ', @@ -65,7 +65,7 @@ class PHPUnit_Framework_Constraint_Not extends PHPUnit_Framework_Constraint 'ends not with ', 'don\'t reference ', 'not ' - ), + ], $string ); } diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/Or.php b/vendor/phpunit/phpunit/src/Framework/Constraint/Or.php index b261456..5c81887 100644 --- a/vendor/phpunit/phpunit/src/Framework/Constraint/Or.php +++ b/vendor/phpunit/phpunit/src/Framework/Constraint/Or.php @@ -18,14 +18,14 @@ class PHPUnit_Framework_Constraint_Or extends PHPUnit_Framework_Constraint /** * @var PHPUnit_Framework_Constraint[] */ - protected $constraints = array(); + protected $constraints = []; /** * @param PHPUnit_Framework_Constraint[] $constraints */ public function setConstraints(array $constraints) { - $this->constraints = array(); + $this->constraints = []; foreach ($constraints as $constraint) { if (!($constraint instanceof PHPUnit_Framework_Constraint)) { diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/StringMatches.php b/vendor/phpunit/phpunit/src/Framework/Constraint/StringMatches.php index af42fc1..53fb977 100644 --- a/vendor/phpunit/phpunit/src/Framework/Constraint/StringMatches.php +++ b/vendor/phpunit/phpunit/src/Framework/Constraint/StringMatches.php @@ -67,7 +67,7 @@ class PHPUnit_Framework_Constraint_StringMatches extends PHPUnit_Framework_Const protected function createPatternFromFormat($string) { $string = str_replace( - array( + [ '%e', '%s', '%S', @@ -79,8 +79,8 @@ class PHPUnit_Framework_Constraint_StringMatches extends PHPUnit_Framework_Const '%x', '%f', '%c' - ), - array( + ], + [ '\\' . DIRECTORY_SEPARATOR, '[^\r\n]+', '[^\r\n]*', @@ -92,7 +92,7 @@ class PHPUnit_Framework_Constraint_StringMatches extends PHPUnit_Framework_Const '[0-9a-fA-F]+', '[+-]?\.?\d+\.?\d*(?:[Ee][+-]?\d+)?', '.' - ), + ], preg_quote($string, '/') ); diff --git a/vendor/phpunit/phpunit/src/Framework/Constraint/Xor.php b/vendor/phpunit/phpunit/src/Framework/Constraint/Xor.php index 79ecbfd..eb0ce26 100644 --- a/vendor/phpunit/phpunit/src/Framework/Constraint/Xor.php +++ b/vendor/phpunit/phpunit/src/Framework/Constraint/Xor.php @@ -18,14 +18,14 @@ class PHPUnit_Framework_Constraint_Xor extends PHPUnit_Framework_Constraint /** * @var PHPUnit_Framework_Constraint[] */ - protected $constraints = array(); + protected $constraints = []; /** * @param PHPUnit_Framework_Constraint[] $constraints */ public function setConstraints(array $constraints) { - $this->constraints = array(); + $this->constraints = []; foreach ($constraints as $constraint) { if (!($constraint instanceof PHPUnit_Framework_Constraint)) { diff --git a/vendor/phpunit/phpunit/src/Framework/SyntheticError.php b/vendor/phpunit/phpunit/src/Framework/SyntheticError.php index 235b046..7d6d7b4 100644 --- a/vendor/phpunit/phpunit/src/Framework/SyntheticError.php +++ b/vendor/phpunit/phpunit/src/Framework/SyntheticError.php @@ -34,7 +34,7 @@ class PHPUnit_Framework_SyntheticError extends PHPUnit_Framework_AssertionFailed * * @var array */ - protected $syntheticTrace = array(); + protected $syntheticTrace = []; /** * Constructor. diff --git a/vendor/phpunit/phpunit/src/Framework/TestCase.php b/vendor/phpunit/phpunit/src/Framework/TestCase.php index 6ee5fae..dbc621e 100644 --- a/vendor/phpunit/phpunit/src/Framework/TestCase.php +++ b/vendor/phpunit/phpunit/src/Framework/TestCase.php @@ -15,6 +15,7 @@ use SebastianBergmann\Diff\Differ; use SebastianBergmann\Exporter\Exporter; use Prophecy\Exception\Prediction\PredictionException; use Prophecy\Prophet; +use DeepCopy\DeepCopy; /** * A TestCase defines the fixture to run multiple tests. @@ -76,7 +77,7 @@ abstract class PHPUnit_Framework_TestCase extends PHPUnit_Framework_Assert imple /** * @var array */ - protected $backupGlobalsBlacklist = array(); + protected $backupGlobalsBlacklist = []; /** * Enable or disable the backup and restoration of static attributes. @@ -90,7 +91,7 @@ abstract class PHPUnit_Framework_TestCase extends PHPUnit_Framework_Assert imple /** * @var array */ - protected $backupStaticAttributesBlacklist = array(); + protected $backupStaticAttributesBlacklist = []; /** * Whether or not this test is to be run in a separate PHP process. @@ -117,7 +118,7 @@ abstract class PHPUnit_Framework_TestCase extends PHPUnit_Framework_Assert imple /** * @var array */ - private $data = array(); + private $data = []; /** * @var string @@ -153,7 +154,7 @@ abstract class PHPUnit_Framework_TestCase extends PHPUnit_Framework_Assert imple /** * The code of the expected Exception. * - * @var int + * @var int|string */ private $expectedExceptionCode; @@ -167,27 +168,27 @@ abstract class PHPUnit_Framework_TestCase extends PHPUnit_Framework_Assert imple /** * @var array */ - private $dependencies = array(); + private $dependencies = []; /** * @var array */ - private $dependencyInput = array(); + private $dependencyInput = []; /** * @var array */ - private $iniSettings = array(); + private $iniSettings = []; /** * @var array */ - private $locale = array(); + private $locale = []; /** * @var array */ - private $mockObjects = array(); + private $mockObjects = []; /** * @var array @@ -262,7 +263,7 @@ abstract class PHPUnit_Framework_TestCase extends PHPUnit_Framework_Assert imple /** * @var bool */ - private $disallowChangesToGlobalState = false; + private $beStrictAboutChangesToGlobalState = false; /** * Constructs a test case with the given name. @@ -271,7 +272,7 @@ abstract class PHPUnit_Framework_TestCase extends PHPUnit_Framework_Assert imple * @param array $data * @param string $dataName */ - public function __construct($name = null, array $data = array(), $dataName = '') + public function __construct($name = null, array $data = [], $dataName = '') { if ($name !== null) { $this->setName($name); @@ -453,35 +454,111 @@ abstract class PHPUnit_Framework_TestCase extends PHPUnit_Framework_Assert imple } /** - * @param mixed $exceptionName - * @param string $exceptionMessage - * @param int $exceptionCode + * @param mixed $exception + * @param string $message + * @param int|string $code * - * @since Method available since Release 3.2.0 + * @throws PHPUnit_Framework_Exception + * + * @since Method available since Release 3.2.0 + * @deprecated Method deprecated since Release 5.2.0 */ - public function setExpectedException($exceptionName, $exceptionMessage = '', $exceptionCode = null) + public function setExpectedException($exception, $message = '', $code = null) { - $this->expectedException = $exceptionName; - $this->expectedExceptionMessage = $exceptionMessage; - $this->expectedExceptionCode = $exceptionCode; + $this->expectedException = $exception; + + if ($message !== '') { + $this->expectExceptionMessage($message); + } + + if ($code !== null) { + $this->expectExceptionCode($code); + } } /** - * @param mixed $exceptionName - * @param string $exceptionMessageRegExp - * @param int $exceptionCode + * @param mixed $exception + * @param string $messageRegExp + * @param int $code * - * @since Method available since Release 4.3.0 + * @throws PHPUnit_Framework_Exception + * + * @since Method available since Release 4.3.0 */ - public function setExpectedExceptionRegExp($exceptionName, $exceptionMessageRegExp = '', $exceptionCode = null) + public function setExpectedExceptionRegExp($exception, $messageRegExp = '', $code = null) { - $this->expectedException = $exceptionName; - $this->expectedExceptionMessageRegExp = $exceptionMessageRegExp; - $this->expectedExceptionCode = $exceptionCode; + if (!is_string($messageRegExp)) { + throw PHPUnit_Util_InvalidArgumentHelper::factory(2, 'string'); + } + + $this->expectedException = $exception; + $this->expectedExceptionMessageRegExp = $messageRegExp; + + if ($code !== null) { + $this->expectExceptionCode($code); + } } /** - * @since Method available since Release 3.4.0 + * @param mixed $exception + * + * @since Method available since Release 5.2.0 + */ + public function expectException($exception) + { + $this->expectedException = $exception; + } + + /** + * @param int|string $code + * + * @throws PHPUnit_Framework_Exception + * + * @since Method available since Release 5.2.0 + */ + public function expectExceptionCode($code) + { + if (!is_int($code) && !is_string($code)) { + throw PHPUnit_Util_InvalidArgumentHelper::factory(1, 'integer or string'); + } + + $this->expectedExceptionCode = $code; + } + + /** + * @param string $message + * + * @throws PHPUnit_Framework_Exception + * + * @since Method available since Release 5.2.0 + */ + public function expectExceptionMessage($message) + { + if (!is_string($message)) { + throw PHPUnit_Util_InvalidArgumentHelper::factory(1, 'string'); + } + + $this->expectedExceptionMessage = $message; + } + + /** + * @param string $messageRegExp + * + * @throws PHPUnit_Framework_Exception + * + * @since Method available since Release 5.2.0 + */ + public function expectExceptionMessageRegExp($messageRegExp) + { + if (!is_string($messageRegExp)) { + throw PHPUnit_Util_InvalidArgumentHelper::factory(1, 'string'); + } + + $this->expectedExceptionMessageRegExp = $messageRegExp; + } + + /** + * @since Method available since Release 3.4.0 */ protected function setExpectedExceptionFromAnnotation() { @@ -492,18 +569,16 @@ abstract class PHPUnit_Framework_TestCase extends PHPUnit_Framework_Assert imple ); if ($expectedException !== false) { - $this->setExpectedException( - $expectedException['class'], - $expectedException['message'], - $expectedException['code'] - ); + $this->expectException($expectedException['class']); - if (!empty($expectedException['message_regex'])) { - $this->setExpectedExceptionRegExp( - $expectedException['class'], - $expectedException['message_regex'], - $expectedException['code'] - ); + if ($expectedException['code'] !== null) { + $this->expectExceptionCode($expectedException['code']); + } + + if ($expectedException['message'] !== '') { + $this->expectExceptionMessage($expectedException['message']); + } elseif ($expectedException['message_regex'] !== '') { + $this->expectExceptionMessageRegExp($expectedException['message_regex']); } } } catch (ReflectionException $e) { @@ -612,7 +687,7 @@ abstract class PHPUnit_Framework_TestCase extends PHPUnit_Framework_Assert imple $result = $this->createResult(); } - if (!$this instanceof PHPUnit_Framework_Warning) { + if (!$this instanceof PHPUnit_Framework_WarningTestCase) { $this->setTestResultObject($result); $this->setUseErrorHandlerFromAnnotation(); } @@ -622,13 +697,12 @@ abstract class PHPUnit_Framework_TestCase extends PHPUnit_Framework_Assert imple $result->convertErrorsToExceptions($this->useErrorHandler); } - if (!$this instanceof PHPUnit_Framework_Warning && !$this->handleDependencies()) { + if (!$this instanceof PHPUnit_Framework_WarningTestCase && !$this->handleDependencies()) { return; } if ($this->runTestInSeparateProcess === true && $this->inIsolation !== true && - !$this instanceof PHPUnit_Extensions_SeleniumTestCase && !$this instanceof PHPUnit_Extensions_PhptTestCase) { $class = new ReflectionClass($this); @@ -652,11 +726,12 @@ abstract class PHPUnit_Framework_TestCase extends PHPUnit_Framework_Assert imple $iniSettings = ''; } - $coverage = $result->getCollectCodeCoverageInformation() ? 'true' : 'false'; - $isStrictAboutTestsThatDoNotTestAnything = $result->isStrictAboutTestsThatDoNotTestAnything() ? 'true' : 'false'; - $isStrictAboutOutputDuringTests = $result->isStrictAboutOutputDuringTests() ? 'true' : 'false'; - $isStrictAboutTestSize = $result->isStrictAboutTestSize() ? 'true' : 'false'; - $isStrictAboutTodoAnnotatedTests = $result->isStrictAboutTodoAnnotatedTests() ? 'true' : 'false'; + $coverage = $result->getCollectCodeCoverageInformation() ? 'true' : 'false'; + $isStrictAboutTestsThatDoNotTestAnything = $result->isStrictAboutTestsThatDoNotTestAnything() ? 'true' : 'false'; + $isStrictAboutOutputDuringTests = $result->isStrictAboutOutputDuringTests() ? 'true' : 'false'; + $enforcesTimeLimit = $result->enforcesTimeLimit() ? 'true' : 'false'; + $isStrictAboutTodoAnnotatedTests = $result->isStrictAboutTodoAnnotatedTests() ? 'true' : 'false'; + $isStrictAboutResourceUsageDuringSmallTests = $result->isStrictAboutResourceUsageDuringSmallTests() ? 'true' : 'false'; if (defined('PHPUNIT_COMPOSER_INSTALL')) { $composerAutoload = var_export(PHPUNIT_COMPOSER_INSTALL, true); @@ -692,28 +767,29 @@ abstract class PHPUnit_Framework_TestCase extends PHPUnit_Framework_Assert imple $configurationFilePath = (isset($GLOBALS['__PHPUNIT_CONFIGURATION_FILE']) ? $GLOBALS['__PHPUNIT_CONFIGURATION_FILE'] : ''); $template->setVar( - array( - 'composerAutoload' => $composerAutoload, - 'phar' => $phar, - 'filename' => $class->getFileName(), - 'className' => $class->getName(), - 'methodName' => $this->name, - 'collectCodeCoverageInformation' => $coverage, - 'data' => $data, - 'dataName' => $dataName, - 'dependencyInput' => $dependencyInput, - 'constants' => $constants, - 'globals' => $globals, - 'include_path' => $includePath, - 'included_files' => $includedFiles, - 'iniSettings' => $iniSettings, - 'isStrictAboutTestsThatDoNotTestAnything' => $isStrictAboutTestsThatDoNotTestAnything, - 'isStrictAboutOutputDuringTests' => $isStrictAboutOutputDuringTests, - 'isStrictAboutTestSize' => $isStrictAboutTestSize, - 'isStrictAboutTodoAnnotatedTests' => $isStrictAboutTodoAnnotatedTests, - 'codeCoverageFilter' => $codeCoverageFilter, - 'configurationFilePath' => $configurationFilePath - ) + [ + 'composerAutoload' => $composerAutoload, + 'phar' => $phar, + 'filename' => $class->getFileName(), + 'className' => $class->getName(), + 'methodName' => $this->name, + 'collectCodeCoverageInformation' => $coverage, + 'data' => $data, + 'dataName' => $dataName, + 'dependencyInput' => $dependencyInput, + 'constants' => $constants, + 'globals' => $globals, + 'include_path' => $includePath, + 'included_files' => $includedFiles, + 'iniSettings' => $iniSettings, + 'isStrictAboutTestsThatDoNotTestAnything' => $isStrictAboutTestsThatDoNotTestAnything, + 'isStrictAboutOutputDuringTests' => $isStrictAboutOutputDuringTests, + 'enforcesTimeLimit' => $enforcesTimeLimit, + 'isStrictAboutTodoAnnotatedTests' => $isStrictAboutTodoAnnotatedTests, + 'isStrictAboutResourceUsageDuringSmallTests' => $isStrictAboutResourceUsageDuringSmallTests, + 'codeCoverageFilter' => $codeCoverageFilter, + 'configurationFilePath' => $configurationFilePath + ] ); $this->prepareTemplate($template); @@ -776,6 +852,9 @@ abstract class PHPUnit_Framework_TestCase extends PHPUnit_Framework_Assert imple } catch (PHPUnit_Framework_SkippedTest $e) { $this->status = PHPUnit_Runner_BaseTestRunner::STATUS_SKIPPED; $this->statusMessage = $e->getMessage(); + } catch (PHPUnit_Framework_Warning $e) { + $this->status = PHPUnit_Runner_BaseTestRunner::STATUS_WARNING; + $this->statusMessage = $e->getMessage(); } catch (PHPUnit_Framework_AssertionFailedError $e) { $this->status = PHPUnit_Runner_BaseTestRunner::STATUS_FAILURE; $this->statusMessage = $e->getMessage(); @@ -794,7 +873,7 @@ abstract class PHPUnit_Framework_TestCase extends PHPUnit_Framework_Assert imple } // Clean up the mock objects. - $this->mockObjects = array(); + $this->mockObjects = []; $this->prophet = null; // Tear down the fixture. An exception raised in tearDown() will be @@ -842,7 +921,7 @@ abstract class PHPUnit_Framework_TestCase extends PHPUnit_Framework_Assert imple ini_set($varName, $oldValue); } - $this->iniSettings = array(); + $this->iniSettings = []; // Clean up locale settings. foreach ($this->locale as $category => $locale) { @@ -870,11 +949,6 @@ abstract class PHPUnit_Framework_TestCase extends PHPUnit_Framework_Assert imple $e = new PHPUnit_Framework_AssertionFailedError($e->getMessage()); } - if (!$e instanceof Exception) { - // Rethrow Error directly on PHP 7 as onNotSuccessfulTest does not support it - throw $e; - } - $this->onNotSuccessfulTest($e); } } @@ -902,11 +976,12 @@ abstract class PHPUnit_Framework_TestCase extends PHPUnit_Framework_Assert imple $this->fail($e->getMessage()); } + $testArguments = array_merge($this->data, $this->dependencyInput); + + $this->registerMockObjectsFromTestArguments($testArguments); + try { - $testResult = $method->invokeArgs( - $this, - array_merge($this->data, $this->dependencyInput) - ); + $testResult = $method->invokeArgs($this, $testArguments); } catch (Throwable $_e) { $e = $_e; } catch (Exception $_e) { @@ -998,7 +1073,9 @@ abstract class PHPUnit_Framework_TestCase extends PHPUnit_Framework_Assert imple $this->numAssertions++; } - $mockObject->__phpunit_verify(); + $mockObject->__phpunit_verify( + $this->shouldInvocationMockerBeReset($mockObject) + ); } if ($this->prophet !== null) { @@ -1006,7 +1083,7 @@ abstract class PHPUnit_Framework_TestCase extends PHPUnit_Framework_Assert imple $this->prophet->checkPredictions(); } catch (Throwable $t) { /* Intentionally left empty */ - } catch (Exception $e) { + } catch (Exception $t) { /* Intentionally left empty */ } @@ -1018,8 +1095,8 @@ abstract class PHPUnit_Framework_TestCase extends PHPUnit_Framework_Assert imple } } - if (isset($e)) { - throw $e; + if (isset($t)) { + throw $t; } } } @@ -1071,13 +1148,13 @@ abstract class PHPUnit_Framework_TestCase extends PHPUnit_Framework_Assert imple } /** - * @param bool $disallowChangesToGlobalState + * @param bool $beStrictAboutChangesToGlobalState * * @since Method available since Release 4.6.0 */ - public function setDisallowChangesToGlobalState($disallowChangesToGlobalState) + public function setbeStrictAboutChangesToGlobalState($beStrictAboutChangesToGlobalState) { - $this->disallowChangesToGlobalState = $disallowChangesToGlobalState; + $this->beStrictAboutChangesToGlobalState = $beStrictAboutChangesToGlobalState; } /** @@ -1280,9 +1357,9 @@ abstract class PHPUnit_Framework_TestCase extends PHPUnit_Framework_Assert imple $category = $args[0]; $locale = $args[1]; - $categories = array( + $categories = [ LC_ALL, LC_COLLATE, LC_CTYPE, LC_MONETARY, LC_NUMERIC, LC_TIME - ); + ]; if (defined('LC_MESSAGES')) { $categories[] = LC_MESSAGES; @@ -1331,7 +1408,7 @@ abstract class PHPUnit_Framework_TestCase extends PHPUnit_Framework_Assert imple * * @since Method available since Release 3.0.0 */ - public function getMock($originalClassName, $methods = array(), array $arguments = array(), $mockClassName = '', $callOriginalConstructor = true, $callOriginalClone = true, $callAutoload = true, $cloneArguments = false, $callOriginalMethods = false) + public function getMock($originalClassName, $methods = [], array $arguments = [], $mockClassName = '', $callOriginalConstructor = true, $callOriginalClone = true, $callAutoload = true, $cloneArguments = false, $callOriginalMethods = false) { $mockObject = $this->getMockObjectGenerator()->getMock( $originalClassName, @@ -1350,6 +1427,24 @@ abstract class PHPUnit_Framework_TestCase extends PHPUnit_Framework_Assert imple return $mockObject; } + /** + * Returns a mock with disabled constructor object for the specified class. + * + * @param string $originalClassName + * + * @return PHPUnit_Framework_MockObject_MockObject + * + * @throws PHPUnit_Framework_Exception + * + * @since Method available since Release 5.0.0 + */ + public function getMockWithoutInvokingTheOriginalConstructor($originalClassName) + { + return $this->getMockBuilder($originalClassName) + ->disableOriginalConstructor() + ->getMock(); + } + /** * Returns a builder object to create mock objects using a fluent interface. * @@ -1382,7 +1477,7 @@ abstract class PHPUnit_Framework_TestCase extends PHPUnit_Framework_Assert imple * * @since Method available since Release 3.5.0 */ - protected function getMockClass($originalClassName, $methods = array(), array $arguments = array(), $mockClassName = '', $callOriginalConstructor = false, $callOriginalClone = true, $callAutoload = true, $cloneArguments = false) + protected function getMockClass($originalClassName, $methods = [], array $arguments = [], $mockClassName = '', $callOriginalConstructor = false, $callOriginalClone = true, $callAutoload = true, $cloneArguments = false) { $mock = $this->getMock( $originalClassName, @@ -1418,7 +1513,7 @@ abstract class PHPUnit_Framework_TestCase extends PHPUnit_Framework_Assert imple * * @throws PHPUnit_Framework_Exception */ - public function getMockForAbstractClass($originalClassName, array $arguments = array(), $mockClassName = '', $callOriginalConstructor = true, $callOriginalClone = true, $callAutoload = true, $mockedMethods = array(), $cloneArguments = false) + public function getMockForAbstractClass($originalClassName, array $arguments = [], $mockClassName = '', $callOriginalConstructor = true, $callOriginalClone = true, $callAutoload = true, $mockedMethods = [], $cloneArguments = false) { $mockObject = $this->getMockObjectGenerator()->getMockForAbstractClass( $originalClassName, @@ -1450,7 +1545,7 @@ abstract class PHPUnit_Framework_TestCase extends PHPUnit_Framework_Assert imple * * @since Method available since Release 3.4.0 */ - protected function getMockFromWsdl($wsdlFile, $originalClassName = '', $mockClassName = '', array $methods = array(), $callOriginalConstructor = true, array $options = array()) + protected function getMockFromWsdl($wsdlFile, $originalClassName = '', $mockClassName = '', array $methods = [], $callOriginalConstructor = true, array $options = []) { if ($originalClassName === '') { $originalClassName = str_replace('.wsdl', '', basename($wsdlFile)); @@ -1470,7 +1565,7 @@ abstract class PHPUnit_Framework_TestCase extends PHPUnit_Framework_Assert imple return $this->getMock( $originalClassName, $methods, - array('', $options), + ['', $options], $mockClassName, $callOriginalConstructor, false, @@ -1498,7 +1593,7 @@ abstract class PHPUnit_Framework_TestCase extends PHPUnit_Framework_Assert imple * * @throws PHPUnit_Framework_Exception */ - public function getMockForTrait($traitName, array $arguments = array(), $mockClassName = '', $callOriginalConstructor = true, $callOriginalClone = true, $callAutoload = true, $mockedMethods = array(), $cloneArguments = false) + public function getMockForTrait($traitName, array $arguments = [], $mockClassName = '', $callOriginalConstructor = true, $callOriginalClone = true, $callAutoload = true, $mockedMethods = [], $cloneArguments = false) { $mockObject = $this->getMockObjectGenerator()->getMockForTrait( $traitName, @@ -1533,7 +1628,7 @@ abstract class PHPUnit_Framework_TestCase extends PHPUnit_Framework_Assert imple * * @throws PHPUnit_Framework_Exception */ - protected function getObjectForTrait($traitName, array $arguments = array(), $traitClassName = '', $callOriginalConstructor = true, $callOriginalClone = true, $callAutoload = true, $cloneArguments = false) + protected function getObjectForTrait($traitName, array $arguments = [], $traitClassName = '', $callOriginalConstructor = true, $callOriginalClone = true, $callAutoload = true, $cloneArguments = false) { return $this->getMockObjectGenerator()->getObjectForTrait( $traitName, @@ -1762,13 +1857,15 @@ abstract class PHPUnit_Framework_TestCase extends PHPUnit_Framework_Assert imple } /** - * @param Exception $exception + * @param Throwable|Exception $exception * * @return PHPUnit_Framework_MockObject_Stub_Exception * * @since Method available since Release 3.1.0 + * + * @todo Add type declaration when support for PHP 5 is dropped */ - public static function throwException(Exception $exception) + public static function throwException($exception) { return new PHPUnit_Framework_MockObject_Stub_Exception($exception); } @@ -1849,6 +1946,16 @@ abstract class PHPUnit_Framework_TestCase extends PHPUnit_Framework_Assert imple $passedKeys = array_flip(array_unique($passedKeys)); foreach ($this->dependencies as $dependency) { + $clone = false; + + if (strpos($dependency, 'clone ') === 0) { + $clone = true; + $dependency = substr($dependency, strlen('clone ')); + } elseif (strpos($dependency, '!clone ') === 0) { + $clone = false; + $dependency = substr($dependency, strlen('!clone ')); + } + if (strpos($dependency, '::') === false) { $dependency = $className . '::' . $dependency; } @@ -1883,7 +1990,14 @@ abstract class PHPUnit_Framework_TestCase extends PHPUnit_Framework_Assert imple return false; } - $this->dependencyInput[$dependency] = $passed[$dependency]['result']; + if ($clone) { + $deepCopy = new DeepCopy; + $deepCopy->skipUncloneable(false); + + $this->dependencyInput[$dependency] = $deepCopy->copy($passed[$dependency]['result']); + } else { + $this->dependencyInput[$dependency] = $passed[$dependency]['result']; + } } else { $this->dependencyInput[$dependency] = null; } @@ -1954,15 +2068,24 @@ abstract class PHPUnit_Framework_TestCase extends PHPUnit_Framework_Assert imple /** * This method is called when a test method did not execute successfully. * - * @param Exception $e + * @param Exception|Throwable $e * * @since Method available since Release 3.4.0 * - * @throws Exception + * @throws Exception|Throwable */ - protected function onNotSuccessfulTest(Exception $e) + protected function onNotSuccessfulTest($e) { - throw $e; + $expected = PHP_MAJOR_VERSION >= 7 ? 'Throwable' : 'Exception'; + + if ($e instanceof $expected) { + throw $e; + } + + throw PHPUnit_Util_InvalidArgumentHelper::factory( + 1, + 'Throwable or Exception' + ); } /** @@ -2027,7 +2150,7 @@ abstract class PHPUnit_Framework_TestCase extends PHPUnit_Framework_Assert imple } else { $this->output = call_user_func_array( $this->outputCallback, - array($output) + [$output] ); } @@ -2057,15 +2180,13 @@ abstract class PHPUnit_Framework_TestCase extends PHPUnit_Framework_Assert imple $backupGlobals = $this->backupGlobals === null || $this->backupGlobals === true; - if ($this->disallowChangesToGlobalState) { + if ($this->beStrictAboutChangesToGlobalState) { try { $this->compareGlobalStateSnapshots( $this->snapshot, $this->createGlobalStateSnapshot($backupGlobals) ); - } - - catch (PHPUnit_Framework_RiskyTestError $rte) { + } catch (PHPUnit_Framework_RiskyTestError $rte) { // Intentionally left empty } } @@ -2202,4 +2323,50 @@ abstract class PHPUnit_Framework_TestCase extends PHPUnit_Framework_Assert imple return $this->prophet; } + + /** + * @param PHPUnit_Framework_MockObject_MockObject $mock + * + * @return bool + * + * @since Method available since Release 5.0.0 + */ + private function shouldInvocationMockerBeReset(PHPUnit_Framework_MockObject_MockObject $mock) + { + if ($this->testResult === $mock) { + return false; + } + + if (is_array($this->testResult)) { + foreach ($this->testResult as $testResult) { + if ($testResult === $mock) { + return false; + } + } + } + + foreach ($this->dependencyInput as $dependencyInput) { + if ($dependencyInput === $mock) { + return false; + } + } + + return true; + } + + /** + * @param array $testArguments + * + * @since Method available since Release 5.0.0 + */ + private function registerMockObjectsFromTestArguments(array $testArguments) + { + foreach ($testArguments as $testArgument) { + if ($testArgument instanceof PHPUnit_Framework_MockObject_MockObject) { + $this->mockObjects[] = $testArgument; + } elseif (is_array($testArgument)) { + $this->registerMockObjectsFromTestArguments($testArgument); + } + } + } } diff --git a/vendor/phpunit/phpunit/src/Framework/TestFailure.php b/vendor/phpunit/phpunit/src/Framework/TestFailure.php index ef3d9cb..506af5c 100644 --- a/vendor/phpunit/phpunit/src/Framework/TestFailure.php +++ b/vendor/phpunit/phpunit/src/Framework/TestFailure.php @@ -34,19 +34,21 @@ class PHPUnit_Framework_TestFailure * Constructs a TestFailure with the given test and exception. * * @param PHPUnit_Framework_Test $failedTest - * @param Exception $thrownException + * @param Throwable $t */ - public function __construct(PHPUnit_Framework_Test $failedTest, Exception $thrownException) + public function __construct(PHPUnit_Framework_Test $failedTest, $t) { if ($failedTest instanceof PHPUnit_Framework_SelfDescribing) { $this->testName = $failedTest->toString(); } else { $this->testName = get_class($failedTest); } + if (!$failedTest instanceof PHPUnit_Framework_TestCase || !$failedTest->isInIsolation()) { $this->failedTest = $failedTest; } - $this->thrownException = $thrownException; + + $this->thrownException = $t; } /** diff --git a/vendor/phpunit/phpunit/src/Framework/TestListener.php b/vendor/phpunit/phpunit/src/Framework/TestListener.php index 6baab55..84d6330 100644 --- a/vendor/phpunit/phpunit/src/Framework/TestListener.php +++ b/vendor/phpunit/phpunit/src/Framework/TestListener.php @@ -24,6 +24,21 @@ interface PHPUnit_Framework_TestListener */ public function addError(PHPUnit_Framework_Test $test, Exception $e, $time); + /** + * A warning occurred. + * + * @param PHPUnit_Framework_Test $test + * @param PHPUnit_Framework_Warning $e + * @param float $time + * + * @since Method available since Release 6.0.0 + * + * @todo Uncomment in time for PHPUnit 6.0.0 + * + * @see https://github.com/sebastianbergmann/phpunit/pull/1840#issuecomment-162535997 + */ +// public function addWarning(PHPUnit_Framework_Test $test, PHPUnit_Framework_Warning $e, $time); + /** * A failure occurred. * diff --git a/vendor/phpunit/phpunit/src/Framework/TestResult.php b/vendor/phpunit/phpunit/src/Framework/TestResult.php index 8da7c35..2a6d591 100644 --- a/vendor/phpunit/phpunit/src/Framework/TestResult.php +++ b/vendor/phpunit/phpunit/src/Framework/TestResult.php @@ -8,6 +8,9 @@ * file that was distributed with this source code. */ +use SebastianBergmann\Comparator\Comparator; +use SebastianBergmann\ResourceOperations\ResourceOperations; + /** * A TestResult collects the results of executing a test case. * @@ -18,37 +21,42 @@ class PHPUnit_Framework_TestResult implements Countable /** * @var array */ - protected $passed = array(); + protected $passed = []; /** * @var array */ - protected $errors = array(); + protected $errors = []; /** * @var array */ - protected $failures = array(); + protected $failures = []; /** * @var array */ - protected $notImplemented = array(); + protected $warnings = []; /** * @var array */ - protected $risky = array(); + protected $notImplemented = []; /** * @var array */ - protected $skipped = array(); + protected $risky = []; /** * @var array */ - protected $listeners = array(); + protected $skipped = []; + + /** + * @var array + */ + protected $listeners = []; /** * @var int @@ -92,6 +100,11 @@ class PHPUnit_Framework_TestResult implements Countable */ protected $stopOnFailure = false; + /** + * @var bool + */ + protected $stopOnWarning = false; + /** * @var bool */ @@ -105,12 +118,32 @@ class PHPUnit_Framework_TestResult implements Countable /** * @var bool */ - protected $beStrictAboutTestSize = false; + protected $beStrictAboutTodoAnnotatedTests = false; /** * @var bool */ - protected $beStrictAboutTodoAnnotatedTests = false; + protected $beStrictAboutResourceUsageDuringSmallTests = false; + + /** + * @var bool + */ + protected $enforceTimeLimit = false; + + /** + * @var int + */ + protected $timeoutForSmallTests = 1; + + /** + * @var int + */ + protected $timeoutForMediumTests = 10; + + /** + * @var int + */ + protected $timeoutForLargeTests = 60; /** * @var bool @@ -132,21 +165,6 @@ class PHPUnit_Framework_TestResult implements Countable */ protected $lastTestFailed = false; - /** - * @var int - */ - protected $timeoutForSmallTests = 1; - - /** - * @var int - */ - protected $timeoutForMediumTests = 10; - - /** - * @var int - */ - protected $timeoutForLargeTests = 60; - /** * Registers a TestListener. * @@ -189,34 +207,34 @@ class PHPUnit_Framework_TestResult implements Countable * Adds an error to the list of errors. * * @param PHPUnit_Framework_Test $test - * @param Exception $e + * @param Throwable $t * @param float $time */ - public function addError(PHPUnit_Framework_Test $test, Exception $e, $time) + public function addError(PHPUnit_Framework_Test $test, $t, $time) { - if ($e instanceof PHPUnit_Framework_RiskyTest) { - $this->risky[] = new PHPUnit_Framework_TestFailure($test, $e); + if ($t instanceof PHPUnit_Framework_RiskyTest) { + $this->risky[] = new PHPUnit_Framework_TestFailure($test, $t); $notifyMethod = 'addRiskyTest'; if ($this->stopOnRisky) { $this->stop(); } - } elseif ($e instanceof PHPUnit_Framework_IncompleteTest) { - $this->notImplemented[] = new PHPUnit_Framework_TestFailure($test, $e); + } elseif ($t instanceof PHPUnit_Framework_IncompleteTest) { + $this->notImplemented[] = new PHPUnit_Framework_TestFailure($test, $t); $notifyMethod = 'addIncompleteTest'; if ($this->stopOnIncomplete) { $this->stop(); } - } elseif ($e instanceof PHPUnit_Framework_SkippedTest) { - $this->skipped[] = new PHPUnit_Framework_TestFailure($test, $e); + } elseif ($t instanceof PHPUnit_Framework_SkippedTest) { + $this->skipped[] = new PHPUnit_Framework_TestFailure($test, $t); $notifyMethod = 'addSkippedTest'; if ($this->stopOnSkipped) { $this->stop(); } } else { - $this->errors[] = new PHPUnit_Framework_TestFailure($test, $e); + $this->errors[] = new PHPUnit_Framework_TestFailure($test, $t); $notifyMethod = 'addError'; if ($this->stopOnError || $this->stopOnFailure) { @@ -224,14 +242,48 @@ class PHPUnit_Framework_TestResult implements Countable } } + // @see https://github.com/sebastianbergmann/phpunit/issues/1953 + if ($t instanceof Error) { + $t = new PHPUnit_Framework_ExceptionWrapper($t); + } + foreach ($this->listeners as $listener) { - $listener->$notifyMethod($test, $e, $time); + $listener->$notifyMethod($test, $t, $time); } $this->lastTestFailed = true; $this->time += $time; } + /** + * Adds a warning to the list of warnings. + * The passed in exception caused the warning. + * + * @param PHPUnit_Framework_Test $test + * @param PHPUnit_Framework_Warning $e + * @param float $time + * + * @since Method available since Release 5.1.0 + */ + public function addWarning(PHPUnit_Framework_Test $test, PHPUnit_Framework_Warning $e, $time) + { + if ($this->stopOnWarning) { + $this->stop(); + } + + $this->warnings[] = new PHPUnit_Framework_TestFailure($test, $e); + + foreach ($this->listeners as $listener) { + // @todo Remove check for PHPUnit 6.0.0 + // @see https://github.com/sebastianbergmann/phpunit/pull/1840#issuecomment-162535997 + if (method_exists($listener, 'addWarning')) { + $listener->addWarning($test, $e, $time); + } + } + + $this->time += $time; + } + /** * Adds a failure to the list of failures. * The passed in exception caused the failure. @@ -344,13 +396,13 @@ class PHPUnit_Framework_TestResult implements Countable $class = get_class($test); $key = $class . '::' . $test->getName(); - $this->passed[$key] = array( + $this->passed[$key] = [ 'result' => $test->getResult(), 'size' => PHPUnit_Util_Test::getSize( $class, $test->getName(false) ) - ); + ]; $this->time += $time; } @@ -498,6 +550,30 @@ class PHPUnit_Framework_TestResult implements Countable return $this->failures; } + /** + * Gets the number of detected warnings. + * + * @return int + * + * @since Method available since Release 5.1.0 + */ + public function warningCount() + { + return count($this->warnings); + } + + /** + * Returns an Enumeration for the warnings. + * + * @return array + * + * @since Method available since Release 5.1.0 + */ + public function warnings() + { + return $this->warnings; + } + /** * Returns the names of the tests that have passed. * @@ -545,6 +621,7 @@ class PHPUnit_Framework_TestResult implements Countable $error = false; $failure = false; + $warning = false; $incomplete = false; $risky = false; $skipped = false; @@ -555,7 +632,7 @@ class PHPUnit_Framework_TestResult implements Countable if ($this->convertErrorsToExceptions) { $oldErrorHandler = set_error_handler( - array('PHPUnit_Util_ErrorHandler', 'handleError'), + ['PHPUnit_Util_ErrorHandler', 'handleError'], E_ALL | E_STRICT ); @@ -567,30 +644,27 @@ class PHPUnit_Framework_TestResult implements Countable } $collectCodeCoverage = $this->codeCoverage !== null && - !$test instanceof PHPUnit_Extensions_SeleniumTestCase && - !$test instanceof PHPUnit_Framework_Warning; + !$test instanceof PHPUnit_Framework_WarningTestCase; if ($collectCodeCoverage) { - // We need to blacklist test source files when no whitelist is used. - if (!$this->codeCoverage->filter()->hasWhitelist()) { - $classes = $this->getHierarchy(get_class($test), true); - - foreach ($classes as $class) { - $this->codeCoverage->filter()->addFileToBlacklist( - $class->getFileName() - ); - } - } - $this->codeCoverage->start($test); } + $monitorFunctions = $this->beStrictAboutResourceUsageDuringSmallTests && + !$test instanceof PHPUnit_Framework_WarningTestCase && + $test->getSize() == PHPUnit_Util_Test::SMALL && + function_exists('xdebug_start_function_monitor'); + + if ($monitorFunctions) { + xdebug_start_function_monitor(ResourceOperations::getFunctions()); + } + PHP_Timer::start(); try { - if (!$test instanceof PHPUnit_Framework_Warning && + if (!$test instanceof PHPUnit_Framework_WarningTestCase && $test->getSize() != PHPUnit_Util_Test::UNKNOWN && - $this->beStrictAboutTestSize && + $this->enforceTimeLimit && extension_loaded('pcntl') && class_exists('PHP_Invoker')) { switch ($test->getSize()) { case PHPUnit_Util_Test::SMALL: @@ -607,7 +681,7 @@ class PHPUnit_Framework_TestResult implements Countable } $invoker = new PHP_Invoker; - $invoker->invoke(array($test, 'runBare'), array(), $_timeout); + $invoker->invoke([$test, 'runBare'], [], $_timeout); } else { $test->runBare(); } @@ -621,6 +695,8 @@ class PHPUnit_Framework_TestResult implements Countable } elseif ($e instanceof PHPUnit_Framework_SkippedTestError) { $skipped = true; } + } catch (PHPUnit_Framework_Warning $e) { + $warning = true; } catch (PHPUnit_Framework_Exception $e) { $error = true; } catch (Throwable $e) { @@ -634,6 +710,29 @@ class PHPUnit_Framework_TestResult implements Countable $time = PHP_Timer::stop(); $test->addToAssertionCount(PHPUnit_Framework_Assert::getCount()); + if ($monitorFunctions) { + $blacklist = new PHPUnit_Util_Blacklist; + $functions = xdebug_get_monitored_functions(); + xdebug_stop_function_monitor(); + + foreach ($functions as $function) { + if (!$blacklist->isBlacklisted($function['filename'])) { + $this->addFailure( + $test, + new PHPUnit_Framework_RiskyTestError( + sprintf( + '%s() used in %s:%s', + $function['function'], + $function['filename'], + $function['lineno'] + ) + ), + $time + ); + } + } + } + if ($this->beStrictAboutTestsThatDoNotTestAnything && $test->getNumAssertions() == 0) { $risky = true; @@ -641,8 +740,8 @@ class PHPUnit_Framework_TestResult implements Countable if ($collectCodeCoverage) { $append = !$risky && !$incomplete && !$skipped; - $linesToBeCovered = array(); - $linesToBeUsed = array(); + $linesToBeCovered = []; + $linesToBeUsed = []; if ($append && $test instanceof PHPUnit_Framework_TestCase) { $linesToBeCovered = PHPUnit_Util_Test::getLinesToBeCovered( @@ -662,11 +761,22 @@ class PHPUnit_Framework_TestResult implements Countable $linesToBeCovered, $linesToBeUsed ); - } catch (PHP_CodeCoverage_Exception_UnintentionallyCoveredCode $cce) { + } catch (PHP_CodeCoverage_UnintentionallyCoveredCodeException $cce) { + if ($this->notOnlyBecauseOfComparators($cce)) { + $this->addFailure( + $test, + new PHPUnit_Framework_UnintentionallyCoveredCodeError( + 'This test executed code that is not listed as code to be covered or used:' . + PHP_EOL . $cce->getMessage() + ), + $time + ); + } + } catch (PHP_CodeCoverage_CoveredCodeNotExecutedException $cce) { $this->addFailure( $test, - new PHPUnit_Framework_UnintentionallyCoveredCodeError( - 'This test executed code that is not listed as code to be covered or used:' . + new PHPUnit_Framework_CoveredCodeNotExecutedException( + 'This test did not execute all the code that is listed as code to be covered:' . PHP_EOL . $cce->getMessage() ), $time @@ -696,6 +806,8 @@ class PHPUnit_Framework_TestResult implements Countable $this->addError($test, $e, $time); } elseif ($failure === true) { $this->addFailure($test, $e, $time); + } elseif ($warning === true) { + $this->addWarning($test, $e, $time); } elseif ($this->beStrictAboutTestsThatDoNotTestAnything && $test->getNumAssertions() == 0) { $this->addFailure( @@ -851,6 +963,24 @@ class PHPUnit_Framework_TestResult implements Countable $this->stopOnFailure = $flag; } + /** + * Enables or disables the stopping when a warning occurs. + * + * @param bool $flag + * + * @throws PHPUnit_Framework_Exception + * + * @since Method available since Release 5.1.0 + */ + public function stopOnWarning($flag) + { + if (!is_bool($flag)) { + throw PHPUnit_Util_InvalidArgumentHelper::factory(1, 'boolean'); + } + + $this->stopOnWarning = $flag; + } + /** * @param bool $flag * @@ -908,25 +1038,51 @@ class PHPUnit_Framework_TestResult implements Countable * * @throws PHPUnit_Framework_Exception * - * @since Method available since Release 4.0.0 + * @since Method available since Release 5.0.0 */ - public function beStrictAboutTestSize($flag) + public function beStrictAboutResourceUsageDuringSmallTests($flag) { if (!is_bool($flag)) { throw PHPUnit_Util_InvalidArgumentHelper::factory(1, 'boolean'); } - $this->beStrictAboutTestSize = $flag; + $this->beStrictAboutResourceUsageDuringSmallTests = $flag; } /** * @return bool * - * @since Method available since Release 4.0.0 + * @since Method available since Release 5.0.0 */ - public function isStrictAboutTestSize() + public function isStrictAboutResourceUsageDuringSmallTests() { - return $this->beStrictAboutTestSize; + return $this->beStrictAboutResourceUsageDuringSmallTests; + } + + /** + * @param bool $flag + * + * @throws PHPUnit_Framework_Exception + * + * @since Method available since Release 5.0.0 + */ + public function enforceTimeLimit($flag) + { + if (!is_bool($flag)) { + throw PHPUnit_Util_InvalidArgumentHelper::factory(1, 'boolean'); + } + + $this->enforceTimeLimit = $flag; + } + + /** + * @return bool + * + * @since Method available since Release 5.0.0 + */ + public function enforcesTimeLimit() + { + return $this->enforceTimeLimit; } /** @@ -1026,7 +1182,7 @@ class PHPUnit_Framework_TestResult implements Countable */ public function wasSuccessful() { - return empty($this->errors) && empty($this->failures); + return empty($this->errors) && empty($this->failures) && empty($this->warnings); } /** @@ -1094,9 +1250,9 @@ class PHPUnit_Framework_TestResult implements Countable protected function getHierarchy($className, $asReflectionObjects = false) { if ($asReflectionObjects) { - $classes = array(new ReflectionClass($className)); + $classes = [new ReflectionClass($className)]; } else { - $classes = array($className); + $classes = [$className]; } $done = false; @@ -1125,4 +1281,28 @@ class PHPUnit_Framework_TestResult implements Countable return $classes; } + + /** + * @param PHP_CodeCoverage_UnintentionallyCoveredCodeException $cce + * + * @return bool + */ + private function notOnlyBecauseOfComparators(PHP_CodeCoverage_UnintentionallyCoveredCodeException $cce) + { + foreach ($cce->getUnintentionallyCoveredUnits() as $unit) { + $unit = explode('::', $unit); + + if (count($unit) != 2) { + continue; + } + + $class = new ReflectionClass($unit[0]); + + if (!$class->isSubclassOf(Comparator::class)) { + return true; + } + } + + return false; + } } diff --git a/vendor/phpunit/phpunit/src/Framework/TestSuite.php b/vendor/phpunit/phpunit/src/Framework/TestSuite.php index 8403633..e109fae 100644 --- a/vendor/phpunit/phpunit/src/Framework/TestSuite.php +++ b/vendor/phpunit/phpunit/src/Framework/TestSuite.php @@ -64,7 +64,7 @@ class PHPUnit_Framework_TestSuite implements PHPUnit_Framework_Test, PHPUnit_Fra /** * @var bool */ - private $disallowChangesToGlobalState = null; + private $beStrictAboutChangesToGlobalState = null; /** * @var bool @@ -83,14 +83,14 @@ class PHPUnit_Framework_TestSuite implements PHPUnit_Framework_Test, PHPUnit_Fra * * @var array */ - protected $groups = array(); + protected $groups = []; /** * The tests in the test suite. * * @var array */ - protected $tests = array(); + protected $tests = []; /** * The number of tests in the test suite. @@ -107,7 +107,7 @@ class PHPUnit_Framework_TestSuite implements PHPUnit_Framework_Test, PHPUnit_Fra /** * @var array */ - protected $foundClasses = array(); + protected $foundClasses = []; /** * @var PHPUnit_Runner_Filter_Factory @@ -225,7 +225,7 @@ class PHPUnit_Framework_TestSuite implements PHPUnit_Framework_Test, PHPUnit_Fra * @param PHPUnit_Framework_Test $test * @param array $groups */ - public function addTest(PHPUnit_Framework_Test $test, $groups = array()) + public function addTest(PHPUnit_Framework_Test $test, $groups = []) { $class = new ReflectionClass($test); @@ -239,12 +239,12 @@ class PHPUnit_Framework_TestSuite implements PHPUnit_Framework_Test, PHPUnit_Fra } if (empty($groups)) { - $groups = array('default'); + $groups = ['default']; } foreach ($groups as $group) { if (!isset($this->groups[$group])) { - $this->groups[$group] = array($test); + $this->groups[$group] = [$test]; } else { $this->groups[$group][] = $test; } @@ -306,7 +306,7 @@ class PHPUnit_Framework_TestSuite implements PHPUnit_Framework_Test, PHPUnit_Fra * as well as the separate import statements for the user's convenience. * * If the named file cannot be read or there are no new tests that can be - * added, a PHPUnit_Framework_Warning will be created instead, + * added, a PHPUnit_Framework_WarningTestCase will be created instead, * leaving the current test run untouched. * * @param string $filename @@ -358,7 +358,7 @@ class PHPUnit_Framework_TestSuite implements PHPUnit_Framework_Test, PHPUnit_Fra $class = new ReflectionClass($className); if ($class->getFileName() == $filename) { - $newClasses = array($className); + $newClasses = [$className]; unset($this->foundClasses[$i]); break; } @@ -547,7 +547,7 @@ class PHPUnit_Framework_TestSuite implements PHPUnit_Framework_Test, PHPUnit_Fra $groups = PHPUnit_Util_Test::getGroups($className, $name); - if ($data instanceof PHPUnit_Framework_Warning || + if ($data instanceof PHPUnit_Framework_WarningTestCase || $data instanceof PHPUnit_Framework_SkippedTestCase || $data instanceof PHPUnit_Framework_IncompleteTestCase) { $test->addTest($data, $groups); @@ -694,7 +694,7 @@ class PHPUnit_Framework_TestSuite implements PHPUnit_Framework_Test, PHPUnit_Fra $this->markTestSuiteSkipped(implode(PHP_EOL, $missingRequirements)); } - call_user_func(array($this->name, $beforeClassMethod)); + call_user_func([$this->name, $beforeClassMethod]); } } } catch (PHPUnit_Framework_SkippedTestSuiteError $e) { @@ -738,7 +738,7 @@ class PHPUnit_Framework_TestSuite implements PHPUnit_Framework_Test, PHPUnit_Fra if ($test instanceof PHPUnit_Framework_TestCase || $test instanceof self) { - $test->setDisallowChangesToGlobalState($this->disallowChangesToGlobalState); + $test->setbeStrictAboutChangesToGlobalState($this->beStrictAboutChangesToGlobalState); $test->setBackupGlobals($this->backupGlobals); $test->setBackupStaticAttributes($this->backupStaticAttributes); $test->setRunTestInSeparateProcess($this->runTestInSeparateProcess); @@ -749,7 +749,7 @@ class PHPUnit_Framework_TestSuite implements PHPUnit_Framework_Test, PHPUnit_Fra foreach ($hookMethods['afterClass'] as $afterClassMethod) { if ($this->testCase === true && class_exists($this->name, false) && method_exists($this->name, $afterClassMethod)) { - call_user_func(array($this->name, $afterClassMethod)); + call_user_func([$this->name, $afterClassMethod]); } } @@ -914,11 +914,11 @@ class PHPUnit_Framework_TestSuite implements PHPUnit_Framework_Test, PHPUnit_Fra /** * @param string $message * - * @return PHPUnit_Framework_Warning + * @return PHPUnit_Framework_WarningTestCase */ protected static function warning($message) { - return new PHPUnit_Framework_Warning($message); + return new PHPUnit_Framework_WarningTestCase($message); } /** @@ -950,14 +950,14 @@ class PHPUnit_Framework_TestSuite implements PHPUnit_Framework_Test, PHPUnit_Fra } /** - * @param bool $disallowChangesToGlobalState + * @param bool $beStrictAboutChangesToGlobalState * * @since Method available since Release 4.6.0 */ - public function setDisallowChangesToGlobalState($disallowChangesToGlobalState) + public function setbeStrictAboutChangesToGlobalState($beStrictAboutChangesToGlobalState) { - if (is_null($this->disallowChangesToGlobalState) && is_bool($disallowChangesToGlobalState)) { - $this->disallowChangesToGlobalState = $disallowChangesToGlobalState; + if (is_null($this->beStrictAboutChangesToGlobalState) && is_bool($beStrictAboutChangesToGlobalState)) { + $this->beStrictAboutChangesToGlobalState = $beStrictAboutChangesToGlobalState; } } diff --git a/vendor/phpunit/phpunit/src/Framework/UnintentionallyCoveredCodeError.php b/vendor/phpunit/phpunit/src/Framework/UnintentionallyCoveredCodeError.php index b24c041..017a54e 100644 --- a/vendor/phpunit/phpunit/src/Framework/UnintentionallyCoveredCodeError.php +++ b/vendor/phpunit/phpunit/src/Framework/UnintentionallyCoveredCodeError.php @@ -10,7 +10,7 @@ /** * Extension to PHPUnit_Framework_AssertionFailedError to mark the special - * case of a test test that unintentionally covers code. + * case of a test that unintentionally covers code. * * @since Class available since Release 4.0.0 */ diff --git a/vendor/phpunit/phpunit/src/Framework/Warning.php b/vendor/phpunit/phpunit/src/Framework/Warning.php index 8c7cef6..1b36f26 100644 --- a/vendor/phpunit/phpunit/src/Framework/Warning.php +++ b/vendor/phpunit/phpunit/src/Framework/Warning.php @@ -9,73 +9,19 @@ */ /** - * A warning. + * Thrown when an there is a warning. * - * @since Class available since Release 2.0.0 + * @since Class available since Release 5.0.0 */ -class PHPUnit_Framework_Warning extends PHPUnit_Framework_TestCase +class PHPUnit_Framework_Warning extends PHPUnit_Framework_Exception implements PHPUnit_Framework_SelfDescribing { /** - * @var string - */ - protected $message = ''; - - /** - * @var bool - */ - protected $backupGlobals = false; - - /** - * @var bool - */ - protected $backupStaticAttributes = false; - - /** - * @var bool - */ - protected $runTestInSeparateProcess = false; - - /** - * @var bool - */ - protected $useErrorHandler = false; - - /** - * @param string $message - */ - public function __construct($message = '') - { - $this->message = $message; - parent::__construct('Warning'); - } - - /** - * @throws PHPUnit_Framework_Exception - */ - protected function runTest() - { - $this->fail($this->message); - } - - /** - * @return string - * - * @since Method available since Release 3.0.0 - */ - public function getMessage() - { - return $this->message; - } - - /** - * Returns a string representation of the test case. + * Wrapper for getMessage() which is declared as final. * * @return string - * - * @since Method available since Release 3.4.0 */ public function toString() { - return 'Warning'; + return $this->getMessage(); } } diff --git a/vendor/phpunit/phpunit/src/Runner/BaseTestRunner.php b/vendor/phpunit/phpunit/src/Runner/BaseTestRunner.php index 15805dc..9eb0656 100644 --- a/vendor/phpunit/phpunit/src/Runner/BaseTestRunner.php +++ b/vendor/phpunit/phpunit/src/Runner/BaseTestRunner.php @@ -21,6 +21,7 @@ abstract class PHPUnit_Runner_BaseTestRunner const STATUS_FAILURE = 3; const STATUS_ERROR = 4; const STATUS_RISKY = 5; + const STATUS_WARNING = 6; const SUITE_METHODNAME = 'suite'; /** diff --git a/vendor/phpunit/phpunit/src/Runner/Filter/Factory.php b/vendor/phpunit/phpunit/src/Runner/Filter/Factory.php index f4fa9d9..11c7427 100644 --- a/vendor/phpunit/phpunit/src/Runner/Filter/Factory.php +++ b/vendor/phpunit/phpunit/src/Runner/Filter/Factory.php @@ -16,7 +16,7 @@ class PHPUnit_Runner_Filter_Factory /** * @var array */ - private $filters = array(); + private $filters = []; /** * @param ReflectionClass $filter @@ -33,7 +33,7 @@ class PHPUnit_Runner_Filter_Factory ); } - $this->filters[] = array($filter, $args); + $this->filters[] = [$filter, $args]; } /** diff --git a/vendor/phpunit/phpunit/src/Runner/Filter/Group.php b/vendor/phpunit/phpunit/src/Runner/Filter/Group.php index 9257b3b..3d21964 100644 --- a/vendor/phpunit/phpunit/src/Runner/Filter/Group.php +++ b/vendor/phpunit/phpunit/src/Runner/Filter/Group.php @@ -16,7 +16,7 @@ abstract class PHPUnit_Runner_Filter_GroupFilterIterator extends RecursiveFilter /** * @var array */ - protected $groupTests = array(); + protected $groupTests = []; /** * @param RecursiveIterator $iterator diff --git a/vendor/phpunit/phpunit/src/Runner/Version.php b/vendor/phpunit/phpunit/src/Runner/Version.php index c645839..d6fa702 100644 --- a/vendor/phpunit/phpunit/src/Runner/Version.php +++ b/vendor/phpunit/phpunit/src/Runner/Version.php @@ -30,7 +30,7 @@ class PHPUnit_Runner_Version } if (self::$version === null) { - $version = new SebastianBergmann\Version('4.8.16', dirname(dirname(__DIR__))); + $version = new SebastianBergmann\Version('5.2.5', dirname(dirname(__DIR__))); self::$version = $version->getVersion(); } @@ -44,6 +44,10 @@ class PHPUnit_Runner_Version */ public static function series() { + if (strpos(self::id(), '-')) { + return explode('-', self::id())[0]; + } + return implode('.', array_slice(explode('.', self::id()), 0, 2)); } diff --git a/vendor/phpunit/phpunit/src/TextUI/Command.php b/vendor/phpunit/phpunit/src/TextUI/Command.php index c6d6c22..eedd006 100644 --- a/vendor/phpunit/phpunit/src/TextUI/Command.php +++ b/vendor/phpunit/phpunit/src/TextUI/Command.php @@ -19,71 +19,80 @@ class PHPUnit_TextUI_Command /** * @var array */ - protected $arguments = array( + protected $arguments = [ 'listGroups' => false, 'loader' => null, 'useDefaultConfiguration' => true - ); + ]; /** * @var array */ - protected $options = array(); + protected $options = []; /** * @var array */ - protected $longOptions = array( - 'colors==' => null, - 'bootstrap=' => null, - 'columns=' => null, - 'configuration=' => null, - 'coverage-clover=' => null, - 'coverage-crap4j=' => null, - 'coverage-html=' => null, - 'coverage-php=' => null, - 'coverage-text==' => null, - 'coverage-xml=' => null, - 'debug' => null, - 'exclude-group=' => null, - 'filter=' => null, - 'testsuite=' => null, - 'group=' => null, - 'help' => null, - 'include-path=' => null, - 'list-groups' => null, - 'loader=' => null, - 'log-json=' => null, - 'log-junit=' => null, - 'log-tap=' => null, - 'process-isolation' => null, - 'repeat=' => null, - 'stderr' => null, - 'stop-on-error' => null, - 'stop-on-failure' => null, - 'stop-on-incomplete' => null, - 'stop-on-risky' => null, - 'stop-on-skipped' => null, - 'report-useless-tests' => null, - 'strict-coverage' => null, - 'disallow-test-output' => null, - 'enforce-time-limit' => null, - 'disallow-todo-tests' => null, - 'strict-global-state' => null, - 'strict' => null, - 'tap' => null, - 'testdox' => null, - 'testdox-html=' => null, - 'testdox-text=' => null, - 'test-suffix=' => null, - 'no-configuration' => null, - 'no-coverage' => null, - 'no-globals-backup' => null, - 'printer=' => null, - 'static-backup' => null, - 'verbose' => null, - 'version' => null - ); + protected $longOptions = [ + 'atleast-version=' => null, + 'bootstrap=' => null, + 'colors==' => null, + 'columns=' => null, + 'configuration=' => null, + 'coverage-clover=' => null, + 'coverage-crap4j=' => null, + 'coverage-html=' => null, + 'coverage-php=' => null, + 'coverage-text==' => null, + 'coverage-xml=' => null, + 'debug' => null, + 'disallow-test-output' => null, + 'disallow-resource-usage' => null, + 'disallow-todo-tests' => null, + 'enforce-time-limit' => null, + 'exclude-group=' => null, + 'filter=' => null, + 'group=' => null, + 'help' => null, + 'include-path=' => null, + 'list-groups' => null, + 'loader=' => null, + 'log-json=' => null, + 'log-junit=' => null, + 'log-tap=' => null, + 'log-teamcity=' => null, + 'no-configuration' => null, + 'no-coverage' => null, + 'no-globals-backup' => null, + 'printer=' => null, + 'process-isolation' => null, + 'repeat=' => null, + 'report-useless-tests' => null, + 'reverse-list' => null, + 'static-backup' => null, + 'stderr' => null, + 'stop-on-error' => null, + 'stop-on-failure' => null, + 'stop-on-warning' => null, + 'stop-on-incomplete' => null, + 'stop-on-risky' => null, + 'stop-on-skipped' => null, + 'fail-on-warning' => null, + 'fail-on-risky' => null, + 'strict-coverage' => null, + 'disable-coverage-ignore' => null, + 'strict-global-state' => null, + 'tap' => null, + 'teamcity' => null, + 'testdox' => null, + 'testdox-html=' => null, + 'testdox-text=' => null, + 'test-suffix=' => null, + 'testsuite=' => null, + 'verbose' => null, + 'version' => null, + 'whitelist=' => null + ]; /** * @var bool @@ -146,24 +155,20 @@ class PHPUnit_TextUI_Command unset($this->arguments['testFile']); try { - $result = $runner->doRun($suite, $this->arguments); + $result = $runner->doRun($suite, $this->arguments, $exit); } catch (PHPUnit_Framework_Exception $e) { print $e->getMessage() . "\n"; } - $ret = PHPUnit_TextUI_TestRunner::FAILURE_EXIT; + $return = PHPUnit_TextUI_TestRunner::FAILURE_EXIT; if (isset($result) && $result->wasSuccessful()) { - $ret = PHPUnit_TextUI_TestRunner::SUCCESS_EXIT; + $return = PHPUnit_TextUI_TestRunner::SUCCESS_EXIT; } elseif (!isset($result) || $result->errorCount() > 0) { - $ret = PHPUnit_TextUI_TestRunner::EXCEPTION_EXIT; + $return = PHPUnit_TextUI_TestRunner::EXCEPTION_EXIT; } - if ($exit) { - exit($ret); - } else { - return $ret; - } + return $return; } /** @@ -372,6 +377,10 @@ class PHPUnit_TextUI_Command $this->arguments['tapLogfile'] = $option[1]; break; + case '--log-teamcity': + $this->arguments['teamcityLogfile'] = $option[1]; + break; + case '--process-isolation': $this->arguments['processIsolation'] = true; break; @@ -392,6 +401,10 @@ class PHPUnit_TextUI_Command $this->arguments['stopOnFailure'] = true; break; + case '--stop-on-warning': + $this->arguments['stopOnWarning'] = true; + break; + case '--stop-on-incomplete': $this->arguments['stopOnIncomplete'] = true; break; @@ -404,10 +417,22 @@ class PHPUnit_TextUI_Command $this->arguments['stopOnSkipped'] = true; break; + case '--fail-on-warning': + $this->arguments['failOnWarning'] = true; + break; + + case '--fail-on-risky': + $this->arguments['failOnRisky'] = true; + break; + case '--tap': $this->arguments['printer'] = 'PHPUnit_Util_Log_TAP'; break; + case '--teamcity': + $this->arguments['printer'] = 'PHPUnit_Util_Log_TeamCity'; + break; + case '--testdox': $this->arguments['printer'] = 'PHPUnit_Util_TestDox_ResultPrinter_Text'; break; @@ -441,6 +466,13 @@ class PHPUnit_TextUI_Command $this->arguments['verbose'] = true; break; + case '--atleast-version': + exit(version_compare(PHPUnit_Runner_Version::id(), $option[1], '>=') + ? PHPUnit_TextUI_TestRunner::SUCCESS_EXIT + : PHPUnit_TextUI_TestRunner::FAILURE_EXIT + ); + break; + case '--version': $this->printVersionString(); exit(PHPUnit_TextUI_TestRunner::SUCCESS_EXIT); @@ -454,14 +486,22 @@ class PHPUnit_TextUI_Command $this->arguments['strictCoverage'] = true; break; + case '--disable-coverage-ignore': + $this->arguments['disableCodeCoverageIgnore'] = true; + break; + case '--strict-global-state': - $this->arguments['disallowChangesToGlobalState'] = true; + $this->arguments['beStrictAboutChangesToGlobalState'] = true; break; case '--disallow-test-output': $this->arguments['disallowTestOutput'] = true; break; + case '--disallow-resource-usage': + $this->arguments['beStrictAboutResourceUsageDuringSmallTests'] = true; + break; + case '--enforce-time-limit': $this->arguments['enforceTimeLimit'] = true; break; @@ -470,13 +510,8 @@ class PHPUnit_TextUI_Command $this->arguments['disallowTodoAnnotatedTests'] = true; break; - case '--strict': - $this->arguments['reportUselessTests'] = true; - $this->arguments['strictCoverage'] = true; - $this->arguments['disallowTestOutput'] = true; - $this->arguments['enforceTimeLimit'] = true; - $this->arguments['disallowTodoAnnotatedTests'] = true; - $this->arguments['deprecatedStrictModeOption'] = true; + case '--reverse-list': + $this->arguments['reverseList'] = true; break; case '--check-version': @@ -506,7 +541,7 @@ class PHPUnit_TextUI_Command $handler = $this->longOptions[$optionName . '=']; } - if (isset($handler) && is_callable(array($this, $handler))) { + if (isset($handler) && is_callable([$this, $handler])) { $this->$handler($option[1]); } } @@ -534,7 +569,7 @@ class PHPUnit_TextUI_Command } if (!isset($this->arguments['testSuffixes'])) { - $this->arguments['testSuffixes'] = array('Test.php', '.phpt'); + $this->arguments['testSuffixes'] = ['Test.php', '.phpt']; } if (isset($includePath)) { @@ -585,7 +620,7 @@ class PHPUnit_TextUI_Command exit(PHPUnit_TextUI_TestRunner::FAILURE_EXIT); } - $phpunit = $configuration->getPHPUnitConfiguration(); + $phpunitConfiguration = $configuration->getPHPUnitConfiguration(); $configuration->handlePHPConfiguration(); @@ -594,57 +629,47 @@ class PHPUnit_TextUI_Command */ if (isset($this->arguments['bootstrap'])) { $this->handleBootstrap($this->arguments['bootstrap']); - } elseif (isset($phpunit['bootstrap'])) { - $this->handleBootstrap($phpunit['bootstrap']); + } elseif (isset($phpunitConfiguration['bootstrap'])) { + $this->handleBootstrap($phpunitConfiguration['bootstrap']); } /* * Issue #657 */ - if (isset($phpunit['stderr']) && ! isset($this->arguments['stderr'])) { - $this->arguments['stderr'] = $phpunit['stderr']; + if (isset($phpunitConfiguration['stderr']) && ! isset($this->arguments['stderr'])) { + $this->arguments['stderr'] = $phpunitConfiguration['stderr']; } - if (isset($phpunit['columns']) && ! isset($this->arguments['columns'])) { - $this->arguments['columns'] = $phpunit['columns']; + if (isset($phpunitConfiguration['columns']) && ! isset($this->arguments['columns'])) { + $this->arguments['columns'] = $phpunitConfiguration['columns']; } - if (isset($phpunit['printerClass'])) { - if (isset($phpunit['printerFile'])) { - $file = $phpunit['printerFile']; + if (!isset($this->arguments['printer']) && isset($phpunitConfiguration['printerClass'])) { + if (isset($phpunitConfiguration['printerFile'])) { + $file = $phpunitConfiguration['printerFile']; } else { $file = ''; } $this->arguments['printer'] = $this->handlePrinter( - $phpunit['printerClass'], + $phpunitConfiguration['printerClass'], $file ); } - if (isset($phpunit['testSuiteLoaderClass'])) { - if (isset($phpunit['testSuiteLoaderFile'])) { - $file = $phpunit['testSuiteLoaderFile']; + if (isset($phpunitConfiguration['testSuiteLoaderClass'])) { + if (isset($phpunitConfiguration['testSuiteLoaderFile'])) { + $file = $phpunitConfiguration['testSuiteLoaderFile']; } else { $file = ''; } $this->arguments['loader'] = $this->handleLoader( - $phpunit['testSuiteLoaderClass'], + $phpunitConfiguration['testSuiteLoaderClass'], $file ); } - $browsers = $configuration->getSeleniumBrowserConfiguration(); - - if (!empty($browsers)) { - $this->arguments['deprecatedSeleniumConfiguration'] = true; - - if (class_exists('PHPUnit_Extensions_SeleniumTestCase')) { - PHPUnit_Extensions_SeleniumTestCase::$browsers = $browsers; - } - } - if (!isset($this->arguments['test'])) { $testSuite = $configuration->getTestSuiteConfiguration(isset($this->arguments['testsuite']) ? $this->arguments['testsuite'] : null); @@ -826,18 +851,13 @@ class PHPUnit_TextUI_Command print 'Updating the PHPUnit PHAR ... '; - $options = array( - 'ssl' => array( + $options = [ + 'ssl' => [ 'allow_self_signed' => false, 'cafile' => $caFile, 'verify_peer' => true - ) - ); - - if (PHP_VERSION_ID < 50600) { - $options['ssl']['CN_match'] = 'phar.phpunit.de'; - $options['ssl']['SNI_server_name'] = 'phar.phpunit.de'; - } + ] + ]; file_put_contents( $tempFilename, @@ -912,14 +932,18 @@ Code Coverage Options: --coverage-text= Generate code coverage report in text format. Default: Standard output. --coverage-xml Generate code coverage report in PHPUnit XML format. + --whitelist Whitelist for code coverage analysis. + --disable-coverage-ignore Disable annotations for ignoring code coverage. Logging Options: --log-junit Log test execution in JUnit XML format to file. --log-tap Log test execution in TAP format to file. + --log-teamcity Log test execution in TeamCity format to file. --log-json Log test execution in JSON format. --testdox-html Write agile documentation in HTML format to file. --testdox-text Write agile documentation in Text format to file. + --reverse-list Print defects in reverse order Test Selection Options: @@ -934,9 +958,10 @@ Test Selection Options: Test Execution Options: --report-useless-tests Be strict about tests that do not test anything. - --strict-coverage Be strict about unintentionally covered code. + --strict-coverage Be strict about @covers annotation usage. --strict-global-state Be strict about changes to global state --disallow-test-output Be strict about output during tests. + --disallow-resource-usage Be strict about resource usage during small tests. --enforce-time-limit Enforce time limit based on test size. --disallow-todo-tests Disallow @todo-annotated tests. @@ -950,15 +975,19 @@ Test Execution Options: --stderr Write to STDERR instead of STDOUT. --stop-on-error Stop execution upon first error. --stop-on-failure Stop execution upon first error or failure. + --stop-on-warning Stop execution upon first warning. --stop-on-risky Stop execution upon first risky test. --stop-on-skipped Stop execution upon first skipped test. --stop-on-incomplete Stop execution upon first incomplete test. + --fail-on-warning Treat tests with warnings as failures. + --fail-on-risky Treat risky tests as failures. -v|--verbose Output more verbose information. --debug Display debugging information during test execution. --loader TestSuiteLoader implementation to use. --repeat Runs the test(s) repeatedly. --tap Report test execution progress in TAP format. + --teamcity Report test execution progress in TeamCity format. --testdox Report test execution progress in TestDox format. --printer TestListener implementation to use. @@ -975,6 +1004,7 @@ Miscellaneous Options: -h|--help Prints this usage information. --version Prints the version and exits. + --atleast-version Checks that version is greater than min and exits. EOT; diff --git a/vendor/phpunit/phpunit/src/TextUI/ResultPrinter.php b/vendor/phpunit/phpunit/src/TextUI/ResultPrinter.php index e4f02cd..be49b7e 100644 --- a/vendor/phpunit/phpunit/src/TextUI/ResultPrinter.php +++ b/vendor/phpunit/phpunit/src/TextUI/ResultPrinter.php @@ -30,7 +30,7 @@ class PHPUnit_TextUI_ResultPrinter extends PHPUnit_Util_Printer implements PHPUn /** * @var array */ - private static $ansiCodes = array( + private static $ansiCodes = [ 'bold' => 1, 'fg-black' => 30, 'fg-red' => 31, @@ -48,7 +48,7 @@ class PHPUnit_TextUI_ResultPrinter extends PHPUnit_Util_Printer implements PHPUn 'bg-magenta' => 45, 'bg-cyan' => 46, 'bg-white' => 47 - ); + ]; /** * @var int @@ -105,6 +105,11 @@ class PHPUnit_TextUI_ResultPrinter extends PHPUnit_Util_Printer implements PHPUn */ private $numberOfColumns; + /** + * @var bool + */ + private $reverse = false; + /** * Constructor. * @@ -113,12 +118,13 @@ class PHPUnit_TextUI_ResultPrinter extends PHPUnit_Util_Printer implements PHPUn * @param string $colors * @param bool $debug * @param int|string $numberOfColumns + * @param bool $reverse * * @throws PHPUnit_Framework_Exception * * @since Method available since Release 3.0.0 */ - public function __construct($out = null, $verbose = false, $colors = self::COLOR_DEFAULT, $debug = false, $numberOfColumns = 80) + public function __construct($out = null, $verbose = false, $colors = self::COLOR_DEFAULT, $debug = false, $numberOfColumns = 80, $reverse = false) { parent::__construct($out); @@ -126,7 +132,7 @@ class PHPUnit_TextUI_ResultPrinter extends PHPUnit_Util_Printer implements PHPUn throw PHPUnit_Util_InvalidArgumentHelper::factory(2, 'boolean'); } - $availableColors = array(self::COLOR_NEVER, self::COLOR_AUTO, self::COLOR_ALWAYS); + $availableColors = [self::COLOR_NEVER, self::COLOR_AUTO, self::COLOR_ALWAYS]; if (!in_array($colors, $availableColors)) { throw PHPUnit_Util_InvalidArgumentHelper::factory( @@ -143,6 +149,10 @@ class PHPUnit_TextUI_ResultPrinter extends PHPUnit_Util_Printer implements PHPUn throw PHPUnit_Util_InvalidArgumentHelper::factory(5, 'integer or "max"'); } + if (!is_bool($reverse)) { + throw PHPUnit_Util_InvalidArgumentHelper::factory(6, 'boolean'); + } + $console = new Console; $maxNumberOfColumns = $console->getNumberOfColumns(); @@ -153,6 +163,7 @@ class PHPUnit_TextUI_ResultPrinter extends PHPUnit_Util_Printer implements PHPUn $this->numberOfColumns = $numberOfColumns; $this->verbose = $verbose; $this->debug = $debug; + $this->reverse = $reverse; if ($colors === self::COLOR_AUTO && $console->hasColorSupport()) { $this->colors = true; @@ -170,13 +181,19 @@ class PHPUnit_TextUI_ResultPrinter extends PHPUnit_Util_Printer implements PHPUn $this->printErrors($result); $printSeparator = $result->errorCount() > 0; + $hasFailures = $result->failureCount() > 0; + $hasWarnings = $result->warningCount() > 0; - if ($printSeparator && $result->failureCount() > 0) { + if ($printSeparator && ($hasFailures || $hasWarnings)) { $this->write("\n--\n\n"); } - $printSeparator = $printSeparator || $result->failureCount() > 0; - $this->printFailures($result); + $printSeparator = $printSeparator || $hasFailures || $hasWarnings; + if ($hasWarnings) { + $this->printWarnings($result); + } else { + $this->printFailures($result); + } if ($this->verbose) { if ($printSeparator && $result->riskyCount() > 0) { @@ -231,6 +248,10 @@ class PHPUnit_TextUI_ResultPrinter extends PHPUnit_Util_Printer implements PHPUn $i = 1; + if ($this->reverse) { + $defects = array_reverse($defects); + } + foreach ($defects as $defect) { $this->printDefect($defect, $i++); } @@ -290,6 +311,14 @@ class PHPUnit_TextUI_ResultPrinter extends PHPUnit_Util_Printer implements PHPUn $this->printDefects($result->failures(), 'failure'); } + /** + * @param PHPUnit_Framework_TestResult $result + */ + protected function printWarnings(PHPUnit_Framework_TestResult $result) + { + $this->printDefects($result->warnings(), 'warning'); + } + /** * @param PHPUnit_Framework_TestResult $result */ @@ -360,16 +389,32 @@ class PHPUnit_TextUI_ResultPrinter extends PHPUnit_Util_Printer implements PHPUn 'OK, but incomplete, skipped, or risky tests!' ); } else { - $color = 'fg-white, bg-red'; + $showFailures = ( + $result->errors() || + $result->failures() || + $result->skipped() || + $result->notImplemented() || + $result->risky()) && + !$result->warnings() + ; + + if ($showFailures) { + $color = 'fg-white, bg-red'; + $text = 'FAILURES!'; + } else { + $color = 'fg-black, bg-yellow'; + $text = 'WARNINGS!'; + } $this->write("\n"); - $this->writeWithColor($color, 'FAILURES!'); + $this->writeWithColor($color, $text); } $this->writeCountString(count($result), 'Tests', $color, true); $this->writeCountString($this->numAssertions, 'Assertions', $color, true); $this->writeCountString($result->errorCount(), 'Errors', $color); $this->writeCountString($result->failureCount(), 'Failures', $color); + $this->writeCountString($result->warningCount(), 'Warnings', $color); $this->writeCountString($result->skippedCount(), 'Skipped', $color); $this->writeCountString($result->notImplementedCount(), 'Incomplete', $color); $this->writeCountString($result->riskyCount(), 'Risky', $color); @@ -410,6 +455,21 @@ class PHPUnit_TextUI_ResultPrinter extends PHPUnit_Util_Printer implements PHPUn $this->lastTestFailed = true; } + /** + * A warning occurred. + * + * @param PHPUnit_Framework_Test $test + * @param PHPUnit_Framework_Warning $e + * @param float $time + * + * @since Method available since Release 5.1.0 + */ + public function addWarning(PHPUnit_Framework_Test $test, PHPUnit_Framework_Warning $e, $time) + { + $this->writeProgressWithColor('fg-yellow, bold', 'W'); + $this->lastTestFailed = true; + } + /** * Incomplete test. * @@ -533,7 +593,13 @@ class PHPUnit_TextUI_ResultPrinter extends PHPUnit_Util_Printer implements PHPUn $this->column++; $this->numTestsRun++; - if ($this->column == $this->maxColumn) { + if ($this->column == $this->maxColumn + || $this->numTestsRun == $this->numTests + ) { + if ($this->numTestsRun == $this->numTests) { + $this->write(str_repeat(' ', $this->maxColumn - $this->column)); + } + $this->write( sprintf( ' %' . $this->numTestsWidth . 'd / %' . @@ -544,7 +610,9 @@ class PHPUnit_TextUI_ResultPrinter extends PHPUnit_Util_Printer implements PHPUn ) ); - $this->writeNewLine(); + if ($this->column == $this->maxColumn) { + $this->writeNewLine(); + } } } @@ -574,7 +642,7 @@ class PHPUnit_TextUI_ResultPrinter extends PHPUnit_Util_Printer implements PHPUn $codes = array_map('trim', explode(',', $color)); $lines = explode("\n", $buffer); $padding = max(array_map('strlen', $lines)); - $styles = array(); + $styles = []; foreach ($codes as $code) { $styles[] = self::$ansiCodes[$code]; @@ -582,7 +650,7 @@ class PHPUnit_TextUI_ResultPrinter extends PHPUnit_Util_Printer implements PHPUn $style = sprintf("\x1b[%sm", implode(';', $styles)); - $styledLines = array(); + $styledLines = []; foreach ($lines as $line) { $styledLines[] = $style . str_pad($line, $padding) . "\x1b[0m"; diff --git a/vendor/phpunit/phpunit/src/TextUI/TestRunner.php b/vendor/phpunit/phpunit/src/TextUI/TestRunner.php index 7b3dbff..250808d 100644 --- a/vendor/phpunit/phpunit/src/TextUI/TestRunner.php +++ b/vendor/phpunit/phpunit/src/TextUI/TestRunner.php @@ -42,16 +42,16 @@ class PHPUnit_TextUI_TestRunner extends PHPUnit_Runner_BaseTestRunner */ protected static $versionStringPrinted = false; - /** - * @var array - */ - private $missingExtensions = array(); - /** * @var Runtime */ private $runtime; + /** + * @var bool + */ + private $messagePrinted = false; + /** * @param PHPUnit_Runner_TestSuiteLoader $loader * @param PHP_CodeCoverage_Filter $filter @@ -61,7 +61,7 @@ class PHPUnit_TextUI_TestRunner extends PHPUnit_Runner_BaseTestRunner public function __construct(PHPUnit_Runner_TestSuiteLoader $loader = null, PHP_CodeCoverage_Filter $filter = null) { if ($filter === null) { - $filter = $this->getCodeCoverageFilter(); + $filter = new PHP_CodeCoverage_Filter; } $this->codeCoverageFilter = $filter; @@ -77,7 +77,7 @@ class PHPUnit_TextUI_TestRunner extends PHPUnit_Runner_BaseTestRunner * * @throws PHPUnit_Framework_Exception */ - public static function run($test, array $arguments = array()) + public static function run($test, array $arguments = []) { if ($test instanceof ReflectionClass) { $test = new PHPUnit_Framework_TestSuite($test); @@ -141,10 +141,11 @@ class PHPUnit_TextUI_TestRunner extends PHPUnit_Runner_BaseTestRunner /** * @param PHPUnit_Framework_Test $suite * @param array $arguments + * @param bool $exit * * @return PHPUnit_Framework_TestResult */ - public function doRun(PHPUnit_Framework_Test $suite, array $arguments = array()) + public function doRun(PHPUnit_Framework_Test $suite, array $arguments = [], $exit) { if (isset($arguments['configuration'])) { $GLOBALS['__PHPUNIT_CONFIGURATION_FILE'] = $arguments['configuration']; @@ -166,8 +167,8 @@ class PHPUnit_TextUI_TestRunner extends PHPUnit_Runner_BaseTestRunner $suite->setBackupStaticAttributes(true); } - if ($arguments['disallowChangesToGlobalState'] === true) { - $suite->setDisallowChangesToGlobalState(true); + if ($arguments['beStrictAboutChangesToGlobalState'] === true) { + $suite->setbeStrictAboutChangesToGlobalState(true); } if (is_integer($arguments['repeat'])) { @@ -203,6 +204,10 @@ class PHPUnit_TextUI_TestRunner extends PHPUnit_Runner_BaseTestRunner $result->stopOnFailure(true); } + if ($arguments['stopOnWarning']) { + $result->stopOnWarning(true); + } + if ($arguments['stopOnIncomplete']) { $result->stopOnIncomplete(true); } @@ -233,11 +238,12 @@ class PHPUnit_TextUI_TestRunner extends PHPUnit_Runner_BaseTestRunner } $this->printer = new $printerClass( - isset($arguments['stderr']) ? 'php://stderr' : null, - $arguments['verbose'], - $arguments['colors'], - $arguments['debug'], - $arguments['columns'] + isset($arguments['stderr']) ? 'php://stderr' : null, + $arguments['verbose'], + $arguments['colors'], + $arguments['debug'], + $arguments['columns'], + $arguments['reverseList'] ); } } @@ -250,42 +256,27 @@ class PHPUnit_TextUI_TestRunner extends PHPUnit_Runner_BaseTestRunner self::$versionStringPrinted = true; if ($arguments['verbose']) { - $this->printer->write( - sprintf( - "\nRuntime:\t%s", - $this->runtime->getNameWithVersion() - ) - ); + $runtime = $this->runtime->getNameWithVersion(); if ($this->runtime->hasXdebug()) { - $this->printer->write( - sprintf( - ' with Xdebug %s', - phpversion('xdebug') - ) + $runtime .= sprintf( + ' with Xdebug %s', + phpversion('xdebug') ); } + $this->writeMessage('Runtime', $runtime); + if (isset($arguments['configuration'])) { - $this->printer->write( - sprintf( - "\nConfiguration:\t%s", - $arguments['configuration']->getFilename() - ) + $this->writeMessage( + 'Configuration', + $arguments['configuration']->getFilename() ); } - - $this->printer->write("\n"); } - if (isset($arguments['deprecatedStrictModeOption'])) { - print "Warning:\tDeprecated option \"--strict\" used\n"; - } elseif (isset($arguments['deprecatedStrictModeSetting'])) { - print "Warning:\tDeprecated configuration setting \"strict\" used\n"; - } - - if (isset($arguments['deprecatedSeleniumConfiguration'])) { - print "Warning:\tDeprecated configuration setting \"selenium\" used\n"; + if (isset($arguments['deprecatedCheckForUnintentionallyCoveredCodeSettingUsed'])) { + print "Warning: Deprecated configuration setting \"checkForUnintentionallyCoveredCode\" used\n"; } } @@ -341,27 +332,19 @@ class PHPUnit_TextUI_TestRunner extends PHPUnit_Runner_BaseTestRunner $codeCoverageReports = 0; } - if ($codeCoverageReports > 0 && (!extension_loaded('tokenizer') || !$this->runtime->canCollectCodeCoverage())) { - if (!extension_loaded('tokenizer')) { - $this->showExtensionNotLoadedWarning( - 'tokenizer', - 'No code coverage will be generated.' - ); - } elseif (!extension_loaded('Xdebug')) { - $this->showExtensionNotLoadedWarning( - 'Xdebug', - 'No code coverage will be generated.' - ); - } + if ($codeCoverageReports > 0) { + if (!$this->runtime->canCollectCodeCoverage()) { + $this->writeMessage('Error', 'No code coverage driver is available'); - $codeCoverageReports = 0; + $codeCoverageReports = 0; + } elseif (!isset($arguments['whitelist']) && !$this->codeCoverageFilter->hasWhitelist()) { + $this->writeMessage('Error', 'No whitelist configured, no code coverage will be generated'); + + $codeCoverageReports = 0; + } } if (!$this->printer instanceof PHPUnit_Util_Log_TAP) { - if ($codeCoverageReports > 0 && !$this->codeCoverageFilter->hasWhitelist()) { - $this->printer->write("Warning:\tNo whitelist configured for code coverage\n"); - } - $this->printer->write("\n"); } @@ -389,10 +372,12 @@ class PHPUnit_TextUI_TestRunner extends PHPUnit_Runner_BaseTestRunner ); } - if (isset($arguments['mapTestClassNameToCoveredClassName'])) { - $codeCoverage->setMapTestClassNameToCoveredClassName( - $arguments['mapTestClassNameToCoveredClassName'] - ); + if (isset($arguments['disableCodeCoverageIgnore'])) { + $codeCoverage->setDisableIgnoredLines(true); + } + + if (isset($arguments['whitelist'])) { + $this->codeCoverageFilter->addDirectoryToWhitelist($arguments['whitelist']); } $result->setCodeCoverage($codeCoverage); @@ -416,6 +401,12 @@ class PHPUnit_TextUI_TestRunner extends PHPUnit_Runner_BaseTestRunner ); } + if (isset($arguments['teamcityLogfile'])) { + $result->addListener( + new PHPUnit_Util_Log_TeamCity($arguments['teamcityLogfile']) + ); + } + if (isset($arguments['junitLogfile'])) { $result->addListener( new PHPUnit_Util_Log_JUnit( @@ -428,7 +419,8 @@ class PHPUnit_TextUI_TestRunner extends PHPUnit_Runner_BaseTestRunner $result->beStrictAboutTestsThatDoNotTestAnything($arguments['reportUselessTests']); $result->beStrictAboutOutputDuringTests($arguments['disallowTestOutput']); $result->beStrictAboutTodoAnnotatedTests($arguments['disallowTodoAnnotatedTests']); - $result->beStrictAboutTestSize($arguments['enforceTimeLimit']); + $result->beStrictAboutResourceUsageDuringSmallTests($arguments['beStrictAboutResourceUsageDuringSmallTests']); + $result->enforceTimeLimit($arguments['enforceTimeLimit']); $result->setTimeoutForSmallTests($arguments['timeoutForSmallTests']); $result->setTimeoutForMediumTests($arguments['timeoutForMediumTests']); $result->setTimeoutForLargeTests($arguments['timeoutForLargeTests']); @@ -452,11 +444,17 @@ class PHPUnit_TextUI_TestRunner extends PHPUnit_Runner_BaseTestRunner "\nGenerating code coverage report in Clover XML format ..." ); - $writer = new PHP_CodeCoverage_Report_Clover; - $writer->process($codeCoverage, $arguments['coverageClover']); + try { + $writer = new PHP_CodeCoverage_Report_Clover; + $writer->process($codeCoverage, $arguments['coverageClover']); - $this->printer->write(" done\n"); - unset($writer); + $this->printer->write(" done\n"); + unset($writer); + } catch (PHP_CodeCoverage_Exception $e) { + $this->printer->write( + " failed\n" . $e->getMessage() . "\n" + ); + } } if (isset($arguments['coverageCrap4J'])) { @@ -464,11 +462,17 @@ class PHPUnit_TextUI_TestRunner extends PHPUnit_Runner_BaseTestRunner "\nGenerating Crap4J report XML file ..." ); - $writer = new PHP_CodeCoverage_Report_Crap4j($arguments['crap4jThreshold']); - $writer->process($codeCoverage, $arguments['coverageCrap4J']); + try { + $writer = new PHP_CodeCoverage_Report_Crap4j($arguments['crap4jThreshold']); + $writer->process($codeCoverage, $arguments['coverageCrap4J']); - $this->printer->write(" done\n"); - unset($writer); + $this->printer->write(" done\n"); + unset($writer); + } catch (PHP_CodeCoverage_Exception $e) { + $this->printer->write( + " failed\n" . $e->getMessage() . "\n" + ); + } } if (isset($arguments['coverageHtml'])) { @@ -476,19 +480,25 @@ class PHPUnit_TextUI_TestRunner extends PHPUnit_Runner_BaseTestRunner "\nGenerating code coverage report in HTML format ..." ); - $writer = new PHP_CodeCoverage_Report_HTML( - $arguments['reportLowUpperBound'], - $arguments['reportHighLowerBound'], - sprintf( - ' and PHPUnit %s', - PHPUnit_Runner_Version::id() - ) - ); + try { + $writer = new PHP_CodeCoverage_Report_HTML( + $arguments['reportLowUpperBound'], + $arguments['reportHighLowerBound'], + sprintf( + ' and PHPUnit %s', + PHPUnit_Runner_Version::id() + ) + ); - $writer->process($codeCoverage, $arguments['coverageHtml']); + $writer->process($codeCoverage, $arguments['coverageHtml']); - $this->printer->write(" done\n"); - unset($writer); + $this->printer->write(" done\n"); + unset($writer); + } catch (PHP_CodeCoverage_Exception $e) { + $this->printer->write( + " failed\n" . $e->getMessage() . "\n" + ); + } } if (isset($arguments['coveragePHP'])) { @@ -496,11 +506,17 @@ class PHPUnit_TextUI_TestRunner extends PHPUnit_Runner_BaseTestRunner "\nGenerating code coverage report in PHP format ..." ); - $writer = new PHP_CodeCoverage_Report_PHP; - $writer->process($codeCoverage, $arguments['coveragePHP']); + try { + $writer = new PHP_CodeCoverage_Report_PHP; + $writer->process($codeCoverage, $arguments['coveragePHP']); - $this->printer->write(" done\n"); - unset($writer); + $this->printer->write(" done\n"); + unset($writer); + } catch (PHP_CodeCoverage_Exception $e) { + $this->printer->write( + " failed\n" . $e->getMessage() . "\n" + ); + } } if (isset($arguments['coverageText'])) { @@ -529,11 +545,39 @@ class PHPUnit_TextUI_TestRunner extends PHPUnit_Runner_BaseTestRunner "\nGenerating code coverage report in PHPUnit XML format ..." ); - $writer = new PHP_CodeCoverage_Report_XML; - $writer->process($codeCoverage, $arguments['coverageXml']); + try { + $writer = new PHP_CodeCoverage_Report_XML; + $writer->process($codeCoverage, $arguments['coverageXml']); - $this->printer->write(" done\n"); - unset($writer); + $this->printer->write(" done\n"); + unset($writer); + } catch (PHP_CodeCoverage_Exception $e) { + $this->printer->write( + " failed\n" . $e->getMessage() . "\n" + ); + } + } + } + + if ($exit) { + if ($result->wasSuccessful()) { + if ($arguments['failOnRisky'] && !$result->allHarmless()) { + exit(self::FAILURE_EXIT); + } + + if ($arguments['failOnWarning'] && $result->warningCount() > 0) { + exit(self::FAILURE_EXIT); + } + + exit(self::SUCCESS_EXIT); + } + + if ($result->errorCount() > 0) { + exit(self::EXCEPTION_EXIT); + } + + if ($result->failureCount() > 0) { + exit(self::FAILURE_EXIT); } } @@ -610,15 +654,15 @@ class PHPUnit_TextUI_TestRunner extends PHPUnit_Runner_BaseTestRunner $arguments['debug'] = isset($arguments['debug']) ? $arguments['debug'] : false; $arguments['filter'] = isset($arguments['filter']) ? $arguments['filter'] : false; - $arguments['listeners'] = isset($arguments['listeners']) ? $arguments['listeners'] : array(); + $arguments['listeners'] = isset($arguments['listeners']) ? $arguments['listeners'] : []; if (isset($arguments['configuration'])) { $arguments['configuration']->handlePHPConfiguration(); $phpunitConfiguration = $arguments['configuration']->getPHPUnitConfiguration(); - if (isset($phpunitConfiguration['deprecatedStrictModeSetting'])) { - $arguments['deprecatedStrictModeSetting'] = true; + if (isset($phpunitConfiguration['deprecatedCheckForUnintentionallyCoveredCodeSettingUsed'])) { + $arguments['deprecatedCheckForUnintentionallyCoveredCodeSettingUsed'] = true; } if (isset($phpunitConfiguration['backupGlobals']) && @@ -631,9 +675,9 @@ class PHPUnit_TextUI_TestRunner extends PHPUnit_Runner_BaseTestRunner $arguments['backupStaticAttributes'] = $phpunitConfiguration['backupStaticAttributes']; } - if (isset($phpunitConfiguration['disallowChangesToGlobalState']) && - !isset($arguments['disallowChangesToGlobalState'])) { - $arguments['disallowChangesToGlobalState'] = $phpunitConfiguration['disallowChangesToGlobalState']; + if (isset($phpunitConfiguration['beStrictAboutChangesToGlobalState']) && + !isset($arguments['beStrictAboutChangesToGlobalState'])) { + $arguments['beStrictAboutChangesToGlobalState'] = $phpunitConfiguration['beStrictAboutChangesToGlobalState']; } if (isset($phpunitConfiguration['bootstrap']) && @@ -681,6 +725,11 @@ class PHPUnit_TextUI_TestRunner extends PHPUnit_Runner_BaseTestRunner $arguments['stopOnFailure'] = $phpunitConfiguration['stopOnFailure']; } + if (isset($phpunitConfiguration['stopOnWarning']) && + !isset($arguments['stopOnWarning'])) { + $arguments['stopOnWarning'] = $phpunitConfiguration['stopOnWarning']; + } + if (isset($phpunitConfiguration['stopOnIncomplete']) && !isset($arguments['stopOnIncomplete'])) { $arguments['stopOnIncomplete'] = $phpunitConfiguration['stopOnIncomplete']; @@ -696,6 +745,16 @@ class PHPUnit_TextUI_TestRunner extends PHPUnit_Runner_BaseTestRunner $arguments['stopOnSkipped'] = $phpunitConfiguration['stopOnSkipped']; } + if (isset($phpunitConfiguration['failOnWarning']) && + !isset($arguments['failOnWarning'])) { + $arguments['failOnWarning'] = $phpunitConfiguration['failOnWarning']; + } + + if (isset($phpunitConfiguration['failOnRisky']) && + !isset($arguments['failOnRisky'])) { + $arguments['failOnRisky'] = $phpunitConfiguration['failOnRisky']; + } + if (isset($phpunitConfiguration['timeoutForSmallTests']) && !isset($arguments['timeoutForSmallTests'])) { $arguments['timeoutForSmallTests'] = $phpunitConfiguration['timeoutForSmallTests']; @@ -736,22 +795,32 @@ class PHPUnit_TextUI_TestRunner extends PHPUnit_Runner_BaseTestRunner $arguments['disallowTodoAnnotatedTests'] = $phpunitConfiguration['disallowTodoAnnotatedTests']; } + if (isset($phpunitConfiguration['beStrictAboutResourceUsageDuringSmallTests']) && + !isset($arguments['beStrictAboutResourceUsageDuringSmallTests'])) { + $arguments['beStrictAboutResourceUsageDuringSmallTests'] = $phpunitConfiguration['beStrictAboutResourceUsageDuringSmallTests']; + } + if (isset($phpunitConfiguration['verbose']) && !isset($arguments['verbose'])) { $arguments['verbose'] = $phpunitConfiguration['verbose']; } + if (isset($phpunitConfiguration['reverseDefectList']) && + !isset($arguments['reverseList'])) { + $arguments['reverseList'] = $phpunitConfiguration['reverseDefectList']; + } + if (isset($phpunitConfiguration['forceCoversAnnotation']) && !isset($arguments['forceCoversAnnotation'])) { $arguments['forceCoversAnnotation'] = $phpunitConfiguration['forceCoversAnnotation']; } - if (isset($phpunitConfiguration['mapTestClassNameToCoveredClassName']) && - !isset($arguments['mapTestClassNameToCoveredClassName'])) { - $arguments['mapTestClassNameToCoveredClassName'] = $phpunitConfiguration['mapTestClassNameToCoveredClassName']; + if (isset($phpunitConfiguration['disableCodeCoverageIgnore']) && + !isset($arguments['disableCodeCoverageIgnore'])) { + $arguments['disableCodeCoverageIgnore'] = $phpunitConfiguration['disableCodeCoverageIgnore']; } - $groupCliArgs = array(); + $groupCliArgs = []; if (!empty($arguments['groups'])) { $groupCliArgs = $arguments['groups']; @@ -867,6 +936,11 @@ class PHPUnit_TextUI_TestRunner extends PHPUnit_Runner_BaseTestRunner $arguments['tapLogfile'] = $loggingConfiguration['tap']; } + if (isset($loggingConfiguration['teamcity']) && + !isset($arguments['teamcityLogfile'])) { + $arguments['teamcityLogfile'] = $loggingConfiguration['teamcity']; + } + if (isset($loggingConfiguration['junit']) && !isset($arguments['junitLogfile'])) { $arguments['junitLogfile'] = $loggingConfiguration['junit']; @@ -898,35 +972,6 @@ class PHPUnit_TextUI_TestRunner extends PHPUnit_Runner_BaseTestRunner $arguments['addUncoveredFilesFromWhitelist'] = $filterConfiguration['whitelist']['addUncoveredFilesFromWhitelist']; $arguments['processUncoveredFilesFromWhitelist'] = $filterConfiguration['whitelist']['processUncoveredFilesFromWhitelist']; - if (empty($filterConfiguration['whitelist']['include']['directory']) && - empty($filterConfiguration['whitelist']['include']['file'])) { - foreach ($filterConfiguration['blacklist']['include']['directory'] as $dir) { - $this->codeCoverageFilter->addDirectoryToBlacklist( - $dir['path'], - $dir['suffix'], - $dir['prefix'], - $dir['group'] - ); - } - - foreach ($filterConfiguration['blacklist']['include']['file'] as $file) { - $this->codeCoverageFilter->addFileToBlacklist($file); - } - - foreach ($filterConfiguration['blacklist']['exclude']['directory'] as $dir) { - $this->codeCoverageFilter->removeDirectoryFromBlacklist( - $dir['path'], - $dir['suffix'], - $dir['prefix'], - $dir['group'] - ); - } - - foreach ($filterConfiguration['blacklist']['exclude']['file'] as $file) { - $this->codeCoverageFilter->removeFileFromBlacklist($file); - } - } - foreach ($filterConfiguration['whitelist']['include']['directory'] as $dir) { $this->codeCoverageFilter->addDirectoryToWhitelist( $dir['path'], @@ -953,79 +998,66 @@ class PHPUnit_TextUI_TestRunner extends PHPUnit_Runner_BaseTestRunner } } - $arguments['addUncoveredFilesFromWhitelist'] = isset($arguments['addUncoveredFilesFromWhitelist']) ? $arguments['addUncoveredFilesFromWhitelist'] : true; - $arguments['processUncoveredFilesFromWhitelist'] = isset($arguments['processUncoveredFilesFromWhitelist']) ? $arguments['processUncoveredFilesFromWhitelist'] : false; - $arguments['backupGlobals'] = isset($arguments['backupGlobals']) ? $arguments['backupGlobals'] : null; - $arguments['backupStaticAttributes'] = isset($arguments['backupStaticAttributes']) ? $arguments['backupStaticAttributes'] : null; - $arguments['disallowChangesToGlobalState'] = isset($arguments['disallowChangesToGlobalState']) ? $arguments['disallowChangesToGlobalState'] : null; - $arguments['cacheTokens'] = isset($arguments['cacheTokens']) ? $arguments['cacheTokens'] : false; - $arguments['columns'] = isset($arguments['columns']) ? $arguments['columns'] : 80; - $arguments['colors'] = isset($arguments['colors']) ? $arguments['colors'] : PHPUnit_TextUI_ResultPrinter::COLOR_DEFAULT; - $arguments['convertErrorsToExceptions'] = isset($arguments['convertErrorsToExceptions']) ? $arguments['convertErrorsToExceptions'] : true; - $arguments['convertNoticesToExceptions'] = isset($arguments['convertNoticesToExceptions']) ? $arguments['convertNoticesToExceptions'] : true; - $arguments['convertWarningsToExceptions'] = isset($arguments['convertWarningsToExceptions']) ? $arguments['convertWarningsToExceptions'] : true; - $arguments['excludeGroups'] = isset($arguments['excludeGroups']) ? $arguments['excludeGroups'] : array(); - $arguments['groups'] = isset($arguments['groups']) ? $arguments['groups'] : array(); - $arguments['logIncompleteSkipped'] = isset($arguments['logIncompleteSkipped']) ? $arguments['logIncompleteSkipped'] : false; - $arguments['processIsolation'] = isset($arguments['processIsolation']) ? $arguments['processIsolation'] : false; - $arguments['repeat'] = isset($arguments['repeat']) ? $arguments['repeat'] : false; - $arguments['reportHighLowerBound'] = isset($arguments['reportHighLowerBound']) ? $arguments['reportHighLowerBound'] : 90; - $arguments['reportLowUpperBound'] = isset($arguments['reportLowUpperBound']) ? $arguments['reportLowUpperBound'] : 50; - $arguments['crap4jThreshold'] = isset($arguments['crap4jThreshold']) ? $arguments['crap4jThreshold'] : 30; - $arguments['stopOnError'] = isset($arguments['stopOnError']) ? $arguments['stopOnError'] : false; - $arguments['stopOnFailure'] = isset($arguments['stopOnFailure']) ? $arguments['stopOnFailure'] : false; - $arguments['stopOnIncomplete'] = isset($arguments['stopOnIncomplete']) ? $arguments['stopOnIncomplete'] : false; - $arguments['stopOnRisky'] = isset($arguments['stopOnRisky']) ? $arguments['stopOnRisky'] : false; - $arguments['stopOnSkipped'] = isset($arguments['stopOnSkipped']) ? $arguments['stopOnSkipped'] : false; - $arguments['timeoutForSmallTests'] = isset($arguments['timeoutForSmallTests']) ? $arguments['timeoutForSmallTests'] : 1; - $arguments['timeoutForMediumTests'] = isset($arguments['timeoutForMediumTests']) ? $arguments['timeoutForMediumTests'] : 10; - $arguments['timeoutForLargeTests'] = isset($arguments['timeoutForLargeTests']) ? $arguments['timeoutForLargeTests'] : 60; - $arguments['reportUselessTests'] = isset($arguments['reportUselessTests']) ? $arguments['reportUselessTests'] : false; - $arguments['strictCoverage'] = isset($arguments['strictCoverage']) ? $arguments['strictCoverage'] : false; - $arguments['disallowTestOutput'] = isset($arguments['disallowTestOutput']) ? $arguments['disallowTestOutput'] : false; - $arguments['enforceTimeLimit'] = isset($arguments['enforceTimeLimit']) ? $arguments['enforceTimeLimit'] : false; - $arguments['disallowTodoAnnotatedTests'] = isset($arguments['disallowTodoAnnotatedTests']) ? $arguments['disallowTodoAnnotatedTests'] : false; - $arguments['verbose'] = isset($arguments['verbose']) ? $arguments['verbose'] : false; + $arguments['addUncoveredFilesFromWhitelist'] = isset($arguments['addUncoveredFilesFromWhitelist']) ? $arguments['addUncoveredFilesFromWhitelist'] : true; + $arguments['processUncoveredFilesFromWhitelist'] = isset($arguments['processUncoveredFilesFromWhitelist']) ? $arguments['processUncoveredFilesFromWhitelist'] : false; + $arguments['backupGlobals'] = isset($arguments['backupGlobals']) ? $arguments['backupGlobals'] : null; + $arguments['backupStaticAttributes'] = isset($arguments['backupStaticAttributes']) ? $arguments['backupStaticAttributes'] : null; + $arguments['beStrictAboutChangesToGlobalState'] = isset($arguments['beStrictAboutChangesToGlobalState']) ? $arguments['beStrictAboutChangesToGlobalState'] : null; + $arguments['cacheTokens'] = isset($arguments['cacheTokens']) ? $arguments['cacheTokens'] : false; + $arguments['columns'] = isset($arguments['columns']) ? $arguments['columns'] : 80; + $arguments['colors'] = isset($arguments['colors']) ? $arguments['colors'] : PHPUnit_TextUI_ResultPrinter::COLOR_DEFAULT; + $arguments['convertErrorsToExceptions'] = isset($arguments['convertErrorsToExceptions']) ? $arguments['convertErrorsToExceptions'] : true; + $arguments['convertNoticesToExceptions'] = isset($arguments['convertNoticesToExceptions']) ? $arguments['convertNoticesToExceptions'] : true; + $arguments['convertWarningsToExceptions'] = isset($arguments['convertWarningsToExceptions']) ? $arguments['convertWarningsToExceptions'] : true; + $arguments['excludeGroups'] = isset($arguments['excludeGroups']) ? $arguments['excludeGroups'] : []; + $arguments['groups'] = isset($arguments['groups']) ? $arguments['groups'] : []; + $arguments['logIncompleteSkipped'] = isset($arguments['logIncompleteSkipped']) ? $arguments['logIncompleteSkipped'] : false; + $arguments['processIsolation'] = isset($arguments['processIsolation']) ? $arguments['processIsolation'] : false; + $arguments['repeat'] = isset($arguments['repeat']) ? $arguments['repeat'] : false; + $arguments['reportHighLowerBound'] = isset($arguments['reportHighLowerBound']) ? $arguments['reportHighLowerBound'] : 90; + $arguments['reportLowUpperBound'] = isset($arguments['reportLowUpperBound']) ? $arguments['reportLowUpperBound'] : 50; + $arguments['crap4jThreshold'] = isset($arguments['crap4jThreshold']) ? $arguments['crap4jThreshold'] : 30; + $arguments['stopOnError'] = isset($arguments['stopOnError']) ? $arguments['stopOnError'] : false; + $arguments['stopOnFailure'] = isset($arguments['stopOnFailure']) ? $arguments['stopOnFailure'] : false; + $arguments['stopOnWarning'] = isset($arguments['stopOnWarning']) ? $arguments['stopOnWarning'] : false; + $arguments['stopOnIncomplete'] = isset($arguments['stopOnIncomplete']) ? $arguments['stopOnIncomplete'] : false; + $arguments['stopOnRisky'] = isset($arguments['stopOnRisky']) ? $arguments['stopOnRisky'] : false; + $arguments['stopOnSkipped'] = isset($arguments['stopOnSkipped']) ? $arguments['stopOnSkipped'] : false; + $arguments['failOnWarning'] = isset($arguments['failOnWarning']) ? $arguments['failOnWarning'] : false; + $arguments['failOnRisky'] = isset($arguments['failOnRisky']) ? $arguments['failOnRisky'] : false; + $arguments['timeoutForSmallTests'] = isset($arguments['timeoutForSmallTests']) ? $arguments['timeoutForSmallTests'] : 1; + $arguments['timeoutForMediumTests'] = isset($arguments['timeoutForMediumTests']) ? $arguments['timeoutForMediumTests'] : 10; + $arguments['timeoutForLargeTests'] = isset($arguments['timeoutForLargeTests']) ? $arguments['timeoutForLargeTests'] : 60; + $arguments['reportUselessTests'] = isset($arguments['reportUselessTests']) ? $arguments['reportUselessTests'] : false; + $arguments['strictCoverage'] = isset($arguments['strictCoverage']) ? $arguments['strictCoverage'] : false; + $arguments['disallowTestOutput'] = isset($arguments['disallowTestOutput']) ? $arguments['disallowTestOutput'] : false; + $arguments['enforceTimeLimit'] = isset($arguments['enforceTimeLimit']) ? $arguments['enforceTimeLimit'] : false; + $arguments['disallowTodoAnnotatedTests'] = isset($arguments['disallowTodoAnnotatedTests']) ? $arguments['disallowTodoAnnotatedTests'] : false; + $arguments['beStrictAboutResourceUsageDuringSmallTests'] = isset($arguments['beStrictAboutResourceUsageDuringSmallTests']) ? $arguments['beStrictAboutResourceUsageDuringSmallTests'] : false; + $arguments['reverseList'] = isset($arguments['reverseList']) ? $arguments['reverseList'] : false; + $arguments['verbose'] = isset($arguments['verbose']) ? $arguments['verbose'] : false; } /** - * @param $extension + * @param string $type * @param string $message * - * @since Method available since Release 4.7.3 + * @since Method available since Release 5.0.0 */ - private function showExtensionNotLoadedWarning($extension, $message = '') + private function writeMessage($type, $message) { - if (isset($this->missingExtensions[$extension])) { - return; + if (!$this->messagePrinted) { + $this->write("\n"); } - $this->write("Warning:\t" . 'The ' . $extension . ' extension is not loaded' . "\n"); + $this->write( + sprintf( + "%-15s%s\n", + $type . ':', + $message + ) + ); - if (!empty($message)) { - $this->write("\t\t" . $message . "\n"); - } - - $this->missingExtensions[$extension] = true; - } - - /** - * @return PHP_CodeCoverage_Filter - */ - private function getCodeCoverageFilter() - { - $filter = new PHP_CodeCoverage_Filter; - - if (defined('__PHPUNIT_PHAR__')) { - $filter->addFileToBlacklist(__PHPUNIT_PHAR__); - } - - $blacklist = new PHPUnit_Util_Blacklist; - - foreach ($blacklist->getBlacklistedDirectories() as $directory) { - $filter->addDirectoryToBlacklist($directory); - } - - return $filter; + $this->messagePrinted = true; } } diff --git a/vendor/phpunit/phpunit/src/Util/Blacklist.php b/vendor/phpunit/phpunit/src/Util/Blacklist.php index a4839ee..1fdf94c 100644 --- a/vendor/phpunit/phpunit/src/Util/Blacklist.php +++ b/vendor/phpunit/phpunit/src/Util/Blacklist.php @@ -18,7 +18,7 @@ class PHPUnit_Util_Blacklist /** * @var array */ - public static $blacklistedClassNames = array( + public static $blacklistedClassNames = [ 'File_Iterator' => 1, 'PHP_CodeCoverage' => 1, 'PHP_Invoker' => 1, @@ -27,7 +27,6 @@ class PHPUnit_Util_Blacklist 'PHPUnit_Framework_TestCase' => 2, 'PHPUnit_Extensions_Database_TestCase' => 2, 'PHPUnit_Framework_MockObject_Generator' => 2, - 'PHPUnit_Extensions_SeleniumTestCase' => 2, 'Text_Template' => 1, 'Symfony\Component\Yaml\Yaml' => 1, 'SebastianBergmann\Diff\Diff' => 1, @@ -40,8 +39,9 @@ class PHPUnit_Util_Blacklist 'Composer\Autoload\ClassLoader' => 1, 'Doctrine\Instantiator\Instantiator' => 1, 'phpDocumentor\Reflection\DocBlock' => 1, - 'Prophecy\Prophet' => 1 - ); + 'Prophecy\Prophet' => 1, + 'DeepCopy\DeepCopy' => 1 + ]; /** * @var array @@ -85,7 +85,7 @@ class PHPUnit_Util_Blacklist private function initialize() { if (self::$directories === null) { - self::$directories = array(); + self::$directories = []; foreach (self::$blacklistedClassNames as $className => $parent) { if (!class_exists($className)) { diff --git a/vendor/phpunit/phpunit/src/Util/Configuration.php b/vendor/phpunit/phpunit/src/Util/Configuration.php index 8e4777d..e88f700 100644 --- a/vendor/phpunit/phpunit/src/Util/Configuration.php +++ b/vendor/phpunit/phpunit/src/Util/Configuration.php @@ -26,25 +26,30 @@ * convertNoticesToExceptions="true" * convertWarningsToExceptions="true" * forceCoversAnnotation="false" - * mapTestClassNameToCoveredClassName="false" * printerClass="PHPUnit_TextUI_ResultPrinter" * processIsolation="false" * stopOnError="false" * stopOnFailure="false" + * stopOnWarning="false" * stopOnIncomplete="false" * stopOnRisky="false" * stopOnSkipped="false" + * failOnWarning="false" + * failOnRisky="false" * testSuiteLoaderClass="PHPUnit_Runner_StandardTestSuiteLoader" + * beStrictAboutChangesToGlobalState="false" + * beStrictAboutCoversAnnotation="false" + * beStrictAboutOutputDuringTests="false" + * beStrictAboutResourceUsageDuringSmallTests="false" + * beStrictAboutTestsThatDoNotTestAnything="false" + * beStrictAboutTodoAnnotatedTests="false" + * checkForUnintentionallyCoveredCode="false" + * enforceTimeLimit="false" * timeoutForSmallTests="1" * timeoutForMediumTests="10" * timeoutForLargeTests="60" - * beStrictAboutTestsThatDoNotTestAnything="false" - * beStrictAboutOutputDuringTests="false" - * beStrictAboutTestSize="false" - * beStrictAboutTodoAnnotatedTests="false" - * checkForUnintentionallyCoveredCode="false" - * disallowChangesToGlobalState="false" - * verbose="false"> + * verbose="false" + * reverseDefectList="false"> * * * /path/to/files @@ -63,14 +68,6 @@ * * * - * - * /path/to/files - * /path/to/file - * - * /path/to/files - * /path/to/file - * - * * * /path/to/files @@ -108,6 +105,7 @@ * * * + * * * * @@ -126,14 +124,6 @@ * * * - * - * - * - * * * * @@ -141,7 +131,7 @@ */ class PHPUnit_Util_Configuration { - private static $instances = array(); + private static $instances = []; protected $document; protected $xpath; @@ -241,46 +231,28 @@ class PHPUnit_Util_Configuration } } - return array( - 'blacklist' => array( - 'include' => array( - 'directory' => $this->readFilterDirectories( - 'filter/blacklist/directory' - ), - 'file' => $this->readFilterFiles( - 'filter/blacklist/file' - ) - ), - 'exclude' => array( - 'directory' => $this->readFilterDirectories( - 'filter/blacklist/exclude/directory' - ), - 'file' => $this->readFilterFiles( - 'filter/blacklist/exclude/file' - ) - ) - ), - 'whitelist' => array( + return [ + 'whitelist' => [ 'addUncoveredFilesFromWhitelist' => $addUncoveredFilesFromWhitelist, 'processUncoveredFilesFromWhitelist' => $processUncoveredFilesFromWhitelist, - 'include' => array( + 'include' => [ 'directory' => $this->readFilterDirectories( 'filter/whitelist/directory' ), 'file' => $this->readFilterFiles( 'filter/whitelist/file' ) - ), - 'exclude' => array( + ], + 'exclude' => [ 'directory' => $this->readFilterDirectories( 'filter/whitelist/exclude/directory' ), 'file' => $this->readFilterFiles( 'filter/whitelist/exclude/file' ) - ) - ) - ); + ] + ] + ]; } /** @@ -292,10 +264,10 @@ class PHPUnit_Util_Configuration */ public function getGroupConfiguration() { - $groups = array( - 'include' => array(), - 'exclude' => array() - ); + $groups = [ + 'include' => [], + 'exclude' => [] + ]; foreach ($this->xpath->query('groups/include/group') as $group) { $groups['include'][] = (string) $group->textContent; @@ -317,12 +289,12 @@ class PHPUnit_Util_Configuration */ public function getListenerConfiguration() { - $result = array(); + $result = []; foreach ($this->xpath->query('listeners/listener') as $listener) { $class = (string) $listener->getAttribute('class'); $file = ''; - $arguments = array(); + $arguments = []; if ($listener->getAttribute('file')) { $file = $this->toAbsolutePath( @@ -346,11 +318,11 @@ class PHPUnit_Util_Configuration } } - $result[] = array( + $result[] = [ 'class' => $class, 'file' => $file, 'arguments' => $arguments - ); + ]; } return $result; @@ -363,7 +335,7 @@ class PHPUnit_Util_Configuration */ public function getLoggingConfiguration() { - $result = array(); + $result = []; foreach ($this->xpath->query('logging/log') as $log) { $type = (string) $log->getAttribute('type'); @@ -433,19 +405,19 @@ class PHPUnit_Util_Configuration */ public function getPHPConfiguration() { - $result = array( - 'include_path' => array(), - 'ini' => array(), - 'const' => array(), - 'var' => array(), - 'env' => array(), - 'post' => array(), - 'get' => array(), - 'cookie' => array(), - 'server' => array(), - 'files' => array(), - 'request' => array() - ); + $result = [ + 'include_path' => [], + 'ini' => [], + 'const' => [], + 'var' => [], + 'env' => [], + 'post' => [], + 'get' => [], + 'cookie' => [], + 'server' => [], + 'files' => [], + 'request' => [] + ]; foreach ($this->xpath->query('php/includePath') as $includePath) { $path = (string) $includePath->textContent; @@ -468,7 +440,7 @@ class PHPUnit_Util_Configuration $result['const'][$name] = $this->getBoolean($value, $value); } - foreach (array('var', 'env', 'post', 'get', 'cookie', 'server', 'files', 'request') as $array) { + foreach (['var', 'env', 'post', 'get', 'cookie', 'server', 'files', 'request'] as $array) { foreach ($this->xpath->query('php/' . $array) as $var) { $name = (string) $var->getAttribute('name'); $value = (string) $var->getAttribute('value'); @@ -512,7 +484,7 @@ class PHPUnit_Util_Configuration } } - foreach (array('var', 'post', 'get', 'cookie', 'server', 'files', 'request') as $array) { + foreach (['var', 'post', 'get', 'cookie', 'server', 'files', 'request'] as $array) { // See https://github.com/sebastianbergmann/phpunit/issues/277 switch ($array) { case 'var': @@ -552,7 +524,7 @@ class PHPUnit_Util_Configuration */ public function getPHPUnitConfiguration() { - $result = array(); + $result = []; $root = $this->document->documentElement; if ($root->hasAttribute('cacheTokens')) { @@ -640,9 +612,9 @@ class PHPUnit_Util_Configuration ); } - if ($root->hasAttribute('mapTestClassNameToCoveredClassName')) { - $result['mapTestClassNameToCoveredClassName'] = $this->getBoolean( - (string) $root->getAttribute('mapTestClassNameToCoveredClassName'), + if ($root->hasAttribute('disableCodeCoverageIgnore')) { + $result['disableCodeCoverageIgnore'] = $this->getBoolean( + (string) $root->getAttribute('disableCodeCoverageIgnore'), false ); } @@ -668,6 +640,13 @@ class PHPUnit_Util_Configuration ); } + if ($root->hasAttribute('stopOnWarning')) { + $result['stopOnWarning'] = $this->getBoolean( + (string) $root->getAttribute('stopOnWarning'), + false + ); + } + if ($root->hasAttribute('stopOnIncomplete')) { $result['stopOnIncomplete'] = $this->getBoolean( (string) $root->getAttribute('stopOnIncomplete'), @@ -689,6 +668,20 @@ class PHPUnit_Util_Configuration ); } + if ($root->hasAttribute('failOnWarning')) { + $result['failOnWarning'] = $this->getBoolean( + (string) $root->getAttribute('failOnWarning'), + false + ); + } + + if ($root->hasAttribute('failOnRisky')) { + $result['failOnRisky'] = $this->getBoolean( + (string) $root->getAttribute('failOnRisky'), + false + ); + } + if ($root->hasAttribute('testSuiteLoaderClass')) { $result['testSuiteLoaderClass'] = (string) $root->getAttribute( 'testSuiteLoaderClass' @@ -713,6 +706,62 @@ class PHPUnit_Util_Configuration ); } + if ($root->hasAttribute('beStrictAboutChangesToGlobalState')) { + $result['beStrictAboutChangesToGlobalState'] = $this->getBoolean( + (string) $root->getAttribute('beStrictAboutChangesToGlobalState'), + false + ); + } + + if ($root->hasAttribute('beStrictAboutOutputDuringTests')) { + $result['disallowTestOutput'] = $this->getBoolean( + (string) $root->getAttribute('beStrictAboutOutputDuringTests'), + false + ); + } + + if ($root->hasAttribute('beStrictAboutResourceUsageDuringSmallTests')) { + $result['beStrictAboutResourceUsageDuringSmallTests'] = $this->getBoolean( + (string) $root->getAttribute('beStrictAboutResourceUsageDuringSmallTests'), + false + ); + } + + if ($root->hasAttribute('beStrictAboutTestsThatDoNotTestAnything')) { + $result['reportUselessTests'] = $this->getBoolean( + (string) $root->getAttribute('beStrictAboutTestsThatDoNotTestAnything'), + false + ); + } + + if ($root->hasAttribute('beStrictAboutTodoAnnotatedTests')) { + $result['disallowTodoAnnotatedTests'] = $this->getBoolean( + (string) $root->getAttribute('beStrictAboutTodoAnnotatedTests'), + false + ); + } + + if ($root->hasAttribute('beStrictAboutCoversAnnotation')) { + $result['strictCoverage'] = $this->getBoolean( + (string) $root->getAttribute('beStrictAboutCoversAnnotation'), + false + ); + } elseif ($root->hasAttribute('checkForUnintentionallyCoveredCode')) { + $result['strictCoverage'] = $this->getBoolean( + (string) $root->getAttribute('checkForUnintentionallyCoveredCode'), + false + ); + + $result['deprecatedCheckForUnintentionallyCoveredCodeSettingUsed'] = true; + } + + if ($root->hasAttribute('enforceTimeLimit')) { + $result['enforceTimeLimit'] = $this->getBoolean( + (string) $root->getAttribute('enforceTimeLimit'), + false + ); + } + if ($root->hasAttribute('timeoutForSmallTests')) { $result['timeoutForSmallTests'] = $this->getInteger( (string) $root->getAttribute('timeoutForSmallTests'), @@ -734,62 +783,13 @@ class PHPUnit_Util_Configuration ); } - if ($root->hasAttribute('beStrictAboutTestsThatDoNotTestAnything')) { - $result['reportUselessTests'] = $this->getBoolean( - (string) $root->getAttribute('beStrictAboutTestsThatDoNotTestAnything'), + if ($root->hasAttribute('reverseDefectList')) { + $result['reverseDefectList'] = $this->getBoolean( + (string) $root->getAttribute('reverseDefectList'), false ); } - if ($root->hasAttribute('checkForUnintentionallyCoveredCode')) { - $result['strictCoverage'] = $this->getBoolean( - (string) $root->getAttribute('checkForUnintentionallyCoveredCode'), - false - ); - } - - if ($root->hasAttribute('beStrictAboutOutputDuringTests')) { - $result['disallowTestOutput'] = $this->getBoolean( - (string) $root->getAttribute('beStrictAboutOutputDuringTests'), - false - ); - } - - if ($root->hasAttribute('beStrictAboutChangesToGlobalState')) { - $result['disallowChangesToGlobalState'] = $this->getBoolean( - (string) $root->getAttribute('beStrictAboutChangesToGlobalState'), - false - ); - } - - if ($root->hasAttribute('beStrictAboutTestSize')) { - $result['enforceTimeLimit'] = $this->getBoolean( - (string) $root->getAttribute('beStrictAboutTestSize'), - false - ); - } - - if ($root->hasAttribute('beStrictAboutTodoAnnotatedTests')) { - $result['disallowTodoAnnotatedTests'] = $this->getBoolean( - (string) $root->getAttribute('beStrictAboutTodoAnnotatedTests'), - false - ); - } - - if ($root->hasAttribute('strict')) { - $flag = $this->getBoolean( - (string) $root->getAttribute('strict'), - false - ); - - $result['reportUselessTests'] = $flag; - $result['strictCoverage'] = $flag; - $result['disallowTestOutput'] = $flag; - $result['enforceTimeLimit'] = $flag; - $result['disallowTodoAnnotatedTests'] = $flag; - $result['deprecatedStrictModeSetting'] = true; - } - if ($root->hasAttribute('verbose')) { $result['verbose'] = $this->getBoolean( (string) $root->getAttribute('verbose'), @@ -800,57 +800,6 @@ class PHPUnit_Util_Configuration return $result; } - /** - * Returns the SeleniumTestCase browser configuration. - * - * @return array - * - * @since Method available since Release 3.2.9 - */ - public function getSeleniumBrowserConfiguration() - { - $result = array(); - - foreach ($this->xpath->query('selenium/browser') as $config) { - $name = (string) $config->getAttribute('name'); - $browser = (string) $config->getAttribute('browser'); - - if ($config->hasAttribute('host')) { - $host = (string) $config->getAttribute('host'); - } else { - $host = 'localhost'; - } - - if ($config->hasAttribute('port')) { - $port = $this->getInteger( - (string) $config->getAttribute('port'), - 4444 - ); - } else { - $port = 4444; - } - - if ($config->hasAttribute('timeout')) { - $timeout = $this->getInteger( - (string) $config->getAttribute('timeout'), - 30000 - ); - } else { - $timeout = 30000; - } - - $result[] = array( - 'name' => $name, - 'browser' => $browser, - 'host' => $host, - 'port' => $port, - 'timeout' => $timeout - ); - } - - return $result; - } - /** * Returns the test suite configuration. * @@ -900,7 +849,7 @@ class PHPUnit_Util_Configuration $suite = new PHPUnit_Framework_TestSuite; } - $exclude = array(); + $exclude = []; foreach ($testSuiteNode->getElementsByTagName('exclude') as $excludeNode) { $excludeFile = (string) $excludeNode->textContent; @@ -1048,7 +997,7 @@ class PHPUnit_Util_Configuration */ protected function readFilterDirectories($query) { - $directories = array(); + $directories = []; foreach ($this->xpath->query($query) as $directory) { $directoryPath = (string) $directory->textContent; @@ -1075,12 +1024,12 @@ class PHPUnit_Util_Configuration $group = 'DEFAULT'; } - $directories[] = array( + $directories[] = [ 'path' => $this->toAbsolutePath($directoryPath), 'prefix' => $prefix, 'suffix' => $suffix, 'group' => $group - ); + ]; } return $directories; @@ -1095,10 +1044,11 @@ class PHPUnit_Util_Configuration */ protected function readFilterFiles($query) { - $files = array(); + $files = []; foreach ($this->xpath->query($query) as $file) { $filePath = (string) $file->textContent; + if ($filePath) { $files[] = $this->toAbsolutePath($filePath); } @@ -1117,6 +1067,8 @@ class PHPUnit_Util_Configuration */ protected function toAbsolutePath($path, $useIncludePath = false) { + $path = trim($path); + if ($path[0] === '/') { return $path; } diff --git a/vendor/phpunit/phpunit/src/Util/ErrorHandler.php b/vendor/phpunit/phpunit/src/Util/ErrorHandler.php index d75d1be..2407664 100644 --- a/vendor/phpunit/phpunit/src/Util/ErrorHandler.php +++ b/vendor/phpunit/phpunit/src/Util/ErrorHandler.php @@ -23,7 +23,7 @@ require_once dirname(__DIR__) . '/Framework/Error/Deprecated.php'; */ class PHPUnit_Util_ErrorHandler { - protected static $errorStack = array(); + protected static $errorStack = []; /** * Returns the error stack. @@ -49,7 +49,7 @@ class PHPUnit_Util_ErrorHandler return false; } - self::$errorStack[] = array($errno, $errstr, $errfile, $errline); + self::$errorStack[] = [$errno, $errstr, $errfile, $errline]; $trace = debug_backtrace(false); array_shift($trace); diff --git a/vendor/phpunit/phpunit/src/Util/Filesystem.php b/vendor/phpunit/phpunit/src/Util/Filesystem.php index aca601a..14340a8 100644 --- a/vendor/phpunit/phpunit/src/Util/Filesystem.php +++ b/vendor/phpunit/phpunit/src/Util/Filesystem.php @@ -18,7 +18,7 @@ class PHPUnit_Util_Filesystem /** * @var array */ - protected static $buffer = array(); + protected static $buffer = []; /** * Maps class names to source file names: @@ -34,7 +34,7 @@ class PHPUnit_Util_Filesystem public static function classNameToFilename($className) { return str_replace( - array('_', '\\'), + ['_', '\\'], DIRECTORY_SEPARATOR, $className ) . '.php'; diff --git a/vendor/phpunit/phpunit/src/Util/Filter.php b/vendor/phpunit/phpunit/src/Util/Filter.php index 8e81b59..a4d7542 100644 --- a/vendor/phpunit/phpunit/src/Util/Filter.php +++ b/vendor/phpunit/phpunit/src/Util/Filter.php @@ -23,7 +23,7 @@ class PHPUnit_Util_Filter * * @return string */ - public static function getFilteredStacktrace(Exception $e, $asString = true) + public static function getFilteredStacktrace($e, $asString = true) { $prefix = false; $script = realpath($GLOBALS['_SERVER']['SCRIPT_NAME']); @@ -35,7 +35,7 @@ class PHPUnit_Util_Filter if ($asString === true) { $filteredStacktrace = ''; } else { - $filteredStacktrace = array(); + $filteredStacktrace = []; } if ($e instanceof PHPUnit_Framework_SyntheticError) { @@ -58,7 +58,7 @@ class PHPUnit_Util_Filter if (!self::frameExists($eTrace, $eFile, $eLine)) { array_unshift( $eTrace, - array('file' => $eFile, 'line' => $eLine) + ['file' => $eFile, 'line' => $eLine] ); } diff --git a/vendor/phpunit/phpunit/src/Util/Getopt.php b/vendor/phpunit/phpunit/src/Util/Getopt.php index ba21be3..ff23ed1 100644 --- a/vendor/phpunit/phpunit/src/Util/Getopt.php +++ b/vendor/phpunit/phpunit/src/Util/Getopt.php @@ -18,11 +18,11 @@ class PHPUnit_Util_Getopt public static function getopt(array $args, $short_options, $long_options = null) { if (empty($args)) { - return array(array(), array()); + return [[], []]; } - $opts = array(); - $non_opts = array(); + $opts = []; + $non_opts = []; if ($long_options) { sort($long_options); @@ -66,7 +66,7 @@ class PHPUnit_Util_Getopt } } - return array($opts, $non_opts); + return [$opts, $non_opts]; } protected static function parseShortOption($arg, $short_options, &$opts, &$args) @@ -87,12 +87,12 @@ class PHPUnit_Util_Getopt if (strlen($spec) > 1 && $spec[1] == ':') { if (strlen($spec) > 2 && $spec[2] == ':') { if ($i + 1 < $argLen) { - $opts[] = array($opt, substr($arg, $i + 1)); + $opts[] = [$opt, substr($arg, $i + 1)]; break; } } else { if ($i + 1 < $argLen) { - $opts[] = array($opt, substr($arg, $i + 1)); + $opts[] = [$opt, substr($arg, $i + 1)]; break; } elseif (list(, $opt_arg) = each($args)) { } else { @@ -103,7 +103,7 @@ class PHPUnit_Util_Getopt } } - $opts[] = array($opt, $opt_arg); + $opts[] = [$opt, $opt_arg]; } } @@ -153,7 +153,7 @@ class PHPUnit_Util_Getopt } $full_option = '--' . preg_replace('/={1,2}$/', '', $long_opt); - $opts[] = array($full_option, $opt_arg); + $opts[] = [$full_option, $opt_arg]; return; } diff --git a/vendor/phpunit/phpunit/src/Util/GlobalState.php b/vendor/phpunit/phpunit/src/Util/GlobalState.php index 35af703..4406c30 100644 --- a/vendor/phpunit/phpunit/src/Util/GlobalState.php +++ b/vendor/phpunit/phpunit/src/Util/GlobalState.php @@ -16,7 +16,7 @@ class PHPUnit_Util_GlobalState /** * @var array */ - protected static $superGlobalArrays = array( + protected static $superGlobalArrays = [ '_ENV', '_POST', '_GET', @@ -24,19 +24,19 @@ class PHPUnit_Util_GlobalState '_SERVER', '_FILES', '_REQUEST' - ); + ]; /** * @var array */ - protected static $superGlobalArraysLong = array( + protected static $superGlobalArraysLong = [ 'HTTP_ENV_VARS', 'HTTP_POST_VARS', 'HTTP_GET_VARS', 'HTTP_COOKIE_VARS', 'HTTP_SERVER_VARS', 'HTTP_POST_FILES' - ); + ]; public static function getIncludedFilesAsString() { diff --git a/vendor/phpunit/phpunit/src/Util/Log/JSON.php b/vendor/phpunit/phpunit/src/Util/Log/JSON.php index 776bad9..5f24de1 100644 --- a/vendor/phpunit/phpunit/src/Util/Log/JSON.php +++ b/vendor/phpunit/phpunit/src/Util/Log/JSON.php @@ -50,6 +50,28 @@ class PHPUnit_Util_Log_JSON extends PHPUnit_Util_Printer implements PHPUnit_Fram $this->currentTestPass = false; } + /** + * A warning occurred. + * + * @param PHPUnit_Framework_Test $test + * @param PHPUnit_Framework_Warning $e + * @param float $time + * + * @since Method available since Release 5.1.0 + */ + public function addWarning(PHPUnit_Framework_Test $test, PHPUnit_Framework_Warning $e, $time) + { + $this->writeCase( + 'warning', + $time, + PHPUnit_Util_Filter::getFilteredStacktrace($e, false), + $e->getMessage(), + $test + ); + + $this->currentTestPass = false; + } + /** * A failure occurred. * @@ -143,11 +165,11 @@ class PHPUnit_Util_Log_JSON extends PHPUnit_Util_Printer implements PHPUnit_Fram $this->currentTestName = ''; $this->write( - array( + [ 'event' => 'suiteStart', 'suite' => $this->currentTestSuiteName, 'tests' => count($suite) - ) + ] ); } @@ -173,11 +195,11 @@ class PHPUnit_Util_Log_JSON extends PHPUnit_Util_Printer implements PHPUnit_Fram $this->currentTestPass = true; $this->write( - array( + [ 'event' => 'testStart', 'suite' => $this->currentTestSuiteName, 'test' => $this->currentTestName - ) + ] ); } @@ -190,7 +212,7 @@ class PHPUnit_Util_Log_JSON extends PHPUnit_Util_Printer implements PHPUnit_Fram public function endTest(PHPUnit_Framework_Test $test, $time) { if ($this->currentTestPass) { - $this->writeCase('pass', $time, array(), '', $test); + $this->writeCase('pass', $time, [], '', $test); } } @@ -201,7 +223,7 @@ class PHPUnit_Util_Log_JSON extends PHPUnit_Util_Printer implements PHPUnit_Fram * @param string $message * @param PHPUnit_Framework_TestCase|null $test */ - protected function writeCase($status, $time, array $trace = array(), $message = '', $test = null) + protected function writeCase($status, $time, array $trace = [], $message = '', $test = null) { $output = ''; // take care of TestSuite producing error (e.g. by running into exception) as TestSuite doesn't have hasOutput @@ -209,7 +231,7 @@ class PHPUnit_Util_Log_JSON extends PHPUnit_Util_Printer implements PHPUnit_Fram $output = $test->getActualOutput(); } $this->write( - array( + [ 'event' => 'test', 'suite' => $this->currentTestSuiteName, 'test' => $this->currentTestName, @@ -218,7 +240,7 @@ class PHPUnit_Util_Log_JSON extends PHPUnit_Util_Printer implements PHPUnit_Fram 'trace' => $trace, 'message' => PHPUnit_Util_String::convertToUtf8($message), 'output' => $output, - ) + ] ); } @@ -233,12 +255,6 @@ class PHPUnit_Util_Log_JSON extends PHPUnit_Util_Printer implements PHPUnit_Fram } }); - $flags = 0; - - if (defined('JSON_PRETTY_PRINT')) { - $flags |= JSON_PRETTY_PRINT; - } - - parent::write(json_encode($buffer, $flags)); + parent::write(json_encode($buffer, JSON_PRETTY_PRINT)); } } diff --git a/vendor/phpunit/phpunit/src/Util/Log/JUnit.php b/vendor/phpunit/phpunit/src/Util/Log/JUnit.php index a2e37e5..94ba755 100644 --- a/vendor/phpunit/phpunit/src/Util/Log/JUnit.php +++ b/vendor/phpunit/phpunit/src/Util/Log/JUnit.php @@ -40,32 +40,32 @@ class PHPUnit_Util_Log_JUnit extends PHPUnit_Util_Printer implements PHPUnit_Fra /** * @var DOMElement[] */ - protected $testSuites = array(); + protected $testSuites = []; /** * @var int[] */ - protected $testSuiteTests = array(0); + protected $testSuiteTests = [0]; /** * @var int[] */ - protected $testSuiteAssertions = array(0); + protected $testSuiteAssertions = [0]; /** * @var int[] */ - protected $testSuiteErrors = array(0); + protected $testSuiteErrors = [0]; /** * @var int[] */ - protected $testSuiteFailures = array(0); + protected $testSuiteFailures = [0]; /** * @var int[] */ - protected $testSuiteTimes = array(0); + protected $testSuiteTimes = [0]; /** * @var int @@ -122,32 +122,25 @@ class PHPUnit_Util_Log_JUnit extends PHPUnit_Util_Printer implements PHPUnit_Fra */ public function addError(PHPUnit_Framework_Test $test, Exception $e, $time) { - if ($this->currentTestCase === null) { - return; - } - - if ($test instanceof PHPUnit_Framework_SelfDescribing) { - $buffer = $test->toString() . "\n"; - } else { - $buffer = ''; - } - - $buffer .= PHPUnit_Framework_TestFailure::exceptionToString($e) . - "\n" . - PHPUnit_Util_Filter::getFilteredStacktrace($e); - - $error = $this->document->createElement( - 'error', - PHPUnit_Util_XML::prepareString($buffer) - ); - - $error->setAttribute('type', get_class($e)); - - $this->currentTestCase->appendChild($error); - + $this->doAddFault($test, $e, $time, 'error'); $this->testSuiteErrors[$this->testSuiteLevel]++; } + /** + * A warning occurred. + * + * @param PHPUnit_Framework_Test $test + * @param PHPUnit_Framework_Warning $e + * @param float $time + * + * @since Method available since Release 5.1.0 + */ + public function addWarning(PHPUnit_Framework_Test $test, PHPUnit_Framework_Warning $e, $time) + { + $this->doAddFault($test, $e, $time, 'warning'); + $this->testSuiteFailures[$this->testSuiteLevel]++; + } + /** * A failure occurred. * @@ -157,29 +150,7 @@ class PHPUnit_Util_Log_JUnit extends PHPUnit_Util_Printer implements PHPUnit_Fra */ public function addFailure(PHPUnit_Framework_Test $test, PHPUnit_Framework_AssertionFailedError $e, $time) { - if ($this->currentTestCase === null) { - return; - } - - if ($test instanceof PHPUnit_Framework_SelfDescribing) { - $buffer = $test->toString() . "\n"; - } else { - $buffer = ''; - } - - $buffer .= PHPUnit_Framework_TestFailure::exceptionToString($e) . - "\n" . - PHPUnit_Util_Filter::getFilteredStacktrace($e); - - $failure = $this->document->createElement( - 'failure', - PHPUnit_Util_XML::prepareString($buffer) - ); - - $failure->setAttribute('type', get_class($e)); - - $this->currentTestCase->appendChild($failure); - + $this->doAddFault($test, $e, $time, 'failure'); $this->testSuiteFailures[$this->testSuiteLevel]++; } @@ -451,4 +422,37 @@ class PHPUnit_Util_Log_JUnit extends PHPUnit_Util_Printer implements PHPUnit_Fra $this->writeDocument = $flag; } } + + /** + * Method which generalizes addError() and addFailure() + * + * @param PHPUnit_Framework_Test $test + * @param Exception $e + * @param float $time + * @param string $type + */ + private function doAddFault(PHPUnit_Framework_Test $test, Exception $e, $time, $type) + { + if ($this->currentTestCase === null) { + return; + } + + if ($test instanceof PHPUnit_Framework_SelfDescribing) { + $buffer = $test->toString() . "\n"; + } else { + $buffer = ''; + } + + $buffer .= PHPUnit_Framework_TestFailure::exceptionToString($e) . + "\n" . + PHPUnit_Util_Filter::getFilteredStacktrace($e); + + $fault = $this->document->createElement( + $type, + PHPUnit_Util_XML::prepareString($buffer) + ); + + $fault->setAttribute('type', get_class($e)); + $this->currentTestCase->appendChild($fault); + } } diff --git a/vendor/phpunit/phpunit/src/Util/Log/TAP.php b/vendor/phpunit/phpunit/src/Util/Log/TAP.php index bcd587f..1cea4cd 100644 --- a/vendor/phpunit/phpunit/src/Util/Log/TAP.php +++ b/vendor/phpunit/phpunit/src/Util/Log/TAP.php @@ -58,6 +58,20 @@ class PHPUnit_Util_Log_TAP extends PHPUnit_Util_Printer implements PHPUnit_Frame $this->writeNotOk($test, 'Error'); } + /** + * A warning occurred. + * + * @param PHPUnit_Framework_Test $test + * @param PHPUnit_Framework_Warning $e + * @param float $time + * + * @since Method available since Release 5.1.0 + */ + public function addWarning(PHPUnit_Framework_Test $test, PHPUnit_Framework_Warning $e, $time) + { + $this->writeNotOk($test, 'Warning'); + } + /** * A failure occurred. * @@ -74,19 +88,19 @@ class PHPUnit_Util_Log_TAP extends PHPUnit_Util_Printer implements PHPUnit_Frame PHPUnit_Framework_TestFailure::exceptionToString($e) ); - $diagnostic = array( + $diagnostic = [ 'message' => $message[0], 'severity' => 'fail' - ); + ]; if ($e instanceof PHPUnit_Framework_ExpectationFailedException) { $cf = $e->getComparisonFailure(); if ($cf !== null) { - $diagnostic['data'] = array( + $diagnostic['data'] = [ 'got' => $cf->getActual(), 'expected' => $cf->getExpected() - ); + ]; } } diff --git a/vendor/phpunit/phpunit/src/Util/PHP.php b/vendor/phpunit/phpunit/src/Util/PHP.php index 84c2ead..d5a04a5 100644 --- a/vendor/phpunit/phpunit/src/Util/PHP.php +++ b/vendor/phpunit/phpunit/src/Util/PHP.php @@ -8,6 +8,8 @@ * file that was distributed with this source code. */ +use SebastianBergmann\Environment\Runtime; + /** * Utility methods for PHP sub-processes. * @@ -15,6 +17,52 @@ */ abstract class PHPUnit_Util_PHP { + /** + * @var Runtime + */ + protected $runtime; + + /** + * @var bool + */ + protected $stderrRedirection = false; + + /** + * Creates internal Runtime instance. + */ + public function __construct() + { + $this->runtime = new Runtime(); + } + + /** + * Defines if should use STDERR redirection or not. + * + * Then $stderrRedirection is TRUE, STDERR is redirected to STDOUT. + * + * @throws PHPUnit_Framework_Exception + * + * @param bool $stderrRedirection + */ + public function setUseStderrRedirection($stderrRedirection) + { + if (!is_bool($stderrRedirection)) { + throw PHPUnit_Util_InvalidArgumentHelper::factory(1, 'boolean'); + } + + $this->stderrRedirection = $stderrRedirection; + } + + /** + * Returns TRUE if uses STDERR redirection or FALSE if not. + * + * @return bool + */ + public function useStderrRedirection() + { + return $this->stderrRedirection; + } + /** * @return PHPUnit_Util_PHP * @@ -52,6 +100,28 @@ abstract class PHPUnit_Util_PHP ); } + /** + * Returns the command based into the configurations. + * + * @param array $settings + * + * @return string + */ + public function getCommand(array $settings) + { + $command = $this->runtime->getBinary(); + $command .= $this->settingsToParameters($settings); + + if ('phpdbg' === PHP_SAPI) { + $command .= ' -qrr ' . escapeshellarg(__DIR__ . '/PHP/eval-stdin.php'); + } + if (true === $this->stderrRedirection) { + $command .= ' 2>&1'; + } + + return $command; + } + /** * Runs a single job (PHP code) using a separate PHP process. * @@ -62,7 +132,7 @@ abstract class PHPUnit_Util_PHP * * @throws PHPUnit_Framework_Exception */ - abstract public function runJob($job, array $settings = array()); + abstract public function runJob($job, array $settings = []); /** * @param array $settings @@ -203,7 +273,7 @@ abstract class PHPUnit_Util_PHP $exception = $error->thrownException(); if ($exception instanceof __PHP_Incomplete_Class) { - $exceptionArray = array(); + $exceptionArray = []; foreach ((array) $exception as $key => $value) { $key = substr($key, strrpos($key, "\0") + 1); $exceptionArray[$key] = $value; diff --git a/vendor/phpunit/phpunit/src/Util/PHP/Default.php b/vendor/phpunit/phpunit/src/Util/PHP/Default.php index f8b5714..7d73ed8 100644 --- a/vendor/phpunit/phpunit/src/Util/PHP/Default.php +++ b/vendor/phpunit/phpunit/src/Util/PHP/Default.php @@ -8,8 +8,6 @@ * file that was distributed with this source code. */ -use SebastianBergmann\Environment\Runtime; - /** * Default utility for PHP sub-processes. * @@ -27,17 +25,15 @@ class PHPUnit_Util_PHP_Default extends PHPUnit_Util_PHP * * @throws PHPUnit_Framework_Exception */ - public function runJob($job, array $settings = array()) + public function runJob($job, array $settings = []) { - $runtime = new Runtime; - $process = proc_open( - $runtime->getBinary() . $this->settingsToParameters($settings), - array( - 0 => array('pipe', 'r'), - 1 => array('pipe', 'w'), - 2 => array('pipe', 'w') - ), + $this->getCommand($settings), + [ + 0 => ['pipe', 'r'], + 1 => ['pipe', 'w'], + 2 => ['pipe', 'w'] + ], $pipes ); @@ -59,7 +55,7 @@ class PHPUnit_Util_PHP_Default extends PHPUnit_Util_PHP proc_close($process); $this->cleanup(); - return array('stdout' => $stdout, 'stderr' => $stderr); + return ['stdout' => $stdout, 'stderr' => $stderr]; } /** diff --git a/vendor/phpunit/phpunit/src/Util/PHP/Template/TestCaseMethod.tpl.dist b/vendor/phpunit/phpunit/src/Util/PHP/Template/TestCaseMethod.tpl.dist index e595099..773af77 100644 --- a/vendor/phpunit/phpunit/src/Util/PHP/Template/TestCaseMethod.tpl.dist +++ b/vendor/phpunit/phpunit/src/Util/PHP/Template/TestCaseMethod.tpl.dist @@ -41,8 +41,9 @@ function __phpunit_run_isolated_test() $result->beStrictAboutTestsThatDoNotTestAnything({isStrictAboutTestsThatDoNotTestAnything}); $result->beStrictAboutOutputDuringTests({isStrictAboutOutputDuringTests}); - $result->beStrictAboutTestSize({isStrictAboutTestSize}); + $result->enforceTimeLimit({enforcesTimeLimit}); $result->beStrictAboutTodoAnnotatedTests({isStrictAboutTodoAnnotatedTests}); + $result->beStrictAboutResourceUsageDuringSmallTests({isStrictAboutResourceUsageDuringSmallTests}); $test = new {className}('{methodName}', unserialize('{data}'), '{dataName}'); $test->setDependencyInput(unserialize('{dependencyInput}')); diff --git a/vendor/phpunit/phpunit/src/Util/PHP/Windows.php b/vendor/phpunit/phpunit/src/Util/PHP/Windows.php index 6587aae..b3b7c6e 100644 --- a/vendor/phpunit/phpunit/src/Util/PHP/Windows.php +++ b/vendor/phpunit/phpunit/src/Util/PHP/Windows.php @@ -8,8 +8,6 @@ * file that was distributed with this source code. */ -use SebastianBergmann\Environment\Runtime; - /** * Windows utility for PHP sub-processes. * @@ -30,10 +28,8 @@ class PHPUnit_Util_PHP_Windows extends PHPUnit_Util_PHP_Default * * @see https://bugs.php.net/bug.php?id=51800 */ - public function runJob($job, array $settings = array()) + public function runJob($job, array $settings = []) { - $runtime = new Runtime; - if (false === $stdout_handle = tmpfile()) { throw new PHPUnit_Framework_Exception( 'A temporary file could not be created; verify that your TEMP environment variable is writable' @@ -41,12 +37,12 @@ class PHPUnit_Util_PHP_Windows extends PHPUnit_Util_PHP_Default } $process = proc_open( - $runtime->getBinary() . $this->settingsToParameters($settings), - array( - 0 => array('pipe', 'r'), - 1 => $stdout_handle, - 2 => array('pipe', 'w') - ), + $this->getCommand($settings), + [ + 0 => ['pipe', 'r'], + 1 => $stdout_handle, + 2 => ['pipe', 'w'] + ], $pipes ); @@ -70,7 +66,7 @@ class PHPUnit_Util_PHP_Windows extends PHPUnit_Util_PHP_Default $this->cleanup(); - return array('stdout' => $stdout, 'stderr' => $stderr); + return ['stdout' => $stdout, 'stderr' => $stderr]; } /** diff --git a/vendor/phpunit/phpunit/src/Util/Printer.php b/vendor/phpunit/phpunit/src/Util/Printer.php index 9ff7daa..42812ef 100644 --- a/vendor/phpunit/phpunit/src/Util/Printer.php +++ b/vendor/phpunit/phpunit/src/Util/Printer.php @@ -90,7 +90,7 @@ class PHPUnit_Util_Printer $this->outTarget, tidy_repair_file( $this->outTarget, - array('indent' => true, 'wrap' => 0), + ['indent' => true, 'wrap' => 0], 'utf8' ) ); diff --git a/vendor/phpunit/phpunit/src/Util/Test.php b/vendor/phpunit/phpunit/src/Util/Test.php index cef33b3..db8f995 100644 --- a/vendor/phpunit/phpunit/src/Util/Test.php +++ b/vendor/phpunit/phpunit/src/Util/Test.php @@ -8,13 +8,6 @@ * file that was distributed with this source code. */ -if (!function_exists('trait_exists')) { - function trait_exists($traitname, $autoload = true) - { - return false; - } -} - /** * Test helpers. * @@ -27,16 +20,16 @@ class PHPUnit_Util_Test const REGEX_EXPECTED_EXCEPTION = '(@expectedException\s+([:.\w\\\\x7f-\xff]+)(?:[\t ]+(\S*))?(?:[\t ]+(\S*))?\s*$)m'; const REGEX_REQUIRES_VERSION = '/@requires\s+(?PPHP(?:Unit)?)\s+(?P[\d\.-]+(dev|(RC|alpha|beta)[\d\.])?)[ \t]*\r?$/m'; const REGEX_REQUIRES_OS = '/@requires\s+OS\s+(?P.+?)[ \t]*\r?$/m'; - const REGEX_REQUIRES = '/@requires\s+(?Pfunction|extension)\s+(?P([^ ]+?))[ \t]*\r?$/m'; + const REGEX_REQUIRES = '/@requires\s+(?Pfunction|extension)\s+(?P([^ ]+?))\s*(?P[\d\.-]+[\d\.]?)?[ \t]*\r?$/m'; const UNKNOWN = -1; const SMALL = 0; const MEDIUM = 1; const LARGE = 2; - private static $annotationCache = array(); + private static $annotationCache = []; - private static $hookMethods = array(); + private static $hookMethods = []; /** * @param PHPUnit_Framework_Test $test @@ -54,13 +47,13 @@ class PHPUnit_Util_Test } } else { if ($test instanceof PHPUnit_Framework_TestCase) { - return array( + return [ get_class($test), $test->getName() - ); + ]; } elseif ($test instanceof PHPUnit_Framework_SelfDescribing) { - return array('', $test->toString()); + return ['', $test->toString()]; } else { - return array('', get_class($test)); + return ['', get_class($test)]; } } } @@ -138,7 +131,7 @@ class PHPUnit_Util_Test $classShortcut = $annotations['class'][$mode . 'DefaultClass'][0]; } - $list = array(); + $list = []; if (isset($annotations['class'][$mode])) { $list = $annotations['class'][$mode]; @@ -148,7 +141,7 @@ class PHPUnit_Util_Test $list = array_merge($list, $annotations['method'][$mode]); } - $codeList = array(); + $codeList = []; foreach (array_unique($list) as $element) { if ($classShortcut && strncmp($element, '::', 2) === 0) { @@ -184,7 +177,7 @@ class PHPUnit_Util_Test $docComment = $reflector->getDocComment(); $reflector = new ReflectionMethod($className, $methodName); $docComment .= "\n" . $reflector->getDocComment(); - $requires = array(); + $requires = []; if ($count = preg_match_all(self::REGEX_REQUIRES_OS, $docComment, $matches)) { $requires['OS'] = sprintf( @@ -199,15 +192,19 @@ class PHPUnit_Util_Test } // https://bugs.php.net/bug.php?id=63055 - $matches = array(); + $matches = []; if ($count = preg_match_all(self::REGEX_REQUIRES, $docComment, $matches)) { for ($i = 0; $i < $count; $i++) { $name = $matches['name'][$i] . 's'; if (!isset($requires[$name])) { - $requires[$name] = array(); + $requires[$name] = []; } $requires[$name][] = $matches['value'][$i]; + if (empty($matches['version'][$i]) || $name != 'extensions') { + continue; + } + $requires['extension_versions'][$matches['value'][$i]] = $matches['version'][$i]; } } @@ -227,7 +224,7 @@ class PHPUnit_Util_Test public static function getMissingRequirements($className, $methodName) { $required = static::getRequirements($className, $methodName); - $missing = array(); + $missing = []; if (!empty($required['PHP']) && version_compare(PHP_VERSION, $required['PHP'], '<')) { $missing[] = sprintf('PHP %s (or later) is required.', $required['PHP']); @@ -259,12 +256,24 @@ class PHPUnit_Util_Test if (!empty($required['extensions'])) { foreach ($required['extensions'] as $extension) { + if (isset($required['extension_versions'][$extension])) { + continue; + } if (!extension_loaded($extension)) { $missing[] = sprintf('Extension %s is required.', $extension); } } } + if (!empty($required['extension_versions'])) { + foreach ($required['extension_versions'] as $extension => $minVersion) { + $actualVersion = phpversion($extension); + if (false === $actualVersion || version_compare($actualVersion, $minVersion, '<')) { + $missing[] = sprintf('Extension %s %s (or later) is required.', $extension, $minVersion); + } + } + } + return $missing; } @@ -323,9 +332,9 @@ class PHPUnit_Util_Test $code = (int) constant($code); } - return array( + return [ 'class' => $class, 'code' => $code, 'message' => $message, 'message_regex' => $messageRegExp - ); + ]; } return false; @@ -466,7 +475,7 @@ class PHPUnit_Util_Test if (preg_match(self::REGEX_TEST_WITH, $docComment, $matches, PREG_OFFSET_CAPTURE)) { $offset = strlen($matches[0][0]) + $matches[0][1]; $annotationContent = substr($docComment, $offset); - $data = array(); + $data = []; foreach (explode("\n", $annotationContent) as $candidateRow) { $candidateRow = trim($candidateRow); $dataSet = json_decode($candidateRow, true); @@ -516,15 +525,15 @@ class PHPUnit_Util_Test $method = new ReflectionMethod($className, $methodName); $annotations = self::parseAnnotations($method->getDocComment()); } catch (ReflectionException $e) { - $annotations = array(); + $annotations = []; } self::$annotationCache[$className . '::' . $methodName] = $annotations; } - return array( + return [ 'class' => self::$annotationCache[$className], - 'method' => !empty($methodName) ? self::$annotationCache[$className . '::' . $methodName] : array() - ); + 'method' => !empty($methodName) ? self::$annotationCache[$className . '::' . $methodName] : [] + ]; } /** @@ -536,7 +545,7 @@ class PHPUnit_Util_Test */ private static function parseAnnotations($docblock) { - $annotations = array(); + $annotations = []; // Strip away the docblock header and footer to ease parsing of one line annotations $docblock = substr($docblock, 3, -2); @@ -563,7 +572,7 @@ class PHPUnit_Util_Test */ public static function getBackupSettings($className, $methodName) { - return array( + return [ 'backupGlobals' => self::getBooleanAnnotationSetting( $className, $methodName, @@ -574,7 +583,7 @@ class PHPUnit_Util_Test $methodName, 'backupStaticAttributes' ) - ); + ]; } /** @@ -594,7 +603,7 @@ class PHPUnit_Util_Test $methodName ); - $dependencies = array(); + $dependencies = []; if (isset($annotations['class']['depends'])) { $dependencies = $annotations['class']['depends']; @@ -646,7 +655,7 @@ class PHPUnit_Util_Test $methodName ); - $groups = array(); + $groups = []; if (isset($annotations['method']['author'])) { $groups = $annotations['method']['author']; @@ -670,8 +679,8 @@ class PHPUnit_Util_Test $groups = array_merge($groups, $annotations['method']['ticket']); } - foreach (array('method', 'class') as $element) { - foreach (array('small', 'medium', 'large') as $size) { + foreach (['method', 'class'] as $element) { + foreach (['small', 'medium', 'large'] as $size) { if (isset($annotations[$element][$size])) { $groups[] = $size; break 2; @@ -705,9 +714,7 @@ class PHPUnit_Util_Test if (isset($groups['large']) || (class_exists('PHPUnit_Extensions_Database_TestCase', false) && - $class->isSubclassOf('PHPUnit_Extensions_Database_TestCase')) || - (class_exists('PHPUnit_Extensions_SeleniumTestCase', false) && - $class->isSubclassOf('PHPUnit_Extensions_SeleniumTestCase'))) { + $class->isSubclassOf('PHPUnit_Extensions_Database_TestCase'))) { $size = self::LARGE; } elseif (isset($groups['medium'])) { $size = self::MEDIUM; @@ -735,7 +742,7 @@ class PHPUnit_Util_Test $methodName ); - $tickets = array(); + $tickets = []; if (isset($annotations['class']['ticket'])) { $tickets = $annotations['class']['ticket']; @@ -842,12 +849,12 @@ class PHPUnit_Util_Test */ private static function emptyHookMethodsArray() { - return array( - 'beforeClass' => array('setUpBeforeClass'), - 'before' => array('setUp'), - 'after' => array('tearDown'), - 'afterClass' => array('tearDownAfterClass') - ); + return [ + 'beforeClass' => ['setUpBeforeClass'], + 'before' => ['setUp'], + 'after' => ['tearDown'], + 'afterClass' => ['tearDownAfterClass'] + ]; } /** @@ -898,7 +905,7 @@ class PHPUnit_Util_Test */ private static function resolveElementToReflectionObjects($element) { - $codeToCoverList = array(); + $codeToCoverList = []; if (strpos($element, '\\') !== false && function_exists($element)) { $codeToCoverList[] = new ReflectionFunction($element); @@ -906,11 +913,12 @@ class PHPUnit_Util_Test list($className, $methodName) = explode('::', $element); if (isset($methodName[0]) && $methodName[0] == '<') { - $classes = array($className); + $classes = [$className]; foreach ($classes as $className) { if (!class_exists($className) && - !interface_exists($className)) { + !interface_exists($className) && + !trait_exists($className)) { throw new PHPUnit_Framework_InvalidCoversTargetException( sprintf( 'Trying to @cover or @use not existing class or ' . @@ -941,7 +949,7 @@ class PHPUnit_Util_Test } } } else { - $classes = array($className); + $classes = [$className]; foreach ($classes as $className) { if ($className == '' && function_exists($methodName)) { @@ -977,7 +985,7 @@ class PHPUnit_Util_Test $extended = true; } - $classes = array($element); + $classes = [$element]; if ($extended) { $classes = array_merge( @@ -1014,13 +1022,13 @@ class PHPUnit_Util_Test */ private static function resolveReflectionObjectsToLines(array $reflectors) { - $result = array(); + $result = []; foreach ($reflectors as $reflector) { $filename = $reflector->getFileName(); if (!isset($result[$filename])) { - $result[$filename] = array(); + $result[$filename] = []; } $result[$filename] = array_unique( diff --git a/vendor/phpunit/phpunit/src/Util/TestDox/NamePrettifier.php b/vendor/phpunit/phpunit/src/Util/TestDox/NamePrettifier.php index 55a972f..8fa1b51 100644 --- a/vendor/phpunit/phpunit/src/Util/TestDox/NamePrettifier.php +++ b/vendor/phpunit/phpunit/src/Util/TestDox/NamePrettifier.php @@ -28,7 +28,7 @@ class PHPUnit_Util_TestDox_NamePrettifier /** * @var array */ - protected $strings = array(); + protected $strings = []; /** * Prettifies the name of a test class. diff --git a/vendor/phpunit/phpunit/src/Util/TestDox/ResultPrinter.php b/vendor/phpunit/phpunit/src/Util/TestDox/ResultPrinter.php index 8511c2d..a77f94b 100644 --- a/vendor/phpunit/phpunit/src/Util/TestDox/ResultPrinter.php +++ b/vendor/phpunit/phpunit/src/Util/TestDox/ResultPrinter.php @@ -33,13 +33,18 @@ abstract class PHPUnit_Util_TestDox_ResultPrinter extends PHPUnit_Util_Printer i /** * @var array */ - protected $tests = array(); + protected $tests = []; /** * @var int */ protected $successful = 0; + /** + * @var int + */ + protected $warned = 0; + /** * @var int */ @@ -111,6 +116,25 @@ abstract class PHPUnit_Util_TestDox_ResultPrinter extends PHPUnit_Util_Printer i $this->failed++; } + /** + * A warning occurred. + * + * @param PHPUnit_Framework_Test $test + * @param PHPUnit_Framework_Warning $e + * @param float $time + * + * @since Method available since Release 5.1.0 + */ + public function addWarning(PHPUnit_Framework_Test $test, PHPUnit_Framework_Warning $e, $time) + { + if (!$this->isOfInterest($test)) { + return; + } + + $this->testStatus = PHPUnit_Runner_BaseTestRunner::STATUS_WARNING; + $this->warned++; + } + /** * A failure occurred. * @@ -223,23 +247,23 @@ abstract class PHPUnit_Util_TestDox_ResultPrinter extends PHPUnit_Util_Printer i $this->doEndClass(); } - $this->currentTestClassPrettified = $this->prettifier->prettifyTestClass($class); + $classAnnotations = PHPUnit_Util_Test::parseTestMethodAnnotations($class); + if (isset($classAnnotations['class']['testdox'][0])) { + $this->currentTestClassPrettified = $classAnnotations['class']['testdox'][0]; + } else { + $this->currentTestClassPrettified = $this->prettifier->prettifyTestClass($class); + } + $this->startClass($class); $this->testClass = $class; - $this->tests = array(); + $this->tests = []; } - $prettified = false; - $annotations = $test->getAnnotations(); - if (isset($annotations['method']['testdox'][0])) { $this->currentTestMethodPrettified = $annotations['method']['testdox'][0]; - $prettified = true; - } - - if (!$prettified) { + } else { $this->currentTestMethodPrettified = $this->prettifier->prettifyTestMethod($test->getName(false)); } @@ -334,6 +358,6 @@ abstract class PHPUnit_Util_TestDox_ResultPrinter extends PHPUnit_Util_Printer i private function isOfInterest(PHPUnit_Framework_Test $test) { - return $test instanceof PHPUnit_Framework_TestCase && get_class($test) != 'PHPUnit_Framework_Warning'; + return $test instanceof PHPUnit_Framework_TestCase && get_class($test) != 'PHPUnit_Framework_WarningTestCase'; } } diff --git a/vendor/phpunit/phpunit/src/Util/Type.php b/vendor/phpunit/phpunit/src/Util/Type.php index 1eb851a..fff7d2d 100644 --- a/vendor/phpunit/phpunit/src/Util/Type.php +++ b/vendor/phpunit/phpunit/src/Util/Type.php @@ -19,7 +19,7 @@ class PHPUnit_Util_Type { return in_array( $type, - array( + [ 'numeric', 'integer', 'int', @@ -32,7 +32,7 @@ class PHPUnit_Util_Type 'object', 'resource', 'scalar' - ) + ] ); } } diff --git a/vendor/phpunit/phpunit/src/Util/XML.php b/vendor/phpunit/phpunit/src/Util/XML.php index 176204b..9205b96 100644 --- a/vendor/phpunit/phpunit/src/Util/XML.php +++ b/vendor/phpunit/phpunit/src/Util/XML.php @@ -15,61 +15,6 @@ */ class PHPUnit_Util_XML { - /** - * Escapes a string for the use in XML documents - * Any Unicode character is allowed, excluding the surrogate blocks, FFFE, - * and FFFF (not even as character reference). - * See http://www.w3.org/TR/xml/#charsets - * - * @param string $string - * - * @return string - * - * @since Method available since Release 3.4.6 - */ - public static function prepareString($string) - { - return preg_replace( - '/[\\x00-\\x08\\x0b\\x0c\\x0e-\\x1f\\x7f]/', - '', - htmlspecialchars( - PHPUnit_Util_String::convertToUtf8($string), - ENT_QUOTES, - 'UTF-8' - ) - ); - } - - /** - * Loads an XML (or HTML) file into a DOMDocument object. - * - * @param string $filename - * @param bool $isHtml - * @param bool $xinclude - * @param bool $strict - * - * @return DOMDocument - * - * @since Method available since Release 3.3.0 - */ - public static function loadFile($filename, $isHtml = false, $xinclude = false, $strict = false) - { - $reporting = error_reporting(0); - $contents = file_get_contents($filename); - error_reporting($reporting); - - if ($contents === false) { - throw new PHPUnit_Framework_Exception( - sprintf( - 'Could not read "%s".', - $filename - ) - ); - } - - return self::load($contents, $isHtml, $filename, $xinclude, $strict); - } - /** * Load an $actual document into a DOMDocument. This is called * from the selector assertions. @@ -100,6 +45,14 @@ class PHPUnit_Util_XML return $actual; } + if (!is_string($actual)) { + throw new PHPUnit_Framework_Exception('Could not load XML from ' . gettype($actual)); + } + + if ($actual === '') { + throw new PHPUnit_Framework_Exception('Could not load XML from empty string'); + } + // Required for XInclude on Windows. if ($xinclude) { $cwd = getcwd(); @@ -149,6 +102,9 @@ class PHPUnit_Util_XML ) ); } else { + if ($message === '') { + $message = 'Could not load XML for unknown reason'; + } throw new PHPUnit_Framework_Exception($message); } } @@ -157,25 +113,33 @@ class PHPUnit_Util_XML } /** - * @param DOMNode $node + * Loads an XML (or HTML) file into a DOMDocument object. * - * @return string + * @param string $filename + * @param bool $isHtml + * @param bool $xinclude + * @param bool $strict * - * @since Method available since Release 3.4.0 + * @return DOMDocument + * + * @since Method available since Release 3.3.0 */ - public static function nodeToText(DOMNode $node) + public static function loadFile($filename, $isHtml = false, $xinclude = false, $strict = false) { - if ($node->childNodes->length == 1) { - return $node->textContent; + $reporting = error_reporting(0); + $contents = file_get_contents($filename); + error_reporting($reporting); + + if ($contents === false) { + throw new PHPUnit_Framework_Exception( + sprintf( + 'Could not read "%s".', + $filename + ) + ); } - $result = ''; - - foreach ($node->childNodes as $childNode) { - $result .= $node->ownerDocument->saveXML($childNode); - } - - return $result; + return self::load($contents, $isHtml, $filename, $xinclude, $strict); } /** @@ -194,6 +158,31 @@ class PHPUnit_Util_XML } } + /** + * Escapes a string for the use in XML documents + * Any Unicode character is allowed, excluding the surrogate blocks, FFFE, + * and FFFF (not even as character reference). + * See http://www.w3.org/TR/xml/#charsets + * + * @param string $string + * + * @return string + * + * @since Method available since Release 3.4.6 + */ + public static function prepareString($string) + { + return preg_replace( + '/[\\x00-\\x08\\x0b\\x0c\\x0e-\\x1f\\x7f]/', + '', + htmlspecialchars( + PHPUnit_Util_String::convertToUtf8($string), + ENT_QUOTES, + 'UTF-8' + ) + ); + } + /** * "Convert" a DOMElement object into a PHP variable. * @@ -209,7 +198,7 @@ class PHPUnit_Util_XML switch ($element->tagName) { case 'array': - $variable = array(); + $variable = []; foreach ($element->getElementsByTagName('element') as $element) { $item = $element->childNodes->item(0); @@ -233,7 +222,7 @@ class PHPUnit_Util_XML if ($element->hasChildNodes()) { $arguments = $element->childNodes->item(1)->childNodes; - $constructorArgs = array(); + $constructorArgs = []; foreach ($arguments as $argument) { if ($argument instanceof DOMElement) { @@ -263,670 +252,4 @@ class PHPUnit_Util_XML return $variable; } - - /** - * Validate list of keys in the associative array. - * - * @param array $hash - * @param array $validKeys - * - * @return array - * - * @throws PHPUnit_Framework_Exception - * - * @since Method available since Release 3.3.0 - */ - public static function assertValidKeys(array $hash, array $validKeys) - { - $valids = array(); - - // Normalize validation keys so that we can use both indexed and - // associative arrays. - foreach ($validKeys as $key => $val) { - is_int($key) ? $valids[$val] = null : $valids[$key] = $val; - } - - $validKeys = array_keys($valids); - - // Check for invalid keys. - foreach ($hash as $key => $value) { - if (!in_array($key, $validKeys)) { - $unknown[] = $key; - } - } - - if (!empty($unknown)) { - throw new PHPUnit_Framework_Exception( - 'Unknown key(s): ' . implode(', ', $unknown) - ); - } - - // Add default values for any valid keys that are empty. - foreach ($valids as $key => $value) { - if (!isset($hash[$key])) { - $hash[$key] = $value; - } - } - - return $hash; - } - - /** - * Parse a CSS selector into an associative array suitable for - * use with findNodes(). - * - * @param string $selector - * @param mixed $content - * - * @return array - * - * @since Method available since Release 3.3.0 - */ - public static function convertSelectToTag($selector, $content = true) - { - $selector = trim(preg_replace("/\s+/", ' ', $selector)); - - // substitute spaces within attribute value - while (preg_match('/\[[^\]]+"[^"]+\s[^"]+"\]/', $selector)) { - $selector = preg_replace( - '/(\[[^\]]+"[^"]+)\s([^"]+"\])/', - '$1__SPACE__$2', - $selector - ); - } - - if (strstr($selector, ' ')) { - $elements = explode(' ', $selector); - } else { - $elements = array($selector); - } - - $previousTag = array(); - - foreach (array_reverse($elements) as $element) { - $element = str_replace('__SPACE__', ' ', $element); - - // child selector - if ($element == '>') { - $previousTag = array('child' => $previousTag['descendant']); - continue; - } - - // adjacent-sibling selector - if ($element == '+') { - $previousTag = array('adjacent-sibling' => $previousTag['descendant']); - continue; - } - - $tag = array(); - - // match element tag - preg_match("/^([^\.#\[]*)/", $element, $eltMatches); - - if (!empty($eltMatches[1])) { - $tag['tag'] = $eltMatches[1]; - } - - // match attributes (\[[^\]]*\]*), ids (#[^\.#\[]*), - // and classes (\.[^\.#\[]*)) - preg_match_all( - "/(\[[^\]]*\]*|#[^\.#\[]*|\.[^\.#\[]*)/", - $element, - $matches - ); - - if (!empty($matches[1])) { - $classes = array(); - $attrs = array(); - - foreach ($matches[1] as $match) { - // id matched - if (substr($match, 0, 1) == '#') { - $tag['id'] = substr($match, 1); - } // class matched - elseif (substr($match, 0, 1) == '.') { - $classes[] = substr($match, 1); - } // attribute matched - elseif (substr($match, 0, 1) == '[' && - substr($match, -1, 1) == ']') { - $attribute = substr($match, 1, strlen($match) - 2); - $attribute = str_replace('"', '', $attribute); - - // match single word - if (strstr($attribute, '~=')) { - list($key, $value) = explode('~=', $attribute); - $value = "regexp:/.*\b$value\b.*/"; - } // match substring - elseif (strstr($attribute, '*=')) { - list($key, $value) = explode('*=', $attribute); - $value = "regexp:/.*$value.*/"; - } // exact match - else { - list($key, $value) = explode('=', $attribute); - } - - $attrs[$key] = $value; - } - } - - if (!empty($classes)) { - $tag['class'] = implode(' ', $classes); - } - - if (!empty($attrs)) { - $tag['attributes'] = $attrs; - } - } - - // tag content - if (is_string($content)) { - $tag['content'] = $content; - } - - // determine previous child/descendants - if (!empty($previousTag['descendant'])) { - $tag['descendant'] = $previousTag['descendant']; - } elseif (!empty($previousTag['child'])) { - $tag['child'] = $previousTag['child']; - } elseif (!empty($previousTag['adjacent-sibling'])) { - $tag['adjacent-sibling'] = $previousTag['adjacent-sibling']; - unset($tag['content']); - } - - $previousTag = array('descendant' => $tag); - } - - return $tag; - } - - /** - * Parse an $actual document and return an array of DOMNodes - * matching the CSS $selector. If an error occurs, it will - * return false. - * - * To only return nodes containing a certain content, give - * the $content to match as a string. Otherwise, setting - * $content to true will return all nodes matching $selector. - * - * The $actual document may be a DOMDocument or a string - * containing XML or HTML, identified by $isHtml. - * - * @param array $selector - * @param string $content - * @param mixed $actual - * @param bool $isHtml - * - * @return bool|array - * - * @since Method available since Release 3.3.0 - */ - public static function cssSelect($selector, $content, $actual, $isHtml = true) - { - $matcher = self::convertSelectToTag($selector, $content); - $dom = self::load($actual, $isHtml); - $tags = self::findNodes($dom, $matcher, $isHtml); - - return $tags; - } - - /** - * Parse out the options from the tag using DOM object tree. - * - * @param DOMDocument $dom - * @param array $options - * @param bool $isHtml - * - * @return array - * - * @since Method available since Release 3.3.0 - */ - public static function findNodes(DOMDocument $dom, array $options, $isHtml = true) - { - $valid = array( - 'id', 'class', 'tag', 'content', 'attributes', 'parent', - 'child', 'ancestor', 'descendant', 'children', 'adjacent-sibling' - ); - - $filtered = array(); - $options = self::assertValidKeys($options, $valid); - - // find the element by id - if ($options['id']) { - $options['attributes']['id'] = $options['id']; - } - - if ($options['class']) { - $options['attributes']['class'] = $options['class']; - } - - $nodes = array(); - - // find the element by a tag type - if ($options['tag']) { - if ($isHtml) { - $elements = self::getElementsByCaseInsensitiveTagName( - $dom, - $options['tag'] - ); - } else { - $elements = $dom->getElementsByTagName($options['tag']); - } - - foreach ($elements as $element) { - $nodes[] = $element; - } - - if (empty($nodes)) { - return false; - } - } // no tag selected, get them all - else { - $tags = array( - 'a', 'abbr', 'acronym', 'address', 'area', 'b', 'base', 'bdo', - 'big', 'blockquote', 'body', 'br', 'button', 'caption', 'cite', - 'code', 'col', 'colgroup', 'dd', 'del', 'div', 'dfn', 'dl', - 'dt', 'em', 'fieldset', 'form', 'frame', 'frameset', 'h1', 'h2', - 'h3', 'h4', 'h5', 'h6', 'head', 'hr', 'html', 'i', 'iframe', - 'img', 'input', 'ins', 'kbd', 'label', 'legend', 'li', 'link', - 'map', 'meta', 'noframes', 'noscript', 'object', 'ol', 'optgroup', - 'option', 'p', 'param', 'pre', 'q', 'samp', 'script', 'select', - 'small', 'span', 'strong', 'style', 'sub', 'sup', 'table', - 'tbody', 'td', 'textarea', 'tfoot', 'th', 'thead', 'title', - 'tr', 'tt', 'ul', 'var', - // HTML5 - 'article', 'aside', 'audio', 'bdi', 'canvas', 'command', - 'datalist', 'details', 'dialog', 'embed', 'figure', 'figcaption', - 'footer', 'header', 'hgroup', 'keygen', 'mark', 'meter', 'nav', - 'output', 'progress', 'ruby', 'rt', 'rp', 'track', 'section', - 'source', 'summary', 'time', 'video', 'wbr' - ); - - foreach ($tags as $tag) { - if ($isHtml) { - $elements = self::getElementsByCaseInsensitiveTagName( - $dom, - $tag - ); - } else { - $elements = $dom->getElementsByTagName($tag); - } - - foreach ($elements as $element) { - $nodes[] = $element; - } - } - - if (empty($nodes)) { - return false; - } - } - - // filter by attributes - if ($options['attributes']) { - foreach ($nodes as $node) { - $invalid = false; - - foreach ($options['attributes'] as $name => $value) { - // match by regexp if like "regexp:/foo/i" - if (preg_match('/^regexp\s*:\s*(.*)/i', $value, $matches)) { - if (!preg_match($matches[1], $node->getAttribute($name))) { - $invalid = true; - } - } // class can match only a part - elseif ($name == 'class') { - // split to individual classes - $findClasses = explode( - ' ', - preg_replace("/\s+/", ' ', $value) - ); - - $allClasses = explode( - ' ', - preg_replace("/\s+/", ' ', $node->getAttribute($name)) - ); - - // make sure each class given is in the actual node - foreach ($findClasses as $findClass) { - if (!in_array($findClass, $allClasses)) { - $invalid = true; - } - } - } // match by exact string - else { - if ($node->getAttribute($name) != $value) { - $invalid = true; - } - } - } - - // if every attribute given matched - if (!$invalid) { - $filtered[] = $node; - } - } - - $nodes = $filtered; - $filtered = array(); - - if (empty($nodes)) { - return false; - } - } - - // filter by content - if ($options['content'] !== null) { - foreach ($nodes as $node) { - $invalid = false; - - // match by regexp if like "regexp:/foo/i" - if (preg_match('/^regexp\s*:\s*(.*)/i', $options['content'], $matches)) { - if (!preg_match($matches[1], self::getNodeText($node))) { - $invalid = true; - } - } // match empty string - elseif ($options['content'] === '') { - if (self::getNodeText($node) !== '') { - $invalid = true; - } - } // match by exact string - elseif (strstr(self::getNodeText($node), $options['content']) === false) { - $invalid = true; - } - - if (!$invalid) { - $filtered[] = $node; - } - } - - $nodes = $filtered; - $filtered = array(); - - if (empty($nodes)) { - return false; - } - } - - // filter by parent node - if ($options['parent']) { - $parentNodes = self::findNodes($dom, $options['parent'], $isHtml); - $parentNode = isset($parentNodes[0]) ? $parentNodes[0] : null; - - foreach ($nodes as $node) { - if ($parentNode !== $node->parentNode) { - continue; - } - - $filtered[] = $node; - } - - $nodes = $filtered; - $filtered = array(); - - if (empty($nodes)) { - return false; - } - } - - // filter by child node - if ($options['child']) { - $childNodes = self::findNodes($dom, $options['child'], $isHtml); - $childNodes = !empty($childNodes) ? $childNodes : array(); - - foreach ($nodes as $node) { - foreach ($node->childNodes as $child) { - foreach ($childNodes as $childNode) { - if ($childNode === $child) { - $filtered[] = $node; - } - } - } - } - - $nodes = $filtered; - $filtered = array(); - - if (empty($nodes)) { - return false; - } - } - - // filter by adjacent-sibling - if ($options['adjacent-sibling']) { - $adjacentSiblingNodes = self::findNodes($dom, $options['adjacent-sibling'], $isHtml); - $adjacentSiblingNodes = !empty($adjacentSiblingNodes) ? $adjacentSiblingNodes : array(); - - foreach ($nodes as $node) { - $sibling = $node; - - while ($sibling = $sibling->nextSibling) { - if ($sibling->nodeType !== XML_ELEMENT_NODE) { - continue; - } - - foreach ($adjacentSiblingNodes as $adjacentSiblingNode) { - if ($sibling === $adjacentSiblingNode) { - $filtered[] = $node; - break; - } - } - - break; - } - } - - $nodes = $filtered; - $filtered = array(); - - if (empty($nodes)) { - return false; - } - } - - // filter by ancestor - if ($options['ancestor']) { - $ancestorNodes = self::findNodes($dom, $options['ancestor'], $isHtml); - $ancestorNode = isset($ancestorNodes[0]) ? $ancestorNodes[0] : null; - - foreach ($nodes as $node) { - $parent = $node->parentNode; - - while ($parent && $parent->nodeType != XML_HTML_DOCUMENT_NODE) { - if ($parent === $ancestorNode) { - $filtered[] = $node; - } - - $parent = $parent->parentNode; - } - } - - $nodes = $filtered; - $filtered = array(); - - if (empty($nodes)) { - return false; - } - } - - // filter by descendant - if ($options['descendant']) { - $descendantNodes = self::findNodes($dom, $options['descendant'], $isHtml); - $descendantNodes = !empty($descendantNodes) ? $descendantNodes : array(); - - foreach ($nodes as $node) { - foreach (self::getDescendants($node) as $descendant) { - foreach ($descendantNodes as $descendantNode) { - if ($descendantNode === $descendant) { - $filtered[] = $node; - } - } - } - } - - $nodes = $filtered; - $filtered = array(); - - if (empty($nodes)) { - return false; - } - } - - // filter by children - if ($options['children']) { - $validChild = array('count', 'greater_than', 'less_than', 'only'); - $childOptions = self::assertValidKeys( - $options['children'], - $validChild - ); - - foreach ($nodes as $node) { - $childNodes = $node->childNodes; - - foreach ($childNodes as $childNode) { - if ($childNode->nodeType !== XML_CDATA_SECTION_NODE && - $childNode->nodeType !== XML_TEXT_NODE) { - $children[] = $childNode; - } - } - - // we must have children to pass this filter - if (!empty($children)) { - // exact count of children - if ($childOptions['count'] !== null) { - if (count($children) !== $childOptions['count']) { - break; - } - } // range count of children - elseif ($childOptions['less_than'] !== null && - $childOptions['greater_than'] !== null) { - if (count($children) >= $childOptions['less_than'] || - count($children) <= $childOptions['greater_than']) { - break; - } - } // less than a given count - elseif ($childOptions['less_than'] !== null) { - if (count($children) >= $childOptions['less_than']) { - break; - } - } // more than a given count - elseif ($childOptions['greater_than'] !== null) { - if (count($children) <= $childOptions['greater_than']) { - break; - } - } - - // match each child against a specific tag - if ($childOptions['only']) { - $onlyNodes = self::findNodes( - $dom, - $childOptions['only'], - $isHtml - ); - - // try to match each child to one of the 'only' nodes - foreach ($children as $child) { - $matched = false; - - foreach ($onlyNodes as $onlyNode) { - if ($onlyNode === $child) { - $matched = true; - } - } - - if (!$matched) { - break 2; - } - } - } - - $filtered[] = $node; - } - } - - $nodes = $filtered; - - if (empty($nodes)) { - return; - } - } - - // return the first node that matches all criteria - return !empty($nodes) ? $nodes : array(); - } - - /** - * Recursively get flat array of all descendants of this node. - * - * @param DOMNode $node - * - * @return array - * - * @since Method available since Release 3.3.0 - */ - protected static function getDescendants(DOMNode $node) - { - $allChildren = array(); - $childNodes = $node->childNodes ? $node->childNodes : array(); - - foreach ($childNodes as $child) { - if ($child->nodeType === XML_CDATA_SECTION_NODE || - $child->nodeType === XML_TEXT_NODE) { - continue; - } - - $children = self::getDescendants($child); - $allChildren = array_merge($allChildren, $children, array($child)); - } - - return isset($allChildren) ? $allChildren : array(); - } - - /** - * Gets elements by case insensitive tagname. - * - * @param DOMDocument $dom - * @param string $tag - * - * @return DOMNodeList - * - * @since Method available since Release 3.4.0 - */ - protected static function getElementsByCaseInsensitiveTagName(DOMDocument $dom, $tag) - { - $elements = $dom->getElementsByTagName(strtolower($tag)); - - if ($elements->length == 0) { - $elements = $dom->getElementsByTagName(strtoupper($tag)); - } - - return $elements; - } - - /** - * Get the text value of this node's child text node. - * - * @param DOMNode $node - * - * @return string - * - * @since Method available since Release 3.3.0 - */ - protected static function getNodeText(DOMNode $node) - { - if (!$node->childNodes instanceof DOMNodeList) { - return ''; - } - - $result = ''; - - foreach ($node->childNodes as $childNode) { - if ($childNode->nodeType === XML_TEXT_NODE || - $childNode->nodeType === XML_CDATA_SECTION_NODE) { - $result .= trim($childNode->data) . ' '; - } else { - $result .= self::getNodeText($childNode); - } - } - - return str_replace(' ', ' ', $result); - } } diff --git a/vendor/phpunit/phpunit/tests/Extensions/PhptTestCaseTest.php b/vendor/phpunit/phpunit/tests/Extensions/PhptTestCaseTest.php index 819f9d2..d35b663 100644 --- a/vendor/phpunit/phpunit/tests/Extensions/PhptTestCaseTest.php +++ b/vendor/phpunit/phpunit/tests/Extensions/PhptTestCaseTest.php @@ -10,18 +10,245 @@ class Extensions_PhptTestCaseTest extends \PHPUnit_Framework_TestCase { + const EXPECT_CONTENT = << +--EXPECT-- +Hello PHPUnit! +EOF; + + const EXPECTF_CONTENT = << +--EXPECTF-- +Hello %s! +EOF; + + const EXPECTREGEX_CONTENT = << +--EXPECTREGEX-- +Hello [HPU]{4}[nit]{3}! +EOF; + + const FILE_SECTION = << + +EOF; + + protected $filename; + protected $testCase; + protected $phpUtil; + + protected function setUp() + { + $this->filename = sys_get_temp_dir() . '/phpunit.phpt'; + touch($this->filename); + + $this->phpUtil = $this->getMockForAbstractClass('PHPUnit_Util_PHP', [], '', false); + + $this->testCase = new PHPUnit_Extensions_PhptTestCase($this->filename, $this->phpUtil); + } + + protected function tearDown() + { + @unlink($this->filename); + + $this->filename = null; + $this->testCase = null; + } + + /** + * Defines the content of the current PHPT test. + * + * @param string $content + */ + private function setPhpContent($content) + { + file_put_contents($this->filename, $content); + } + + public function testShouldRunFileSectionAsTest() + { + $this->setPhpContent(self::EXPECT_CONTENT); + + $fileSection = '' . PHP_EOL; + + $this->phpUtil + ->expects($this->once()) + ->method('runJob') + ->with($fileSection) + ->will($this->returnValue(['stdout' => '', 'stderr' => ''])); + + $this->testCase->run(); + } + + public function testShouldRunSkipifSectionWhenExists() + { + $skipifSection = '' . PHP_EOL; + + $phptContent = self::EXPECT_CONTENT . PHP_EOL; + $phptContent .= '--SKIPIF--' . PHP_EOL; + $phptContent .= $skipifSection; + + $this->setPhpContent($phptContent); + + $this->phpUtil + ->expects($this->at(0)) + ->method('runJob') + ->with($skipifSection) + ->will($this->returnValue(['stdout' => '', 'stderr' => ''])); + + $this->testCase->run(); + } + + public function testShouldNotRunTestSectionIfSkipifSectionReturnsOutputWithSkipWord() + { + $skipifSection = '' . PHP_EOL; + + $phptContent = self::EXPECT_CONTENT . PHP_EOL; + $phptContent .= '--SKIPIF--' . PHP_EOL; + $phptContent .= $skipifSection; + + $this->setPhpContent($phptContent); + + $this->phpUtil + ->expects($this->once()) + ->method('runJob') + ->with($skipifSection) + ->will($this->returnValue(['stdout' => 'skip: Reason', 'stderr' => ''])); + + $this->testCase->run(); + } + + public function testShouldRunCleanSectionWhenDefined() + { + $cleanSection = '' . PHP_EOL; + + $phptContent = self::EXPECT_CONTENT . PHP_EOL; + $phptContent .= '--CLEAN--' . PHP_EOL; + $phptContent .= $cleanSection; + + $this->setPhpContent($phptContent); + + $this->phpUtil + ->expects($this->at(1)) + ->method('runJob') + ->with($cleanSection); + + $this->testCase->run(); + } + + /** + * @expectedException PHPUnit_Framework_Exception + * @expectedExceptionMessage Invalid PHPT file + */ + public function testShouldThrowsAnExceptionWhenPhptFileIsEmpty() + { + $this->setPhpContent(''); + + $this->testCase->run(); + } + + /** + * @expectedException PHPUnit_Framework_Exception + * @expectedExceptionMessage Invalid PHPT file + */ + public function testShouldThrowsAnExceptionWhenFileSectionIsMissing() + { + $this->setPhpContent( +<<testCase->run(); + } + + /** + * @expectedException PHPUnit_Framework_Exception + * @expectedExceptionMessage Invalid PHPT file + */ + public function testShouldThrowsAnExceptionWhenThereIsNoExpecOrExpectifOrExpecregexSectionInPhptFile() + { + $this->setPhpContent( +<< +EOF + ); + $this->testCase->run(); + } + + public function testShouldValidateExpectSession() + { + $this->setPhpContent(self::EXPECT_CONTENT); + + $this->phpUtil + ->expects($this->once()) + ->method('runJob') + ->with(self::FILE_SECTION) + ->will($this->returnValue(['stdout' => 'Hello PHPUnit!', 'stderr' => ''])); + + $result = $this->testCase->run(); + + $this->assertTrue($result->wasSuccessful()); + } + + public function testShouldValidateExpectfSession() + { + $this->setPhpContent(self::EXPECTF_CONTENT); + + $this->phpUtil + ->expects($this->once()) + ->method('runJob') + ->with(self::FILE_SECTION) + ->will($this->returnValue(['stdout' => 'Hello PHPUnit!', 'stderr' => ''])); + + $result = $this->testCase->run(); + + $this->assertTrue($result->wasSuccessful()); + } + + public function testShouldValidateExpectregexSession() + { + $this->setPhpContent(self::EXPECTREGEX_CONTENT); + + $this->phpUtil + ->expects($this->once()) + ->method('runJob') + ->with(self::FILE_SECTION) + ->will($this->returnValue(['stdout' => 'Hello PHPUnit!', 'stderr' => ''])); + + $result = $this->testCase->run(); + + $this->assertTrue($result->wasSuccessful()); + } + public function testParseIniSection() { $phptTestCase = new PhpTestCaseProxy(__FILE__); $settings = $phptTestCase->parseIniSection("foo=1\nbar = 2\rbaz = 3\r\nempty=\nignore"); - $expected = array( + $expected = [ 'foo=1', 'bar = 2', 'baz = 3', 'empty=', 'ignore', - ); + ]; $this->assertEquals($expected, $settings); } diff --git a/vendor/phpunit/phpunit/tests/Framework/AssertTest.php b/vendor/phpunit/phpunit/tests/Framework/AssertTest.php index aa4612e..2b22753 100644 --- a/vendor/phpunit/phpunit/tests/Framework/AssertTest.php +++ b/vendor/phpunit/phpunit/tests/Framework/AssertTest.php @@ -66,10 +66,10 @@ class Framework_AssertTest extends PHPUnit_Framework_TestCase $a = new stdClass; $b = new stdClass; - $this->assertContains($a, array($a)); + $this->assertContains($a, [$a]); try { - $this->assertContains($a, array($b)); + $this->assertContains($a, [$b]); } catch (PHPUnit_Framework_AssertionFailedError $e) { return; } @@ -82,10 +82,10 @@ class Framework_AssertTest extends PHPUnit_Framework_TestCase */ public function testAssertArrayContainsString() { - $this->assertContains('foo', array('foo')); + $this->assertContains('foo', ['foo']); try { - $this->assertContains('foo', array('bar')); + $this->assertContains('foo', ['bar']); } catch (PHPUnit_Framework_AssertionFailedError $e) { return; } @@ -98,10 +98,10 @@ class Framework_AssertTest extends PHPUnit_Framework_TestCase */ public function testAssertArrayContainsNonObject() { - $this->assertContains('foo', array(true)); + $this->assertContains('foo', [true]); try { - $this->assertContains('foo', array(true), '', false, true, true); + $this->assertContains('foo', [true], '', false, true, true); } catch (PHPUnit_Framework_AssertionFailedError $e) { return; } @@ -114,16 +114,16 @@ class Framework_AssertTest extends PHPUnit_Framework_TestCase */ public function testAssertContainsOnlyInstancesOf() { - $test = array( + $test = [ new Book(), new Book - ); + ]; $this->assertContainsOnlyInstancesOf('Book', $test); - $this->assertContainsOnlyInstancesOf('stdClass', array(new stdClass())); + $this->assertContainsOnlyInstancesOf('stdClass', [new stdClass()]); - $test2 = array( + $test2 = [ new Author('Test') - ); + ]; try { $this->assertContainsOnlyInstancesOf('Book', $test2); } catch (PHPUnit_Framework_AssertionFailedError $e) { @@ -138,7 +138,7 @@ class Framework_AssertTest extends PHPUnit_Framework_TestCase */ public function testAssertArrayHasKeyThrowsExceptionForInvalidFirstArgument() { - $this->assertArrayHasKey(null, array()); + $this->assertArrayHasKey(null, []); } /** @@ -155,10 +155,10 @@ class Framework_AssertTest extends PHPUnit_Framework_TestCase */ public function testAssertArrayHasIntegerKey() { - $this->assertArrayHasKey(0, array('foo')); + $this->assertArrayHasKey(0, ['foo']); try { - $this->assertArrayHasKey(1, array('foo')); + $this->assertArrayHasKey(1, ['foo']); } catch (PHPUnit_Framework_AssertionFailedError $e) { return; } @@ -172,23 +172,23 @@ class Framework_AssertTest extends PHPUnit_Framework_TestCase */ public function testAssertArraySubset() { - $array = array( + $array = [ 'a' => 'item a', 'b' => 'item b', - 'c' => array('a2' => 'item a2', 'b2' => 'item b2'), - 'd' => array('a2' => array('a3' => 'item a3', 'b3' => 'item b3')) - ); + 'c' => ['a2' => 'item a2', 'b2' => 'item b2'], + 'd' => ['a2' => ['a3' => 'item a3', 'b3' => 'item b3']] + ]; - $this->assertArraySubset(array('a' => 'item a', 'c' => array('a2' => 'item a2')), $array); - $this->assertArraySubset(array('a' => 'item a', 'd' => array('a2' => array('b3' => 'item b3'))), $array); + $this->assertArraySubset(['a' => 'item a', 'c' => ['a2' => 'item a2']], $array); + $this->assertArraySubset(['a' => 'item a', 'd' => ['a2' => ['b3' => 'item b3']]], $array); try { - $this->assertArraySubset(array('a' => 'bad value'), $array); + $this->assertArraySubset(['a' => 'bad value'], $array); } catch (PHPUnit_Framework_AssertionFailedError $e) { } try { - $this->assertArraySubset(array('d' => array('a2' => array('bad index' => 'item b3'))), $array); + $this->assertArraySubset(['d' => ['a2' => ['bad index' => 'item b3']]], $array); } catch (PHPUnit_Framework_AssertionFailedError $e) { return; } @@ -202,23 +202,23 @@ class Framework_AssertTest extends PHPUnit_Framework_TestCase */ public function testAssertArraySubsetWithDeepNestedArrays() { - $array = array( - 'path' => array( - 'to' => array( - 'the' => array( + $array = [ + 'path' => [ + 'to' => [ + 'the' => [ 'cake' => 'is a lie' - ) - ) - ) - ); + ] + ] + ] + ]; - $this->assertArraySubset(array('path' => array()), $array); - $this->assertArraySubset(array('path' => array('to' => array())), $array); - $this->assertArraySubset(array('path' => array('to' => array('the' => array()))), $array); - $this->assertArraySubset(array('path' => array('to' => array('the' => array('cake' => 'is a lie')))), $array); + $this->assertArraySubset(['path' => []], $array); + $this->assertArraySubset(['path' => ['to' => []]], $array); + $this->assertArraySubset(['path' => ['to' => ['the' => []]]], $array); + $this->assertArraySubset(['path' => ['to' => ['the' => ['cake' => 'is a lie']]]], $array); try { - $this->assertArraySubset(array('path' => array('to' => array('the' => array('cake' => 'is not a lie')))), $array); + $this->assertArraySubset(['path' => ['to' => ['the' => ['cake' => 'is not a lie']]]], $array); } catch (PHPUnit_Framework_AssertionFailedError $e) { return; } @@ -234,10 +234,10 @@ class Framework_AssertTest extends PHPUnit_Framework_TestCase { $obj = new \stdClass; $reference = &$obj; - $array = array('a' => $obj); + $array = ['a' => $obj]; - $this->assertArraySubset(array('a' => $reference), $array); - $this->assertArraySubset(array('a' => new \stdClass), $array); + $this->assertArraySubset(['a' => $reference], $array); + $this->assertArraySubset(['a' => new \stdClass], $array); } /** @@ -248,12 +248,12 @@ class Framework_AssertTest extends PHPUnit_Framework_TestCase { $obj = new \stdClass; $reference = &$obj; - $array = array('a' => $obj); + $array = ['a' => $obj]; - $this->assertArraySubset(array('a' => $reference), $array, true); + $this->assertArraySubset(['a' => $reference], $array, true); try { - $this->assertArraySubset(array('a' => new \stdClass), $array, true); + $this->assertArraySubset(['a' => new \stdClass], $array, true); } catch (PHPUnit_Framework_AssertionFailedError $e) { return; } @@ -278,10 +278,10 @@ class Framework_AssertTest extends PHPUnit_Framework_TestCase */ public function assertArraySubsetInvalidArgumentProvider() { - return array( - array(false, array()), - array(array(), false), - ); + return [ + [false, []], + [[], false], + ]; } /** @@ -290,7 +290,7 @@ class Framework_AssertTest extends PHPUnit_Framework_TestCase */ public function testAssertArrayNotHasKeyThrowsExceptionForInvalidFirstArgument() { - $this->assertArrayNotHasKey(null, array()); + $this->assertArrayNotHasKey(null, []); } /** @@ -307,10 +307,10 @@ class Framework_AssertTest extends PHPUnit_Framework_TestCase */ public function testAssertArrayNotHasIntegerKey() { - $this->assertArrayNotHasKey(1, array('foo')); + $this->assertArrayNotHasKey(1, ['foo']); try { - $this->assertArrayNotHasKey(0, array('foo')); + $this->assertArrayNotHasKey(0, ['foo']); } catch (PHPUnit_Framework_AssertionFailedError $e) { return; } @@ -323,10 +323,10 @@ class Framework_AssertTest extends PHPUnit_Framework_TestCase */ public function testAssertArrayHasStringKey() { - $this->assertArrayHasKey('foo', array('foo' => 'bar')); + $this->assertArrayHasKey('foo', ['foo' => 'bar']); try { - $this->assertArrayHasKey('bar', array('foo' => 'bar')); + $this->assertArrayHasKey('bar', ['foo' => 'bar']); } catch (PHPUnit_Framework_AssertionFailedError $e) { return; } @@ -339,10 +339,10 @@ class Framework_AssertTest extends PHPUnit_Framework_TestCase */ public function testAssertArrayNotHasStringKey() { - $this->assertArrayNotHasKey('bar', array('foo' => 'bar')); + $this->assertArrayNotHasKey('bar', ['foo' => 'bar']); try { - $this->assertArrayNotHasKey('foo', array('foo' => 'bar')); + $this->assertArrayNotHasKey('foo', ['foo' => 'bar']); } catch (PHPUnit_Framework_AssertionFailedError $e) { return; } @@ -429,10 +429,10 @@ class Framework_AssertTest extends PHPUnit_Framework_TestCase { $foo = new stdClass; - $this->assertContains($foo, new TestIterator(array($foo))); + $this->assertContains($foo, new TestIterator([$foo])); try { - $this->assertContains($foo, new TestIterator(array(new stdClass))); + $this->assertContains($foo, new TestIterator([new stdClass])); } catch (PHPUnit_Framework_AssertionFailedError $e) { return; } @@ -445,10 +445,10 @@ class Framework_AssertTest extends PHPUnit_Framework_TestCase */ public function testAssertIteratorContainsString() { - $this->assertContains('foo', new TestIterator(array('foo'))); + $this->assertContains('foo', new TestIterator(['foo'])); try { - $this->assertContains('foo', new TestIterator(array('bar'))); + $this->assertContains('foo', new TestIterator(['bar'])); } catch (PHPUnit_Framework_AssertionFailedError $e) { return; } @@ -510,10 +510,10 @@ class Framework_AssertTest extends PHPUnit_Framework_TestCase $a = new stdClass; $b = new stdClass; - $this->assertNotContains($a, array($b)); + $this->assertNotContains($a, [$b]); try { - $this->assertNotContains($a, array($a)); + $this->assertNotContains($a, [$a]); } catch (PHPUnit_Framework_AssertionFailedError $e) { return; } @@ -526,10 +526,10 @@ class Framework_AssertTest extends PHPUnit_Framework_TestCase */ public function testAssertArrayNotContainsString() { - $this->assertNotContains('foo', array('bar')); + $this->assertNotContains('foo', ['bar']); try { - $this->assertNotContains('foo', array('foo')); + $this->assertNotContains('foo', ['foo']); } catch (PHPUnit_Framework_AssertionFailedError $e) { return; } @@ -542,10 +542,10 @@ class Framework_AssertTest extends PHPUnit_Framework_TestCase */ public function testAssertArrayNotContainsNonObject() { - $this->assertNotContains('foo', array(true), '', false, true, true); + $this->assertNotContains('foo', [true], '', false, true, true); try { - $this->assertNotContains('foo', array(true)); + $this->assertNotContains('foo', [true]); } catch (PHPUnit_Framework_AssertionFailedError $e) { return; } @@ -601,10 +601,10 @@ class Framework_AssertTest extends PHPUnit_Framework_TestCase */ public function testAssertArrayContainsOnlyIntegers() { - $this->assertContainsOnly('integer', array(1, 2, 3)); + $this->assertContainsOnly('integer', [1, 2, 3]); try { - $this->assertContainsOnly('integer', array('1', 2, 3)); + $this->assertContainsOnly('integer', ['1', 2, 3]); } catch (PHPUnit_Framework_AssertionFailedError $e) { return; } @@ -617,10 +617,10 @@ class Framework_AssertTest extends PHPUnit_Framework_TestCase */ public function testAssertArrayNotContainsOnlyIntegers() { - $this->assertNotContainsOnly('integer', array('1', 2, 3)); + $this->assertNotContainsOnly('integer', ['1', 2, 3]); try { - $this->assertNotContainsOnly('integer', array(1, 2, 3)); + $this->assertNotContainsOnly('integer', [1, 2, 3]); } catch (PHPUnit_Framework_AssertionFailedError $e) { return; } @@ -633,10 +633,10 @@ class Framework_AssertTest extends PHPUnit_Framework_TestCase */ public function testAssertArrayContainsOnlyStdClass() { - $this->assertContainsOnly('StdClass', array(new stdClass)); + $this->assertContainsOnly('StdClass', [new stdClass]); try { - $this->assertContainsOnly('StdClass', array('StdClass')); + $this->assertContainsOnly('StdClass', ['StdClass']); } catch (PHPUnit_Framework_AssertionFailedError $e) { return; } @@ -649,10 +649,10 @@ class Framework_AssertTest extends PHPUnit_Framework_TestCase */ public function testAssertArrayNotContainsOnlyStdClass() { - $this->assertNotContainsOnly('StdClass', array('StdClass')); + $this->assertNotContainsOnly('StdClass', ['StdClass']); try { - $this->assertNotContainsOnly('StdClass', array(new stdClass)); + $this->assertNotContainsOnly('StdClass', [new stdClass]); } catch (PHPUnit_Framework_AssertionFailedError $e) { return; } @@ -668,27 +668,27 @@ class Framework_AssertTest extends PHPUnit_Framework_TestCase $file = dirname(__DIR__) . DIRECTORY_SEPARATOR . '_files' . DIRECTORY_SEPARATOR . 'foo.xml'; $resource = fopen($file, 'r'); - return array( + return [ // null - array(null, null), + [null, null], // strings - array('a', 'a'), + ['a', 'a'], // integers - array(0, 0), + [0, 0], // floats - array(2.3, 2.3), - array(1/3, 1 - 2/3), - array(log(0), log(0)), + [2.3, 2.3], + [1/3, 1 - 2/3], + [log(0), log(0)], // arrays - array(array(), array()), - array(array(0 => 1), array(0 => 1)), - array(array(0 => null), array(0 => null)), - array(array('a', 'b' => array(1, 2)), array('a', 'b' => array(1, 2))), + [[], []], + [[0 => 1], [0 => 1]], + [[0 => null], [0 => null]], + [['a', 'b' => [1, 2]], ['a', 'b' => [1, 2]]], // objects - array($object, $object), + [$object, $object], // resources - array($resource, $resource), - ); + [$resource, $resource], + ]; } protected function notEqualValues() @@ -718,120 +718,120 @@ class Framework_AssertTest extends PHPUnit_Framework_TestCase // setUpBeforeClass() are executed before the data providers $file = dirname(__DIR__) . DIRECTORY_SEPARATOR . '_files' . DIRECTORY_SEPARATOR . 'foo.xml'; - return array( + return [ // strings - array('a', 'b'), - array('a', 'A'), + ['a', 'b'], + ['a', 'A'], // https://github.com/sebastianbergmann/phpunit/issues/1023 - array('9E6666666','9E7777777'), + ['9E6666666','9E7777777'], // integers - array(1, 2), - array(2, 1), + [1, 2], + [2, 1], // floats - array(2.3, 4.2), - array(2.3, 4.2, 0.5), - array(array(2.3), array(4.2), 0.5), - array(array(array(2.3)), array(array(4.2)), 0.5), - array(new Struct(2.3), new Struct(4.2), 0.5), - array(array(new Struct(2.3)), array(new Struct(4.2)), 0.5), + [2.3, 4.2], + [2.3, 4.2, 0.5], + [[2.3], [4.2], 0.5], + [[[2.3]], [[4.2]], 0.5], + [new Struct(2.3), new Struct(4.2), 0.5], + [[new Struct(2.3)], [new Struct(4.2)], 0.5], // NAN - array(NAN, NAN), + [NAN, NAN], // arrays - array(array(), array(0 => 1)), - array(array(0 => 1), array()), - array(array(0 => null), array()), - array(array(0 => 1, 1 => 2), array(0 => 1, 1 => 3)), - array(array('a', 'b' => array(1, 2)), array('a', 'b' => array(2, 1))), + [[], [0 => 1]], + [[0 => 1], []], + [[0 => null], []], + [[0 => 1, 1 => 2], [0 => 1, 1 => 3]], + [['a', 'b' => [1, 2]], ['a', 'b' => [2, 1]]], // objects - array(new SampleClass(4, 8, 15), new SampleClass(16, 23, 42)), - array($object1, $object2), - array($book1, $book2), - array($book3, $book4), // same content, different class + [new SampleClass(4, 8, 15), new SampleClass(16, 23, 42)], + [$object1, $object2], + [$book1, $book2], + [$book3, $book4], // same content, different class // resources - array(fopen($file, 'r'), fopen($file, 'r')), + [fopen($file, 'r'), fopen($file, 'r')], // SplObjectStorage - array($storage1, $storage2), + [$storage1, $storage2], // DOMDocument - array( + [ PHPUnit_Util_XML::load(''), PHPUnit_Util_XML::load(''), - ), - array( + ], + [ PHPUnit_Util_XML::load(''), PHPUnit_Util_XML::load(''), - ), - array( + ], + [ PHPUnit_Util_XML::load(' bar '), PHPUnit_Util_XML::load(''), - ), - array( + ], + [ PHPUnit_Util_XML::load(''), PHPUnit_Util_XML::load(''), - ), - array( + ], + [ PHPUnit_Util_XML::load(' bar '), PHPUnit_Util_XML::load(' bir '), - ), - array( + ], + [ new DateTime('2013-03-29 04:13:35', new DateTimeZone('America/New_York')), new DateTime('2013-03-29 03:13:35', new DateTimeZone('America/New_York')), - ), - array( + ], + [ new DateTime('2013-03-29 04:13:35', new DateTimeZone('America/New_York')), new DateTime('2013-03-29 03:13:35', new DateTimeZone('America/New_York')), 3500 - ), - array( + ], + [ new DateTime('2013-03-29 04:13:35', new DateTimeZone('America/New_York')), new DateTime('2013-03-29 05:13:35', new DateTimeZone('America/New_York')), 3500 - ), - array( + ], + [ new DateTime('2013-03-29', new DateTimeZone('America/New_York')), new DateTime('2013-03-30', new DateTimeZone('America/New_York')), - ), - array( + ], + [ new DateTime('2013-03-29', new DateTimeZone('America/New_York')), new DateTime('2013-03-30', new DateTimeZone('America/New_York')), 43200 - ), - array( + ], + [ new DateTime('2013-03-29 04:13:35', new DateTimeZone('America/New_York')), new DateTime('2013-03-29 04:13:35', new DateTimeZone('America/Chicago')), - ), - array( + ], + [ new DateTime('2013-03-29 04:13:35', new DateTimeZone('America/New_York')), new DateTime('2013-03-29 04:13:35', new DateTimeZone('America/Chicago')), 3500 - ), - array( + ], + [ new DateTime('2013-03-30', new DateTimeZone('America/New_York')), new DateTime('2013-03-30', new DateTimeZone('America/Chicago')), - ), - array( + ], + [ new DateTime('2013-03-29T05:13:35-0600'), new DateTime('2013-03-29T04:13:35-0600'), - ), - array( + ], + [ new DateTime('2013-03-29T05:13:35-0600'), new DateTime('2013-03-29T05:13:35-0500'), - ), + ], // Exception //array(new Exception('Exception 1'), new Exception('Exception 2')), // different types - array(new SampleClass(4, 8, 15), false), - array(false, new SampleClass(4, 8, 15)), - array(array(0 => 1, 1 => 2), false), - array(false, array(0 => 1, 1 => 2)), - array(array(), new stdClass), - array(new stdClass, array()), + [new SampleClass(4, 8, 15), false], + [false, new SampleClass(4, 8, 15)], + [[0 => 1, 1 => 2], false], + [false, [0 => 1, 1 => 2]], + [[], new stdClass], + [new stdClass, []], // PHP: 0 == 'Foobar' => true! // We want these values to differ - array(0, 'Foobar'), - array('Foobar', 0), - array(3, acos(8)), - array(acos(8), 3) - ); + [0, 'Foobar'], + ['Foobar', 0], + [3, acos(8)], + [acos(8), 3] + ]; } protected function equalValues() @@ -851,99 +851,99 @@ class Framework_AssertTest extends PHPUnit_Framework_TestCase $storage2 = new SplObjectStorage; $storage2->attach($object1); - return array( + return [ // strings - array('a', 'A', 0, false, true), // ignore case + ['a', 'A', 0, false, true], // ignore case // arrays - array(array('a' => 1, 'b' => 2), array('b' => 2, 'a' => 1)), - array(array(1), array('1')), - array(array(3, 2, 1), array(2, 3, 1), 0, true), // canonicalized comparison + [['a' => 1, 'b' => 2], ['b' => 2, 'a' => 1]], + [[1], ['1']], + [[3, 2, 1], [2, 3, 1], 0, true], // canonicalized comparison // floats - array(2.3, 2.5, 0.5), - array(array(2.3), array(2.5), 0.5), - array(array(array(2.3)), array(array(2.5)), 0.5), - array(new Struct(2.3), new Struct(2.5), 0.5), - array(array(new Struct(2.3)), array(new Struct(2.5)), 0.5), + [2.3, 2.5, 0.5], + [[2.3], [2.5], 0.5], + [[[2.3]], [[2.5]], 0.5], + [new Struct(2.3), new Struct(2.5), 0.5], + [[new Struct(2.3)], [new Struct(2.5)], 0.5], // numeric with delta - array(1, 2, 1), + [1, 2, 1], // objects - array($object1, $object2), - array($book1, $book2), + [$object1, $object2], + [$book1, $book2], // SplObjectStorage - array($storage1, $storage2), + [$storage1, $storage2], // DOMDocument - array( + [ PHPUnit_Util_XML::load(''), PHPUnit_Util_XML::load(''), - ), - array( + ], + [ PHPUnit_Util_XML::load(''), PHPUnit_Util_XML::load(''), - ), - array( + ], + [ PHPUnit_Util_XML::load(''), PHPUnit_Util_XML::load(''), - ), - array( + ], + [ PHPUnit_Util_XML::load("\n \n"), PHPUnit_Util_XML::load(''), - ), - array( + ], + [ new DateTime('2013-03-29 04:13:35', new DateTimeZone('America/New_York')), new DateTime('2013-03-29 04:13:35', new DateTimeZone('America/New_York')), - ), - array( + ], + [ new DateTime('2013-03-29 04:13:35', new DateTimeZone('America/New_York')), new DateTime('2013-03-29 04:13:25', new DateTimeZone('America/New_York')), 10 - ), - array( + ], + [ new DateTime('2013-03-29 04:13:35', new DateTimeZone('America/New_York')), new DateTime('2013-03-29 04:14:40', new DateTimeZone('America/New_York')), 65 - ), - array( + ], + [ new DateTime('2013-03-29', new DateTimeZone('America/New_York')), new DateTime('2013-03-29', new DateTimeZone('America/New_York')), - ), - array( + ], + [ new DateTime('2013-03-29 04:13:35', new DateTimeZone('America/New_York')), new DateTime('2013-03-29 03:13:35', new DateTimeZone('America/Chicago')), - ), - array( + ], + [ new DateTime('2013-03-29 04:13:35', new DateTimeZone('America/New_York')), new DateTime('2013-03-29 03:13:49', new DateTimeZone('America/Chicago')), 15 - ), - array( + ], + [ new DateTime('2013-03-30', new DateTimeZone('America/New_York')), new DateTime('2013-03-29 23:00:00', new DateTimeZone('America/Chicago')), - ), - array( + ], + [ new DateTime('2013-03-30', new DateTimeZone('America/New_York')), new DateTime('2013-03-29 23:01:30', new DateTimeZone('America/Chicago')), 100 - ), - array( + ], + [ new DateTime('@1364616000'), new DateTime('2013-03-29 23:00:00', new DateTimeZone('America/Chicago')), - ), - array( + ], + [ new DateTime('2013-03-29T05:13:35-0500'), new DateTime('2013-03-29T04:13:35-0600'), - ), + ], // Exception //array(new Exception('Exception 1'), new Exception('Exception 1')), // mixed types - array(0, '0'), - array('0', 0), - array(2.3, '2.3'), - array('2.3', 2.3), - array((string) (1/3), 1 - 2/3), - array(1/3, (string) (1 - 2/3)), - array('string representation', new ClassWithToString), - array(new ClassWithToString, 'string representation'), - ); + [0, '0'], + ['0', 0], + [2.3, '2.3'], + ['2.3', 2.3], + [(string) (1/3), 1 - 2/3], + [1/3, (string) (1 - 2/3)], + ['string representation', new ClassWithToString], + [new ClassWithToString, 'string representation'], + ]; } public function equalProvider() @@ -1426,6 +1426,54 @@ XML; $this->fail(); } + /** + * @covers PHPUnit_Framework_Assert::assertFinite + */ + public function testAssertFinite() + { + $this->assertFinite(1); + + try { + $this->assertFinite(INF); + } catch (PHPUnit_Framework_AssertionFailedError $e) { + return; + } + + $this->fail(); + } + + /** + * @covers PHPUnit_Framework_Assert::assertInfinite + */ + public function testAssertInfinite() + { + $this->assertInfinite(INF); + + try { + $this->assertInfinite(1); + } catch (PHPUnit_Framework_AssertionFailedError $e) { + return; + } + + $this->fail(); + } + + /** + * @covers PHPUnit_Framework_Assert::assertNan + */ + public function testAssertNan() + { + $this->assertNan(NAN); + + try { + $this->assertNan(1); + } catch (PHPUnit_Framework_AssertionFailedError $e) { + return; + } + + $this->fail(); + } + /** * @covers PHPUnit_Framework_Assert::assertNull */ @@ -2931,7 +2979,7 @@ XML; */ public function testAssertThatContains() { - $this->assertThat(array('foo'), $this->contains('foo')); + $this->assertThat(['foo'], $this->contains('foo')); } /** @@ -2949,7 +2997,7 @@ XML; */ public function testAssertThatContainsOnly() { - $this->assertThat(array('foo'), $this->containsOnly('string')); + $this->assertThat(['foo'], $this->containsOnly('string')); } /** * @covers PHPUnit_Framework_Assert::assertThat @@ -2957,7 +3005,7 @@ XML; */ public function testAssertThatContainsOnlyInstancesOf() { - $this->assertThat(array(new Book), $this->containsOnlyInstancesOf('Book')); + $this->assertThat([new Book], $this->containsOnlyInstancesOf('Book')); } /** @@ -2966,7 +3014,7 @@ XML; */ public function testAssertThatArrayHasKey() { - $this->assertThat(array('foo' => 'bar'), $this->arrayHasKey('foo')); + $this->assertThat(['foo' => 'bar'], $this->arrayHasKey('foo')); } /** @@ -3050,7 +3098,7 @@ XML; */ public function testAssertThatIsEmpty() { - $this->assertThat(array(), $this->isEmpty()); + $this->assertThat([], $this->isEmpty()); } /** @@ -3125,7 +3173,7 @@ XML; */ public function testAssertThatCountOf() { - $this->assertThat(array(1), $this->countOf(1)); + $this->assertThat([1], $this->countOf(1)); } /** @@ -3426,10 +3474,10 @@ XML; */ public function testAssertEmpty() { - $this->assertEmpty(array()); + $this->assertEmpty([]); try { - $this->assertEmpty(array('foo')); + $this->assertEmpty(['foo']); } catch (PHPUnit_Framework_AssertionFailedError $e) { return; } @@ -3442,10 +3490,10 @@ XML; */ public function testAssertNotEmpty() { - $this->assertNotEmpty(array('foo')); + $this->assertNotEmpty(['foo']); try { - $this->assertNotEmpty(array()); + $this->assertNotEmpty([]); } catch (PHPUnit_Framework_AssertionFailedError $e) { return; } @@ -3459,12 +3507,12 @@ XML; public function testAssertAttributeEmpty() { $o = new stdClass; - $o->a = array(); + $o->a = []; $this->assertAttributeEmpty('a', $o); try { - $o->a = array('b'); + $o->a = ['b']; $this->assertAttributeEmpty('a', $o); } catch (PHPUnit_Framework_AssertionFailedError $e) { return; @@ -3479,12 +3527,12 @@ XML; public function testAssertAttributeNotEmpty() { $o = new stdClass; - $o->a = array('b'); + $o->a = ['b']; $this->assertAttributeNotEmpty('a', $o); try { - $o->a = array(); + $o->a = []; $this->assertAttributeNotEmpty('a', $o); } catch (PHPUnit_Framework_AssertionFailedError $e) { return; @@ -3530,10 +3578,10 @@ XML; */ public function testAssertCount() { - $this->assertCount(2, array(1, 2)); + $this->assertCount(2, [1, 2]); try { - $this->assertCount(2, array(1, 2, 3)); + $this->assertCount(2, [1, 2, 3]); } catch (PHPUnit_Framework_AssertionFailedError $e) { return; } @@ -3546,10 +3594,10 @@ XML; */ public function testAssertCountTraversable() { - $this->assertCount(2, new ArrayIterator(array(1, 2))); + $this->assertCount(2, new ArrayIterator([1, 2])); try { - $this->assertCount(2, new ArrayIterator(array(1, 2, 3))); + $this->assertCount(2, new ArrayIterator([1, 2, 3])); } catch (PHPUnit_Framework_AssertionFailedError $e) { return; } @@ -3563,7 +3611,7 @@ XML; public function testAssertCountThrowsExceptionIfExpectedCountIsNoInteger() { try { - $this->assertCount('a', array()); + $this->assertCount('a', []); } catch (PHPUnit_Framework_Exception $e) { $this->assertEquals('Argument #1 (No Value) of PHPUnit_Framework_Assert::assertCount() must be a integer', $e->getMessage()); @@ -3595,7 +3643,7 @@ XML; public function testAssertAttributeCount() { $o = new stdClass; - $o->a = array(); + $o->a = []; $this->assertAttributeCount(0, 'a', $o); } @@ -3605,10 +3653,10 @@ XML; */ public function testAssertNotCount() { - $this->assertNotCount(2, array(1, 2, 3)); + $this->assertNotCount(2, [1, 2, 3]); try { - $this->assertNotCount(2, array(1, 2)); + $this->assertNotCount(2, [1, 2]); } catch (PHPUnit_Framework_AssertionFailedError $e) { return; } @@ -3622,7 +3670,7 @@ XML; */ public function testAssertNotCountThrowsExceptionIfExpectedCountIsNoInteger() { - $this->assertNotCount('a', array()); + $this->assertNotCount('a', []); } /** @@ -3640,7 +3688,7 @@ XML; public function testAssertAttributeNotCount() { $o = new stdClass; - $o->a = array(); + $o->a = []; $this->assertAttributeNotCount(1, 'a', $o); } @@ -3650,10 +3698,10 @@ XML; */ public function testAssertSameSize() { - $this->assertSameSize(array(1, 2), array(3, 4)); + $this->assertSameSize([1, 2], [3, 4]); try { - $this->assertSameSize(array(1, 2), array(1, 2, 3)); + $this->assertSameSize([1, 2], [1, 2, 3]); } catch (PHPUnit_Framework_AssertionFailedError $e) { return; } @@ -3667,7 +3715,7 @@ XML; public function testAssertSameSizeThrowsExceptionIfExpectedIsNotCountable() { try { - $this->assertSameSize('a', array()); + $this->assertSameSize('a', []); } catch (PHPUnit_Framework_Exception $e) { $this->assertEquals('Argument #1 (No Value) of PHPUnit_Framework_Assert::assertSameSize() must be a countable or traversable', $e->getMessage()); @@ -3683,7 +3731,7 @@ XML; public function testAssertSameSizeThrowsExceptionIfActualIsNotCountable() { try { - $this->assertSameSize(array(), ''); + $this->assertSameSize([], ''); } catch (PHPUnit_Framework_Exception $e) { $this->assertEquals('Argument #2 (No Value) of PHPUnit_Framework_Assert::assertSameSize() must be a countable or traversable', $e->getMessage()); @@ -3698,10 +3746,10 @@ XML; */ public function testAssertNotSameSize() { - $this->assertNotSameSize(array(1, 2), array(1, 2, 3)); + $this->assertNotSameSize([1, 2], [1, 2, 3]); try { - $this->assertNotSameSize(array(1, 2), array(3, 4)); + $this->assertNotSameSize([1, 2], [3, 4]); } catch (PHPUnit_Framework_AssertionFailedError $e) { return; } @@ -3715,7 +3763,7 @@ XML; */ public function testAssertNotSameSizeThrowsExceptionIfExpectedIsNotCountable() { - $this->assertNotSameSize('a', array()); + $this->assertNotSameSize('a', []); } /** @@ -3724,7 +3772,7 @@ XML; */ public function testAssertNotSameSizeThrowsExceptionIfActualIsNotCountable() { - $this->assertNotSameSize(array(), ''); + $this->assertNotSameSize([], ''); } /** @@ -3802,7 +3850,7 @@ XML; public function testAssertJsonStringEqualsJsonFile() { $file = __DIR__ . '/../_files/JsonData/simpleObject.json'; - $actual = json_encode(array('Mascott' => 'Tux')); + $actual = json_encode(['Mascott' => 'Tux']); $message = ''; $this->assertJsonStringEqualsJsonFile($file, $actual, $message); } @@ -3813,7 +3861,7 @@ XML; public function testAssertJsonStringEqualsJsonFileExpectingExpectationFailedException() { $file = __DIR__ . '/../_files/JsonData/simpleObject.json'; - $actual = json_encode(array('Mascott' => 'Beastie')); + $actual = json_encode(['Mascott' => 'Beastie']); $message = ''; try { $this->assertJsonStringEqualsJsonFile($file, $actual, $message); @@ -3849,7 +3897,7 @@ XML; public function testAssertJsonStringNotEqualsJsonFile() { $file = __DIR__ . '/../_files/JsonData/simpleObject.json'; - $actual = json_encode(array('Mascott' => 'Beastie')); + $actual = json_encode(['Mascott' => 'Beastie']); $message = ''; $this->assertJsonStringNotEqualsJsonFile($file, $actual, $message); } @@ -4122,9 +4170,9 @@ XML; */ public static function validInvalidJsonDataprovider() { - return array( - 'error syntax in expected JSON' => array('{"Mascott"::}', '{"Mascott" : "Tux"}'), - 'error UTF-8 in actual JSON' => array('{"Mascott" : "Tux"}', '{"Mascott" : :}'), - ); + return [ + 'error syntax in expected JSON' => ['{"Mascott"::}', '{"Mascott" : "Tux"}'], + 'error UTF-8 in actual JSON' => ['{"Mascott" : "Tux"}', '{"Mascott" : :}'], + ]; } } diff --git a/vendor/phpunit/phpunit/tests/Framework/Constraint/CountTest.php b/vendor/phpunit/phpunit/tests/Framework/Constraint/CountTest.php index 79e99e8..557981e 100644 --- a/vendor/phpunit/phpunit/tests/Framework/Constraint/CountTest.php +++ b/vendor/phpunit/phpunit/tests/Framework/Constraint/CountTest.php @@ -17,13 +17,13 @@ class CountTest extends PHPUnit_Framework_TestCase public function testCount() { $countConstraint = new PHPUnit_Framework_Constraint_Count(3); - $this->assertTrue($countConstraint->evaluate(array(1, 2, 3), '', true)); + $this->assertTrue($countConstraint->evaluate([1, 2, 3], '', true)); $countConstraint = new PHPUnit_Framework_Constraint_Count(0); - $this->assertTrue($countConstraint->evaluate(array(), '', true)); + $this->assertTrue($countConstraint->evaluate([], '', true)); $countConstraint = new PHPUnit_Framework_Constraint_Count(2); - $it = new TestIterator(array(1, 2)); + $it = new TestIterator([1, 2]); $this->assertTrue($countConstraint->evaluate($it, '', true)); } @@ -32,7 +32,7 @@ class CountTest extends PHPUnit_Framework_TestCase $countConstraint = new PHPUnit_Framework_Constraint_Count(2); // test with 1st implementation of Iterator - $it = new TestIterator(array(1, 2)); + $it = new TestIterator([1, 2]); $countConstraint->evaluate($it, '', true); $this->assertEquals(1, $it->current()); @@ -46,7 +46,7 @@ class CountTest extends PHPUnit_Framework_TestCase $this->assertFalse($it->valid()); // test with 2nd implementation of Iterator - $it = new TestIterator2(array(1, 2)); + $it = new TestIterator2([1, 2]); $countConstraint = new PHPUnit_Framework_Constraint_Count(2); $countConstraint->evaluate($it, '', true); diff --git a/vendor/phpunit/phpunit/tests/Framework/Constraint/JsonMatches/ErrorMessageProviderTest.php b/vendor/phpunit/phpunit/tests/Framework/Constraint/JsonMatches/ErrorMessageProviderTest.php index 8529026..2ee36a3 100644 --- a/vendor/phpunit/phpunit/tests/Framework/Constraint/JsonMatches/ErrorMessageProviderTest.php +++ b/vendor/phpunit/phpunit/tests/Framework/Constraint/JsonMatches/ErrorMessageProviderTest.php @@ -42,42 +42,42 @@ class Framework_Constraint_JsonMatches_ErrorMessageProviderTest extends PHPUnit_ public static function determineJsonErrorDataprovider() { - return array( - 'JSON_ERROR_NONE' => array( + return [ + 'JSON_ERROR_NONE' => [ null, 'json_error_none', '' - ), - 'JSON_ERROR_DEPTH' => array( + ], + 'JSON_ERROR_DEPTH' => [ 'Maximum stack depth exceeded', JSON_ERROR_DEPTH, '' - ), - 'prefixed JSON_ERROR_DEPTH' => array( + ], + 'prefixed JSON_ERROR_DEPTH' => [ 'TUX: Maximum stack depth exceeded', JSON_ERROR_DEPTH, 'TUX: ' - ), - 'JSON_ERROR_STATE_MISMatch' => array( + ], + 'JSON_ERROR_STATE_MISMatch' => [ 'Underflow or the modes mismatch', JSON_ERROR_STATE_MISMATCH, '' - ), - 'JSON_ERROR_CTRL_CHAR' => array( + ], + 'JSON_ERROR_CTRL_CHAR' => [ 'Unexpected control character found', JSON_ERROR_CTRL_CHAR, '' - ), - 'JSON_ERROR_SYNTAX' => array( + ], + 'JSON_ERROR_SYNTAX' => [ 'Syntax error, malformed JSON', JSON_ERROR_SYNTAX, '' - ), - 'JSON_ERROR_UTF8`' => array( + ], + 'JSON_ERROR_UTF8`' => [ 'Malformed UTF-8 characters, possibly incorrectly encoded', JSON_ERROR_UTF8, '' - ), - 'Invalid error indicator' => array( + ], + 'Invalid error indicator' => [ 'Unknown error', 55, '' - ), - ); + ], + ]; } public static function translateTypeToPrefixDataprovider() { - return array( - 'expected' => array('Expected value JSON decode error - ', 'expected'), - 'actual' => array('Actual value JSON decode error - ', 'actual'), - 'default' => array('', ''), - ); + return [ + 'expected' => ['Expected value JSON decode error - ', 'expected'], + 'actual' => ['Actual value JSON decode error - ', 'actual'], + 'default' => ['', ''], + ]; } } diff --git a/vendor/phpunit/phpunit/tests/Framework/Constraint/JsonMatchesTest.php b/vendor/phpunit/phpunit/tests/Framework/Constraint/JsonMatchesTest.php index 2b7221c..fa2dc5b 100644 --- a/vendor/phpunit/phpunit/tests/Framework/Constraint/JsonMatchesTest.php +++ b/vendor/phpunit/phpunit/tests/Framework/Constraint/JsonMatchesTest.php @@ -30,7 +30,7 @@ class Framework_Constraint_JsonMatchesTest extends PHPUnit_Framework_TestCase */ public function testToString() { - $jsonValue = json_encode(array('Mascott' => 'Tux')); + $jsonValue = json_encode(['Mascott' => 'Tux']); $constraint = new PHPUnit_Framework_Constraint_JsonMatches($jsonValue); $this->assertEquals('matches JSON string "' . $jsonValue . '"', $constraint->toString()); @@ -38,11 +38,11 @@ class Framework_Constraint_JsonMatchesTest extends PHPUnit_Framework_TestCase public static function evaluateDataprovider() { - return array( - 'valid JSON' => array(true, json_encode(array('Mascott' => 'Tux')), json_encode(array('Mascott' => 'Tux'))), - 'error syntax' => array(false, '{"Mascott"::}', json_encode(array('Mascott' => 'Tux'))), - 'error UTF-8' => array(false, json_encode('\xB1\x31'), json_encode(array('Mascott' => 'Tux'))), - 'invalid JSON in class instantiation' => array(false, json_encode(array('Mascott' => 'Tux')), '{"Mascott"::}'), - ); + return [ + 'valid JSON' => [true, json_encode(['Mascott' => 'Tux']), json_encode(['Mascott' => 'Tux'])], + 'error syntax' => [false, '{"Mascott"::}', json_encode(['Mascott' => 'Tux'])], + 'error UTF-8' => [false, json_encode('\xB1\x31'), json_encode(['Mascott' => 'Tux'])], + 'invalid JSON in class instantiation' => [false, json_encode(['Mascott' => 'Tux']), '{"Mascott"::}'], + ]; } } diff --git a/vendor/phpunit/phpunit/tests/Framework/ConstraintTest.php b/vendor/phpunit/phpunit/tests/Framework/ConstraintTest.php index a6ff784..aa02e29 100644 --- a/vendor/phpunit/phpunit/tests/Framework/ConstraintTest.php +++ b/vendor/phpunit/phpunit/tests/Framework/ConstraintTest.php @@ -23,12 +23,12 @@ class Framework_ConstraintTest extends PHPUnit_Framework_TestCase { $constraint = PHPUnit_Framework_Assert::arrayHasKey(0); - $this->assertFalse($constraint->evaluate(array(), '', true)); + $this->assertFalse($constraint->evaluate([], '', true)); $this->assertEquals('has the key 0', $constraint->toString()); $this->assertEquals(1, count($constraint)); try { - $constraint->evaluate(array()); + $constraint->evaluate([]); } catch (PHPUnit_Framework_ExpectationFailedException $e) { $this->assertEquals(<<evaluate(array(), 'custom message'); + $constraint->evaluate([], 'custom message'); } catch (PHPUnit_Framework_ExpectationFailedException $e) { $this->assertEquals( <<assertFalse($constraint->evaluate(array(0 => 1), '', true)); + $this->assertFalse($constraint->evaluate([0 => 1], '', true)); $this->assertEquals('does not have the key 0', $constraint->toString()); $this->assertEquals(1, count($constraint)); try { - $constraint->evaluate(array(0 => 1)); + $constraint->evaluate([0 => 1]); } catch (PHPUnit_Framework_ExpectationFailedException $e) { $this->assertEquals( <<evaluate(array(0), 'custom message'); + $constraint->evaluate([0], 'custom message'); } catch (PHPUnit_Framework_ExpectationFailedException $e) { $this->assertEquals( <<foo = 'bar'; $c->int = 1; - $c->array = array(0, array(1), array(2), 3); + $c->array = [0, [1], [2], 3]; $c->related = new stdClass; $c->related->foo = "a\nb\nc\nd\ne\nf\ng\nh\ni\nj\nk"; $c->self = $c; @@ -633,7 +633,7 @@ EOF $d = new stdClass; $d->foo = 'bar'; $d->int = 2; - $d->array = array(0, array(4), array(2), 3); + $d->array = [0, [4], [2], 3]; $d->related = new stdClass; $d->related->foo = "a\np\nc\nd\ne\nf\ng\nh\ni\nw\nk"; $d->self = $d; @@ -654,18 +654,18 @@ EOF $dom2->preserveWhiteSpace = false; $dom2->loadXML(''); - $data = array( - array(1, 0, << EOF - ), - array( + ], + [ new DateTime('2013-03-29 04:13:35', new DateTimeZone('America/New_York')), new DateTime('2013-03-29 04:13:35', new DateTimeZone('America/Chicago')), << array(fopen(__FILE__, 'r')), - 'closed resource' => array($fh), - ); + return [ + 'open resource' => [fopen(__FILE__, 'r')], + 'closed resource' => [$fh], + ]; } /** @@ -1754,11 +1754,11 @@ EOF $this->assertTrue($constraint->evaluate(true, '', true)); $this->assertFalse($constraint->evaluate(false, '', true)); - $callback = array($this, 'callbackReturningTrue'); + $callback = [$this, 'callbackReturningTrue']; $constraint = PHPUnit_Framework_Assert::callback($callback); $this->assertTrue($constraint->evaluate(false, '', true)); - $callback = array('Framework_ConstraintTest', 'staticCallbackReturningTrue'); + $callback = ['Framework_ConstraintTest', 'staticCallbackReturningTrue']; $constraint = PHPUnit_Framework_Assert::callback($callback); $this->assertTrue($constraint->evaluate(null, '', true)); @@ -2872,14 +2872,14 @@ EOF // Check for primitive type. $constraint = new PHPUnit_Framework_Constraint_TraversableContains('foo', true, true); - $this->assertFalse($constraint->evaluate(array(0), '', true)); - $this->assertFalse($constraint->evaluate(array(true), '', true)); + $this->assertFalse($constraint->evaluate([0], '', true)); + $this->assertFalse($constraint->evaluate([true], '', true)); // Default case. $constraint = new PHPUnit_Framework_Constraint_TraversableContains('foo'); - $this->assertTrue($constraint->evaluate(array(0), '', true)); - $this->assertTrue($constraint->evaluate(array(true), '', true)); + $this->assertTrue($constraint->evaluate([0], '', true)); + $this->assertTrue($constraint->evaluate([true], '', true)); } /** @@ -2891,13 +2891,13 @@ EOF { $constraint = new PHPUnit_Framework_Constraint_TraversableContains('foo'); - $this->assertFalse($constraint->evaluate(array('bar'), '', true)); - $this->assertTrue($constraint->evaluate(array('foo'), '', true)); + $this->assertFalse($constraint->evaluate(['bar'], '', true)); + $this->assertTrue($constraint->evaluate(['foo'], '', true)); $this->assertEquals("contains 'foo'", $constraint->toString()); $this->assertEquals(1, count($constraint)); try { - $constraint->evaluate(array('bar')); + $constraint->evaluate(['bar']); } catch (PHPUnit_Framework_ExpectationFailedException $e) { $this->assertEquals( <<evaluate(array('bar'), 'custom message'); + $constraint->evaluate(['bar'], 'custom message'); } catch (PHPUnit_Framework_ExpectationFailedException $e) { $this->assertEquals( <<assertTrue($constraint->evaluate(array('bar'), '', true)); - $this->assertFalse($constraint->evaluate(array('foo'), '', true)); + $this->assertTrue($constraint->evaluate(['bar'], '', true)); + $this->assertFalse($constraint->evaluate(['foo'], '', true)); $this->assertEquals("does not contain 'foo'", $constraint->toString()); $this->assertEquals(1, count($constraint)); try { - $constraint->evaluate(array('foo')); + $constraint->evaluate(['foo']); } catch (PHPUnit_Framework_ExpectationFailedException $e) { $this->assertEquals( <<evaluate(array('foo'), 'custom message'); + $constraint->evaluate(['foo'], 'custom message'); } catch (PHPUnit_Framework_ExpectationFailedException $e) { $this->assertEquals( <<assertFalse($constraint->evaluate(array('foo'), '', true)); - $this->assertTrue($constraint->evaluate(array(), '', true)); - $this->assertFalse($constraint->evaluate(new ArrayObject(array('foo')), '', true)); - $this->assertTrue($constraint->evaluate(new ArrayObject(array()), '', true)); + $this->assertFalse($constraint->evaluate(['foo'], '', true)); + $this->assertTrue($constraint->evaluate([], '', true)); + $this->assertFalse($constraint->evaluate(new ArrayObject(['foo']), '', true)); + $this->assertTrue($constraint->evaluate(new ArrayObject([]), '', true)); $this->assertEquals('is empty', $constraint->toString()); $this->assertEquals(1, count($constraint)); try { - $constraint->evaluate(array('foo')); + $constraint->evaluate(['foo']); } catch (PHPUnit_Framework_ExpectationFailedException $e) { $this->assertEquals( <<evaluate(array('foo'), 'custom message'); + $constraint->evaluate(['foo'], 'custom message'); } catch (PHPUnit_Framework_ExpectationFailedException $e) { $this->assertEquals( <<assertTrue($constraint->evaluate(array(1, 2, 3, 4, 5), '', true)); - $this->assertFalse($constraint->evaluate(array(1, 2, 3, 4), '', true)); + $this->assertTrue($constraint->evaluate([1, 2, 3, 4, 5], '', true)); + $this->assertFalse($constraint->evaluate([1, 2, 3, 4], '', true)); } /** @@ -3286,8 +3286,8 @@ EOF { $constraint = new PHPUnit_Framework_Constraint_Count(5); - $this->assertTrue($constraint->evaluate(new TestIterator(array(1, 2, 3, 4, 5)), '', true)); - $this->assertFalse($constraint->evaluate(new TestIterator(array(1, 2, 3, 4)), '', true)); + $this->assertTrue($constraint->evaluate(new TestIterator([1, 2, 3, 4, 5]), '', true)); + $this->assertFalse($constraint->evaluate(new TestIterator([1, 2, 3, 4]), '', true)); } /** @@ -3297,8 +3297,8 @@ EOF { $constraint = new PHPUnit_Framework_Constraint_Count(5); - $this->assertTrue($constraint->evaluate(new ArrayObject(array(1, 2, 3, 4, 5)), '', true)); - $this->assertFalse($constraint->evaluate(new ArrayObject(array(1, 2, 3, 4)), '', true)); + $this->assertTrue($constraint->evaluate(new ArrayObject([1, 2, 3, 4, 5]), '', true)); + $this->assertFalse($constraint->evaluate(new ArrayObject([1, 2, 3, 4]), '', true)); } /** @@ -3310,7 +3310,7 @@ EOF $constraint = new PHPUnit_Framework_Constraint_Count(5); try { - $constraint->evaluate(array(1, 2)); + $constraint->evaluate([1, 2]); } catch (PHPUnit_Framework_ExpectationFailedException $e) { $this->assertEquals( <<evaluate(array(1, 2)); + $constraint->evaluate([1, 2]); } catch (PHPUnit_Framework_ExpectationFailedException $e) { $this->assertEquals( <<assertTrue($constraint->evaluate(array(6, 7, 8, 9, 10), '', true)); - $this->assertFalse($constraint->evaluate(array(1, 2, 3, 4), '', true)); + $this->assertTrue($constraint->evaluate([6, 7, 8, 9, 10], '', true)); + $this->assertFalse($constraint->evaluate([1, 2, 3, 4], '', true)); } /** @@ -3373,10 +3373,10 @@ EOF */ public function testConstraintSameSizeWithAnIteratorWhichDoesNotImplementCountable() { - $constraint = new PHPUnit_Framework_Constraint_SameSize(new TestIterator(array(1, 2, 3, 4, 5))); + $constraint = new PHPUnit_Framework_Constraint_SameSize(new TestIterator([1, 2, 3, 4, 5])); - $this->assertTrue($constraint->evaluate(new TestIterator(array(6, 7, 8, 9, 10)), '', true)); - $this->assertFalse($constraint->evaluate(new TestIterator(array(1, 2, 3, 4)), '', true)); + $this->assertTrue($constraint->evaluate(new TestIterator([6, 7, 8, 9, 10]), '', true)); + $this->assertFalse($constraint->evaluate(new TestIterator([1, 2, 3, 4]), '', true)); } /** @@ -3384,10 +3384,10 @@ EOF */ public function testConstraintSameSizeWithAnObjectImplementingCountable() { - $constraint = new PHPUnit_Framework_Constraint_SameSize(new ArrayObject(array(1, 2, 3, 4, 5))); + $constraint = new PHPUnit_Framework_Constraint_SameSize(new ArrayObject([1, 2, 3, 4, 5])); - $this->assertTrue($constraint->evaluate(new ArrayObject(array(6, 7, 8, 9, 10)), '', true)); - $this->assertFalse($constraint->evaluate(new ArrayObject(array(1, 2, 3, 4)), '', true)); + $this->assertTrue($constraint->evaluate(new ArrayObject([6, 7, 8, 9, 10]), '', true)); + $this->assertFalse($constraint->evaluate(new ArrayObject([1, 2, 3, 4]), '', true)); } /** @@ -3396,10 +3396,10 @@ EOF */ public function testConstraintSameSizeFailing() { - $constraint = new PHPUnit_Framework_Constraint_SameSize(array(1, 2, 3, 4, 5)); + $constraint = new PHPUnit_Framework_Constraint_SameSize([1, 2, 3, 4, 5]); try { - $constraint->evaluate(array(1, 2)); + $constraint->evaluate([1, 2]); } catch (PHPUnit_Framework_ExpectationFailedException $e) { $this->assertEquals( <<evaluate(array(3, 4)); + $constraint->evaluate([3, 4]); } catch (PHPUnit_Framework_ExpectationFailedException $e) { $this->assertEquals( <<getTraceAsString(); + $stackTrace = PHPUnit_Util_Filter::getFilteredStacktrace($exception); try { $constraint->evaluate($exception); diff --git a/vendor/phpunit/phpunit/tests/Framework/SuiteTest.php b/vendor/phpunit/phpunit/tests/Framework/SuiteTest.php index e3f58b3..5d61285 100644 --- a/vendor/phpunit/phpunit/tests/Framework/SuiteTest.php +++ b/vendor/phpunit/phpunit/tests/Framework/SuiteTest.php @@ -90,7 +90,8 @@ class Framework_SuiteTest extends PHPUnit_Framework_TestCase $suite->run($this->result); $this->assertTrue(!$this->result->wasSuccessful()); - $this->assertEquals(1, $this->result->failureCount()); + $this->assertEquals(0, $this->result->failureCount()); + $this->assertEquals(1, $this->result->warningCount()); $this->assertEquals(1, count($this->result)); } diff --git a/vendor/phpunit/phpunit/tests/Framework/TestCaseTest.php b/vendor/phpunit/phpunit/tests/Framework/TestCaseTest.php index 9133278..b2be522 100644 --- a/vendor/phpunit/phpunit/tests/Framework/TestCaseTest.php +++ b/vendor/phpunit/phpunit/tests/Framework/TestCaseTest.php @@ -27,7 +27,7 @@ $GLOBALS['i'] = 'i'; */ class Framework_TestCaseTest extends PHPUnit_Framework_TestCase { - protected $backupGlobalsBlacklist = array('i', 'singleton'); + protected $backupGlobalsBlacklist = ['i', 'singleton']; /** * Used be testStaticAttributesBackupPre @@ -483,6 +483,17 @@ class Framework_TestCaseTest extends PHPUnit_Framework_TestCase ); } + public function testSkipsIfRequiresExtensionWithAMinimumVersion() + { + $test = new RequirementsTest('testSpecificExtensionVersion'); + $result = $test->run(); + + $this->assertEquals( + 'Extension testExt 1.8.0 (or later) is required.', + $test->getStatusMessage() + ); + } + public function testSkipsProvidesMessagesForAllSkippingReasons() { $test = new RequirementsTest('testAllPossibleRequirements'); @@ -495,7 +506,8 @@ class Framework_TestCaseTest extends PHPUnit_Framework_TestCase 'Function testFuncOne is required.' . PHP_EOL . 'Function testFuncTwo is required.' . PHP_EOL . 'Extension testExtOne is required.' . PHP_EOL . - 'Extension testExtTwo is required.', + 'Extension testExtTwo is required.' . PHP_EOL . + 'Extension testExtThree 2.0 (or later) is required.', $test->getStatusMessage() ); } diff --git a/vendor/phpunit/phpunit/tests/Framework/TestListenerTest.php b/vendor/phpunit/phpunit/tests/Framework/TestListenerTest.php index 589741b..98b63c7 100644 --- a/vendor/phpunit/phpunit/tests/Framework/TestListenerTest.php +++ b/vendor/phpunit/phpunit/tests/Framework/TestListenerTest.php @@ -17,6 +17,7 @@ class Framework_TestListenerTest extends PHPUnit_Framework_TestCase implements P protected $endCount; protected $errorCount; protected $failureCount; + protected $warningCount; protected $notImplementedCount; protected $riskyCount; protected $skippedCount; @@ -28,6 +29,11 @@ class Framework_TestListenerTest extends PHPUnit_Framework_TestCase implements P $this->errorCount++; } + public function addWarning(PHPUnit_Framework_Test $test, PHPUnit_Framework_Warning $e, $time) + { + $this->warningCount++; + } + public function addFailure(PHPUnit_Framework_Test $test, PHPUnit_Framework_AssertionFailedError $e, $time) { $this->failureCount++; diff --git a/vendor/phpunit/phpunit/tests/Regression/1021.phpt b/vendor/phpunit/phpunit/tests/Regression/1021.phpt index 45f4708..fb06be0 100644 --- a/vendor/phpunit/phpunit/tests/Regression/1021.phpt +++ b/vendor/phpunit/phpunit/tests/Regression/1021.phpt @@ -12,7 +12,7 @@ PHPUnit_TextUI_Command::main(); --EXPECTF-- PHPUnit %s by Sebastian Bergmann and contributors. -.. +.. 2 / 2 (100%) Time: %s, Memory: %sMb diff --git a/vendor/phpunit/phpunit/tests/Regression/1021/Issue1021Test.php b/vendor/phpunit/phpunit/tests/Regression/1021/Issue1021Test.php index 5814e94..c8fa4c7 100644 --- a/vendor/phpunit/phpunit/tests/Regression/1021/Issue1021Test.php +++ b/vendor/phpunit/phpunit/tests/Regression/1021/Issue1021Test.php @@ -18,6 +18,6 @@ class Issue1021Test extends PHPUnit_Framework_TestCase public function provider() { - return array(array(true)); + return [[true]]; } } diff --git a/vendor/phpunit/phpunit/tests/Regression/523.phpt b/vendor/phpunit/phpunit/tests/Regression/523.phpt index 6ba2e42..7e46c1c 100644 --- a/vendor/phpunit/phpunit/tests/Regression/523.phpt +++ b/vendor/phpunit/phpunit/tests/Regression/523.phpt @@ -12,7 +12,7 @@ PHPUnit_TextUI_Command::main(); --EXPECTF-- PHPUnit %s by Sebastian Bergmann and contributors. -. +. 1 / 1 (100%) Time: %s, Memory: %sMb diff --git a/vendor/phpunit/phpunit/tests/Regression/578.phpt b/vendor/phpunit/phpunit/tests/Regression/578.phpt index c50d2e3..059f0fe 100644 --- a/vendor/phpunit/phpunit/tests/Regression/578.phpt +++ b/vendor/phpunit/phpunit/tests/Regression/578.phpt @@ -12,7 +12,7 @@ PHPUnit_TextUI_Command::main(); --EXPECTF-- PHPUnit %s by Sebastian Bergmann and contributors. -EEE +EEE 3 / 3 (100%) Time: %s, Memory: %sMb diff --git a/vendor/phpunit/phpunit/tests/Regression/684.phpt b/vendor/phpunit/phpunit/tests/Regression/684.phpt index ca88a55..17b58b4 100644 --- a/vendor/phpunit/phpunit/tests/Regression/684.phpt +++ b/vendor/phpunit/phpunit/tests/Regression/684.phpt @@ -12,14 +12,14 @@ PHPUnit_TextUI_Command::main(); --EXPECTF-- PHPUnit %s by Sebastian Bergmann and contributors. -F +W 1 / 1 (100%) Time: %s, Memory: %sMb -There was 1 failure: +There was 1 warning: 1) Warning No tests found in class "Foo_Bar_Issue684Test". -FAILURES! -Tests: 1, Assertions: 0, Failures: 1. +WARNINGS! +Tests: 1, Assertions: 0, Warnings: 1. diff --git a/vendor/phpunit/phpunit/tests/Regression/783.phpt b/vendor/phpunit/phpunit/tests/Regression/783.phpt index 687b237..556a28c 100644 --- a/vendor/phpunit/phpunit/tests/Regression/783.phpt +++ b/vendor/phpunit/phpunit/tests/Regression/783.phpt @@ -14,7 +14,7 @@ PHPUnit_TextUI_Command::main(); --EXPECTF-- PHPUnit %s by Sebastian Bergmann and contributors. -.. +.. 2 / 2 (100%) Time: %s, Memory: %sMb diff --git a/vendor/phpunit/phpunit/tests/Regression/GitHub/1149.phpt b/vendor/phpunit/phpunit/tests/Regression/GitHub/1149.phpt index 45e2435..737b8b6 100644 --- a/vendor/phpunit/phpunit/tests/Regression/GitHub/1149.phpt +++ b/vendor/phpunit/phpunit/tests/Regression/GitHub/1149.phpt @@ -13,7 +13,7 @@ PHPUnit_TextUI_Command::main(); --EXPECTF-- PHPUnit %s by Sebastian Bergmann and contributors. -.1.2 +.1. 2 / 2 (100%)2 Time: %s, Memory: %sMb diff --git a/vendor/phpunit/phpunit/tests/Regression/GitHub/1216.phpt b/vendor/phpunit/phpunit/tests/Regression/GitHub/1216.phpt index d13403b..37d00f1 100644 --- a/vendor/phpunit/phpunit/tests/Regression/GitHub/1216.phpt +++ b/vendor/phpunit/phpunit/tests/Regression/GitHub/1216.phpt @@ -18,7 +18,7 @@ PHPUnit %s by Sebastian Bergmann and contributors. Starting test 'Issue1216Test::testConfigAvailableInBootstrap'. -. +. 1 / 1 (100%) Time: %s, Memory: %sMb diff --git a/vendor/phpunit/phpunit/tests/Regression/GitHub/1265.phpt b/vendor/phpunit/phpunit/tests/Regression/GitHub/1265.phpt index a179d5d..24ceedc 100644 --- a/vendor/phpunit/phpunit/tests/Regression/GitHub/1265.phpt +++ b/vendor/phpunit/phpunit/tests/Regression/GitHub/1265.phpt @@ -14,7 +14,7 @@ PHPUnit_TextUI_Command::main(); --EXPECTF-- PHPUnit %s by Sebastian Bergmann and contributors. -. +. 1 / 1 (100%) Time: %s, Memory: %sMb diff --git a/vendor/phpunit/phpunit/tests/Regression/GitHub/1330.phpt b/vendor/phpunit/phpunit/tests/Regression/GitHub/1330.phpt index c31073e..0a71db7 100644 --- a/vendor/phpunit/phpunit/tests/Regression/GitHub/1330.phpt +++ b/vendor/phpunit/phpunit/tests/Regression/GitHub/1330.phpt @@ -17,7 +17,7 @@ PHPUnit %s by Sebastian Bergmann and contributors. Starting test 'Issue1330Test::testTrue'. -. +. 1 / 1 (100%) Time: %s, Memory: %sMb diff --git a/vendor/phpunit/phpunit/tests/Regression/GitHub/1335.phpt b/vendor/phpunit/phpunit/tests/Regression/GitHub/1335.phpt index cd6aade..cb0079b 100644 --- a/vendor/phpunit/phpunit/tests/Regression/GitHub/1335.phpt +++ b/vendor/phpunit/phpunit/tests/Regression/GitHub/1335.phpt @@ -14,7 +14,7 @@ PHPUnit_TextUI_Command::main(); --EXPECTF-- PHPUnit %s by Sebastian Bergmann and contributors. -............ +............ 12 / 12 (100%) Time: %s, Memory: %sMb diff --git a/vendor/phpunit/phpunit/tests/Regression/GitHub/1335/Issue1335Test.php b/vendor/phpunit/phpunit/tests/Regression/GitHub/1335/Issue1335Test.php index 4407ec8..567ee7a 100644 --- a/vendor/phpunit/phpunit/tests/Regression/GitHub/1335/Issue1335Test.php +++ b/vendor/phpunit/phpunit/tests/Regression/GitHub/1335/Issue1335Test.php @@ -42,26 +42,26 @@ class Issue1335Test extends PHPUnit_Framework_TestCase public function testGlobalArray() { - $this->assertEquals(array('foo'), $GLOBALS['globalArray']); + $this->assertEquals(['foo'], $GLOBALS['globalArray']); } public function testGlobalNestedArray() { - $this->assertEquals(array(array('foo')), $GLOBALS['globalNestedArray']); + $this->assertEquals([['foo']], $GLOBALS['globalNestedArray']); } public function testGlobalObject() { - $this->assertEquals((object) array('foo'=> 'bar'), $GLOBALS['globalObject']); + $this->assertEquals((object) ['foo'=> 'bar'], $GLOBALS['globalObject']); } public function testGlobalObjectWithBackSlashString() { - $this->assertEquals((object) array('foo'=> 'back\\slash'), $GLOBALS['globalObjectWithBackSlashString']); + $this->assertEquals((object) ['foo'=> 'back\\slash'], $GLOBALS['globalObjectWithBackSlashString']); } public function testGlobalObjectWithDoubleBackSlashString() { - $this->assertEquals((object) array('foo'=> 'back\\\\slash'), $GLOBALS['globalObjectWithDoubleBackSlashString']); + $this->assertEquals((object) ['foo'=> 'back\\\\slash'], $GLOBALS['globalObjectWithDoubleBackSlashString']); } } diff --git a/vendor/phpunit/phpunit/tests/Regression/GitHub/1335/bootstrap1335.php b/vendor/phpunit/phpunit/tests/Regression/GitHub/1335/bootstrap1335.php index 073a87e..7165bb2 100644 --- a/vendor/phpunit/phpunit/tests/Regression/GitHub/1335/bootstrap1335.php +++ b/vendor/phpunit/phpunit/tests/Regression/GitHub/1335/bootstrap1335.php @@ -6,8 +6,8 @@ $globalFloat = 1.123; $globalBoolTrue = true; $globalBoolFalse = false; $globalNull = null; -$globalArray = array('foo'); -$globalNestedArray = array(array('foo')); -$globalObject = (object) array('foo'=> 'bar'); -$globalObjectWithBackSlashString = (object) array('foo'=> 'back\\slash'); -$globalObjectWithDoubleBackSlashString = (object) array('foo'=> 'back\\\\slash'); +$globalArray = ['foo']; +$globalNestedArray = [['foo']]; +$globalObject = (object) ['foo'=> 'bar']; +$globalObjectWithBackSlashString = (object) ['foo'=> 'back\\slash']; +$globalObjectWithDoubleBackSlashString = (object) ['foo'=> 'back\\\\slash']; diff --git a/vendor/phpunit/phpunit/tests/Regression/GitHub/1337.phpt b/vendor/phpunit/phpunit/tests/Regression/GitHub/1337.phpt index 9c1d76f..eb33e68 100644 --- a/vendor/phpunit/phpunit/tests/Regression/GitHub/1337.phpt +++ b/vendor/phpunit/phpunit/tests/Regression/GitHub/1337.phpt @@ -14,8 +14,8 @@ PHPUnit_TextUI_Command::main(); --EXPECTF-- PHPUnit %s by Sebastian Bergmann and contributors. -.. +.. 2 / 2 (100%) Time: %s, Memory: %sMb -OK (2 tests, 2 assertions) \ No newline at end of file +OK (2 tests, 2 assertions) diff --git a/vendor/phpunit/phpunit/tests/Regression/GitHub/1337/Issue1337Test.php b/vendor/phpunit/phpunit/tests/Regression/GitHub/1337/Issue1337Test.php index b972b2a..922cfe9 100644 --- a/vendor/phpunit/phpunit/tests/Regression/GitHub/1337/Issue1337Test.php +++ b/vendor/phpunit/phpunit/tests/Regression/GitHub/1337/Issue1337Test.php @@ -11,9 +11,9 @@ class Issue1337Test extends PHPUnit_Framework_TestCase public function dataProvider() { - return array( - 'c:\\'=> array(true), - 0.9 => array(true) - ); + return [ + 'c:\\'=> [true], + 0.9 => [true] + ]; } } diff --git a/vendor/phpunit/phpunit/tests/Regression/GitHub/1348.phpt b/vendor/phpunit/phpunit/tests/Regression/GitHub/1348.phpt index 3cf3d51..47ed3af 100644 --- a/vendor/phpunit/phpunit/tests/Regression/GitHub/1348.phpt +++ b/vendor/phpunit/phpunit/tests/Regression/GitHub/1348.phpt @@ -23,7 +23,7 @@ PHPUnit %s by Sebastian Bergmann and contributors. . STDOUT does not break test result -E +E 2 / 2 (100%) Time: %s, Memory: %sMb diff --git a/vendor/phpunit/phpunit/tests/Regression/GitHub/1351.phpt b/vendor/phpunit/phpunit/tests/Regression/GitHub/1351.phpt index 2dbc2af..ae882a5 100644 --- a/vendor/phpunit/phpunit/tests/Regression/GitHub/1351.phpt +++ b/vendor/phpunit/phpunit/tests/Regression/GitHub/1351.phpt @@ -20,7 +20,7 @@ PHPUnit_TextUI_Command::main(); --EXPECTF-- PHPUnit %s by Sebastian Bergmann and contributors. -F.E.E +F.E.E 5 / 5 (100%) Time: %s, Memory: %sMb diff --git a/vendor/phpunit/phpunit/tests/Regression/GitHub/1374.phpt b/vendor/phpunit/phpunit/tests/Regression/GitHub/1374.phpt index 84d13be..5c1d0de 100644 --- a/vendor/phpunit/phpunit/tests/Regression/GitHub/1374.phpt +++ b/vendor/phpunit/phpunit/tests/Regression/GitHub/1374.phpt @@ -13,7 +13,7 @@ PHPUnit_TextUI_Command::main(); --EXPECTF-- PHPUnit %s by Sebastian Bergmann and contributors. -S +S 1 / 1 (100%) Time: %s, Memory: %sMb diff --git a/vendor/phpunit/phpunit/tests/Regression/GitHub/1437.phpt b/vendor/phpunit/phpunit/tests/Regression/GitHub/1437.phpt index f9bd41b..afd0c3f 100644 --- a/vendor/phpunit/phpunit/tests/Regression/GitHub/1437.phpt +++ b/vendor/phpunit/phpunit/tests/Regression/GitHub/1437.phpt @@ -13,7 +13,7 @@ PHPUnit_TextUI_Command::main(); --EXPECTF-- PHPUnit %s by Sebastian Bergmann and contributors. -F +F 1 / 1 (100%) Time: %s, Memory: %sMb diff --git a/vendor/phpunit/phpunit/tests/Regression/GitHub/1468.phpt b/vendor/phpunit/phpunit/tests/Regression/GitHub/1468.phpt index 23c410b..2c57701 100644 --- a/vendor/phpunit/phpunit/tests/Regression/GitHub/1468.phpt +++ b/vendor/phpunit/phpunit/tests/Regression/GitHub/1468.phpt @@ -14,7 +14,7 @@ PHPUnit_TextUI_Command::main(); --EXPECTF-- PHPUnit %s by Sebastian Bergmann and contributors. -I +I 1 / 1 (100%) Time: %s, Memory: %sMb diff --git a/vendor/phpunit/phpunit/tests/Regression/GitHub/1471.phpt b/vendor/phpunit/phpunit/tests/Regression/GitHub/1471.phpt index 631d6e6..92546c3 100644 --- a/vendor/phpunit/phpunit/tests/Regression/GitHub/1471.phpt +++ b/vendor/phpunit/phpunit/tests/Regression/GitHub/1471.phpt @@ -13,7 +13,7 @@ PHPUnit_TextUI_Command::main(); --EXPECTF-- PHPUnit %s by Sebastian Bergmann and contributors. -F +F 1 / 1 (100%) Time: %s, Memory: %sMb diff --git a/vendor/phpunit/phpunit/tests/Regression/GitHub/1472.phpt b/vendor/phpunit/phpunit/tests/Regression/GitHub/1472.phpt index 3e605b4..46e48ff 100644 --- a/vendor/phpunit/phpunit/tests/Regression/GitHub/1472.phpt +++ b/vendor/phpunit/phpunit/tests/Regression/GitHub/1472.phpt @@ -19,7 +19,7 @@ PHPUnit_TextUI_Command::main(); --EXPECTF-- PHPUnit %s by Sebastian Bergmann and contributors. -. +. 1 / 1 (100%) Time: %s, Memory: %sMb diff --git a/vendor/phpunit/phpunit/tests/Regression/GitHub/1570.phpt b/vendor/phpunit/phpunit/tests/Regression/GitHub/1570.phpt index a94b961..21f3ea9 100644 --- a/vendor/phpunit/phpunit/tests/Regression/GitHub/1570.phpt +++ b/vendor/phpunit/phpunit/tests/Regression/GitHub/1570.phpt @@ -13,7 +13,7 @@ PHPUnit_TextUI_Command::main(); --EXPECTF-- PHPUnit %s by Sebastian Bergmann and contributors. -R* +R 1 / 1 (100%)* Time: %s, Memory: %sMb diff --git a/vendor/phpunit/phpunit/tests/Regression/GitHub/244.phpt b/vendor/phpunit/phpunit/tests/Regression/GitHub/244.phpt index 3cb9aef..389c21b 100644 --- a/vendor/phpunit/phpunit/tests/Regression/GitHub/244.phpt +++ b/vendor/phpunit/phpunit/tests/Regression/GitHub/244.phpt @@ -13,7 +13,7 @@ PHPUnit_TextUI_Command::main(); --EXPECTF-- PHPUnit %s by Sebastian Bergmann and contributors. -.FFF +.FFF 4 / 4 (100%) Time: %s, Memory: %sMb diff --git a/vendor/phpunit/phpunit/tests/Regression/GitHub/322.phpt b/vendor/phpunit/phpunit/tests/Regression/GitHub/322.phpt index 0d892c7..c8530a5 100644 --- a/vendor/phpunit/phpunit/tests/Regression/GitHub/322.phpt +++ b/vendor/phpunit/phpunit/tests/Regression/GitHub/322.phpt @@ -19,7 +19,7 @@ PHPUnit %s by Sebastian Bergmann and contributors. Starting test 'Issue322Test::testOne'. -. +. 1 / 1 (100%) Time: %s, Memory: %sMb diff --git a/vendor/phpunit/phpunit/tests/Regression/GitHub/433.phpt b/vendor/phpunit/phpunit/tests/Regression/GitHub/433.phpt index ead9437..84968fe 100644 --- a/vendor/phpunit/phpunit/tests/Regression/GitHub/433.phpt +++ b/vendor/phpunit/phpunit/tests/Regression/GitHub/433.phpt @@ -13,7 +13,7 @@ PHPUnit_TextUI_Command::main(); --EXPECTF-- PHPUnit %s by Sebastian Bergmann and contributors. -..F +..F 3 / 3 (100%) Time: %s, Memory: %sMb diff --git a/vendor/phpunit/phpunit/tests/Regression/GitHub/445.phpt b/vendor/phpunit/phpunit/tests/Regression/GitHub/445.phpt index e57e7fb..bf4e4bd 100644 --- a/vendor/phpunit/phpunit/tests/Regression/GitHub/445.phpt +++ b/vendor/phpunit/phpunit/tests/Regression/GitHub/445.phpt @@ -14,7 +14,7 @@ PHPUnit_TextUI_Command::main(); --EXPECTF-- PHPUnit %s by Sebastian Bergmann and contributors. -..F +..F 3 / 3 (100%) Time: %s, Memory: %sMb diff --git a/vendor/phpunit/phpunit/tests/Regression/GitHub/498.phpt b/vendor/phpunit/phpunit/tests/Regression/GitHub/498.phpt index 51dbe75..ee72a10 100644 --- a/vendor/phpunit/phpunit/tests/Regression/GitHub/498.phpt +++ b/vendor/phpunit/phpunit/tests/Regression/GitHub/498.phpt @@ -15,15 +15,15 @@ PHPUnit_TextUI_Command::main(); --EXPECTF-- PHPUnit %s by Sebastian Bergmann and contributors. -F +W 1 / 1 (100%) Time: %s, Memory: %sMb -There was 1 failure: +There was 1 warning: 1) Warning The data provider specified for Issue498Test::shouldBeFalse is invalid. Can't create the data -FAILURES! -Tests: 1, Assertions: 0, Failures: 1. +WARNINGS! +Tests: 1, Assertions: 0, Warnings: 1. diff --git a/vendor/phpunit/phpunit/tests/Regression/GitHub/498/Issue498Test.php b/vendor/phpunit/phpunit/tests/Regression/GitHub/498/Issue498Test.php index 49fa764..5d22aac 100644 --- a/vendor/phpunit/phpunit/tests/Regression/GitHub/498/Issue498Test.php +++ b/vendor/phpunit/phpunit/tests/Regression/GitHub/498/Issue498Test.php @@ -26,19 +26,19 @@ class Issue498Test extends PHPUnit_Framework_TestCase { //throw new Exception("Can't create the data"); - return array( - array(true), - array(false) - ); + return [ + [true], + [false] + ]; } public function shouldBeFalseDataProvider() { throw new Exception("Can't create the data"); - return array( - array(true), - array(false) - ); + return [ + [true], + [false] + ]; } } diff --git a/vendor/phpunit/phpunit/tests/Regression/GitHub/503.phpt b/vendor/phpunit/phpunit/tests/Regression/GitHub/503.phpt index 2e7b30f..403823f 100644 --- a/vendor/phpunit/phpunit/tests/Regression/GitHub/503.phpt +++ b/vendor/phpunit/phpunit/tests/Regression/GitHub/503.phpt @@ -13,7 +13,7 @@ PHPUnit_TextUI_Command::main(); --EXPECTF-- PHPUnit %s by Sebastian Bergmann and contributors. -F +F 1 / 1 (100%) Time: %s, Memory: %sMb diff --git a/vendor/phpunit/phpunit/tests/Regression/GitHub/581.phpt b/vendor/phpunit/phpunit/tests/Regression/GitHub/581.phpt index c2d6545..1ce00b9 100644 --- a/vendor/phpunit/phpunit/tests/Regression/GitHub/581.phpt +++ b/vendor/phpunit/phpunit/tests/Regression/GitHub/581.phpt @@ -13,7 +13,7 @@ PHPUnit_TextUI_Command::main(); --EXPECTF-- PHPUnit %s by Sebastian Bergmann and contributors. -F +F 1 / 1 (100%) Time: %s, Memory: %sMb diff --git a/vendor/phpunit/phpunit/tests/Regression/GitHub/581/Issue581Test.php b/vendor/phpunit/phpunit/tests/Regression/GitHub/581/Issue581Test.php index 51de83b..88d637c 100644 --- a/vendor/phpunit/phpunit/tests/Regression/GitHub/581/Issue581Test.php +++ b/vendor/phpunit/phpunit/tests/Regression/GitHub/581/Issue581Test.php @@ -4,8 +4,8 @@ class Issue581Test extends PHPUnit_Framework_TestCase public function testExportingObjectsDoesNotBreakWindowsLineFeeds() { $this->assertEquals( - (object) array(1, 2, "Test\r\n", 4, 5, 6, 7, 8), - (object) array(1, 2, "Test\r\n", 4, 1, 6, 7, 8) + (object) [1, 2, "Test\r\n", 4, 5, 6, 7, 8], + (object) [1, 2, "Test\r\n", 4, 1, 6, 7, 8] ); } } diff --git a/vendor/phpunit/phpunit/tests/Regression/GitHub/74.phpt b/vendor/phpunit/phpunit/tests/Regression/GitHub/74.phpt index 8a4f79d..d2f06dc 100644 --- a/vendor/phpunit/phpunit/tests/Regression/GitHub/74.phpt +++ b/vendor/phpunit/phpunit/tests/Regression/GitHub/74.phpt @@ -13,7 +13,7 @@ PHPUnit_TextUI_Command::main(); --EXPECTF-- PHPUnit %s by Sebastian Bergmann and contributors. -E +E 1 / 1 (100%) Time: %s, Memory: %sMb diff --git a/vendor/phpunit/phpunit/tests/Regression/GitHub/765.phpt b/vendor/phpunit/phpunit/tests/Regression/GitHub/765.phpt index dc59dd6..ba524db 100644 --- a/vendor/phpunit/phpunit/tests/Regression/GitHub/765.phpt +++ b/vendor/phpunit/phpunit/tests/Regression/GitHub/765.phpt @@ -13,14 +13,14 @@ PHPUnit_TextUI_Command::main(); --EXPECTF-- PHPUnit %s by Sebastian Bergmann and contributors. -.F +.W 2 / 2 (100%) Time: %s, Memory: %sMb -There was 1 failure: +There was 1 warning: 1) Warning The data provider specified for Issue765Test::testDependent is invalid. -FAILURES! -Tests: 2, Assertions: 1, Failures: 1. +WARNINGS! +Tests: 2, Assertions: 1, Warnings: 1. diff --git a/vendor/phpunit/phpunit/tests/Regression/GitHub/797.phpt b/vendor/phpunit/phpunit/tests/Regression/GitHub/797.phpt index 4a6490f..3b360a3 100644 --- a/vendor/phpunit/phpunit/tests/Regression/GitHub/797.phpt +++ b/vendor/phpunit/phpunit/tests/Regression/GitHub/797.phpt @@ -15,8 +15,8 @@ PHPUnit_TextUI_Command::main(); --EXPECTF-- PHPUnit %s by Sebastian Bergmann and contributors. -. +. 1 / 1 (100%) Time: %s, Memory: %sMb -OK (1 test, 1 assertion) \ No newline at end of file +OK (1 test, 1 assertion) diff --git a/vendor/phpunit/phpunit/tests/Regression/GitHub/863.phpt b/vendor/phpunit/phpunit/tests/Regression/GitHub/863.phpt index 1e0ffbd..8807425 100644 --- a/vendor/phpunit/phpunit/tests/Regression/GitHub/863.phpt +++ b/vendor/phpunit/phpunit/tests/Regression/GitHub/863.phpt @@ -17,7 +17,7 @@ PHPUnit %s by Sebastian Bergmann and contributors. ............................................................... 63 / 150 ( 42%) ............................................................... 126 / 150 ( 84%) -........................ +........................ 150 / 150 (100%) Time: %s, Memory: %sMb diff --git a/vendor/phpunit/phpunit/tests/TextUI/abstract-test-class.phpt b/vendor/phpunit/phpunit/tests/TextUI/abstract-test-class.phpt index 8d6c07a..1ce9ab6 100644 --- a/vendor/phpunit/phpunit/tests/TextUI/abstract-test-class.phpt +++ b/vendor/phpunit/phpunit/tests/TextUI/abstract-test-class.phpt @@ -12,14 +12,14 @@ PHPUnit_TextUI_Command::main(); --EXPECTF-- PHPUnit %s by Sebastian Bergmann and contributors. -F +W 1 / 1 (100%) Time: %s, Memory: %sMb -There was 1 failure: +There was 1 warning: 1) Warning Cannot instantiate class "AbstractTest". -FAILURES! -Tests: 1, Assertions: 0, Failures: 1. +WARNINGS! +Tests: 1, Assertions: 0, Warnings: 1. diff --git a/vendor/phpunit/phpunit/tests/TextUI/colors-always.phpt b/vendor/phpunit/phpunit/tests/TextUI/colors-always.phpt index 28b527d..308d881 100644 --- a/vendor/phpunit/phpunit/tests/TextUI/colors-always.phpt +++ b/vendor/phpunit/phpunit/tests/TextUI/colors-always.phpt @@ -12,7 +12,7 @@ PHPUnit_TextUI_Command::main(); --EXPECTF-- PHPUnit %s by Sebastian Bergmann and contributors. -... +... 3 / 3 (100%) Time: %s, Memory: %sMb diff --git a/vendor/phpunit/phpunit/tests/TextUI/concrete-test-class.phpt b/vendor/phpunit/phpunit/tests/TextUI/concrete-test-class.phpt index f01bd79..689f39b 100644 --- a/vendor/phpunit/phpunit/tests/TextUI/concrete-test-class.phpt +++ b/vendor/phpunit/phpunit/tests/TextUI/concrete-test-class.phpt @@ -12,7 +12,7 @@ PHPUnit_TextUI_Command::main(); --EXPECTF-- PHPUnit %s by Sebastian Bergmann and contributors. -.. +.. 2 / 2 (100%) Time: %s, Memory: %sMb diff --git a/vendor/phpunit/phpunit/tests/TextUI/custom-printer-debug.phpt b/vendor/phpunit/phpunit/tests/TextUI/custom-printer-debug.phpt index 19b9e05..01bc3d0 100644 --- a/vendor/phpunit/phpunit/tests/TextUI/custom-printer-debug.phpt +++ b/vendor/phpunit/phpunit/tests/TextUI/custom-printer-debug.phpt @@ -20,7 +20,7 @@ Starting test 'BankAccountTest::testBalanceIsInitiallyZero'. Starting test 'BankAccountTest::testBalanceCannotBecomeNegative'. . Starting test 'BankAccountTest::testBalanceCannotBecomeNegative2'. -. +. 3 / 3 (100%) Time: %s, Memory: %sMb diff --git a/vendor/phpunit/phpunit/tests/TextUI/custom-printer-verbose.phpt b/vendor/phpunit/phpunit/tests/TextUI/custom-printer-verbose.phpt index 2e2a990..d54f830 100644 --- a/vendor/phpunit/phpunit/tests/TextUI/custom-printer-verbose.phpt +++ b/vendor/phpunit/phpunit/tests/TextUI/custom-printer-verbose.phpt @@ -14,10 +14,10 @@ PHPUnit_TextUI_Command::main(); --EXPECTF-- PHPUnit %s by Sebastian Bergmann and contributors. -Runtime: %s -Configuration: %sconfiguration.custom-printer.xml +Runtime: %s +Configuration: %sconfiguration.custom-printer.xml -I +I 1 / 1 (100%) Time: %s, Memory: %sMb diff --git a/vendor/phpunit/phpunit/tests/TextUI/dataprovider-debug.phpt b/vendor/phpunit/phpunit/tests/TextUI/dataprovider-debug.phpt index e7e49b4..640ae61 100644 --- a/vendor/phpunit/phpunit/tests/TextUI/dataprovider-debug.phpt +++ b/vendor/phpunit/phpunit/tests/TextUI/dataprovider-debug.phpt @@ -27,7 +27,7 @@ Starting test 'DataProviderDebugTest::testProvider with data set #4 (stdClass Ob Starting test 'DataProviderDebugTest::testProvider with data set #5 (Binary String: 0x000102030405, Binary String: 0x0e0f101112131...c1d1e1f)'. . Starting test 'DataProviderDebugTest::testProvider with data set #6 (Binary String: 0x0009)'. -. +. 7 / 7 (100%) Time: %s, Memory: %sMb diff --git a/vendor/phpunit/phpunit/tests/TextUI/dataprovider-log-xml-isolation.phpt b/vendor/phpunit/phpunit/tests/TextUI/dataprovider-log-xml-isolation.phpt index e1c4571..92ac82d 100644 --- a/vendor/phpunit/phpunit/tests/TextUI/dataprovider-log-xml-isolation.phpt +++ b/vendor/phpunit/phpunit/tests/TextUI/dataprovider-log-xml-isolation.phpt @@ -15,7 +15,7 @@ PHPUnit_TextUI_Command::main(); --EXPECTF-- PHPUnit %s by Sebastian Bergmann and contributors. -..F. +..F. 4 / 4 (100%) diff --git a/vendor/phpunit/phpunit/tests/TextUI/dataprovider-log-xml.phpt b/vendor/phpunit/phpunit/tests/TextUI/dataprovider-log-xml.phpt index a14b466..9d3d98e 100644 --- a/vendor/phpunit/phpunit/tests/TextUI/dataprovider-log-xml.phpt +++ b/vendor/phpunit/phpunit/tests/TextUI/dataprovider-log-xml.phpt @@ -14,7 +14,7 @@ PHPUnit_TextUI_Command::main(); --EXPECTF-- PHPUnit %s by Sebastian Bergmann and contributors. -..F. +..F. 4 / 4 (100%) diff --git a/vendor/phpunit/phpunit/tests/TextUI/debug.phpt b/vendor/phpunit/phpunit/tests/TextUI/debug.phpt index 1639484..c8f36be 100644 --- a/vendor/phpunit/phpunit/tests/TextUI/debug.phpt +++ b/vendor/phpunit/phpunit/tests/TextUI/debug.phpt @@ -19,7 +19,7 @@ Starting test 'BankAccountTest::testBalanceIsInitiallyZero'. Starting test 'BankAccountTest::testBalanceCannotBecomeNegative'. . Starting test 'BankAccountTest::testBalanceCannotBecomeNegative2'. -. +. 3 / 3 (100%) Time: %s, Memory: %sMb diff --git a/vendor/phpunit/phpunit/tests/TextUI/default-isolation.phpt b/vendor/phpunit/phpunit/tests/TextUI/default-isolation.phpt index 864484c..54d8b68 100644 --- a/vendor/phpunit/phpunit/tests/TextUI/default-isolation.phpt +++ b/vendor/phpunit/phpunit/tests/TextUI/default-isolation.phpt @@ -13,7 +13,7 @@ PHPUnit_TextUI_Command::main(); --EXPECTF-- PHPUnit %s by Sebastian Bergmann and contributors. -... +... 3 / 3 (100%) Time: %s, Memory: %sMb diff --git a/vendor/phpunit/phpunit/tests/TextUI/default.phpt b/vendor/phpunit/phpunit/tests/TextUI/default.phpt index 9fefe1a..d6ac8ea 100644 --- a/vendor/phpunit/phpunit/tests/TextUI/default.phpt +++ b/vendor/phpunit/phpunit/tests/TextUI/default.phpt @@ -12,7 +12,7 @@ PHPUnit_TextUI_Command::main(); --EXPECTF-- PHPUnit %s by Sebastian Bergmann and contributors. -... +... 3 / 3 (100%) Time: %s, Memory: %sMb diff --git a/vendor/phpunit/phpunit/tests/TextUI/dependencies-isolation.phpt b/vendor/phpunit/phpunit/tests/TextUI/dependencies-isolation.phpt index 226d3d8..1380db5 100644 --- a/vendor/phpunit/phpunit/tests/TextUI/dependencies-isolation.phpt +++ b/vendor/phpunit/phpunit/tests/TextUI/dependencies-isolation.phpt @@ -14,9 +14,9 @@ PHPUnit_TextUI_Command::main(); --EXPECTF-- PHPUnit %s by Sebastian Bergmann and contributors. -Runtime: %s +Runtime: %s -...FSS +...FSSS 7 / 7 (100%) Time: %s, Memory: %sMb @@ -28,7 +28,7 @@ There was 1 failure: -- -There were 2 skipped tests: +There were 3 skipped tests: 1) DependencyFailureTest::testTwo This test depends on "DependencyFailureTest::testOne" to pass. @@ -36,5 +36,8 @@ This test depends on "DependencyFailureTest::testOne" to pass. 2) DependencyFailureTest::testThree This test depends on "DependencyFailureTest::testTwo" to pass. +3) DependencyFailureTest::testFour +This test depends on "DependencyFailureTest::testOne" to pass. + FAILURES! -Tests: 4, Assertions: 0, Failures: 1, Skipped: 2. +Tests: 4, Assertions: 0, Failures: 1, Skipped: 3. diff --git a/vendor/phpunit/phpunit/tests/TextUI/dependencies.phpt b/vendor/phpunit/phpunit/tests/TextUI/dependencies.phpt index 593088f..1919d94 100644 --- a/vendor/phpunit/phpunit/tests/TextUI/dependencies.phpt +++ b/vendor/phpunit/phpunit/tests/TextUI/dependencies.phpt @@ -13,9 +13,9 @@ PHPUnit_TextUI_Command::main(); --EXPECTF-- PHPUnit %s by Sebastian Bergmann and contributors. -Runtime: %s +Runtime: %s -...FSS +...FSSS 7 / 7 (100%) Time: %s, Memory: %sMb @@ -27,7 +27,7 @@ There was 1 failure: -- -There were 2 skipped tests: +There were 3 skipped tests: 1) DependencyFailureTest::testTwo This test depends on "DependencyFailureTest::testOne" to pass. @@ -35,5 +35,8 @@ This test depends on "DependencyFailureTest::testOne" to pass. 2) DependencyFailureTest::testThree This test depends on "DependencyFailureTest::testTwo" to pass. +3) DependencyFailureTest::testFour +This test depends on "DependencyFailureTest::testOne" to pass. + FAILURES! -Tests: 4, Assertions: 0, Failures: 1, Skipped: 2. +Tests: 4, Assertions: 0, Failures: 1, Skipped: 3. diff --git a/vendor/phpunit/phpunit/tests/TextUI/dependencies2-isolation.phpt b/vendor/phpunit/phpunit/tests/TextUI/dependencies2-isolation.phpt index bd88351..e923a0e 100644 --- a/vendor/phpunit/phpunit/tests/TextUI/dependencies2-isolation.phpt +++ b/vendor/phpunit/phpunit/tests/TextUI/dependencies2-isolation.phpt @@ -13,7 +13,7 @@ PHPUnit_TextUI_Command::main(); --EXPECTF-- PHPUnit %s by Sebastian Bergmann and contributors. -.. +.. 2 / 2 (100%) Time: %s, Memory: %sMb diff --git a/vendor/phpunit/phpunit/tests/TextUI/dependencies2.phpt b/vendor/phpunit/phpunit/tests/TextUI/dependencies2.phpt index d05b79d..64ffd92 100644 --- a/vendor/phpunit/phpunit/tests/TextUI/dependencies2.phpt +++ b/vendor/phpunit/phpunit/tests/TextUI/dependencies2.phpt @@ -12,7 +12,7 @@ PHPUnit_TextUI_Command::main(); --EXPECTF-- PHPUnit %s by Sebastian Bergmann and contributors. -.. +.. 2 / 2 (100%) Time: %s, Memory: %sMb diff --git a/vendor/phpunit/phpunit/tests/TextUI/dependencies3-isolation.phpt b/vendor/phpunit/phpunit/tests/TextUI/dependencies3-isolation.phpt index 37d2e63..7ec6d3b 100644 --- a/vendor/phpunit/phpunit/tests/TextUI/dependencies3-isolation.phpt +++ b/vendor/phpunit/phpunit/tests/TextUI/dependencies3-isolation.phpt @@ -13,7 +13,7 @@ PHPUnit_TextUI_Command::main(); --EXPECTF-- PHPUnit %s by Sebastian Bergmann and contributors. -... +... 3 / 3 (100%) Time: %s, Memory: %sMb diff --git a/vendor/phpunit/phpunit/tests/TextUI/dependencies3.phpt b/vendor/phpunit/phpunit/tests/TextUI/dependencies3.phpt index 6c5d3b1..5474cc5 100644 --- a/vendor/phpunit/phpunit/tests/TextUI/dependencies3.phpt +++ b/vendor/phpunit/phpunit/tests/TextUI/dependencies3.phpt @@ -12,7 +12,7 @@ PHPUnit_TextUI_Command::main(); --EXPECTF-- PHPUnit %s by Sebastian Bergmann and contributors. -... +... 3 / 3 (100%) Time: %s, Memory: %sMb diff --git a/vendor/phpunit/phpunit/tests/TextUI/empty-testcase.phpt b/vendor/phpunit/phpunit/tests/TextUI/empty-testcase.phpt index 3de7055..0731f27 100644 --- a/vendor/phpunit/phpunit/tests/TextUI/empty-testcase.phpt +++ b/vendor/phpunit/phpunit/tests/TextUI/empty-testcase.phpt @@ -12,14 +12,14 @@ PHPUnit_TextUI_Command::main(); --EXPECTF-- PHPUnit %s by Sebastian Bergmann and contributors. -F +W 1 / 1 (100%) Time: %s, Memory: %sMb -There was 1 failure: +There was 1 warning: 1) Warning No tests found in class "EmptyTestCaseTest". -FAILURES! -Tests: 1, Assertions: 0, Failures: 1. +WARNINGS! +Tests: 1, Assertions: 0, Warnings: 1. diff --git a/vendor/phpunit/phpunit/tests/TextUI/exception-stack.phpt b/vendor/phpunit/phpunit/tests/TextUI/exception-stack.phpt index db585bf..16dc86b 100644 --- a/vendor/phpunit/phpunit/tests/TextUI/exception-stack.phpt +++ b/vendor/phpunit/phpunit/tests/TextUI/exception-stack.phpt @@ -12,7 +12,7 @@ PHPUnit_TextUI_Command::main(); --EXPECTF-- PHPUnit %s by Sebastian Bergmann and contributors. -EE +EE 2 / 2 (100%) Time: %s, Memory: %sMb diff --git a/vendor/phpunit/phpunit/tests/TextUI/exclude-group-isolation.phpt b/vendor/phpunit/phpunit/tests/TextUI/exclude-group-isolation.phpt index 736feda..f340a32 100644 --- a/vendor/phpunit/phpunit/tests/TextUI/exclude-group-isolation.phpt +++ b/vendor/phpunit/phpunit/tests/TextUI/exclude-group-isolation.phpt @@ -15,7 +15,7 @@ PHPUnit_TextUI_Command::main(); --EXPECTF-- PHPUnit %s by Sebastian Bergmann and contributors. -.. +.. 2 / 2 (100%) Time: %s, Memory: %sMb diff --git a/vendor/phpunit/phpunit/tests/TextUI/exclude-group.phpt b/vendor/phpunit/phpunit/tests/TextUI/exclude-group.phpt index f75d611..d789c9f 100644 --- a/vendor/phpunit/phpunit/tests/TextUI/exclude-group.phpt +++ b/vendor/phpunit/phpunit/tests/TextUI/exclude-group.phpt @@ -14,7 +14,7 @@ PHPUnit_TextUI_Command::main(); --EXPECTF-- PHPUnit %s by Sebastian Bergmann and contributors. -.. +.. 2 / 2 (100%) Time: %s, Memory: %sMb diff --git a/vendor/phpunit/phpunit/tests/TextUI/failure-isolation.phpt b/vendor/phpunit/phpunit/tests/TextUI/failure-isolation.phpt index 7df4f10..c077e8f 100644 --- a/vendor/phpunit/phpunit/tests/TextUI/failure-isolation.phpt +++ b/vendor/phpunit/phpunit/tests/TextUI/failure-isolation.phpt @@ -13,7 +13,7 @@ PHPUnit_TextUI_Command::main(); --EXPECTF-- PHPUnit %s by Sebastian Bergmann and contributors. -FFFFFFFFFFFFF +FFFFFFFFFFFFF 13 / 13 (100%) Time: %s, Memory: %sMb diff --git a/vendor/phpunit/phpunit/tests/TextUI/failure.phpt b/vendor/phpunit/phpunit/tests/TextUI/failure.phpt index 23415e9..d7c77ab 100644 --- a/vendor/phpunit/phpunit/tests/TextUI/failure.phpt +++ b/vendor/phpunit/phpunit/tests/TextUI/failure.phpt @@ -12,7 +12,7 @@ PHPUnit_TextUI_Command::main(); --EXPECTF-- PHPUnit %s by Sebastian Bergmann and contributors. -FFFFFFFFFFFFF +FFFFFFFFFFFFF 13 / 13 (100%) Time: %s, Memory: %sMb diff --git a/vendor/phpunit/phpunit/tests/TextUI/fatal-isolation.phpt b/vendor/phpunit/phpunit/tests/TextUI/fatal-isolation.phpt index ec7f91a..fbff971 100644 --- a/vendor/phpunit/phpunit/tests/TextUI/fatal-isolation.phpt +++ b/vendor/phpunit/phpunit/tests/TextUI/fatal-isolation.phpt @@ -13,7 +13,7 @@ PHPUnit_TextUI_Command::main(); --EXPECTF-- PHPUnit %s by Sebastian Bergmann and contributors. -E +E 1 / 1 (100%) Time: %s, Memory: %sMb diff --git a/vendor/phpunit/phpunit/tests/TextUI/filter-class-isolation.phpt b/vendor/phpunit/phpunit/tests/TextUI/filter-class-isolation.phpt index 31cf060..687d98d 100644 --- a/vendor/phpunit/phpunit/tests/TextUI/filter-class-isolation.phpt +++ b/vendor/phpunit/phpunit/tests/TextUI/filter-class-isolation.phpt @@ -15,7 +15,7 @@ PHPUnit_TextUI_Command::main(); --EXPECTF-- PHPUnit %s by Sebastian Bergmann and contributors. -... +... 3 / 3 (100%) Time: %s, Memory: %sMb diff --git a/vendor/phpunit/phpunit/tests/TextUI/filter-class.phpt b/vendor/phpunit/phpunit/tests/TextUI/filter-class.phpt index 7b3c8dd..3db4577 100644 --- a/vendor/phpunit/phpunit/tests/TextUI/filter-class.phpt +++ b/vendor/phpunit/phpunit/tests/TextUI/filter-class.phpt @@ -14,7 +14,7 @@ PHPUnit_TextUI_Command::main(); --EXPECTF-- PHPUnit %s by Sebastian Bergmann and contributors. -... +... 3 / 3 (100%) Time: %s, Memory: %sMb diff --git a/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-classname-and-range-isolation.phpt b/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-classname-and-range-isolation.phpt index f90a691..f8020f5 100644 --- a/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-classname-and-range-isolation.phpt +++ b/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-classname-and-range-isolation.phpt @@ -15,7 +15,7 @@ PHPUnit_TextUI_Command::main(); --EXPECTF-- PHPUnit %s by Sebastian Bergmann and contributors. -... +... 3 / 3 (100%) Time: %s, Memory: %sMb diff --git a/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-classname-and-range.phpt b/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-classname-and-range.phpt index 9c1e689..d492b7b 100644 --- a/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-classname-and-range.phpt +++ b/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-classname-and-range.phpt @@ -14,7 +14,7 @@ PHPUnit_TextUI_Command::main(); --EXPECTF-- PHPUnit %s by Sebastian Bergmann and contributors. -... +... 3 / 3 (100%) Time: %s, Memory: %sMb diff --git a/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-number-isolation.phpt b/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-number-isolation.phpt index 0d2ea77..8e5a177 100644 --- a/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-number-isolation.phpt +++ b/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-number-isolation.phpt @@ -15,7 +15,7 @@ PHPUnit_TextUI_Command::main(); --EXPECTF-- PHPUnit %s by Sebastian Bergmann and contributors. -. +. 1 / 1 (100%) Time: %s, Memory: %sMb diff --git a/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-number.phpt b/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-number.phpt index 79bf643..a46376e 100644 --- a/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-number.phpt +++ b/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-number.phpt @@ -14,7 +14,7 @@ PHPUnit_TextUI_Command::main(); --EXPECTF-- PHPUnit %s by Sebastian Bergmann and contributors. -. +. 1 / 1 (100%) Time: %s, Memory: %sMb diff --git a/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-only-range-isolation.phpt b/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-only-range-isolation.phpt index 2dfdd0c..fafd32b 100644 --- a/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-only-range-isolation.phpt +++ b/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-only-range-isolation.phpt @@ -15,7 +15,7 @@ PHPUnit_TextUI_Command::main(); --EXPECTF-- PHPUnit %s by Sebastian Bergmann and contributors. -... +... 3 / 3 (100%) Time: %s, Memory: %sMb diff --git a/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-only-range.phpt b/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-only-range.phpt index c3d344c..ad0ed2e 100644 --- a/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-only-range.phpt +++ b/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-only-range.phpt @@ -14,7 +14,7 @@ PHPUnit_TextUI_Command::main(); --EXPECTF-- PHPUnit %s by Sebastian Bergmann and contributors. -... +... 3 / 3 (100%) Time: %s, Memory: %sMb diff --git a/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-only-regexp-isolation.phpt b/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-only-regexp-isolation.phpt index d109cfb..2028c64 100644 --- a/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-only-regexp-isolation.phpt +++ b/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-only-regexp-isolation.phpt @@ -15,7 +15,7 @@ PHPUnit_TextUI_Command::main(); --EXPECTF-- PHPUnit %s by Sebastian Bergmann and contributors. -.. +.. 2 / 2 (100%) Time: %s, Memory: %sMb diff --git a/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-only-regexp.phpt b/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-only-regexp.phpt index d87b304..922613f 100644 --- a/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-only-regexp.phpt +++ b/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-only-regexp.phpt @@ -14,7 +14,7 @@ PHPUnit_TextUI_Command::main(); --EXPECTF-- PHPUnit %s by Sebastian Bergmann and contributors. -.. +.. 2 / 2 (100%) Time: %s, Memory: %sMb diff --git a/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-only-string-isolation.phpt b/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-only-string-isolation.phpt index 07c4002..a97c593 100644 --- a/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-only-string-isolation.phpt +++ b/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-only-string-isolation.phpt @@ -15,7 +15,7 @@ PHPUnit_TextUI_Command::main(); --EXPECTF-- PHPUnit %s by Sebastian Bergmann and contributors. -. +. 1 / 1 (100%) Time: %s, Memory: %sMb diff --git a/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-only-string.phpt b/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-only-string.phpt index 0cf91eb..36785f0 100644 --- a/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-only-string.phpt +++ b/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-only-string.phpt @@ -14,7 +14,7 @@ PHPUnit_TextUI_Command::main(); --EXPECTF-- PHPUnit %s by Sebastian Bergmann and contributors. -. +. 1 / 1 (100%) Time: %s, Memory: %sMb diff --git a/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-range-isolation.phpt b/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-range-isolation.phpt index 2231b4d..21bb04f 100644 --- a/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-range-isolation.phpt +++ b/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-range-isolation.phpt @@ -15,7 +15,7 @@ PHPUnit_TextUI_Command::main(); --EXPECTF-- PHPUnit %s by Sebastian Bergmann and contributors. -... +... 3 / 3 (100%) Time: %s, Memory: %sMb diff --git a/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-range.phpt b/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-range.phpt index 2f2aa1d..d601838 100644 --- a/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-range.phpt +++ b/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-range.phpt @@ -14,7 +14,7 @@ PHPUnit_TextUI_Command::main(); --EXPECTF-- PHPUnit %s by Sebastian Bergmann and contributors. -... +... 3 / 3 (100%) Time: %s, Memory: %sMb diff --git a/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-regexp-isolation.phpt b/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-regexp-isolation.phpt index 3a46c51..9c929b1 100644 --- a/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-regexp-isolation.phpt +++ b/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-regexp-isolation.phpt @@ -15,7 +15,7 @@ PHPUnit_TextUI_Command::main(); --EXPECTF-- PHPUnit %s by Sebastian Bergmann and contributors. -.. +.. 2 / 2 (100%) Time: %s, Memory: %sMb diff --git a/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-regexp.phpt b/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-regexp.phpt index fdbd8bd..b328d44 100644 --- a/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-regexp.phpt +++ b/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-regexp.phpt @@ -14,7 +14,7 @@ PHPUnit_TextUI_Command::main(); --EXPECTF-- PHPUnit %s by Sebastian Bergmann and contributors. -.. +.. 2 / 2 (100%) Time: %s, Memory: %sMb diff --git a/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-string-isolation.phpt b/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-string-isolation.phpt index d91ca73..91ada63 100644 --- a/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-string-isolation.phpt +++ b/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-string-isolation.phpt @@ -15,7 +15,7 @@ PHPUnit_TextUI_Command::main(); --EXPECTF-- PHPUnit %s by Sebastian Bergmann and contributors. -. +. 1 / 1 (100%) Time: %s, Memory: %sMb diff --git a/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-string.phpt b/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-string.phpt index eb3e6af..2a1ba51 100644 --- a/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-string.phpt +++ b/vendor/phpunit/phpunit/tests/TextUI/filter-dataprovider-by-string.phpt @@ -14,7 +14,7 @@ PHPUnit_TextUI_Command::main(); --EXPECTF-- PHPUnit %s by Sebastian Bergmann and contributors. -. +. 1 / 1 (100%) Time: %s, Memory: %sMb diff --git a/vendor/phpunit/phpunit/tests/TextUI/filter-method-case-insensitive.phpt b/vendor/phpunit/phpunit/tests/TextUI/filter-method-case-insensitive.phpt index 55519a1..9cf8912 100644 --- a/vendor/phpunit/phpunit/tests/TextUI/filter-method-case-insensitive.phpt +++ b/vendor/phpunit/phpunit/tests/TextUI/filter-method-case-insensitive.phpt @@ -14,7 +14,7 @@ PHPUnit_TextUI_Command::main(); --EXPECTF-- PHPUnit %s by Sebastian Bergmann and contributors. -. +. 1 / 1 (100%) Time: %s, Memory: %sMb diff --git a/vendor/phpunit/phpunit/tests/TextUI/filter-method-isolation.phpt b/vendor/phpunit/phpunit/tests/TextUI/filter-method-isolation.phpt index 9cd16ef..8858530 100644 --- a/vendor/phpunit/phpunit/tests/TextUI/filter-method-isolation.phpt +++ b/vendor/phpunit/phpunit/tests/TextUI/filter-method-isolation.phpt @@ -15,7 +15,7 @@ PHPUnit_TextUI_Command::main(); --EXPECTF-- PHPUnit %s by Sebastian Bergmann and contributors. -. +. 1 / 1 (100%) Time: %s, Memory: %sMb diff --git a/vendor/phpunit/phpunit/tests/TextUI/filter-method.phpt b/vendor/phpunit/phpunit/tests/TextUI/filter-method.phpt index 9f5b01c..376c15c 100644 --- a/vendor/phpunit/phpunit/tests/TextUI/filter-method.phpt +++ b/vendor/phpunit/phpunit/tests/TextUI/filter-method.phpt @@ -14,7 +14,7 @@ PHPUnit_TextUI_Command::main(); --EXPECTF-- PHPUnit %s by Sebastian Bergmann and contributors. -. +. 1 / 1 (100%) Time: %s, Memory: %sMb diff --git a/vendor/phpunit/phpunit/tests/TextUI/group-isolation.phpt b/vendor/phpunit/phpunit/tests/TextUI/group-isolation.phpt index 9fc0d02..6f9c235 100644 --- a/vendor/phpunit/phpunit/tests/TextUI/group-isolation.phpt +++ b/vendor/phpunit/phpunit/tests/TextUI/group-isolation.phpt @@ -15,7 +15,7 @@ PHPUnit_TextUI_Command::main(); --EXPECTF-- PHPUnit %s by Sebastian Bergmann and contributors. -. +. 1 / 1 (100%) Time: %s, Memory: %sMb diff --git a/vendor/phpunit/phpunit/tests/TextUI/group.phpt b/vendor/phpunit/phpunit/tests/TextUI/group.phpt index 858456b..06296d2 100644 --- a/vendor/phpunit/phpunit/tests/TextUI/group.phpt +++ b/vendor/phpunit/phpunit/tests/TextUI/group.phpt @@ -14,7 +14,7 @@ PHPUnit_TextUI_Command::main(); --EXPECTF-- PHPUnit %s by Sebastian Bergmann and contributors. -. +. 1 / 1 (100%) Time: %s, Memory: %sMb diff --git a/vendor/phpunit/phpunit/tests/TextUI/help.phpt b/vendor/phpunit/phpunit/tests/TextUI/help.phpt index c56cbe3..8349311 100644 --- a/vendor/phpunit/phpunit/tests/TextUI/help.phpt +++ b/vendor/phpunit/phpunit/tests/TextUI/help.phpt @@ -22,14 +22,18 @@ Code Coverage Options: --coverage-text= Generate code coverage report in text format. Default: Standard output. --coverage-xml Generate code coverage report in PHPUnit XML format. + --whitelist Whitelist for code coverage analysis. + --disable-coverage-ignore Disable annotations for ignoring code coverage. Logging Options: --log-junit Log test execution in JUnit XML format to file. --log-tap Log test execution in TAP format to file. + --log-teamcity Log test execution in TeamCity format to file. --log-json Log test execution in JSON format. --testdox-html Write agile documentation in HTML format to file. --testdox-text Write agile documentation in Text format to file. + --reverse-list Print defects in reverse order Test Selection Options: @@ -44,9 +48,10 @@ Test Selection Options: Test Execution Options: --report-useless-tests Be strict about tests that do not test anything. - --strict-coverage Be strict about unintentionally covered code. + --strict-coverage Be strict about @covers annotation usage. --strict-global-state Be strict about changes to global state --disallow-test-output Be strict about output during tests. + --disallow-resource-usage Be strict about resource usage during small tests. --enforce-time-limit Enforce time limit based on test size. --disallow-todo-tests Disallow @todo-annotated tests. @@ -60,15 +65,19 @@ Test Execution Options: --stderr Write to STDERR instead of STDOUT. --stop-on-error Stop execution upon first error. --stop-on-failure Stop execution upon first error or failure. + --stop-on-warning Stop execution upon first warning. --stop-on-risky Stop execution upon first risky test. --stop-on-skipped Stop execution upon first skipped test. --stop-on-incomplete Stop execution upon first incomplete test. + --fail-on-warning Treat tests with warnings as failures. + --fail-on-risky Treat risky tests as failures. -v|--verbose Output more verbose information. --debug Display debugging information during test execution. --loader TestSuiteLoader implementation to use. --repeat Runs the test(s) repeatedly. --tap Report test execution progress in TAP format. + --teamcity Report test execution progress in TeamCity format. --testdox Report test execution progress in TestDox format. --printer TestListener implementation to use. @@ -85,3 +94,4 @@ Miscellaneous Options: -h|--help Prints this usage information. --version Prints the version and exits. + --atleast-version Checks that version is greater than min and exits. diff --git a/vendor/phpunit/phpunit/tests/TextUI/help2.phpt b/vendor/phpunit/phpunit/tests/TextUI/help2.phpt index 97d69db..c1376a2 100644 --- a/vendor/phpunit/phpunit/tests/TextUI/help2.phpt +++ b/vendor/phpunit/phpunit/tests/TextUI/help2.phpt @@ -23,14 +23,18 @@ Code Coverage Options: --coverage-text= Generate code coverage report in text format. Default: Standard output. --coverage-xml Generate code coverage report in PHPUnit XML format. + --whitelist Whitelist for code coverage analysis. + --disable-coverage-ignore Disable annotations for ignoring code coverage. Logging Options: --log-junit Log test execution in JUnit XML format to file. --log-tap Log test execution in TAP format to file. + --log-teamcity Log test execution in TeamCity format to file. --log-json Log test execution in JSON format. --testdox-html Write agile documentation in HTML format to file. --testdox-text Write agile documentation in Text format to file. + --reverse-list Print defects in reverse order Test Selection Options: @@ -45,9 +49,10 @@ Test Selection Options: Test Execution Options: --report-useless-tests Be strict about tests that do not test anything. - --strict-coverage Be strict about unintentionally covered code. + --strict-coverage Be strict about @covers annotation usage. --strict-global-state Be strict about changes to global state --disallow-test-output Be strict about output during tests. + --disallow-resource-usage Be strict about resource usage during small tests. --enforce-time-limit Enforce time limit based on test size. --disallow-todo-tests Disallow @todo-annotated tests. @@ -61,15 +66,19 @@ Test Execution Options: --stderr Write to STDERR instead of STDOUT. --stop-on-error Stop execution upon first error. --stop-on-failure Stop execution upon first error or failure. + --stop-on-warning Stop execution upon first warning. --stop-on-risky Stop execution upon first risky test. --stop-on-skipped Stop execution upon first skipped test. --stop-on-incomplete Stop execution upon first incomplete test. + --fail-on-warning Treat tests with warnings as failures. + --fail-on-risky Treat risky tests as failures. -v|--verbose Output more verbose information. --debug Display debugging information during test execution. --loader TestSuiteLoader implementation to use. --repeat Runs the test(s) repeatedly. --tap Report test execution progress in TAP format. + --teamcity Report test execution progress in TeamCity format. --testdox Report test execution progress in TestDox format. --printer TestListener implementation to use. @@ -86,3 +95,4 @@ Miscellaneous Options: -h|--help Prints this usage information. --version Prints the version and exits. + --atleast-version Checks that version is greater than min and exits. diff --git a/vendor/phpunit/phpunit/tests/TextUI/ini-isolation.phpt b/vendor/phpunit/phpunit/tests/TextUI/ini-isolation.phpt index ee002df..133ab50 100644 --- a/vendor/phpunit/phpunit/tests/TextUI/ini-isolation.phpt +++ b/vendor/phpunit/phpunit/tests/TextUI/ini-isolation.phpt @@ -15,7 +15,7 @@ PHPUnit_TextUI_Command::main(); --EXPECTF-- PHPUnit %s by Sebastian Bergmann and contributors. -. +. 1 / 1 (100%) Time: %s, Memory: %sMb diff --git a/vendor/phpunit/phpunit/tests/TextUI/log-json-no-pretty-print.phpt b/vendor/phpunit/phpunit/tests/TextUI/log-json-no-pretty-print.phpt deleted file mode 100644 index b2b4ae8..0000000 --- a/vendor/phpunit/phpunit/tests/TextUI/log-json-no-pretty-print.phpt +++ /dev/null @@ -1,27 +0,0 @@ ---TEST-- -phpunit --log-json php://stdout BankAccountTest ../_files/BankAccountTest.php ---SKIPIF-- - ---FILE-- - ---EXPECTF-- -PHPUnit %s by Sebastian Bergmann and contributors. - -{"event":"suiteStart","suite":"BankAccountTest","tests":3}{"event":"testStart","suite":"BankAccountTest","test":"BankAccountTest::testBalanceIsInitiallyZero"}.{"event":"test","suite":"BankAccountTest","test":"BankAccountTest::testBalanceIsInitiallyZero","status":"pass","time":%f,"trace":[],"message":"","output":""}{"event":"testStart","suite":"BankAccountTest","test":"BankAccountTest::testBalanceCannotBecomeNegative"}.{"event":"test","suite":"BankAccountTest","test":"BankAccountTest::testBalanceCannotBecomeNegative","status":"pass","time":%f,"trace":[],"message":"","output":""}{"event":"testStart","suite":"BankAccountTest","test":"BankAccountTest::testBalanceCannotBecomeNegative2"}.{"event":"test","suite":"BankAccountTest","test":"BankAccountTest::testBalanceCannotBecomeNegative2","status":"pass","time":%f,"trace":[],"message":"","output":""} - -Time: %s, Memory: %sMb - -OK (3 tests, 3 assertions) diff --git a/vendor/phpunit/phpunit/tests/TextUI/log-json-post-66021.phpt b/vendor/phpunit/phpunit/tests/TextUI/log-json-post-66021.phpt index deb03a4..35bfa2d 100644 --- a/vendor/phpunit/phpunit/tests/TextUI/log-json-post-66021.phpt +++ b/vendor/phpunit/phpunit/tests/TextUI/log-json-post-66021.phpt @@ -4,7 +4,7 @@ phpunit --log-json php://stdout BankAccountTest ../_files/BankAccountTest.php @@ -56,7 +56,7 @@ PHPUnit %s by Sebastian Bergmann and contributors. "event": "testStart", "suite": "BankAccountTest", "test": "BankAccountTest::testBalanceCannotBecomeNegative2" -}.{ +}. 3 / 3 (100%){ "event": "test", "suite": "BankAccountTest", "test": "BankAccountTest::testBalanceCannotBecomeNegative2", diff --git a/vendor/phpunit/phpunit/tests/TextUI/log-json-pre-66021.phpt b/vendor/phpunit/phpunit/tests/TextUI/log-json-pre-66021.phpt deleted file mode 100644 index a2fb751..0000000 --- a/vendor/phpunit/phpunit/tests/TextUI/log-json-pre-66021.phpt +++ /dev/null @@ -1,78 +0,0 @@ ---TEST-- -phpunit --log-json php://stdout BankAccountTest ../_files/BankAccountTest.php ---SKIPIF-- - ---FILE-- - ---EXPECTF-- -PHPUnit %s by Sebastian Bergmann and contributors. - -{ - "event": "suiteStart", - "suite": "BankAccountTest", - "tests": 3 -}{ - "event": "testStart", - "suite": "BankAccountTest", - "test": "BankAccountTest::testBalanceIsInitiallyZero" -}.{ - "event": "test", - "suite": "BankAccountTest", - "test": "BankAccountTest::testBalanceIsInitiallyZero", - "status": "pass", - "time": %f, - "trace": [ - - ], - "message": "", - "output": "" -}{ - "event": "testStart", - "suite": "BankAccountTest", - "test": "BankAccountTest::testBalanceCannotBecomeNegative" -}.{ - "event": "test", - "suite": "BankAccountTest", - "test": "BankAccountTest::testBalanceCannotBecomeNegative", - "status": "pass", - "time": %f, - "trace": [ - - ], - "message": "", - "output": "" -}{ - "event": "testStart", - "suite": "BankAccountTest", - "test": "BankAccountTest::testBalanceCannotBecomeNegative2" -}.{ - "event": "test", - "suite": "BankAccountTest", - "test": "BankAccountTest::testBalanceCannotBecomeNegative2", - "status": "pass", - "time": %f, - "trace": [ - - ], - "message": "", - "output": "" -} - -Time: %s, Memory: %sMb - -OK (3 tests, 3 assertions) diff --git a/vendor/phpunit/phpunit/tests/TextUI/log-tap.phpt b/vendor/phpunit/phpunit/tests/TextUI/log-tap.phpt index 6e13626..69024c3 100644 --- a/vendor/phpunit/phpunit/tests/TextUI/log-tap.phpt +++ b/vendor/phpunit/phpunit/tests/TextUI/log-tap.phpt @@ -17,7 +17,7 @@ PHPUnit %s by Sebastian Bergmann and contributors. TAP version 13 .ok 1 - BankAccountTest::testBalanceIsInitiallyZero .ok 2 - BankAccountTest::testBalanceCannotBecomeNegative -.ok 3 - BankAccountTest::testBalanceCannotBecomeNegative2 +. 3 / 3 (100%)ok 3 - BankAccountTest::testBalanceCannotBecomeNegative2 1..3 diff --git a/vendor/phpunit/phpunit/tests/TextUI/log-xml.phpt b/vendor/phpunit/phpunit/tests/TextUI/log-xml.phpt index a031c85..63262b9 100644 --- a/vendor/phpunit/phpunit/tests/TextUI/log-xml.phpt +++ b/vendor/phpunit/phpunit/tests/TextUI/log-xml.phpt @@ -14,7 +14,7 @@ PHPUnit_TextUI_Command::main(); --EXPECTF-- PHPUnit %s by Sebastian Bergmann and contributors. -... +... 3 / 3 (100%) diff --git a/vendor/phpunit/phpunit/tests/TextUI/options-after-arguments.phpt b/vendor/phpunit/phpunit/tests/TextUI/options-after-arguments.phpt index d4cdc1a..534d3aa 100644 --- a/vendor/phpunit/phpunit/tests/TextUI/options-after-arguments.phpt +++ b/vendor/phpunit/phpunit/tests/TextUI/options-after-arguments.phpt @@ -12,7 +12,7 @@ PHPUnit_TextUI_Command::main(); --EXPECTF-- PHPUnit %s by Sebastian Bergmann and contributors. -... +... 3 / 3 (100%) Time: %s, Memory: %sMb diff --git a/vendor/phpunit/phpunit/tests/TextUI/output-isolation.phpt b/vendor/phpunit/phpunit/tests/TextUI/output-isolation.phpt index 128a7e2..7492d81 100644 --- a/vendor/phpunit/phpunit/tests/TextUI/output-isolation.phpt +++ b/vendor/phpunit/phpunit/tests/TextUI/output-isolation.phpt @@ -14,7 +14,7 @@ PHPUnit_TextUI_Command::main(); --EXPECTF-- PHPUnit %s by Sebastian Bergmann and contributors. -. +. 1 / 1 (100%) Time: %s, Memory: %sMb diff --git a/vendor/phpunit/phpunit/tests/TextUI/repeat.phpt b/vendor/phpunit/phpunit/tests/TextUI/repeat.phpt index db5eddb..8a0c0f7 100644 --- a/vendor/phpunit/phpunit/tests/TextUI/repeat.phpt +++ b/vendor/phpunit/phpunit/tests/TextUI/repeat.phpt @@ -14,7 +14,7 @@ PHPUnit_TextUI_Command::main(); --EXPECTF-- PHPUnit %s by Sebastian Bergmann and contributors. -......... +......... 9 / 9 (100%) Time: %s, Memory: %sMb diff --git a/vendor/phpunit/phpunit/tests/TextUI/report-useless-tests-incomplete.phpt b/vendor/phpunit/phpunit/tests/TextUI/report-useless-tests-incomplete.phpt index 9bc4c2d..7892d03 100644 --- a/vendor/phpunit/phpunit/tests/TextUI/report-useless-tests-incomplete.phpt +++ b/vendor/phpunit/phpunit/tests/TextUI/report-useless-tests-incomplete.phpt @@ -13,7 +13,7 @@ PHPUnit_TextUI_Command::main(); --EXPECTF-- PHPUnit %s by Sebastian Bergmann and contributors. -I +I 1 / 1 (100%) Time: %s, Memory: %sMb diff --git a/vendor/phpunit/phpunit/tests/TextUI/report-useless-tests-isolation.phpt b/vendor/phpunit/phpunit/tests/TextUI/report-useless-tests-isolation.phpt index 9401b26..50027e4 100644 --- a/vendor/phpunit/phpunit/tests/TextUI/report-useless-tests-isolation.phpt +++ b/vendor/phpunit/phpunit/tests/TextUI/report-useless-tests-isolation.phpt @@ -14,7 +14,7 @@ PHPUnit_TextUI_Command::main(); --EXPECTF-- PHPUnit %s by Sebastian Bergmann and contributors. -R +R 1 / 1 (100%) Time: %s, Memory: %sMb diff --git a/vendor/phpunit/phpunit/tests/TextUI/report-useless-tests.phpt b/vendor/phpunit/phpunit/tests/TextUI/report-useless-tests.phpt index 9eb22df..205b3ee 100644 --- a/vendor/phpunit/phpunit/tests/TextUI/report-useless-tests.phpt +++ b/vendor/phpunit/phpunit/tests/TextUI/report-useless-tests.phpt @@ -13,7 +13,7 @@ PHPUnit_TextUI_Command::main(); --EXPECTF-- PHPUnit %s by Sebastian Bergmann and contributors. -R +R 1 / 1 (100%) Time: %s, Memory: %sMb diff --git a/vendor/phpunit/phpunit/tests/TextUI/test-suffix-multiple.phpt b/vendor/phpunit/phpunit/tests/TextUI/test-suffix-multiple.phpt index 417f065..1beaa18 100644 --- a/vendor/phpunit/phpunit/tests/TextUI/test-suffix-multiple.phpt +++ b/vendor/phpunit/phpunit/tests/TextUI/test-suffix-multiple.phpt @@ -13,7 +13,7 @@ PHPUnit_TextUI_Command::main(); --EXPECTF-- PHPUnit %s by Sebastian Bergmann and contributors. -..... +..... 5 / 5 (100%) Time: %s, Memory: %sMb diff --git a/vendor/phpunit/phpunit/tests/TextUI/test-suffix-single.phpt b/vendor/phpunit/phpunit/tests/TextUI/test-suffix-single.phpt index 6c35937..77cca0b 100644 --- a/vendor/phpunit/phpunit/tests/TextUI/test-suffix-single.phpt +++ b/vendor/phpunit/phpunit/tests/TextUI/test-suffix-single.phpt @@ -13,7 +13,7 @@ PHPUnit_TextUI_Command::main(); --EXPECTF-- PHPUnit %s by Sebastian Bergmann and contributors. -... +... 3 / 3 (100%) Time: %s, Memory: %sMb diff --git a/vendor/phpunit/phpunit/tests/TextUI/testdox-html.phpt b/vendor/phpunit/phpunit/tests/TextUI/testdox-html.phpt index 95e4405..bf28529 100644 --- a/vendor/phpunit/phpunit/tests/TextUI/testdox-html.phpt +++ b/vendor/phpunit/phpunit/tests/TextUI/testdox-html.phpt @@ -14,7 +14,7 @@ PHPUnit_TextUI_Command::main(); --EXPECTF-- PHPUnit %s by Sebastian Bergmann and contributors. -

BankAccount

    ...
  • Balance is initially zero
  • Balance cannot become negative
+

BankAccount

    ... 3 / 3 (100%)
  • Balance is initially zero
  • Balance cannot become negative
Time: %s, Memory: %sMb diff --git a/vendor/phpunit/phpunit/tests/TextUI/testdox-text.phpt b/vendor/phpunit/phpunit/tests/TextUI/testdox-text.phpt index 79c6755..f6c7e94 100644 --- a/vendor/phpunit/phpunit/tests/TextUI/testdox-text.phpt +++ b/vendor/phpunit/phpunit/tests/TextUI/testdox-text.phpt @@ -15,7 +15,7 @@ PHPUnit_TextUI_Command::main(); PHPUnit %s by Sebastian Bergmann and contributors. BankAccount -... [x] Balance is initially zero +... 3 / 3 (100%) [x] Balance is initially zero [x] Balance cannot become negative diff --git a/vendor/phpunit/phpunit/tests/Util/ConfigurationTest.php b/vendor/phpunit/phpunit/tests/Util/ConfigurationTest.php index aea2334..92539c0 100644 --- a/vendor/phpunit/phpunit/tests/Util/ConfigurationTest.php +++ b/vendor/phpunit/phpunit/tests/Util/ConfigurationTest.php @@ -85,84 +85,48 @@ class Util_ConfigurationTest extends PHPUnit_Framework_TestCase public function testFilterConfigurationIsReadCorrectly() { $this->assertEquals( - array( - 'blacklist' => - array( - 'include' => - array( - 'directory' => - array( - 0 => - array( - 'path' => '/path/to/files', - 'prefix' => '', - 'suffix' => '.php', - 'group' => 'DEFAULT' - ), - ), - 'file' => - array( - 0 => '/path/to/file', - ), - ), - 'exclude' => - array( - 'directory' => - array( - 0 => - array( - 'path' => '/path/to/files', - 'prefix' => '', - 'suffix' => '.php', - 'group' => 'DEFAULT' - ), - ), - 'file' => - array( - 0 => '/path/to/file', - ), - ), - ), + [ 'whitelist' => - array( + [ 'addUncoveredFilesFromWhitelist' => true, 'processUncoveredFilesFromWhitelist' => false, 'include' => - array( + [ 'directory' => - array( + [ 0 => - array( + [ 'path' => '/path/to/files', 'prefix' => '', 'suffix' => '.php', 'group' => 'DEFAULT' - ), - ), + ], + ], 'file' => - array( + [ 0 => '/path/to/file', - ), - ), + 1 => '/path/to/file', + ], + ], 'exclude' => - array( + [ 'directory' => - array( + [ 0 => - array( + [ 'path' => '/path/to/files', 'prefix' => '', 'suffix' => '.php', 'group' => 'DEFAULT' - ), - ), + ], + ], 'file' => - array( + [ 0 => '/path/to/file', - ), - ), - ), - ), + ], + ], + ], + ], $this->configuration->getFilterConfiguration() ); } @@ -173,16 +137,16 @@ class Util_ConfigurationTest extends PHPUnit_Framework_TestCase public function testGroupConfigurationIsReadCorrectly() { $this->assertEquals( - array( + [ 'include' => - array( + [ 0 => 'name', - ), + ], 'exclude' => - array( + [ 0 => 'name', - ), - ), + ], + ], $this->configuration->getGroupConfiguration() ); } @@ -198,17 +162,17 @@ class Util_ConfigurationTest extends PHPUnit_Framework_TestCase ini_set('include_path', $dir . PATH_SEPARATOR . $includePath); $this->assertEquals( - array( + [ 0 => - array( + [ 'class' => 'MyListener', 'file' => '/optional/path/to/MyListener.php', 'arguments' => - array( + [ 0 => - array( + [ 0 => 'Sebastian', - ), + ], 1 => 22, 2 => 'April', 3 => 19.78, @@ -216,22 +180,22 @@ class Util_ConfigurationTest extends PHPUnit_Framework_TestCase 5 => new stdClass, 6 => dirname(__DIR__) . DIRECTORY_SEPARATOR . '_files' . DIRECTORY_SEPARATOR . 'MyTestFile.php', 7 => dirname(__DIR__) . DIRECTORY_SEPARATOR . '_files' . DIRECTORY_SEPARATOR . 'MyRelativePath', - ), - ), - array( + ], + ], + [ 'class' => 'IncludePathListener', 'file' => __FILE__, - 'arguments' => array() - ), - array( + 'arguments' => [] + ], + [ 'class' => 'CompactArgumentsListener', 'file' => '/CompactArgumentsListener.php', 'arguments' => - array( + [ 0 => 42 - ), - ), - ), + ], + ], + ], $this->configuration->getListenerConfiguration() ); @@ -244,7 +208,7 @@ class Util_ConfigurationTest extends PHPUnit_Framework_TestCase public function testLoggingConfigurationIsReadCorrectly() { $this->assertEquals( - array( + [ 'lowUpperBound' => '50', 'highLowerBound' => '90', 'coverage-html' => '/tmp/report', @@ -256,7 +220,7 @@ class Util_ConfigurationTest extends PHPUnit_Framework_TestCase 'junit' => '/tmp/logfile.xml', 'testdox-html' => '/tmp/testdox.html', 'testdox-text' => '/tmp/testdox.txt', - ), + ], $this->configuration->getLoggingConfiguration() ); } @@ -267,23 +231,23 @@ class Util_ConfigurationTest extends PHPUnit_Framework_TestCase public function testPHPConfigurationIsReadCorrectly() { $this->assertEquals( - array( + [ 'include_path' => - array( + [ dirname(__DIR__) . DIRECTORY_SEPARATOR . '_files' . DIRECTORY_SEPARATOR . '.', '/path/to/lib' - ), - 'ini' => array('foo' => 'bar'), - 'const' => array('FOO' => false, 'BAR' => true), - 'var' => array('foo' => false), - 'env' => array('foo' => true), - 'post' => array('foo' => 'bar'), - 'get' => array('foo' => 'bar'), - 'cookie' => array('foo' => 'bar'), - 'server' => array('foo' => 'bar'), - 'files' => array('foo' => 'bar'), - 'request'=> array('foo' => 'bar'), - ), + ], + 'ini' => ['foo' => 'bar'], + 'const' => ['FOO' => false, 'BAR' => true], + 'var' => ['foo' => false], + 'env' => ['foo' => true], + 'post' => ['foo' => 'bar'], + 'get' => ['foo' => 'bar'], + 'cookie' => ['foo' => 'bar'], + 'server' => ['foo' => 'bar'], + 'files' => ['foo' => 'bar'], + 'request'=> ['foo' => 'bar'], + ], $this->configuration->getPHPConfiguration() ); } @@ -345,57 +309,40 @@ class Util_ConfigurationTest extends PHPUnit_Framework_TestCase public function testPHPUnitConfigurationIsReadCorrectly() { $this->assertEquals( - array( - 'backupGlobals' => true, - 'backupStaticAttributes' => false, - 'disallowChangesToGlobalState' => false, - 'bootstrap' => '/path/to/bootstrap.php', - 'cacheTokens' => false, - 'columns' => 80, - 'colors' => 'never', - 'stderr' => false, - 'convertErrorsToExceptions' => true, - 'convertNoticesToExceptions' => true, - 'convertWarningsToExceptions' => true, - 'forceCoversAnnotation' => false, - 'mapTestClassNameToCoveredClassName' => false, - 'printerClass' => 'PHPUnit_TextUI_ResultPrinter', - 'stopOnFailure' => false, - 'reportUselessTests' => false, - 'strictCoverage' => false, - 'disallowTestOutput' => false, - 'enforceTimeLimit' => false, - 'disallowTodoAnnotatedTests' => false, - 'testSuiteLoaderClass' => 'PHPUnit_Runner_StandardTestSuiteLoader', - 'verbose' => false, - 'timeoutForSmallTests' => 1, - 'timeoutForMediumTests' => 10, - 'timeoutForLargeTests' => 60 - ), + [ + 'backupGlobals' => true, + 'backupStaticAttributes' => false, + 'beStrictAboutChangesToGlobalState' => false, + 'bootstrap' => '/path/to/bootstrap.php', + 'cacheTokens' => false, + 'columns' => 80, + 'colors' => 'never', + 'stderr' => false, + 'convertErrorsToExceptions' => true, + 'convertNoticesToExceptions' => true, + 'convertWarningsToExceptions' => true, + 'forceCoversAnnotation' => false, + 'printerClass' => 'PHPUnit_TextUI_ResultPrinter', + 'stopOnFailure' => false, + 'stopOnWarning' => false, + 'reportUselessTests' => false, + 'strictCoverage' => false, + 'disallowTestOutput' => false, + 'enforceTimeLimit' => false, + 'testSuiteLoaderClass' => 'PHPUnit_Runner_StandardTestSuiteLoader', + 'verbose' => false, + 'timeoutForSmallTests' => 1, + 'timeoutForMediumTests' => 10, + 'timeoutForLargeTests' => 60, + 'beStrictAboutResourceUsageDuringSmallTests' => false, + 'disallowTodoAnnotatedTests' => false, + 'failOnWarning' => false, + 'failOnRisky' => false + ], $this->configuration->getPHPUnitConfiguration() ); } - /** - * @covers PHPUnit_Util_Configuration::getSeleniumBrowserConfiguration - */ - public function testSeleniumBrowserConfigurationIsReadCorrectly() - { - $this->assertEquals( - array( - 0 => - array( - 'name' => 'Firefox on Linux', - 'browser' => '*firefox /usr/lib/firefox/firefox-bin', - 'host' => 'my.linux.box', - 'port' => 4444, - 'timeout' => 30000, - ), - ), - $this->configuration->getSeleniumBrowserConfiguration() - ); - } - /** * @covers PHPUnit_Util_Configuration::getInstance */ @@ -442,10 +389,6 @@ class Util_ConfigurationTest extends PHPUnit_Framework_TestCase $this->assertEmpty($suite->getGroups()); $filter = $emptyConfiguration->getFilterConfiguration(); - $this->assertEmpty($filter['blacklist']['include']['directory']); - $this->assertEmpty($filter['blacklist']['include']['file']); - $this->assertEmpty($filter['blacklist']['exclude']['directory']); - $this->assertEmpty($filter['blacklist']['exclude']['file']); $this->assertEmpty($filter['whitelist']['include']['directory']); $this->assertEmpty($filter['whitelist']['include']['file']); $this->assertEmpty($filter['whitelist']['exclude']['directory']); @@ -490,11 +433,6 @@ class Util_ConfigurationTest extends PHPUnit_Framework_TestCase $actualConfiguration->getPHPUnitConfiguration() ); - $this->assertEquals( - $expectedConfiguration->getSeleniumBrowserConfiguration(), - $actualConfiguration->getSeleniumBrowserConfiguration() - ); - $this->assertEquals( $expectedConfiguration->getTestSuiteConfiguration(), $actualConfiguration->getTestSuiteConfiguration() diff --git a/vendor/phpunit/phpunit/tests/Util/GetoptTest.php b/vendor/phpunit/phpunit/tests/Util/GetoptTest.php index 8e7ad4d..778ef5f 100644 --- a/vendor/phpunit/phpunit/tests/Util/GetoptTest.php +++ b/vendor/phpunit/phpunit/tests/Util/GetoptTest.php @@ -14,48 +14,48 @@ class Util_GetoptTest extends PHPUnit_Framework_TestCase { public function testItIncludeTheLongOptionsAfterTheArgument() { - $args = array( + $args = [ 'command', 'myArgument', '--colors', - ); - $actual = PHPUnit_Util_Getopt::getopt($args, '', array('colors==')); + ]; + $actual = PHPUnit_Util_Getopt::getopt($args, '', ['colors==']); - $expected = array( - array( - array( + $expected = [ + [ + [ '--colors', null, - ), - ), - array( + ], + ], + [ 'myArgument', - ), - ); + ], + ]; $this->assertEquals($expected, $actual); } public function testItIncludeTheShortOptionsAfterTheArgument() { - $args = array( + $args = [ 'command', 'myArgument', '-v', - ); + ]; $actual = PHPUnit_Util_Getopt::getopt($args, 'v'); - $expected = array( - array( - array( + $expected = [ + [ + [ 'v', null, - ), - ), - array( + ], + ], + [ 'myArgument', - ), - ); + ], + ]; $this->assertEquals($expected, $actual); } diff --git a/vendor/phpunit/phpunit/tests/Util/GlobalStateTest.php b/vendor/phpunit/phpunit/tests/Util/GlobalStateTest.php index 5810ee3..710b2b2 100644 --- a/vendor/phpunit/phpunit/tests/Util/GlobalStateTest.php +++ b/vendor/phpunit/phpunit/tests/Util/GlobalStateTest.php @@ -18,14 +18,14 @@ class Util_GlobalStateTest extends PHPUnit_Framework_TestCase public function testIncludedFilesAsStringSkipsVfsProtocols() { $dir = __DIR__; - $files = array( + $files = [ 'phpunit', // The 0 index is not used $dir . '/ConfigurationTest.php', $dir . '/GlobalStateTest.php', 'vfs://' . $dir . '/RegexTest.php', 'phpvfs53e46260465c7://' . $dir . '/TestTest.php', 'file://' . $dir . '/XMLTest.php' - ); + ]; $this->assertEquals( "require_once '" . $dir . "/ConfigurationTest.php';\n" . diff --git a/vendor/phpunit/phpunit/tests/Util/RegexTest.php b/vendor/phpunit/phpunit/tests/Util/RegexTest.php index 7242654..d9ee4d6 100644 --- a/vendor/phpunit/phpunit/tests/Util/RegexTest.php +++ b/vendor/phpunit/phpunit/tests/Util/RegexTest.php @@ -15,21 +15,21 @@ class Util_RegexTest extends PHPUnit_Framework_TestCase { public function validRegexpProvider() { - return array( - array('#valid regexp#', 'valid regexp', 1), - array(';val.*xp;', 'valid regexp', 1), - array('/val.*xp/i', 'VALID REGEXP', 1), - array('/a val.*p/','valid regexp', 0), - ); + return [ + ['#valid regexp#', 'valid regexp', 1], + [';val.*xp;', 'valid regexp', 1], + ['/val.*xp/i', 'VALID REGEXP', 1], + ['/a val.*p/','valid regexp', 0], + ]; } public function invalidRegexpProvider() { - return array( - array('valid regexp', 'valid regexp'), - array(';val.*xp', 'valid regexp'), - array('val.*xp/i', 'VALID REGEXP'), - ); + return [ + ['valid regexp', 'valid regexp'], + [';val.*xp', 'valid regexp'], + ['val.*xp/i', 'VALID REGEXP'], + ]; } /** diff --git a/vendor/phpunit/phpunit/tests/Util/TestTest.php b/vendor/phpunit/phpunit/tests/Util/TestTest.php index 2ec3829..a4d5329 100644 --- a/vendor/phpunit/phpunit/tests/Util/TestTest.php +++ b/vendor/phpunit/phpunit/tests/Util/TestTest.php @@ -32,68 +32,68 @@ class Util_TestTest extends PHPUnit_Framework_TestCase public function testGetExpectedException() { $this->assertArraySubset( - array('class' => 'FooBarBaz', 'code' => null, 'message' => ''), + ['class' => 'FooBarBaz', 'code' => null, 'message' => ''], PHPUnit_Util_Test::getExpectedException('ExceptionTest', 'testOne') ); $this->assertArraySubset( - array('class' => 'Foo_Bar_Baz', 'code' => null, 'message' => ''), + ['class' => 'Foo_Bar_Baz', 'code' => null, 'message' => ''], PHPUnit_Util_Test::getExpectedException('ExceptionTest', 'testTwo') ); $this->assertArraySubset( - array('class' => 'Foo\Bar\Baz', 'code' => null, 'message' => ''), + ['class' => 'Foo\Bar\Baz', 'code' => null, 'message' => ''], PHPUnit_Util_Test::getExpectedException('ExceptionTest', 'testThree') ); $this->assertArraySubset( - array('class' => 'ほげ', 'code' => null, 'message' => ''), + ['class' => 'ほげ', 'code' => null, 'message' => ''], PHPUnit_Util_Test::getExpectedException('ExceptionTest', 'testFour') ); $this->assertArraySubset( - array('class' => 'Class', 'code' => 1234, 'message' => 'Message'), + ['class' => 'Class', 'code' => 1234, 'message' => 'Message'], PHPUnit_Util_Test::getExpectedException('ExceptionTest', 'testFive') ); $this->assertArraySubset( - array('class' => 'Class', 'code' => 1234, 'message' => 'Message'), + ['class' => 'Class', 'code' => 1234, 'message' => 'Message'], PHPUnit_Util_Test::getExpectedException('ExceptionTest', 'testSix') ); $this->assertArraySubset( - array('class' => 'Class', 'code' => 'ExceptionCode', 'message' => 'Message'), + ['class' => 'Class', 'code' => 'ExceptionCode', 'message' => 'Message'], PHPUnit_Util_Test::getExpectedException('ExceptionTest', 'testSeven') ); $this->assertArraySubset( - array('class' => 'Class', 'code' => 0, 'message' => 'Message'), + ['class' => 'Class', 'code' => 0, 'message' => 'Message'], PHPUnit_Util_Test::getExpectedException('ExceptionTest', 'testEight') ); $this->assertArraySubset( - array('class' => 'Class', 'code' => ExceptionTest::ERROR_CODE, 'message' => ExceptionTest::ERROR_MESSAGE), + ['class' => 'Class', 'code' => ExceptionTest::ERROR_CODE, 'message' => ExceptionTest::ERROR_MESSAGE], PHPUnit_Util_Test::getExpectedException('ExceptionTest', 'testNine') ); $this->assertArraySubset( - array('class' => 'Class', 'code' => null, 'message' => ''), + ['class' => 'Class', 'code' => null, 'message' => ''], PHPUnit_Util_Test::getExpectedException('ExceptionTest', 'testSingleLine') ); $this->assertArraySubset( - array('class' => 'Class', 'code' => My\Space\ExceptionNamespaceTest::ERROR_CODE, 'message' => My\Space\ExceptionNamespaceTest::ERROR_MESSAGE), + ['class' => 'Class', 'code' => My\Space\ExceptionNamespaceTest::ERROR_CODE, 'message' => My\Space\ExceptionNamespaceTest::ERROR_MESSAGE], PHPUnit_Util_Test::getExpectedException('My\Space\ExceptionNamespaceTest', 'testConstants') ); // Ensure the Class::CONST expression is only evaluated when the constant really exists $this->assertArraySubset( - array('class' => 'Class', 'code' => 'ExceptionTest::UNKNOWN_CODE_CONSTANT', 'message' => 'ExceptionTest::UNKNOWN_MESSAGE_CONSTANT'), + ['class' => 'Class', 'code' => 'ExceptionTest::UNKNOWN_CODE_CONSTANT', 'message' => 'ExceptionTest::UNKNOWN_MESSAGE_CONSTANT'], PHPUnit_Util_Test::getExpectedException('ExceptionTest', 'testUnknownConstants') ); $this->assertArraySubset( - array('class' => 'Class', 'code' => 'My\Space\ExceptionNamespaceTest::UNKNOWN_CODE_CONSTANT', 'message' => 'My\Space\ExceptionNamespaceTest::UNKNOWN_MESSAGE_CONSTANT'), + ['class' => 'Class', 'code' => 'My\Space\ExceptionNamespaceTest::UNKNOWN_CODE_CONSTANT', 'message' => 'My\Space\ExceptionNamespaceTest::UNKNOWN_MESSAGE_CONSTANT'], PHPUnit_Util_Test::getExpectedException('My\Space\ExceptionNamespaceTest', 'testUnknownConstants') ); } @@ -104,17 +104,17 @@ class Util_TestTest extends PHPUnit_Framework_TestCase public function testGetExpectedRegExp() { $this->assertArraySubset( - array('message_regex' => '#regex#'), + ['message_regex' => '#regex#'], PHPUnit_Util_Test::getExpectedException('ExceptionTest', 'testWithRegexMessage') ); $this->assertArraySubset( - array('message_regex' => '#regex#'), + ['message_regex' => '#regex#'], PHPUnit_Util_Test::getExpectedException('ExceptionTest', 'testWithRegexMessageFromClassConstant') ); $this->assertArraySubset( - array('message_regex' => 'ExceptionTest::UNKNOWN_MESSAGE_REGEX_CONSTANT'), + ['message_regex' => 'ExceptionTest::UNKNOWN_MESSAGE_REGEX_CONSTANT'], PHPUnit_Util_Test::getExpectedException('ExceptionTest', 'testWithUnknowRegexMessageFromClassConstant') ); } @@ -133,42 +133,52 @@ class Util_TestTest extends PHPUnit_Framework_TestCase public function requirementsProvider() { - return array( - array('testOne', array()), - array('testTwo', array('PHPUnit' => '1.0')), - array('testThree', array('PHP' => '2.0')), - array('testFour', array('PHPUnit' => '2.0', 'PHP' => '1.0')), - array('testFive', array('PHP' => '5.4.0RC6')), - array('testSix', array('PHP' => '5.4.0-alpha1')), - array('testSeven', array('PHP' => '5.4.0beta2')), - array('testEight', array('PHP' => '5.4-dev')), - array('testNine', array('functions' => array('testFunc'))), - array('testTen', array('extensions' => array('testExt'))), - array('testEleven', array('OS' => '/Linux/i')), - array( + return [ + ['testOne', []], + ['testTwo', ['PHPUnit' => '1.0']], + ['testThree', ['PHP' => '2.0']], + ['testFour', ['PHPUnit' => '2.0', 'PHP' => '1.0']], + ['testFive', ['PHP' => '5.4.0RC6']], + ['testSix', ['PHP' => '5.4.0-alpha1']], + ['testSeven', ['PHP' => '5.4.0beta2']], + ['testEight', ['PHP' => '5.4-dev']], + ['testNine', ['functions' => ['testFunc']]], + ['testTen', ['extensions' => ['testExt']]], + ['testEleven', ['OS' => '/Linux/i']], + [ 'testSpace', - array( - 'extensions' => array('spl'), + [ + 'extensions' => ['spl'], 'OS' => '/.*/i' - ) - ), - array( + ] + ], + [ 'testAllPossibleRequirements', - array( + [ 'PHP' => '99-dev', 'PHPUnit' => '9-dev', 'OS' => '/DOESNOTEXIST/i', - 'functions' => array( + 'functions' => [ 'testFuncOne', 'testFuncTwo', - ), - 'extensions' => array( + ], + 'extensions' => [ 'testExtOne', 'testExtTwo', - ) - ) - ) - ); + 'testExtThree', + ], + 'extension_versions' => [ + 'testExtThree' => '2.0' + ] + ] + ], + ['testSpecificExtensionVersion', + [ + 'extension_versions' => ['testExt' => '1.8.0'], + 'extensions' => ['testExt'] + ] + ], + ]; } /** @@ -176,19 +186,19 @@ class Util_TestTest extends PHPUnit_Framework_TestCase */ public function testGetRequirementsMergesClassAndMethodDocBlocks() { - $expectedAnnotations = array( + $expectedAnnotations = [ 'PHP' => '5.4', 'PHPUnit' => '3.7', 'OS' => '/WINNT/i', - 'functions' => array( + 'functions' => [ 'testFuncClass', 'testFuncMethod', - ), - 'extensions' => array( + ], + 'extensions' => [ 'testExtClass', 'testExtMethod', - ) - ); + ] + ]; $this->assertEquals( $expectedAnnotations, @@ -210,14 +220,14 @@ class Util_TestTest extends PHPUnit_Framework_TestCase public function missingRequirementsProvider() { - return array( - array('testOne', array()), - array('testNine', array('Function testFunc is required.')), - array('testTen', array('Extension testExt is required.')), - array('testAlwaysSkip', array('PHPUnit 1111111 (or later) is required.')), - array('testAlwaysSkip2', array('PHP 9999999 (or later) is required.')), - array('testAlwaysSkip3', array('Operating system matching /DOESNOTEXIST/i is required.')), - array('testAllPossibleRequirements', array( + return [ + ['testOne', []], + ['testNine', ['Function testFunc is required.']], + ['testTen', ['Extension testExt is required.']], + ['testAlwaysSkip', ['PHPUnit 1111111 (or later) is required.']], + ['testAlwaysSkip2', ['PHP 9999999 (or later) is required.']], + ['testAlwaysSkip3', ['Operating system matching /DOESNOTEXIST/i is required.']], + ['testAllPossibleRequirements', [ 'PHP 99-dev (or later) is required.', 'PHPUnit 9-dev (or later) is required.', 'Operating system matching /DOESNOTEXIST/i is required.', @@ -225,8 +235,9 @@ class Util_TestTest extends PHPUnit_Framework_TestCase 'Function testFuncTwo is required.', 'Extension testExtOne is required.', 'Extension testExtTwo is required.', - )), - ); + 'Extension testExtThree 2.0 (or later) is required.', + ]], + ]; } /** @@ -274,7 +285,7 @@ class Util_TestTest extends PHPUnit_Framework_TestCase $result = PHPUnit_Util_Test::getDataFromTestWithAnnotation('/** * @testWith [1] */'); - $this->assertEquals(array(array(1)), $result); + $this->assertEquals([[1]], $result); } /** @@ -286,7 +297,7 @@ class Util_TestTest extends PHPUnit_Framework_TestCase * @testWith [1, 2] * [3, 4] */'); - $this->assertEquals(array(array(1, 2), array(3, 4)), $result); + $this->assertEquals([[1, 2], [3, 4]], $result); } /** @@ -299,7 +310,7 @@ class Util_TestTest extends PHPUnit_Framework_TestCase * [true] * [null] */'); - $this->assertEquals(array(array('ab'), array(true), array(null)), $result); + $this->assertEquals([['ab'], [true], [null]], $result); } /** @@ -312,7 +323,7 @@ class Util_TestTest extends PHPUnit_Framework_TestCase * [2] * @annotation */'); - $this->assertEquals(array(array(1), array(2)), $result); + $this->assertEquals([[1], [2]], $result); } /** @@ -325,7 +336,7 @@ class Util_TestTest extends PHPUnit_Framework_TestCase * [2] * blah blah */'); - $this->assertEquals(array(array(1), array(2)), $result); + $this->assertEquals([[1], [2]], $result); } /** @@ -336,7 +347,7 @@ class Util_TestTest extends PHPUnit_Framework_TestCase $result = PHPUnit_Util_Test::getDataFromTestWithAnnotation('/** * @testWith ["\"", "\""] */'); - $this->assertEquals(array(array('"', '"')), $result); + $this->assertEquals([['"', '"']], $result); } /** @@ -361,7 +372,7 @@ class Util_TestTest extends PHPUnit_Framework_TestCase public function testParseAnnotation() { $this->assertEquals( - array('Foo', 'ほげ'), + ['Foo', 'ほげ'], PHPUnit_Util_Test::getDependencies(get_class($this), 'methodForTestParseAnnotation') ); } @@ -382,7 +393,7 @@ class Util_TestTest extends PHPUnit_Framework_TestCase public function testParseAnnotationThatIsOnlyOneLine() { $this->assertEquals( - array('Bar'), + ['Bar'], PHPUnit_Util_Test::getDependencies(get_class($this), 'methodForTestParseAnnotationThatIsOnlyOneLine') ); } @@ -402,19 +413,19 @@ class Util_TestTest extends PHPUnit_Framework_TestCase public function testGetLinesToBeCovered($test, $lines) { if (strpos($test, 'Namespace') === 0) { - $expected = array( + $expected = [ TEST_FILES_PATH . 'NamespaceCoveredClass.php' => $lines - ); + ]; } elseif ($test === 'CoverageNoneTest') { - $expected = array(); + $expected = []; } elseif ($test === 'CoverageNothingTest') { $expected = false; } elseif ($test === 'CoverageFunctionTest') { - $expected = array( + $expected = [ TEST_FILES_PATH . 'CoveredFunction.php' => $lines - ); + ]; } else { - $expected = array(TEST_FILES_PATH . 'CoveredClass.php' => $lines); + $expected = [TEST_FILES_PATH . 'CoveredClass.php' => $lines]; } $this->assertEquals( @@ -471,7 +482,7 @@ class Util_TestTest extends PHPUnit_Framework_TestCase public function testGetLinesToBeCoveredSkipsNonExistentMethods() { $this->assertSame( - array(), + [], PHPUnit_Util_Test::getLinesToBeCovered( 'NotExistingCoveredElementTest', 'methodDoesNotExist' @@ -499,7 +510,7 @@ class Util_TestTest extends PHPUnit_Framework_TestCase public function testFunctionParenthesesAreAllowed() { $this->assertSame( - array(TEST_FILES_PATH . 'CoveredFunction.php' => range(2, 4)), + [TEST_FILES_PATH . 'CoveredFunction.php' => range(2, 4)], PHPUnit_Util_Test::getLinesToBeCovered( 'CoverageFunctionParenthesesTest', 'testSomething' @@ -514,7 +525,7 @@ class Util_TestTest extends PHPUnit_Framework_TestCase public function testFunctionParenthesesAreAllowedWithWhitespace() { $this->assertSame( - array(TEST_FILES_PATH . 'CoveredFunction.php' => range(2, 4)), + [TEST_FILES_PATH . 'CoveredFunction.php' => range(2, 4)], PHPUnit_Util_Test::getLinesToBeCovered( 'CoverageFunctionParenthesesWhitespaceTest', 'testSomething' @@ -529,7 +540,7 @@ class Util_TestTest extends PHPUnit_Framework_TestCase public function testMethodParenthesesAreAllowed() { $this->assertSame( - array(TEST_FILES_PATH . 'CoveredClass.php' => range(31, 35)), + [TEST_FILES_PATH . 'CoveredClass.php' => range(31, 35)], PHPUnit_Util_Test::getLinesToBeCovered( 'CoverageMethodParenthesesTest', 'testSomething' @@ -544,7 +555,7 @@ class Util_TestTest extends PHPUnit_Framework_TestCase public function testMethodParenthesesAreAllowedWithWhitespace() { $this->assertSame( - array(TEST_FILES_PATH . 'CoveredClass.php' => range(31, 35)), + [TEST_FILES_PATH . 'CoveredClass.php' => range(31, 35)], PHPUnit_Util_Test::getLinesToBeCovered( 'CoverageMethodParenthesesWhitespaceTest', 'testSomething' @@ -559,9 +570,9 @@ class Util_TestTest extends PHPUnit_Framework_TestCase public function testNamespacedFunctionCanBeCoveredOrUsed() { $this->assertEquals( - array( + [ TEST_FILES_PATH . 'NamespaceCoveredFunction.php' => range(4, 7) - ), + ], PHPUnit_Util_Test::getLinesToBeCovered( 'CoverageNamespacedFunctionTest', 'testFunc' @@ -571,103 +582,103 @@ class Util_TestTest extends PHPUnit_Framework_TestCase public function getLinesToBeCoveredProvider() { - return array( - array( + return [ + [ 'CoverageNoneTest', - array() - ), - array( + [] + ], + [ 'CoverageClassExtendedTest', array_merge(range(19, 36), range(2, 17)) - ), - array( + ], + [ 'CoverageClassTest', range(19, 36) - ), - array( + ], + [ 'CoverageMethodTest', range(31, 35) - ), - array( + ], + [ 'CoverageMethodOneLineAnnotationTest', range(31, 35) - ), - array( + ], + [ 'CoverageNotPrivateTest', array_merge(range(25, 29), range(31, 35)) - ), - array( + ], + [ 'CoverageNotProtectedTest', array_merge(range(21, 23), range(31, 35)) - ), - array( + ], + [ 'CoverageNotPublicTest', array_merge(range(21, 23), range(25, 29)) - ), - array( + ], + [ 'CoveragePrivateTest', range(21, 23) - ), - array( + ], + [ 'CoverageProtectedTest', range(25, 29) - ), - array( + ], + [ 'CoveragePublicTest', range(31, 35) - ), - array( + ], + [ 'CoverageFunctionTest', range(2, 4) - ), - array( + ], + [ 'NamespaceCoverageClassExtendedTest', array_merge(range(21, 38), range(4, 19)) - ), - array( + ], + [ 'NamespaceCoverageClassTest', range(21, 38) - ), - array( + ], + [ 'NamespaceCoverageMethodTest', range(33, 37) - ), - array( + ], + [ 'NamespaceCoverageNotPrivateTest', array_merge(range(27, 31), range(33, 37)) - ), - array( + ], + [ 'NamespaceCoverageNotProtectedTest', array_merge(range(23, 25), range(33, 37)) - ), - array( + ], + [ 'NamespaceCoverageNotPublicTest', array_merge(range(23, 25), range(27, 31)) - ), - array( + ], + [ 'NamespaceCoveragePrivateTest', range(23, 25) - ), - array( + ], + [ 'NamespaceCoverageProtectedTest', range(27, 31) - ), - array( + ], + [ 'NamespaceCoveragePublicTest', range(33, 37) - ), - array( + ], + [ 'NamespaceCoverageCoversClassTest', array_merge(range(23, 25), range(27, 31), range(33, 37), range(6, 8), range(10, 13), range(15, 18)) - ), - array( + ], + [ 'NamespaceCoverageCoversClassPublicTest', range(33, 37) - ), - array( + ], + [ 'CoverageNothingTest', false - ) - ); + ] + ]; } } diff --git a/vendor/phpunit/phpunit/tests/Util/XMLTest.php b/vendor/phpunit/phpunit/tests/Util/XMLTest.php index 086b738..25f5677 100644 --- a/vendor/phpunit/phpunit/tests/Util/XMLTest.php +++ b/vendor/phpunit/phpunit/tests/Util/XMLTest.php @@ -14,275 +14,6 @@ */ class Util_XMLTest extends PHPUnit_Framework_TestCase { - public function testAssertValidKeysValidKeys() - { - $options = array('testA' => 1, 'testB' => 2, 'testC' => 3); - $valid = array('testA', 'testB', 'testC'); - $expected = array('testA' => 1, 'testB' => 2, 'testC' => 3); - $validated = PHPUnit_Util_XML::assertValidKeys($options, $valid); - - $this->assertEquals($expected, $validated); - } - - public function testAssertValidKeysValidKeysEmpty() - { - $options = array('testA' => 1, 'testB' => 2); - $valid = array('testA', 'testB', 'testC'); - $expected = array('testA' => 1, 'testB' => 2, 'testC' => null); - $validated = PHPUnit_Util_XML::assertValidKeys($options, $valid); - - $this->assertEquals($expected, $validated); - } - - public function testAssertValidKeysDefaultValuesA() - { - $options = array('testA' => 1, 'testB' => 2); - $valid = array('testA' => 23, 'testB' => 24, 'testC' => 25); - $expected = array('testA' => 1, 'testB' => 2, 'testC' => 25); - $validated = PHPUnit_Util_XML::assertValidKeys($options, $valid); - - $this->assertEquals($expected, $validated); - } - - public function testAssertValidKeysDefaultValuesB() - { - $options = array(); - $valid = array('testA' => 23, 'testB' => 24, 'testC' => 25); - $expected = array('testA' => 23, 'testB' => 24, 'testC' => 25); - $validated = PHPUnit_Util_XML::assertValidKeys($options, $valid); - - $this->assertEquals($expected, $validated); - } - - public function testAssertValidKeysInvalidKey() - { - $options = array('testA' => 1, 'testB' => 2, 'testD' => 3); - $valid = array('testA', 'testB', 'testC'); - - try { - $validated = PHPUnit_Util_XML::assertValidKeys($options, $valid); - $this->fail(); - } catch (PHPUnit_Framework_Exception $e) { - $this->assertEquals('Unknown key(s): testD', $e->getMessage()); - } - } - - public function testAssertValidKeysInvalidKeys() - { - $options = array('testA' => 1, 'testD' => 2, 'testE' => 3); - $valid = array('testA', 'testB', 'testC'); - - try { - $validated = PHPUnit_Util_XML::assertValidKeys($options, $valid); - $this->fail(); - } catch (PHPUnit_Framework_Exception $e) { - $this->assertEquals('Unknown key(s): testD, testE', $e->getMessage()); - } - } - - public function testConvertAssertSelect() - { - $selector = 'div#folder.open a[href="http://www.xerox.com"][title="xerox"].selected.big > span + h1'; - $converted = PHPUnit_Util_XML::convertSelectToTag($selector); - $tag = array('tag' => 'div', - 'id' => 'folder', - 'class' => 'open', - 'descendant' => array('tag' => 'a', - 'class' => 'selected big', - 'attributes' => array('href' => 'http://www.xerox.com', - 'title' => 'xerox'), - 'child' => array('tag' => 'span', - 'adjacent-sibling' => array('tag' => 'h1')))); - $this->assertEquals($tag, $converted); - } - - public function testConvertAssertSelectElt() - { - $selector = 'div'; - $converted = PHPUnit_Util_XML::convertSelectToTag($selector); - $tag = array('tag' => 'div'); - - $this->assertEquals($tag, $converted); - } - - public function testConvertAssertClass() - { - $selector = '.foo'; - $converted = PHPUnit_Util_XML::convertSelectToTag($selector); - $tag = array('class' => 'foo'); - - $this->assertEquals($tag, $converted); - } - - public function testConvertAssertId() - { - $selector = '#foo'; - $converted = PHPUnit_Util_XML::convertSelectToTag($selector); - $tag = array('id' => 'foo'); - - $this->assertEquals($tag, $converted); - } - - public function testConvertAssertAttribute() - { - $selector = '[foo="bar"]'; - $converted = PHPUnit_Util_XML::convertSelectToTag($selector); - $tag = array('attributes' => array('foo' => 'bar')); - - $this->assertEquals($tag, $converted); - } - - public function testConvertAssertAttributeSpaces() - { - $selector = '[foo="bar baz"] div[value="foo bar"]'; - $converted = PHPUnit_Util_XML::convertSelectToTag($selector); - $tag = array('attributes' => array('foo' => 'bar baz'), - 'descendant' => array('tag' => 'div', - 'attributes' => array('value' => 'foo bar'))); - $this->assertEquals($tag, $converted); - } - - public function testConvertAssertAttributeMultipleSpaces() - { - $selector = '[foo="bar baz"] div[value="foo bar baz"]'; - $converted = PHPUnit_Util_XML::convertSelectToTag($selector); - $tag = array('attributes' => array('foo' => 'bar baz'), - 'descendant' => array('tag' => 'div', - 'attributes' => array('value' => 'foo bar baz'))); - $this->assertEquals($tag, $converted); - } - - public function testConvertAssertSelectEltClass() - { - $selector = 'div.foo'; - $converted = PHPUnit_Util_XML::convertSelectToTag($selector); - $tag = array('tag' => 'div', 'class' => 'foo'); - - $this->assertEquals($tag, $converted); - } - - public function testConvertAssertSelectEltId() - { - $selector = 'div#foo'; - $converted = PHPUnit_Util_XML::convertSelectToTag($selector); - $tag = array('tag' => 'div', 'id' => 'foo'); - - $this->assertEquals($tag, $converted); - } - - public function testConvertAssertSelectEltAttrEqual() - { - $selector = 'div[foo="bar"]'; - $converted = PHPUnit_Util_XML::convertSelectToTag($selector); - $tag = array('tag' => 'div', 'attributes' => array('foo' => 'bar')); - - $this->assertEquals($tag, $converted); - } - - public function testConvertAssertSelectEltMultiAttrEqual() - { - $selector = 'div[foo="bar"][baz="fob"]'; - $converted = PHPUnit_Util_XML::convertSelectToTag($selector); - $tag = array('tag' => 'div', 'attributes' => array('foo' => 'bar', 'baz' => 'fob')); - - $this->assertEquals($tag, $converted); - } - - public function testConvertAssertSelectEltAttrHasOne() - { - $selector = 'div[foo~="bar"]'; - $converted = PHPUnit_Util_XML::convertSelectToTag($selector); - $tag = array('tag' => 'div', 'attributes' => array('foo' => 'regexp:/.*\bbar\b.*/')); - - $this->assertEquals($tag, $converted); - } - - public function testConvertAssertSelectEltAttrContains() - { - $selector = 'div[foo*="bar"]'; - $converted = PHPUnit_Util_XML::convertSelectToTag($selector); - $tag = array('tag' => 'div', 'attributes' => array('foo' => 'regexp:/.*bar.*/')); - - $this->assertEquals($tag, $converted); - } - - public function testConvertAssertSelectEltChild() - { - $selector = 'div > a'; - $converted = PHPUnit_Util_XML::convertSelectToTag($selector); - $tag = array('tag' => 'div', 'child' => array('tag' => 'a')); - - $this->assertEquals($tag, $converted); - } - - public function testConvertAssertSelectEltAdjacentSibling() - { - $selector = 'div + a'; - $converted = PHPUnit_Util_XML::convertSelectToTag($selector); - $tag = array('tag' => 'div', 'adjacent-sibling' => array('tag' => 'a')); - - $this->assertEquals($tag, $converted); - } - - public function testConvertAssertSelectEltDescendant() - { - $selector = 'div a'; - $converted = PHPUnit_Util_XML::convertSelectToTag($selector); - $tag = array('tag' => 'div', 'descendant' => array('tag' => 'a')); - - $this->assertEquals($tag, $converted); - } - - public function testConvertAssertSelectContent() - { - $selector = '#foo'; - $content = 'div contents'; - $converted = PHPUnit_Util_XML::convertSelectToTag($selector, $content); - $tag = array('id' => 'foo', 'content' => 'div contents'); - - $this->assertEquals($tag, $converted); - } - - public function testConvertAssertSelectTrue() - { - $selector = '#foo'; - $content = true; - $converted = PHPUnit_Util_XML::convertSelectToTag($selector, $content); - $tag = array('id' => 'foo'); - - $this->assertEquals($tag, $converted); - } - - public function testConvertAssertSelectFalse() - { - $selector = '#foo'; - $content = false; - $converted = PHPUnit_Util_XML::convertSelectToTag($selector, $content); - $tag = array('id' => 'foo'); - - $this->assertEquals($tag, $converted); - } - - public function testConvertAssertNumber() - { - $selector = '.foo'; - $content = 3; - $converted = PHPUnit_Util_XML::convertSelectToTag($selector, $content); - $tag = array('class' => 'foo'); - - $this->assertEquals($tag, $converted); - } - - public function testConvertAssertRange() - { - $selector = '#foo'; - $content = array('greater_than' => 5, 'less_than' => 10); - $converted = PHPUnit_Util_XML::convertSelectToTag($selector, $content); - $tag = array('id' => 'foo'); - - $this->assertEquals($tag, $converted); - } - /** * @dataProvider charProvider */ @@ -307,12 +38,39 @@ class Util_XMLTest extends PHPUnit_Framework_TestCase public function charProvider() { - $data = array(); + $data = []; for ($i = 0; $i < 256; $i++) { - $data[] = array(chr($i)); + $data[] = [chr($i)]; } return $data; } + + /** + * @expectedException PHPUnit_Framework_Exception + * @expectedExceptionMessage Could not load XML from empty string + */ + public function testLoadEmptyString() + { + PHPUnit_Util_XML::load(''); + } + + /** + * @expectedException PHPUnit_Framework_Exception + * @expectedExceptionMessage Could not load XML from array + */ + public function testLoadArray() + { + PHPUnit_Util_XML::load(array(1, 2, 3)); + } + + /** + * @expectedException PHPUnit_Framework_Exception + * @expectedExceptionMessage Could not load XML from boolean + */ + public function testLoadBoolean() + { + PHPUnit_Util_XML::load(false); + } } diff --git a/vendor/phpunit/phpunit/tests/_files/Author.php b/vendor/phpunit/phpunit/tests/_files/Author.php index 6a24750..195dae6 100644 --- a/vendor/phpunit/phpunit/tests/_files/Author.php +++ b/vendor/phpunit/phpunit/tests/_files/Author.php @@ -16,7 +16,7 @@ class Author { // the order of properties is important for testing the cycle! - public $books = array(); + public $books = []; private $name = ''; diff --git a/vendor/phpunit/phpunit/tests/_files/ClassWithNonPublicAttributes.php b/vendor/phpunit/phpunit/tests/_files/ClassWithNonPublicAttributes.php index abc8ff6..ec285b8 100644 --- a/vendor/phpunit/phpunit/tests/_files/ClassWithNonPublicAttributes.php +++ b/vendor/phpunit/phpunit/tests/_files/ClassWithNonPublicAttributes.php @@ -23,7 +23,7 @@ class ClassWithNonPublicAttributes extends ParentClassWithProtectedAttributes protected $protectedAttribute = 'bar'; protected $privateAttribute = 'baz'; - public $publicArray = array('foo'); - protected $protectedArray = array('bar'); - protected $privateArray = array('baz'); + public $publicArray = ['foo']; + protected $protectedArray = ['bar']; + protected $privateArray = ['baz']; } diff --git a/vendor/phpunit/phpunit/tests/_files/DataProviderDebugTest.php b/vendor/phpunit/phpunit/tests/_files/DataProviderDebugTest.php index 22317cf..53f7a97 100644 --- a/vendor/phpunit/phpunit/tests/_files/DataProviderDebugTest.php +++ b/vendor/phpunit/phpunit/tests/_files/DataProviderDebugTest.php @@ -14,7 +14,7 @@ class DataProviderDebugTest extends PHPUnit_Framework_TestCase $obj2 = new \stdClass(); $obj2->foo = 'bar'; - $obj3 = (object) array(1,2,"Test\r\n",4,5,6,7,8); + $obj3 = (object) [1,2,"Test\r\n",4,5,6,7,8]; $obj = new \stdClass(); //@codingStandardsIgnoreStart @@ -27,22 +27,22 @@ class DataProviderDebugTest extends PHPUnit_Framework_TestCase $obj->text = "this\nis\na\nvery\nvery\nvery\nvery\nvery\nvery\rlong\n\rtext"; $obj->object = $obj2; $obj->objectagain = $obj2; - $obj->array = array('foo' => 'bar'); + $obj->array = ['foo' => 'bar']; $obj->self = $obj; $storage = new \SplObjectStorage(); $storage->attach($obj2); $storage->foo = $obj2; - return array( - array(null, true, 1, 1.0), - array(1.2, fopen('php://memory', 'r'), '1'), - array(array(array(1,2,3), array(3,4,5))), + return [ + [null, true, 1, 1.0], + [1.2, fopen('php://memory', 'r'), '1'], + [[[1,2,3], [3,4,5]]], // \n\r and \r is converted to \n - array("this\nis\na\nvery\nvery\nvery\nvery\nvery\nvery\rlong\n\rtext"), - array(new \stdClass(), $obj, array(), $storage, $obj3), - array(chr(0) . chr(1) . chr(2) . chr(3) . chr(4) . chr(5), implode('', array_map('chr', range(0x0e, 0x1f)))), - array(chr(0x00) . chr(0x09)) - ); + ["this\nis\na\nvery\nvery\nvery\nvery\nvery\nvery\rlong\n\rtext"], + [new \stdClass(), $obj, [], $storage, $obj3], + [chr(0) . chr(1) . chr(2) . chr(3) . chr(4) . chr(5), implode('', array_map('chr', range(0x0e, 0x1f)))], + [chr(0x00) . chr(0x09)] + ]; } } diff --git a/vendor/phpunit/phpunit/tests/_files/DataProviderFilterTest.php b/vendor/phpunit/phpunit/tests/_files/DataProviderFilterTest.php index a872bc9..da5801d 100644 --- a/vendor/phpunit/phpunit/tests/_files/DataProviderFilterTest.php +++ b/vendor/phpunit/phpunit/tests/_files/DataProviderFilterTest.php @@ -11,12 +11,12 @@ class DataProviderFilterTest extends PHPUnit_Framework_TestCase public static function truthProvider() { - return array( - array(true), - array(true), - array(true), - array(true) - ); + return [ + [true], + [true], + [true], + [true] + ]; } /** @@ -29,11 +29,11 @@ class DataProviderFilterTest extends PHPUnit_Framework_TestCase public static function falseProvider() { - return array( - 'false test' => array(false), - 'false test 2' => array(false), - 'other false test' => array(false), - 'other false test2'=> array(false) - ); + return [ + 'false test' => [false], + 'false test 2' => [false], + 'other false test' => [false], + 'other false test2'=> [false] + ]; } } diff --git a/vendor/phpunit/phpunit/tests/_files/DataProviderIncompleteTest.php b/vendor/phpunit/phpunit/tests/_files/DataProviderIncompleteTest.php index e0efb5b..1570ab2 100644 --- a/vendor/phpunit/phpunit/tests/_files/DataProviderIncompleteTest.php +++ b/vendor/phpunit/phpunit/tests/_files/DataProviderIncompleteTest.php @@ -21,17 +21,17 @@ class DataProviderIncompleteTest extends PHPUnit_Framework_TestCase { $this->markTestIncomplete('incomplete'); - return array( - array(0, 0, 0), - array(0, 1, 1), - ); + return [ + [0, 0, 0], + [0, 1, 1], + ]; } public static function providerMethod() { - return array( - array(0, 0, 0), - array(0, 1, 1), - ); + return [ + [0, 0, 0], + [0, 1, 1], + ]; } } diff --git a/vendor/phpunit/phpunit/tests/_files/DataProviderSkippedTest.php b/vendor/phpunit/phpunit/tests/_files/DataProviderSkippedTest.php index ec67ce5..d85402b 100644 --- a/vendor/phpunit/phpunit/tests/_files/DataProviderSkippedTest.php +++ b/vendor/phpunit/phpunit/tests/_files/DataProviderSkippedTest.php @@ -21,17 +21,17 @@ class DataProviderSkippedTest extends PHPUnit_Framework_TestCase { $this->markTestSkipped('skipped'); - return array( - array(0, 0, 0), - array(0, 1, 1), - ); + return [ + [0, 0, 0], + [0, 1, 1], + ]; } public static function providerMethod() { - return array( - array(0, 0, 0), - array(0, 1, 1), - ); + return [ + [0, 0, 0], + [0, 1, 1], + ]; } } diff --git a/vendor/phpunit/phpunit/tests/_files/DataProviderTest.php b/vendor/phpunit/phpunit/tests/_files/DataProviderTest.php index d940a05..0546ad4 100644 --- a/vendor/phpunit/phpunit/tests/_files/DataProviderTest.php +++ b/vendor/phpunit/phpunit/tests/_files/DataProviderTest.php @@ -11,11 +11,11 @@ class DataProviderTest extends PHPUnit_Framework_TestCase public static function providerMethod() { - return array( - array(0, 0, 0), - array(0, 1, 1), - array(1, 1, 3), - array(1, 0, 1) - ); + return [ + [0, 0, 0], + [0, 1, 1], + [1, 1, 3], + [1, 0, 1] + ]; } } diff --git a/vendor/phpunit/phpunit/tests/_files/DependencyFailureTest.php b/vendor/phpunit/phpunit/tests/_files/DependencyFailureTest.php index d83aecd..43cbd8f 100644 --- a/vendor/phpunit/phpunit/tests/_files/DependencyFailureTest.php +++ b/vendor/phpunit/phpunit/tests/_files/DependencyFailureTest.php @@ -14,9 +14,16 @@ class DependencyFailureTest extends PHPUnit_Framework_TestCase } /** - * @depends testTwo + * @depends !clone testTwo */ public function testThree() { } + + /** + * @depends clone testOne + */ + public function testFour() + { + } } diff --git a/vendor/phpunit/phpunit/tests/_files/ExceptionStackTest.php b/vendor/phpunit/phpunit/tests/_files/ExceptionStackTest.php index 05fa878..256ae1c 100644 --- a/vendor/phpunit/phpunit/tests/_files/ExceptionStackTest.php +++ b/vendor/phpunit/phpunit/tests/_files/ExceptionStackTest.php @@ -4,7 +4,7 @@ class ExceptionStackTest extends PHPUnit_Framework_TestCase public function testPrintingChildException() { try { - $this->assertEquals(array(1), array(2), 'message'); + $this->assertEquals([1], [2], 'message'); } catch (PHPUnit_Framework_ExpectationFailedException $e) { $message = $e->getMessage() . $e->getComparisonFailure()->getDiff(); throw new PHPUnit_Framework_Exception("Child exception\n$message", 101, $e); diff --git a/vendor/phpunit/phpunit/tests/_files/FailureTest.php b/vendor/phpunit/phpunit/tests/_files/FailureTest.php index e9df755..47134aa 100644 --- a/vendor/phpunit/phpunit/tests/_files/FailureTest.php +++ b/vendor/phpunit/phpunit/tests/_files/FailureTest.php @@ -3,7 +3,7 @@ class FailureTest extends PHPUnit_Framework_TestCase { public function testAssertArrayEqualsArray() { - $this->assertEquals(array(1), array(2), 'message'); + $this->assertEquals([1], [2], 'message'); } public function testAssertIntegerEqualsInteger() diff --git a/vendor/phpunit/phpunit/tests/_files/RequirementsTest.php b/vendor/phpunit/phpunit/tests/_files/RequirementsTest.php index 5b20695..6b5da89 100644 --- a/vendor/phpunit/phpunit/tests/_files/RequirementsTest.php +++ b/vendor/phpunit/phpunit/tests/_files/RequirementsTest.php @@ -84,6 +84,7 @@ class RequirementsTest extends PHPUnit_Framework_TestCase * @requires function testFuncTwo * @requires extension testExtOne * @requires extension testExtTwo + * @requires extension testExtThree 2.0 */ public function testAllPossibleRequirements() { @@ -145,4 +146,11 @@ class RequirementsTest extends PHPUnit_Framework_TestCase public function testSpace() { } + + /** + * @requires extension testExt 1.8.0 + */ + public function testSpecificExtensionVersion() + { + } } diff --git a/vendor/phpunit/phpunit/tests/_files/SampleArrayAccess.php b/vendor/phpunit/phpunit/tests/_files/SampleArrayAccess.php index d002165..7b68729 100644 --- a/vendor/phpunit/phpunit/tests/_files/SampleArrayAccess.php +++ b/vendor/phpunit/phpunit/tests/_files/SampleArrayAccess.php @@ -11,7 +11,7 @@ class SampleArrayAccess implements ArrayAccess public function __construct() { - $this->container = array(); + $this->container = []; } public function offsetSet($offset, $value) { diff --git a/vendor/phpunit/phpunit/tests/_files/StackTest.php b/vendor/phpunit/phpunit/tests/_files/StackTest.php index 2e29e87..50f7ea6 100644 --- a/vendor/phpunit/phpunit/tests/_files/StackTest.php +++ b/vendor/phpunit/phpunit/tests/_files/StackTest.php @@ -3,7 +3,7 @@ class StackTest extends PHPUnit_Framework_TestCase { public function testPush() { - $stack = array(); + $stack = []; $this->assertEquals(0, count($stack)); array_push($stack, 'foo'); diff --git a/vendor/phpunit/phpunit/tests/_files/TestIterator.php b/vendor/phpunit/phpunit/tests/_files/TestIterator.php index 01135e3..d26ac85 100644 --- a/vendor/phpunit/phpunit/tests/_files/TestIterator.php +++ b/vendor/phpunit/phpunit/tests/_files/TestIterator.php @@ -4,7 +4,7 @@ class TestIterator implements Iterator protected $array; protected $position = 0; - public function __construct($array = array()) + public function __construct($array = []) { $this->array = $array; } diff --git a/vendor/phpunit/phpunit/tests/_files/TestWithTest.php b/vendor/phpunit/phpunit/tests/_files/TestWithTest.php index 3fa6dfd..a80fdbe 100644 --- a/vendor/phpunit/phpunit/tests/_files/TestWithTest.php +++ b/vendor/phpunit/phpunit/tests/_files/TestWithTest.php @@ -14,11 +14,11 @@ class TestWithTest extends PHPUnit_Framework_TestCase public static function providerMethod() { - return array( - array(0, 0, 0), - array(0, 1, 1), - array(1, 1, 3), - array(1, 0, 1) - ); + return [ + [0, 0, 0], + [0, 1, 1], + [1, 1, 3], + [1, 0, 1] + ]; } } diff --git a/vendor/phpunit/phpunit/tests/_files/configuration.xml b/vendor/phpunit/phpunit/tests/_files/configuration.xml index e83bfd3..b91bf4f 100644 --- a/vendor/phpunit/phpunit/tests/_files/configuration.xml +++ b/vendor/phpunit/phpunit/tests/_files/configuration.xml @@ -11,19 +11,22 @@ convertNoticesToExceptions="true" convertWarningsToExceptions="true" forceCoversAnnotation="false" - mapTestClassNameToCoveredClassName="false" printerClass="PHPUnit_TextUI_ResultPrinter" stopOnFailure="false" + stopOnWarning="false" + failOnWarning="false" + failOnRisky="false" testSuiteLoaderClass="PHPUnit_Runner_StandardTestSuiteLoader" + beStrictAboutChangesToGlobalState="false" + beStrictAboutOutputDuringTests="false" + beStrictAboutResourceUsageDuringSmallTests="false" + beStrictAboutTestsThatDoNotTestAnything="false" + beStrictAboutTodoAnnotatedTests="false" + beStrictAboutCoversAnnotation="false" + enforceTimeLimit="false" timeoutForSmallTests="1" timeoutForMediumTests="10" timeoutForLargeTests="60" - beStrictAboutTestsThatDoNotTestAnything="false" - beStrictAboutOutputDuringTests="false" - beStrictAboutTestSize="false" - beStrictAboutTodoAnnotatedTests="false" - checkForUnintentionallyCoveredCode="false" - beStrictAboutChangesToGlobalState="false" verbose="false"> @@ -42,18 +45,13 @@ - - /path/to/files - /path/to/file - - /path/to/files - /path/to/file - - /path/to/files /path/to/file + + /path/to/file + /path/to/files /path/to/file @@ -108,13 +106,5 @@ - - - - diff --git a/vendor/phpunit/phpunit/tests/_files/configuration_empty.xml b/vendor/phpunit/phpunit/tests/_files/configuration_empty.xml index 13c8b71..13d090d 100644 --- a/vendor/phpunit/phpunit/tests/_files/configuration_empty.xml +++ b/vendor/phpunit/phpunit/tests/_files/configuration_empty.xml @@ -20,14 +20,6 @@ - - - - - - - - diff --git a/vendor/phpunit/phpunit/tests/_files/configuration_xinclude.xml b/vendor/phpunit/phpunit/tests/_files/configuration_xinclude.xml index 4307629..16b41aa 100644 --- a/vendor/phpunit/phpunit/tests/_files/configuration_xinclude.xml +++ b/vendor/phpunit/phpunit/tests/_files/configuration_xinclude.xml @@ -11,19 +11,22 @@ convertNoticesToExceptions="true" convertWarningsToExceptions="true" forceCoversAnnotation="false" - mapTestClassNameToCoveredClassName="false" printerClass="PHPUnit_TextUI_ResultPrinter" stopOnFailure="false" + stopOnWarning="false" + failOnWarning="false" + failOnRisky="false" testSuiteLoaderClass="PHPUnit_Runner_StandardTestSuiteLoader" + beStrictAboutChangesToGlobalState="false" + beStrictAboutOutputDuringTests="false" + beStrictAboutResourceUsageDuringSmallTests="false" + beStrictAboutTestsThatDoNotTestAnything="false" + beStrictAboutTodoAnnotatedTests="false" + beStrictAboutCoversAnnotation="false" + enforceTimeLimit="false" timeoutForSmallTests="1" timeoutForMediumTests="10" timeoutForLargeTests="60" - beStrictAboutTestsThatDoNotTestAnything="false" - beStrictAboutOutputDuringTests="false" - beStrictAboutTestSize="false" - beStrictAboutTodoAnnotatedTests="false" - checkForUnintentionallyCoveredCode="false" - beStrictAboutChangesToGlobalState="false" verbose="false"> - - diff --git a/vendor/sebastian/diff/composer.json b/vendor/sebastian/diff/composer.json index 3c04952..4b4b8d1 100644 --- a/vendor/sebastian/diff/composer.json +++ b/vendor/sebastian/diff/composer.json @@ -2,7 +2,7 @@ "name": "sebastian/diff", "description": "Diff implementation", "keywords": ["diff"], - "homepage": "http://www.github.com/sebastianbergmann/diff", + "homepage": "https://github.com/sebastianbergmann/diff", "license": "BSD-3-Clause", "authors": [ { @@ -18,7 +18,7 @@ "php": ">=5.3.3" }, "require-dev": { - "phpunit/phpunit": "~4.2" + "phpunit/phpunit": "~4.8" }, "autoload": { "classmap": [ @@ -27,7 +27,7 @@ }, "extra": { "branch-alias": { - "dev-master": "1.3-dev" + "dev-master": "1.4-dev" } } } diff --git a/vendor/sebastian/diff/src/Chunk.php b/vendor/sebastian/diff/src/Chunk.php index 79d13fc..eb08103 100644 --- a/vendor/sebastian/diff/src/Chunk.php +++ b/vendor/sebastian/diff/src/Chunk.php @@ -11,12 +11,6 @@ namespace SebastianBergmann\Diff; /** - * @package Diff - * @author Sebastian Bergmann - * @author Kore Nordmann - * @copyright Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://www.github.com/sebastianbergmann/diff */ class Chunk { diff --git a/vendor/sebastian/diff/src/Diff.php b/vendor/sebastian/diff/src/Diff.php index 45aaae6..c4a0892 100644 --- a/vendor/sebastian/diff/src/Diff.php +++ b/vendor/sebastian/diff/src/Diff.php @@ -11,12 +11,6 @@ namespace SebastianBergmann\Diff; /** - * @package Diff - * @author Sebastian Bergmann - * @author Kore Nordmann - * @copyright Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://www.github.com/sebastianbergmann/diff */ class Diff { diff --git a/vendor/sebastian/diff/src/Differ.php b/vendor/sebastian/diff/src/Differ.php index 76630ed..4960111 100644 --- a/vendor/sebastian/diff/src/Differ.php +++ b/vendor/sebastian/diff/src/Differ.php @@ -16,13 +16,6 @@ use SebastianBergmann\Diff\LCS\MemoryEfficientImplementation; /** * Diff implementation. - * - * @package Diff - * @author Sebastian Bergmann - * @author Kore Nordmann - * @copyright Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://www.github.com/sebastianbergmann/diff */ class Differ { @@ -31,20 +24,27 @@ class Differ */ private $header; + /** + * @var bool + */ + private $showNonDiffLines; + /** * @param string $header */ - public function __construct($header = "--- Original\n+++ New\n") + public function __construct($header = "--- Original\n+++ New\n", $showNonDiffLines = true) { - $this->header = $header; + $this->header = $header; + $this->showNonDiffLines = $showNonDiffLines; } /** * Returns the diff between two arrays or strings as string. * - * @param array|string $from - * @param array|string $to - * @param LongestCommonSubsequence $lcs + * @param array|string $from + * @param array|string $to + * @param LongestCommonSubsequence $lcs + * * @return string */ public function diff($from, $to, LongestCommonSubsequence $lcs = null) @@ -97,7 +97,9 @@ class Differ } if ($newChunk) { - $buffer .= "@@ @@\n"; + if ($this->showNonDiffLines === true) { + $buffer .= "@@ @@\n"; + } $newChunk = false; } @@ -105,7 +107,7 @@ class Differ $buffer .= '+' . $diff[$i][0] . "\n"; } elseif ($diff[$i][1] === 2 /* REMOVED */) { $buffer .= '-' . $diff[$i][0] . "\n"; - } else { + } elseif ($this->showNonDiffLines === true) { $buffer .= ' ' . $diff[$i][0] . "\n"; } } @@ -124,9 +126,10 @@ class Differ * - 1: ADDED: $token was added to $from * - 0: OLD: $token is not changed in $to * - * @param array|string $from - * @param array|string $to - * @param LongestCommonSubsequence $lcs + * @param array|string $from + * @param array|string $to + * @param LongestCommonSubsequence $lcs + * * @return array */ public function diffToArray($from, $to, LongestCommonSubsequence $lcs = null) @@ -221,8 +224,9 @@ class Differ } /** - * @param array $from - * @param array $to + * @param array $from + * @param array $to + * * @return LongestCommonSubsequence */ private function selectLcsImplementation(array $from, array $to) @@ -243,9 +247,10 @@ class Differ /** * Calculates the estimated memory footprint for the DP-based method. * - * @param array $from - * @param array $to - * @return integer + * @param array $from + * @param array $to + * + * @return int */ private function calculateEstimatedFootprint(array $from, array $to) { diff --git a/vendor/sebastian/diff/src/LCS/LongestCommonSubsequence.php b/vendor/sebastian/diff/src/LCS/LongestCommonSubsequence.php index 8036474..5ea9cf9 100644 --- a/vendor/sebastian/diff/src/LCS/LongestCommonSubsequence.php +++ b/vendor/sebastian/diff/src/LCS/LongestCommonSubsequence.php @@ -12,21 +12,15 @@ namespace SebastianBergmann\Diff\LCS; /** * Interface for implementations of longest common subsequence calculation. - * - * @package Diff - * @author Sebastian Bergmann - * @author Kore Nordmann - * @copyright Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://www.github.com/sebastianbergmann/diff */ interface LongestCommonSubsequence { /** * Calculates the longest common subsequence of two arrays. * - * @param array $from - * @param array $to + * @param array $from + * @param array $to + * * @return array */ public function calculate(array $from, array $to); diff --git a/vendor/sebastian/diff/src/LCS/MemoryEfficientLongestCommonSubsequenceImplementation.php b/vendor/sebastian/diff/src/LCS/MemoryEfficientLongestCommonSubsequenceImplementation.php index 6213607..b990dc0 100644 --- a/vendor/sebastian/diff/src/LCS/MemoryEfficientLongestCommonSubsequenceImplementation.php +++ b/vendor/sebastian/diff/src/LCS/MemoryEfficientLongestCommonSubsequenceImplementation.php @@ -12,21 +12,15 @@ namespace SebastianBergmann\Diff\LCS; /** * Memory-efficient implementation of longest common subsequence calculation. - * - * @package Diff - * @author Sebastian Bergmann - * @author Denes Lados - * @copyright Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://www.github.com/sebastianbergmann/diff */ class MemoryEfficientImplementation implements LongestCommonSubsequence { /** * Calculates the longest common subsequence of two arrays. * - * @param array $from - * @param array $to + * @param array $from + * @param array $to + * * @return array */ public function calculate(array $from, array $to) @@ -73,6 +67,7 @@ class MemoryEfficientImplementation implements LongestCommonSubsequence /** * @param array $from * @param array $to + * * @return array */ private function length(array $from, array $to) diff --git a/vendor/sebastian/diff/src/LCS/TimeEfficientLongestCommonSubsequenceImplementation.php b/vendor/sebastian/diff/src/LCS/TimeEfficientLongestCommonSubsequenceImplementation.php index b569586..4fc9d3e 100644 --- a/vendor/sebastian/diff/src/LCS/TimeEfficientLongestCommonSubsequenceImplementation.php +++ b/vendor/sebastian/diff/src/LCS/TimeEfficientLongestCommonSubsequenceImplementation.php @@ -12,21 +12,15 @@ namespace SebastianBergmann\Diff\LCS; /** * Time-efficient implementation of longest common subsequence calculation. - * - * @package Diff - * @author Sebastian Bergmann - * @author Kore Nordmann - * @copyright Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://www.github.com/sebastianbergmann/diff */ class TimeEfficientImplementation implements LongestCommonSubsequence { /** * Calculates the longest common subsequence of two arrays. * - * @param array $from - * @param array $to + * @param array $from + * @param array $to + * * @return array */ public function calculate(array $from, array $to) @@ -47,7 +41,7 @@ class TimeEfficientImplementation implements LongestCommonSubsequence for ($i = 1; $i <= $fromLength; ++$i) { for ($j = 1; $j <= $toLength; ++$j) { - $o = ($j * $width) + $i; + $o = ($j * $width) + $i; $matrix[$o] = max( $matrix[$o - 1], $matrix[$o - $width], diff --git a/vendor/sebastian/diff/src/Line.php b/vendor/sebastian/diff/src/Line.php index 28c66aa..e0a96b9 100644 --- a/vendor/sebastian/diff/src/Line.php +++ b/vendor/sebastian/diff/src/Line.php @@ -11,17 +11,11 @@ namespace SebastianBergmann\Diff; /** - * @package Diff - * @author Sebastian Bergmann - * @author Kore Nordmann - * @copyright Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://www.github.com/sebastianbergmann/diff */ class Line { - const ADDED = 1; - const REMOVED = 2; + const ADDED = 1; + const REMOVED = 2; const UNCHANGED = 3; /** diff --git a/vendor/sebastian/diff/src/Parser.php b/vendor/sebastian/diff/src/Parser.php index 79e2413..b01511b 100644 --- a/vendor/sebastian/diff/src/Parser.php +++ b/vendor/sebastian/diff/src/Parser.php @@ -12,18 +12,12 @@ namespace SebastianBergmann\Diff; /** * Unified diff parser. - * - * @package Diff - * @author Sebastian Bergmann - * @author Kore Nordmann - * @copyright Sebastian Bergmann - * @license http://www.opensource.org/licenses/BSD-3-Clause The BSD 3-Clause License - * @link http://www.github.com/sebastianbergmann/diff */ class Parser { /** - * @param string $string + * @param string $string + * * @return Diff[] */ public function parse($string) @@ -78,7 +72,7 @@ class Parser isset($match['endrange']) ? max(1, $match['endrange']) : 1 ); - $chunks[] = $chunk; + $chunks[] = $chunk; $diffLines = array(); continue; } diff --git a/vendor/sebastian/diff/tests/DifferTest.php b/vendor/sebastian/diff/tests/DifferTest.php index a786325bc1b8beae1133a7e459df7563585fa218..12d0cfeff376f7ecc3a3c4ff9b702f16f3d048aa 100644 GIT binary patch delta 213 zcmaDI@g#BsCzFJNf~|s~HJ1VqBVppufAmd3?7`8|&`Bj;p3UO6D?$f_|pf|rjCs9GN=b&*|UavQItEN3+rC#MQf zcX4Wwf~`VcYPmuHm}3nTpM08Ei3vyruqf~pr52awlxPBlYq=)#bBk`a 'bar') ); - $to = $from; + $to = $from; $common = $this->implementation->calculate($from, $to); $this->assertEquals($from, $common); @@ -81,19 +81,19 @@ class TimeEfficientImplementationTest extends PHPUnit_Framework_TestCase public function testDistinctSequences() { - $from = array('A'); - $to = array('B'); + $from = array('A'); + $to = array('B'); $common = $this->implementation->calculate($from, $to); $this->assertEquals(array(), $common); - $from = array('A', 'B', 'C'); - $to = array('D', 'E', 'F'); + $from = array('A', 'B', 'C'); + $to = array('D', 'E', 'F'); $common = $this->implementation->calculate($from, $to); $this->assertEquals(array(), $common); foreach ($this->stress_sizes as $size) { - $from = range(1, $size); - $to = range($size + 1, $size * 2); + $from = range(1, $size); + $to = range($size + 1, $size * 2); $common = $this->implementation->calculate($from, $to); $this->assertEquals(array(), $common); } @@ -101,15 +101,15 @@ class TimeEfficientImplementationTest extends PHPUnit_Framework_TestCase public function testCommonSubsequence() { - $from = array('A', 'C', 'E', 'F', 'G' ); + $from = array('A', 'C', 'E', 'F', 'G'); $to = array('A', 'B', 'D', 'E', 'H'); - $expected = array('A', 'E' ); + $expected = array('A', 'E'); $common = $this->implementation->calculate($from, $to); $this->assertEquals($expected, $common); - $from = array('A', 'C', 'E', 'F', 'G' ); - $to = array( 'B', 'C', 'D', 'E', 'F', 'H'); - $expected = array('C', 'E', 'F' ); + $from = array('A', 'C', 'E', 'F', 'G'); + $to = array('B', 'C', 'D', 'E', 'F', 'H'); + $expected = array('C', 'E', 'F'); $common = $this->implementation->calculate($from, $to); $this->assertEquals($expected, $common); diff --git a/vendor/sebastian/environment/src/Console.php b/vendor/sebastian/environment/src/Console.php index 9f15d54..f5d5f92 100644 --- a/vendor/sebastian/environment/src/Console.php +++ b/vendor/sebastian/environment/src/Console.php @@ -29,7 +29,7 @@ class Console public function hasColorSupport() { if (DIRECTORY_SEPARATOR == '\\') { - return false !== getenv('ANSICON') || 'ON' === getenv('ConEmuANSI'); + return false !== getenv('ANSICON') || 'ON' === getenv('ConEmuANSI') || 'xterm' === getenv('TERM'); } if (!defined('STDOUT')) { diff --git a/vendor/sebastian/recursion-context/src/Context.php b/vendor/sebastian/recursion-context/src/Context.php index 06bf6ce..b853d10 100644 --- a/vendor/sebastian/recursion-context/src/Context.php +++ b/vendor/sebastian/recursion-context/src/Context.php @@ -121,7 +121,7 @@ final class Context private function containsArray(array &$array) { $keys = array_keys($this->arrays, $array, true); - $hash = '_Key_' . hash('sha512', microtime(true)); + $hash = '_Key_' . microtime(true); foreach ($keys as $key) { $this->arrays[$key][$hash] = $hash; diff --git a/vendor/sebastian/version/composer.json b/vendor/sebastian/version/composer.json index 39d6569..3b87814 100644 --- a/vendor/sebastian/version/composer.json +++ b/vendor/sebastian/version/composer.json @@ -13,9 +13,17 @@ "support": { "issues": "https://github.com/sebastianbergmann/version/issues" }, + "require": { + "php": ">=5.6" + }, "autoload": { "classmap": [ "src/" ] + }, + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } } } diff --git a/vendor/sebastian/version/src/Version.php b/vendor/sebastian/version/src/Version.php index 3cb3e09..fc4cfec 100644 --- a/vendor/sebastian/version/src/Version.php +++ b/vendor/sebastian/version/src/Version.php @@ -15,8 +15,19 @@ namespace SebastianBergmann; */ class Version { + /** + * @var string + */ private $path; + + /** + * @var string + */ private $release; + + /** + * @var string + */ private $version; /** @@ -58,7 +69,8 @@ class Version } /** - * @param string $path + * @param string $path + * * @return bool|string */ private function getGitInformation($path) @@ -67,11 +79,26 @@ class Version return false; } - $dir = getcwd(); - chdir($path); - $returnCode = 1; - $result = @exec('git describe --tags 2>&1', $output, $returnCode); - chdir($dir); + $process = proc_open( + 'git describe --tags', + [ + 1 => ['pipe', 'w'], + 2 => ['pipe', 'w'], + ], + $pipes, + $path + ); + + if (!is_resource($process)) { + return false; + } + + $result = trim(stream_get_contents($pipes[1])); + + fclose($pipes[1]); + fclose($pipes[2]); + + $returnCode = proc_close($process); if ($returnCode !== 0) { return false; diff --git a/vendor/symfony/console/Application.php b/vendor/symfony/console/Application.php index e386337..4248ecd 100644 --- a/vendor/symfony/console/Application.php +++ b/vendor/symfony/console/Application.php @@ -309,8 +309,12 @@ class Application */ public function getLongVersion() { - if ('UNKNOWN' !== $this->getName() && 'UNKNOWN' !== $this->getVersion()) { - return sprintf('%s version %s', $this->getName(), $this->getVersion()); + if ('UNKNOWN' !== $this->getName()) { + if ('UNKNOWN' !== $this->getVersion()) { + return sprintf('%s version %s', $this->getName(), $this->getVersion()); + } + + return sprintf('%s', $this->getName()); } return 'Console Tool'; @@ -631,6 +635,8 @@ class Application */ public function renderException($e, $output) { + $output->writeln(''); + do { $title = sprintf(' [%s] ', get_class($e)); @@ -653,7 +659,7 @@ class Application } } - $messages = array('', ''); + $messages = array(); $messages[] = $emptyLine = $formatter->format(sprintf('%s', str_repeat(' ', $len))); $messages[] = $formatter->format(sprintf('%s%s', $title, str_repeat(' ', max(0, $len - $this->stringWidth($title))))); foreach ($lines as $line) { @@ -661,7 +667,6 @@ class Application } $messages[] = $emptyLine; $messages[] = ''; - $messages[] = ''; $output->writeln($messages, OutputInterface::OUTPUT_RAW); @@ -688,14 +693,12 @@ class Application } $output->writeln(''); - $output->writeln(''); } } while ($e = $e->getPrevious()); if (null !== $this->runningCommand) { $output->writeln(sprintf('%s', sprintf($this->runningCommand->getSynopsis(), $this->getName()))); $output->writeln(''); - $output->writeln(''); } } @@ -1070,7 +1073,7 @@ class Application return strlen($string); } - if (false === $encoding = mb_detect_encoding($string)) { + if (false === $encoding = mb_detect_encoding($string, null, true)) { return strlen($string); } @@ -1087,7 +1090,7 @@ class Application return str_split($string, $width); } - if (false === $encoding = mb_detect_encoding($string)) { + if (false === $encoding = mb_detect_encoding($string, null, true)) { return str_split($string, $width); } diff --git a/vendor/symfony/console/Command/HelpCommand.php b/vendor/symfony/console/Command/HelpCommand.php index 8c20b57..c0e7b38 100644 --- a/vendor/symfony/console/Command/HelpCommand.php +++ b/vendor/symfony/console/Command/HelpCommand.php @@ -42,7 +42,7 @@ class HelpCommand extends Command new InputOption('raw', null, InputOption::VALUE_NONE, 'To output raw command help'), )) ->setDescription('Displays help for a command') - ->setHelp(<<setHelp(<<<'EOF' The %command.name% command displays help for a given command: php %command.full_name% list diff --git a/vendor/symfony/console/Command/ListCommand.php b/vendor/symfony/console/Command/ListCommand.php index 5f970e8..5e1b926 100644 --- a/vendor/symfony/console/Command/ListCommand.php +++ b/vendor/symfony/console/Command/ListCommand.php @@ -34,7 +34,7 @@ class ListCommand extends Command ->setName('list') ->setDefinition($this->createDefinition()) ->setDescription('Lists commands') - ->setHelp(<<setHelp(<<<'EOF' The %command.name% command lists all commands: php %command.full_name% diff --git a/vendor/symfony/console/Descriptor/TextDescriptor.php b/vendor/symfony/console/Descriptor/TextDescriptor.php index 57e09e4..64b5397 100644 --- a/vendor/symfony/console/Descriptor/TextDescriptor.php +++ b/vendor/symfony/console/Descriptor/TextDescriptor.php @@ -173,7 +173,7 @@ class TextDescriptor extends Descriptor $width = $this->getColumnWidth($description->getCommands()); foreach ($description->getCommands() as $command) { - $this->writeText(sprintf("%-${width}s %s", $command->getName(), $command->getDescription()), $options); + $this->writeText(sprintf("%-{$width}s %s", $command->getName(), $command->getDescription()), $options); $this->writeText("\n"); } } else { @@ -236,10 +236,10 @@ class TextDescriptor extends Descriptor private function formatDefaultValue($default) { if (PHP_VERSION_ID < 50400) { - return str_replace('\/', '/', json_encode($default)); + return str_replace(array('\/', '\\\\'), array('/', '\\'), json_encode($default)); } - return json_encode($default, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE); + return str_replace('\\\\', '\\', json_encode($default, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE)); } /** diff --git a/vendor/symfony/console/Helper/DialogHelper.php b/vendor/symfony/console/Helper/DialogHelper.php index dbadac2..0f6ae52 100644 --- a/vendor/symfony/console/Helper/DialogHelper.php +++ b/vendor/symfony/console/Helper/DialogHelper.php @@ -56,7 +56,7 @@ class DialogHelper extends InputAwareHelper $messages = (array) $question; foreach ($choices as $key => $value) { - $messages[] = sprintf(" [%-${width}s] %s", $key, $value); + $messages[] = sprintf(" [%-{$width}s] %s", $key, $value); } $output->writeln($messages); @@ -458,7 +458,7 @@ class DialogHelper extends InputAwareHelper * @param callable $interviewer A callable that will ask for a question and return the result * @param OutputInterface $output An Output instance * @param callable $validator A PHP callback - * @param int|false $attempts Max number of times to ask before giving up ; false will ask infinitely + * @param int|false $attempts Max number of times to ask before giving up; false will ask infinitely * * @return string The validated response * diff --git a/vendor/symfony/console/Helper/Helper.php b/vendor/symfony/console/Helper/Helper.php index b288d44..156d8dc 100644 --- a/vendor/symfony/console/Helper/Helper.php +++ b/vendor/symfony/console/Helper/Helper.php @@ -55,7 +55,7 @@ abstract class Helper implements HelperInterface return strlen($string); } - if (false === $encoding = mb_detect_encoding($string)) { + if (false === $encoding = mb_detect_encoding($string, null, true)) { return strlen($string); } diff --git a/vendor/symfony/console/Helper/ProgressBar.php b/vendor/symfony/console/Helper/ProgressBar.php index 0b64b18..016e885 100644 --- a/vendor/symfony/console/Helper/ProgressBar.php +++ b/vendor/symfony/console/Helper/ProgressBar.php @@ -67,10 +67,8 @@ class ProgressBar // disable overwrite when output does not support ANSI codes. $this->overwrite = false; - if ($this->max > 10) { - // set a reasonable redraw frequency so output isn't flooded - $this->setRedrawFrequency($max / 10); - } + // set a reasonable redraw frequency so output isn't flooded + $this->setRedrawFrequency($max / 10); } $this->startTime = time(); @@ -316,11 +314,11 @@ class ProgressBar /** * Sets the redraw frequency. * - * @param int $freq The frequency in steps + * @param int|float $freq The frequency in steps */ public function setRedrawFrequency($freq) { - $this->redrawFreq = (int) $freq; + $this->redrawFreq = max((int) $freq, 1); } /** diff --git a/vendor/symfony/console/Helper/QuestionHelper.php b/vendor/symfony/console/Helper/QuestionHelper.php index a533f87..c158f73 100644 --- a/vendor/symfony/console/Helper/QuestionHelper.php +++ b/vendor/symfony/console/Helper/QuestionHelper.php @@ -162,11 +162,12 @@ class QuestionHelper extends Helper $message = $question->getQuestion(); if ($question instanceof ChoiceQuestion) { - $width = max(array_map('strlen', array_keys($question->getChoices()))); + $maxWidth = max(array_map(array($this, 'strlen'), array_keys($question->getChoices()))); $messages = (array) $question->getQuestion(); foreach ($question->getChoices() as $key => $value) { - $messages[] = sprintf(" [%-${width}s] %s", $key, $value); + $width = $maxWidth - $this->strlen($key); + $messages[] = ' ['.$key.str_repeat(' ', $width).'] '.$value; } $output->writeln($messages); diff --git a/vendor/symfony/console/Helper/SymfonyQuestionHelper.php b/vendor/symfony/console/Helper/SymfonyQuestionHelper.php index 77130f9..dc2141e 100644 --- a/vendor/symfony/console/Helper/SymfonyQuestionHelper.php +++ b/vendor/symfony/console/Helper/SymfonyQuestionHelper.php @@ -32,7 +32,7 @@ class SymfonyQuestionHelper extends QuestionHelper { $validator = $question->getValidator(); $question->setValidator(function ($value) use ($validator) { - if (null !== $validator && is_callable($validator)) { + if (null !== $validator) { $value = $validator($value); } diff --git a/vendor/symfony/console/Helper/Table.php b/vendor/symfony/console/Helper/Table.php index 6f5fbd0..3823e9c 100644 --- a/vendor/symfony/console/Helper/Table.php +++ b/vendor/symfony/console/Helper/Table.php @@ -332,7 +332,7 @@ class Table $columns[] = $this->getNumberOfColumns($row); } - return $this->numberOfColumns = max($columns); + $this->numberOfColumns = max($columns); } private function buildTableRows($rows) @@ -343,7 +343,6 @@ class Table // Remove any new line breaks and replace it with a new line foreach ($rows[$rowKey] as $column => $cell) { - $rows[$rowKey] = $this->fillCells($rows[$rowKey], $column); if (!strstr($cell, "\n")) { continue; } @@ -363,7 +362,7 @@ class Table $tableRows = array(); foreach ($rows as $rowKey => $row) { - $tableRows[] = $row; + $tableRows[] = $this->fillCells($row); if (isset($unmergedRows[$rowKey])) { $tableRows = array_merge($tableRows, $unmergedRows[$rowKey]); } @@ -429,21 +428,23 @@ class Table * fill cells for a row that contains colspan > 1. * * @param array $row - * @param int $column * * @return array */ - private function fillCells($row, $column) + private function fillCells($row) { - $cell = $row[$column]; - if ($cell instanceof TableCell && $cell->getColspan() > 1) { - foreach (range($column + 1, $column + $cell->getColspan() - 1) as $position) { - // insert empty value into rows at column position - array_splice($row, $position, 0, ''); + $newRow = array(); + foreach ($row as $column => $cell) { + $newRow[] = $cell; + if ($cell instanceof TableCell && $cell->getColspan() > 1) { + foreach (range($column + 1, $column + $cell->getColspan() - 1) as $position) { + // insert empty value at column position + $newRow[] = ''; + } } } - return $row; + return $newRow ?: $row; } /** @@ -487,7 +488,7 @@ class Table * * @param array $row * - * @return array() + * @return array */ private function getRowColumns($row) { @@ -529,8 +530,6 @@ class Table /** * Gets column width. * - * @param int $column - * * @return int */ private function getColumnSeparatorWidth() diff --git a/vendor/symfony/console/Helper/TableHelper.php b/vendor/symfony/console/Helper/TableHelper.php index 2953522..d762884 100644 --- a/vendor/symfony/console/Helper/TableHelper.php +++ b/vendor/symfony/console/Helper/TableHelper.php @@ -69,7 +69,7 @@ class TableHelper extends Helper default: throw new \InvalidArgumentException(sprintf('Invalid table layout "%s".', $layout)); - }; + } return $this; } diff --git a/vendor/symfony/console/LICENSE b/vendor/symfony/console/LICENSE index 43028bc..12a7453 100644 --- a/vendor/symfony/console/LICENSE +++ b/vendor/symfony/console/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2015 Fabien Potencier +Copyright (c) 2004-2016 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/vendor/symfony/console/Output/ConsoleOutput.php b/vendor/symfony/console/Output/ConsoleOutput.php index 8e1f360..f666c79 100644 --- a/vendor/symfony/console/Output/ConsoleOutput.php +++ b/vendor/symfony/console/Output/ConsoleOutput.php @@ -131,7 +131,7 @@ class ConsoleOutput extends StreamOutput implements ConsoleOutputInterface PHP_OS, ); - return false !== stristr(implode(';', $checks), 'OS400'); + return false !== stripos(implode(';', $checks), 'OS400'); } /** diff --git a/vendor/symfony/console/Shell.php b/vendor/symfony/console/Shell.php index eaaadfd..a140a5e 100644 --- a/vendor/symfony/console/Shell.php +++ b/vendor/symfony/console/Shell.php @@ -67,7 +67,7 @@ class Shell if ($this->processIsolation) { $finder = new PhpExecutableFinder(); $php = $finder->find(); - $this->output->writeln(<<output->writeln(<<<'EOF' Running with process isolation, you should consider this: * each command is executed as separate process, * commands don't support interactivity, all params must be passed explicitly, diff --git a/vendor/symfony/console/Style/SymfonyStyle.php b/vendor/symfony/console/Style/SymfonyStyle.php index 6e9c64f..365c03a 100644 --- a/vendor/symfony/console/Style/SymfonyStyle.php +++ b/vendor/symfony/console/Style/SymfonyStyle.php @@ -294,7 +294,7 @@ class SymfonyStyle extends OutputStyle { $progressBar = parent::createProgressBar($max); - if ('\\' === DIRECTORY_SEPARATOR) { + if ('\\' !== DIRECTORY_SEPARATOR) { $progressBar->setEmptyBarCharacter('░'); // light shade character \u2591 $progressBar->setProgressCharacter(''); $progressBar->setBarCharacter('▓'); // dark shade character \u2593 diff --git a/vendor/symfony/console/Tests/Command/ListCommandTest.php b/vendor/symfony/console/Tests/Command/ListCommandTest.php index 36d2380..a166a04 100644 --- a/vendor/symfony/console/Tests/Command/ListCommandTest.php +++ b/vendor/symfony/console/Tests/Command/ListCommandTest.php @@ -38,7 +38,7 @@ class ListCommandTest extends \PHPUnit_Framework_TestCase $application = new Application(); $commandTester = new CommandTester($command = $application->get('list')); $commandTester->execute(array('command' => $command->getName(), '--raw' => true)); - $output = <<add(new \FooCommand()); $commandTester = new CommandTester($command = $application->get('list')); $commandTester->execute(array('command' => $command->getName(), 'namespace' => 'foo', '--raw' => true)); - $output = <<add(new \Foo6Command()); $commandTester = new CommandTester($command = $application->get('list')); $commandTester->execute(array('command' => $command->getName()), array('decorated' => false)); - $output = <<add(new \Foo6Command()); $commandTester = new CommandTester($command = $application->get('list')); $commandTester->execute(array('command' => $command->getName(), '--raw' => true)); - $output = <<] - diff --git a/vendor/symfony/console/Tests/Fixtures/application_renderexception3.txt b/vendor/symfony/console/Tests/Fixtures/application_renderexception3.txt index 72a7286..8276137 100644 --- a/vendor/symfony/console/Tests/Fixtures/application_renderexception3.txt +++ b/vendor/symfony/console/Tests/Fixtures/application_renderexception3.txt @@ -1,27 +1,18 @@ - [Exception] Third exception comment - - - [Exception] Second exception comment - - - [Exception] First exception

this is html

- foo3:bar - diff --git a/vendor/symfony/console/Tests/Fixtures/application_renderexception3decorated.txt b/vendor/symfony/console/Tests/Fixtures/application_renderexception3decorated.txt index b44d50b..b4a7b01 100644 --- a/vendor/symfony/console/Tests/Fixtures/application_renderexception3decorated.txt +++ b/vendor/symfony/console/Tests/Fixtures/application_renderexception3decorated.txt @@ -1,27 +1,18 @@ -    [Exception]   Third exception comment    - - -    [Exception]   Second exception comment    - - -    [Exception]   First exception 

this is html

    - foo3:bar - diff --git a/vendor/symfony/console/Tests/Fixtures/application_renderexception4.txt b/vendor/symfony/console/Tests/Fixtures/application_renderexception4.txt index 19f893b..9d881e7 100644 --- a/vendor/symfony/console/Tests/Fixtures/application_renderexception4.txt +++ b/vendor/symfony/console/Tests/Fixtures/application_renderexception4.txt @@ -1,9 +1,7 @@ - [InvalidArgumentException] Command "foo" is not define d. - diff --git a/vendor/symfony/console/Tests/Fixtures/application_renderexception_doublewidth1.txt b/vendor/symfony/console/Tests/Fixtures/application_renderexception_doublewidth1.txt index 6a98660..1ba5f8f 100644 --- a/vendor/symfony/console/Tests/Fixtures/application_renderexception_doublewidth1.txt +++ b/vendor/symfony/console/Tests/Fixtures/application_renderexception_doublewidth1.txt @@ -1,11 +1,8 @@ - [Exception] エラーメッセージ - foo - diff --git a/vendor/symfony/console/Tests/Fixtures/application_renderexception_doublewidth1decorated.txt b/vendor/symfony/console/Tests/Fixtures/application_renderexception_doublewidth1decorated.txt index 8c8801b..2064425 100644 --- a/vendor/symfony/console/Tests/Fixtures/application_renderexception_doublewidth1decorated.txt +++ b/vendor/symfony/console/Tests/Fixtures/application_renderexception_doublewidth1decorated.txt @@ -1,11 +1,8 @@ -    [Exception]   エラーメッセージ    - foo - diff --git a/vendor/symfony/console/Tests/Fixtures/application_renderexception_doublewidth2.txt b/vendor/symfony/console/Tests/Fixtures/application_renderexception_doublewidth2.txt index 545cd7b..e41fcfc 100644 --- a/vendor/symfony/console/Tests/Fixtures/application_renderexception_doublewidth2.txt +++ b/vendor/symfony/console/Tests/Fixtures/application_renderexception_doublewidth2.txt @@ -1,12 +1,9 @@ - [Exception] コマンドの実行中にエラーが 発生しました。 - foo - diff --git a/vendor/symfony/console/Tests/Formatter/OutputFormatterTest.php b/vendor/symfony/console/Tests/Formatter/OutputFormatterTest.php index 510a4e7..46d5fe1 100644 --- a/vendor/symfony/console/Tests/Formatter/OutputFormatterTest.php +++ b/vendor/symfony/console/Tests/Formatter/OutputFormatterTest.php @@ -220,7 +220,7 @@ class OutputFormatterTest extends \PHPUnit_Framework_TestCase \033[32m some text\033[39m EOF - , $formatter->format(<<format(<<<'EOF' some text EOF @@ -230,7 +230,7 @@ EOF \033[32msome text \033[39m EOF - , $formatter->format(<<format(<<<'EOF' some text EOF @@ -241,7 +241,7 @@ EOF some text \033[39m EOF - , $formatter->format(<<format(<<<'EOF' some text @@ -254,7 +254,7 @@ some text more text \033[39m EOF - , $formatter->format(<<format(<<<'EOF' some text more text diff --git a/vendor/symfony/console/Tests/Helper/HelperSetTest.php b/vendor/symfony/console/Tests/Helper/HelperSetTest.php index bf58a45..d615899 100644 --- a/vendor/symfony/console/Tests/Helper/HelperSetTest.php +++ b/vendor/symfony/console/Tests/Helper/HelperSetTest.php @@ -16,9 +16,6 @@ use Symfony\Component\Console\Command\Command; class HelperSetTest extends \PHPUnit_Framework_TestCase { - /** - * @covers \Symfony\Component\Console\Helper\HelperSet::__construct - */ public function testConstructor() { $mock_helper = $this->getGenericMockHelper('fake_helper'); @@ -28,9 +25,6 @@ class HelperSetTest extends \PHPUnit_Framework_TestCase $this->assertTrue($helperset->has('fake_helper_alias'), '__construct sets helper alias for given helper'); } - /** - * @covers \Symfony\Component\Console\Helper\HelperSet::set - */ public function testSet() { $helperset = new HelperSet(); @@ -49,9 +43,6 @@ class HelperSetTest extends \PHPUnit_Framework_TestCase $this->assertTrue($helperset->has('fake_helper_alias'), '->set() adds helper alias when set'); } - /** - * @covers \Symfony\Component\Console\Helper\HelperSet::has - */ public function testHas() { $helperset = new HelperSet(array('fake_helper_alias' => $this->getGenericMockHelper('fake_helper'))); @@ -59,9 +50,6 @@ class HelperSetTest extends \PHPUnit_Framework_TestCase $this->assertTrue($helperset->has('fake_helper_alias'), '->has() finds set helper by alias'); } - /** - * @covers \Symfony\Component\Console\Helper\HelperSet::get - */ public function testGet() { $helper_01 = $this->getGenericMockHelper('fake_helper_01'); @@ -82,9 +70,6 @@ class HelperSetTest extends \PHPUnit_Framework_TestCase } } - /** - * @covers \Symfony\Component\Console\Helper\HelperSet::setCommand - */ public function testSetCommand() { $cmd_01 = new Command('foo'); @@ -100,9 +85,6 @@ class HelperSetTest extends \PHPUnit_Framework_TestCase $this->assertEquals($cmd_02, $helperset->getCommand(), '->setCommand() overwrites stored command with consecutive calls'); } - /** - * @covers \Symfony\Component\Console\Helper\HelperSet::getCommand - */ public function testGetCommand() { $cmd = new Command('foo'); @@ -111,9 +93,6 @@ class HelperSetTest extends \PHPUnit_Framework_TestCase $this->assertEquals($cmd, $helperset->getCommand(), '->getCommand() retrieves stored command'); } - /** - * @covers \Symfony\Component\Console\Helper\HelperSet::getIterator - */ public function testIteration() { $helperset = new HelperSet(); diff --git a/vendor/symfony/console/Tests/Helper/LegacyTableHelperTest.php b/vendor/symfony/console/Tests/Helper/LegacyTableHelperTest.php index 02c6d7f..cf9ad13 100644 --- a/vendor/symfony/console/Tests/Helper/LegacyTableHelperTest.php +++ b/vendor/symfony/console/Tests/Helper/LegacyTableHelperTest.php @@ -96,7 +96,7 @@ class LegacyTableHelperTest extends \PHPUnit_Framework_TestCase array('ISBN', 'Title', 'Author'), $books, TableHelper::LAYOUT_DEFAULT, -<<Charles Dickens'), ), TableHelper::LAYOUT_DEFAULT, -<<
render($output = $this->getOutputStream()); $expected = -<<
render($output = $this->getOutputStream()); $expected = - <<
getMock('Symfony\Component\Console\Helper\ProgressBar', array('display'), array($output = $this->getOutputStream(), 6)); + $bar = $this->getMock('Symfony\Component\Console\Helper\ProgressBar', array('display'), array($this->getOutputStream(), 6)); $bar->expects($this->exactly(4))->method('display'); $bar->setRedrawFrequency(2); @@ -307,6 +307,26 @@ class ProgressBarTest extends \PHPUnit_Framework_TestCase $bar->advance(1); } + public function testRedrawFrequencyIsAtLeastOneIfZeroGiven() + { + $bar = $this->getMock('Symfony\Component\Console\Helper\ProgressBar', array('display'), array($this->getOutputStream())); + + $bar->expects($this->exactly(2))->method('display'); + $bar->setRedrawFrequency(0); + $bar->start(); + $bar->advance(); + } + + public function testRedrawFrequencyIsAtLeastOneIfSmallerOneGiven() + { + $bar = $this->getMock('Symfony\Component\Console\Helper\ProgressBar', array('display'), array($this->getOutputStream())); + + $bar->expects($this->exactly(2))->method('display'); + $bar->setRedrawFrequency(0.9); + $bar->start(); + $bar->advance(); + } + /** * @requires extension mbstring */ diff --git a/vendor/symfony/console/Tests/Helper/QuestionHelperTest.php b/vendor/symfony/console/Tests/Helper/QuestionHelperTest.php index a1f85b1..5a7a80b 100644 --- a/vendor/symfony/console/Tests/Helper/QuestionHelperTest.php +++ b/vendor/symfony/console/Tests/Helper/QuestionHelperTest.php @@ -11,6 +11,7 @@ namespace Symfony\Component\Console\Tests\Helper; +use Symfony\Component\Console\Formatter\OutputFormatter; use Symfony\Component\Console\Helper\QuestionHelper; use Symfony\Component\Console\Helper\HelperSet; use Symfony\Component\Console\Helper\FormatterHelper; @@ -350,6 +351,34 @@ class QuestionHelperTest extends \PHPUnit_Framework_TestCase $this->assertEquals('not yet', $dialog->ask($this->createInputInterfaceMock(false), $this->createOutputInterface(), $question)); } + public function testChoiceOutputFormattingQuestionForUtf8Keys() + { + $question = 'Lorem ipsum?'; + $possibleChoices = array( + 'foo' => 'foo', + 'żółw' => 'bar', + 'łabądź' => 'baz', + ); + $outputShown = array( + $question, + ' [foo ] foo', + ' [żółw ] bar', + ' [łabądź] baz', + ); + $output = $this->getMock('\Symfony\Component\Console\Output\OutputInterface'); + $output->method('getFormatter')->willReturn(new OutputFormatter()); + + $dialog = new QuestionHelper(); + $dialog->setInputStream($this->getInputStream("\n")); + $helperSet = new HelperSet(array(new FormatterHelper())); + $dialog->setHelperSet($helperSet); + + $output->expects($this->once())->method('writeln')->with($this->equalTo($outputShown)); + + $question = new ChoiceQuestion($question, $possibleChoices, 'foo'); + $dialog->ask($this->createInputInterfaceMock(), $output, $question); + } + protected function getInputStream($input) { $stream = fopen('php://memory', 'r+', false); diff --git a/vendor/symfony/console/Tests/Helper/TableTest.php b/vendor/symfony/console/Tests/Helper/TableTest.php index 19bdf00..ab562fd 100644 --- a/vendor/symfony/console/Tests/Helper/TableTest.php +++ b/vendor/symfony/console/Tests/Helper/TableTest.php @@ -459,6 +459,24 @@ TABLE | ISBN | Title | Author | +------+-------+--------+ +TABLE + ), + 'Row with multiple cells' => array( + array(), + array( + array( + new TableCell('1', array('colspan' => 3)), + new TableCell('2', array('colspan' => 2)), + new TableCell('3', array('colspan' => 2)), + new TableCell('4', array('colspan' => 2)), + ), + ), + 'default', +<<
tokenize() parses quoted arguments'), array("'quoted'", array('quoted'), '->tokenize() parses quoted arguments'), array("'a\rb\nc\td'", array("a\rb\nc\td"), '->tokenize() parses whitespace chars in strings'), - array("'a'\r'b'\n'c'\t'd'", array('a','b','c','d'), '->tokenize() parses whitespace chars between args as spaces'), + array("'a'\r'b'\n'c'\t'd'", array('a', 'b', 'c', 'd'), '->tokenize() parses whitespace chars between args as spaces'), array('\"quoted\"', array('"quoted"'), '->tokenize() parses escaped-quoted arguments'), array("\'quoted\'", array('\'quoted\''), '->tokenize() parses escaped-quoted arguments'), array('-a', array('-a'), '->tokenize() parses short options'), diff --git a/vendor/symfony/console/composer.json b/vendor/symfony/console/composer.json index 38903ab..b68129d 100644 --- a/vendor/symfony/console/composer.json +++ b/vendor/symfony/console/composer.json @@ -29,7 +29,10 @@ "psr/log": "For using the console logger" }, "autoload": { - "psr-4": { "Symfony\\Component\\Console\\": "" } + "psr-4": { "Symfony\\Component\\Console\\": "" }, + "exclude-from-classmap": [ + "/Tests/" + ] }, "minimum-stability": "dev", "extra": { diff --git a/vendor/symfony/debug/CHANGELOG.md b/vendor/symfony/debug/CHANGELOG.md index 31f0de9..ab07458 100644 --- a/vendor/symfony/debug/CHANGELOG.md +++ b/vendor/symfony/debug/CHANGELOG.md @@ -1,6 +1,13 @@ CHANGELOG ========= +2.8.0 +----- + +* added BufferingLogger for errors that happen before a proper logger is configured +* allow throwing from `__toString()` with `return trigger_error($e, E_USER_ERROR);` +* deprecate ExceptionHandler::createResponse + 2.7.0 ----- diff --git a/vendor/symfony/debug/Debug.php b/vendor/symfony/debug/Debug.php index 08b35f4..f8d2bea 100644 --- a/vendor/symfony/debug/Debug.php +++ b/vendor/symfony/debug/Debug.php @@ -52,9 +52,10 @@ class Debug // CLI - display errors only if they're not already logged to STDERR ini_set('display_errors', 1); } - $handler = ErrorHandler::register(); - if (!$displayErrors) { - $handler->throwAt(0, true); + if ($displayErrors) { + ErrorHandler::register(new ErrorHandler(new BufferingLogger())); + } else { + ErrorHandler::register()->throwAt(0, true); } DebugClassLoader::enable(); diff --git a/vendor/symfony/debug/DebugClassLoader.php b/vendor/symfony/debug/DebugClassLoader.php index 8c79774..a67c4ea 100644 --- a/vendor/symfony/debug/DebugClassLoader.php +++ b/vendor/symfony/debug/DebugClassLoader.php @@ -147,7 +147,7 @@ class DebugClassLoader try { if ($this->isFinder) { if ($file = $this->classLoader[0]->findFile($class)) { - require $file; + require_once $file; } } else { call_user_func($this->classLoader, $class); @@ -200,8 +200,25 @@ class DebugClassLoader @trigger_error(sprintf('The %s class extends %s that is deprecated %s', $name, $parent->name, self::$deprecated[$parent->name]), E_USER_DEPRECATED); } + $parentInterfaces = array(); + $deprecatedInterfaces = array(); + if ($parent) { + foreach ($parent->getInterfaceNames() as $interface) { + $parentInterfaces[$interface] = 1; + } + } + foreach ($refl->getInterfaceNames() as $interface) { - if (isset(self::$deprecated[$interface]) && strncmp($ns, $interface, $len) && !($parent && $parent->implementsInterface($interface))) { + if (isset(self::$deprecated[$interface]) && strncmp($ns, $interface, $len)) { + $deprecatedInterfaces[] = $interface; + } + foreach (class_implements($interface) as $interface) { + $parentInterfaces[$interface] = 1; + } + } + + foreach ($deprecatedInterfaces as $interface) { + if (!isset($parentInterfaces[$interface])) { @trigger_error(sprintf('The %s %s %s that is deprecated %s', $name, $refl->isInterface() ? 'interface extends' : 'class implements', $interface, self::$deprecated[$interface]), E_USER_DEPRECATED); } } diff --git a/vendor/symfony/debug/ErrorHandler.php b/vendor/symfony/debug/ErrorHandler.php index cc698ee..71f490d 100644 --- a/vendor/symfony/debug/ErrorHandler.php +++ b/vendor/symfony/debug/ErrorHandler.php @@ -95,11 +95,14 @@ class ErrorHandler private $loggedTraces = array(); private $isRecursive = 0; + private $isRoot = false; private $exceptionHandler; + private $bootstrappingLogger; private static $reservedMemory; private static $stackedErrors = array(); private static $stackedErrorLevels = array(); + private static $toStringException = null; /** * Same init value as thrownErrors. @@ -134,7 +137,12 @@ class ErrorHandler $handler = new static(); } - $prev = set_error_handler(array($handler, 'handleError'), $handler->thrownErrors | $handler->loggedErrors); + if (null === $prev = set_error_handler(array($handler, 'handleError'))) { + restore_error_handler(); + // Specifying the error types earlier would expose us to https://bugs.php.net/63206 + set_error_handler(array($handler, 'handleError'), $handler->thrownErrors | $handler->loggedErrors); + $handler->isRoot = true; + } if ($handlerIsNew && is_array($prev) && $prev[0] instanceof self) { $handler = $prev[0]; @@ -151,6 +159,14 @@ class ErrorHandler return $handler; } + public function __construct(BufferingLogger $bootstrappingLogger = null) + { + if ($bootstrappingLogger) { + $this->bootstrappingLogger = $bootstrappingLogger; + $this->setDefaultLogger($bootstrappingLogger); + } + } + /** * Sets a logger to non assigned errors levels. * @@ -164,7 +180,7 @@ class ErrorHandler if (is_array($levels)) { foreach ($levels as $type => $logLevel) { - if (empty($this->loggers[$type][0]) || $replace) { + if (empty($this->loggers[$type][0]) || $replace || $this->loggers[$type][0] === $this->bootstrappingLogger) { $loggers[$type] = array($logger, $logLevel); } } @@ -173,7 +189,7 @@ class ErrorHandler $levels = E_ALL | E_STRICT; } foreach ($this->loggers as $type => $log) { - if (($type & $levels) && (empty($log[0]) || $replace)) { + if (($type & $levels) && (empty($log[0]) || $replace || $log[0] === $this->bootstrappingLogger)) { $log[0] = $logger; $loggers[$type] = $log; } @@ -196,6 +212,7 @@ class ErrorHandler { $prevLogged = $this->loggedErrors; $prev = $this->loggers; + $flush = array(); foreach ($loggers as $type => $log) { if (!isset($prev[$type])) { @@ -214,9 +231,24 @@ class ErrorHandler throw new \InvalidArgumentException('Invalid logger provided'); } $this->loggers[$type] = $log + $prev[$type]; + + if ($this->bootstrappingLogger && $prev[$type][0] === $this->bootstrappingLogger) { + $flush[$type] = $type; + } } $this->reRegister($prevLogged | $this->thrownErrors); + if ($flush) { + foreach ($this->bootstrappingLogger->cleanLogs() as $log) { + $type = $log[2]['type']; + if (!isset($flush[$type])) { + $this->bootstrappingLogger->log($log[0], $log[1], $log[2]); + } elseif ($this->loggers[$type][0]) { + $this->loggers[$type][0]->log($this->loggers[$type][1], $log[1], $log[2]); + } + } + } + return $prev; } @@ -326,12 +358,16 @@ class ErrorHandler private function reRegister($prev) { if ($prev !== $this->thrownErrors | $this->loggedErrors) { - $handler = set_error_handler('var_dump', 0); + $handler = set_error_handler('var_dump'); $handler = is_array($handler) ? $handler[0] : null; restore_error_handler(); if ($handler === $this) { restore_error_handler(); - set_error_handler(array($this, 'handleError'), $this->thrownErrors | $this->loggedErrors); + if ($this->isRoot) { + set_error_handler(array($this, 'handleError'), $this->thrownErrors | $this->loggedErrors); + } else { + set_error_handler(array($this, 'handleError')); + } } } } @@ -377,7 +413,10 @@ class ErrorHandler } if ($throw) { - if (($this->scopedErrors & $type) && class_exists('Symfony\Component\Debug\Exception\ContextErrorException')) { + if (null !== self::$toStringException) { + $throw = self::$toStringException; + self::$toStringException = null; + } elseif (($this->scopedErrors & $type) && class_exists('Symfony\Component\Debug\Exception\ContextErrorException')) { // Checking for class existence is a work around for https://bugs.php.net/42098 $throw = new ContextErrorException($this->levels[$type].': '.$message, 0, $type, $file, $line, $context); } else { @@ -392,6 +431,47 @@ class ErrorHandler $throw->errorHandlerCanary = new ErrorHandlerCanary(); } + if (E_USER_ERROR & $type) { + $backtrace = $backtrace ?: $throw->getTrace(); + + for ($i = 1; isset($backtrace[$i]); ++$i) { + if (isset($backtrace[$i]['function'], $backtrace[$i]['type'], $backtrace[$i - 1]['function']) + && '__toString' === $backtrace[$i]['function'] + && '->' === $backtrace[$i]['type'] + && !isset($backtrace[$i - 1]['class']) + && ('trigger_error' === $backtrace[$i - 1]['function'] || 'user_error' === $backtrace[$i - 1]['function']) + ) { + // Here, we know trigger_error() has been called from __toString(). + // HHVM is fine with throwing from __toString() but PHP triggers a fatal error instead. + // A small convention allows working around the limitation: + // given a caught $e exception in __toString(), quitting the method with + // `return trigger_error($e, E_USER_ERROR);` allows this error handler + // to make $e get through the __toString() barrier. + + foreach ($context as $e) { + if (($e instanceof \Exception || $e instanceof \Throwable) && $e->__toString() === $message) { + if (1 === $i) { + // On HHVM + $throw = $e; + break; + } + self::$toStringException = $e; + + return true; + } + } + + if (1 < $i) { + // On PHP (not on HHVM), display the original error message instead of the default one. + $this->handleException($throw); + + // Stop the process by giving back the error to the native handler. + return false; + } + } + } + } + throw $throw; } @@ -527,7 +607,7 @@ class ErrorHandler self::$reservedMemory = null; - $handler = set_error_handler('var_dump', 0); + $handler = set_error_handler('var_dump'); $handler = is_array($handler) ? $handler[0] : null; restore_error_handler(); @@ -672,7 +752,7 @@ class ErrorHandler { @trigger_error('The '.__METHOD__.' static method is deprecated since version 2.6 and will be removed in 3.0. Use the setLoggers() or setDefaultLogger() methods instead.', E_USER_DEPRECATED); - $handler = set_error_handler('var_dump', 0); + $handler = set_error_handler('var_dump'); $handler = is_array($handler) ? $handler[0] : null; restore_error_handler(); if (!$handler instanceof self) { diff --git a/vendor/symfony/debug/Exception/FlattenException.php b/vendor/symfony/debug/Exception/FlattenException.php index d8d5c5b..33c9bec 100644 --- a/vendor/symfony/debug/Exception/FlattenException.php +++ b/vendor/symfony/debug/Exception/FlattenException.php @@ -94,8 +94,13 @@ class FlattenException extends LegacyFlattenException $e->setClass(get_class($exception)); $e->setFile($exception->getFile()); $e->setLine($exception->getLine()); - if ($exception->getPrevious()) { - $e->setPrevious(static::create($exception->getPrevious())); + + $previous = $exception->getPrevious(); + + if ($previous instanceof \Exception) { + $e->setPrevious(static::create($previous)); + } elseif ($previous instanceof \Throwable) { + $e->setPrevious(static::create(new FatalThrowableError($previous))); } return $e; diff --git a/vendor/symfony/debug/ExceptionHandler.php b/vendor/symfony/debug/ExceptionHandler.php index 027b66c..c44b4a7 100644 --- a/vendor/symfony/debug/ExceptionHandler.php +++ b/vendor/symfony/debug/ExceptionHandler.php @@ -39,6 +39,8 @@ class ExceptionHandler public function __construct($debug = true, $charset = null, $fileLinkFormat = null) { if (false !== strpos($charset, '%')) { + @trigger_error('Providing $fileLinkFormat as second argument to '.__METHOD__.' is deprecated since version 2.8 and will be unsupported in 3.0. Please provide it as third argument, after $charset.', E_USER_DEPRECATED); + // Swap $charset and $fileLinkFormat for BC reasons $pivot = $fileLinkFormat; $fileLinkFormat = $charset; @@ -164,6 +166,7 @@ class ExceptionHandler $response = $this->createResponse($exception); $response->sendHeaders(); $response->sendContent(); + @trigger_error(sprintf("The %s::createResponse method is deprecated since 2.8 and won't be called anymore when handling an exception in 3.0.", $reflector->class), E_USER_DEPRECATED); return; } @@ -177,7 +180,7 @@ class ExceptionHandler * This method uses plain PHP functions like header() and echo to output * the response. * - * @param \Exception|FlattenException $exception An \Exception instance + * @param \Exception|FlattenException $exception An \Exception or FlattenException instance */ public function sendPhpResponse($exception) { @@ -199,17 +202,37 @@ class ExceptionHandler /** * Creates the error Response associated with the given Exception. * - * @param \Exception|FlattenException $exception An \Exception instance + * @param \Exception|FlattenException $exception An \Exception or FlattenException instance * * @return Response A Response instance + * + * @deprecated since 2.8, to be removed in 3.0. */ public function createResponse($exception) + { + @trigger_error('The '.__METHOD__.' method is deprecated since version 2.8 and will be removed in 3.0.', E_USER_DEPRECATED); + + if (!$exception instanceof FlattenException) { + $exception = FlattenException::create($exception); + } + + return Response::create($this->getHtml($exception), $exception->getStatusCode(), $exception->getHeaders())->setCharset($this->charset); + } + + /** + * Gets the full HTML content associated with the given exception. + * + * @param \Exception|FlattenException $exception An \Exception or FlattenException instance + * + * @return string The HTML content as a string + */ + public function getHtml($exception) { if (!$exception instanceof FlattenException) { $exception = FlattenException::create($exception); } - return Response::create($this->decorate($this->getContent($exception), $this->getStylesheet($exception)), $exception->getStatusCode(), $exception->getHeaders())->setCharset($this->charset); + return $this->decorate($this->getContent($exception), $this->getStylesheet($exception)); } /** @@ -238,7 +261,7 @@ class ExceptionHandler $ind = $count - $position + 1; $class = $this->formatClass($e['class']); $message = nl2br($this->escapeHtml($e['message'])); - $content .= sprintf(<< %d/%d %s%s: @@ -289,7 +312,7 @@ EOF; */ public function getStylesheet(FlattenException $exception) { - return << E_USER_NOTICE, + 'message' => '', + ); + + $this->assertSame($xError, $lastError); + } + public function testDeprecatedSuperInSameNamespace() { - set_error_handler('var_dump', 0); + set_error_handler(function() { return false; }); $e = error_reporting(0); trigger_error('', E_USER_NOTICE); @@ -231,7 +253,7 @@ class DebugClassLoaderTest extends \PHPUnit_Framework_TestCase $this->markTestSkipped('PHP7 already prevents using reserved names.'); } - set_error_handler('var_dump', 0); + set_error_handler(function() { return false; }); $e = error_reporting(0); trigger_error('', E_USER_NOTICE); @@ -289,6 +311,8 @@ class ClassLoader eval('namespace Test\\'.__NAMESPACE__.'; class DeprecatedParentClass extends \\'.__NAMESPACE__.'\Fixtures\DeprecatedClass {}'); } elseif ('Test\\'.__NAMESPACE__.'\DeprecatedInterfaceClass' === $class) { eval('namespace Test\\'.__NAMESPACE__.'; class DeprecatedInterfaceClass implements \\'.__NAMESPACE__.'\Fixtures\DeprecatedInterface {}'); + } elseif ('Test\\'.__NAMESPACE__.'\NonDeprecatedInterfaceClass' === $class) { + eval('namespace Test\\'.__NAMESPACE__.'; class NonDeprecatedInterfaceClass implements \\'.__NAMESPACE__.'\Fixtures\NonDeprecatedInterface {}'); } elseif ('Test\\'.__NAMESPACE__.'\Float' === $class) { eval('namespace Test\\'.__NAMESPACE__.'; class Float {}'); } diff --git a/vendor/symfony/debug/Tests/ErrorHandlerTest.php b/vendor/symfony/debug/Tests/ErrorHandlerTest.php index c107c0c..927009c 100644 --- a/vendor/symfony/debug/Tests/ErrorHandlerTest.php +++ b/vendor/symfony/debug/Tests/ErrorHandlerTest.php @@ -13,6 +13,7 @@ namespace Symfony\Component\Debug\Tests; use Psr\Log\LogLevel; use Symfony\Component\Debug\ErrorHandler; +use Symfony\Component\Debug\BufferingLogger; use Symfony\Component\Debug\Exception\ContextErrorException; /** @@ -268,6 +269,33 @@ class ErrorHandlerTest extends \PHPUnit_Framework_TestCase } } + public function testHandleUserError() + { + try { + $handler = ErrorHandler::register(); + $handler->throwAt(0, true); + + $e = null; + $x = new \Exception('Foo'); + + try { + $f = new Fixtures\ToStringThrower($x); + $f .= ''; // Trigger $f->__toString() + } catch (\Exception $e) { + } + + $this->assertSame($x, $e); + + restore_error_handler(); + restore_exception_handler(); + } catch (\Exception $e) { + restore_error_handler(); + restore_exception_handler(); + + throw $e; + } + } + public function testHandleDeprecation() { $that = $this; @@ -372,6 +400,49 @@ class ErrorHandlerTest extends \PHPUnit_Framework_TestCase } } + public function testBootstrappingLogger() + { + $bootLogger = new BufferingLogger(); + $handler = new ErrorHandler($bootLogger); + + $loggers = array( + E_DEPRECATED => array($bootLogger, LogLevel::INFO), + E_USER_DEPRECATED => array($bootLogger, LogLevel::INFO), + E_NOTICE => array($bootLogger, LogLevel::WARNING), + E_USER_NOTICE => array($bootLogger, LogLevel::WARNING), + E_STRICT => array($bootLogger, LogLevel::WARNING), + E_WARNING => array($bootLogger, LogLevel::WARNING), + E_USER_WARNING => array($bootLogger, LogLevel::WARNING), + E_COMPILE_WARNING => array($bootLogger, LogLevel::WARNING), + E_CORE_WARNING => array($bootLogger, LogLevel::WARNING), + E_USER_ERROR => array($bootLogger, LogLevel::CRITICAL), + E_RECOVERABLE_ERROR => array($bootLogger, LogLevel::CRITICAL), + E_COMPILE_ERROR => array($bootLogger, LogLevel::CRITICAL), + E_PARSE => array($bootLogger, LogLevel::CRITICAL), + E_ERROR => array($bootLogger, LogLevel::CRITICAL), + E_CORE_ERROR => array($bootLogger, LogLevel::CRITICAL), + ); + + $this->assertSame($loggers, $handler->setLoggers(array())); + + $handler->handleError(E_DEPRECATED, 'Foo message', __FILE__, 123, array()); + $expectedLog = array(LogLevel::INFO, 'Foo message', array('type' => E_DEPRECATED, 'file' => __FILE__, 'line' => 123, 'level' => error_reporting())); + + $logs = $bootLogger->cleanLogs(); + unset($logs[0][2]['stack']); + + $this->assertSame(array($expectedLog), $logs); + + $bootLogger->log($expectedLog[0], $expectedLog[1], $expectedLog[2]); + + $mockLogger = $this->getMock('Psr\Log\LoggerInterface'); + $mockLogger->expects($this->once()) + ->method('log') + ->with(LogLevel::WARNING, 'Foo message', $expectedLog[2]); + + $handler->setLoggers(array(E_DEPRECATED => array($mockLogger, LogLevel::WARNING))); + } + public function testHandleFatalError() { try { diff --git a/vendor/symfony/debug/Tests/Exception/FlattenExceptionTest.php b/vendor/symfony/debug/Tests/Exception/FlattenExceptionTest.php index 99eaf49..6c570e2 100644 --- a/vendor/symfony/debug/Tests/Exception/FlattenExceptionTest.php +++ b/vendor/symfony/debug/Tests/Exception/FlattenExceptionTest.php @@ -131,6 +131,20 @@ class FlattenExceptionTest extends \PHPUnit_Framework_TestCase $this->assertSame(array($flattened2), $flattened->getAllPrevious()); } + /** + * @requires PHP 7.0 + */ + public function testPreviousError() + { + $exception = new \Exception('test', 123, new \ParseError('Oh noes!', 42)); + + $flattened = FlattenException::create($exception)->getPrevious(); + + $this->assertEquals($flattened->getMessage(), 'Parse error: Oh noes!', 'The message is copied from the original exception.'); + $this->assertEquals($flattened->getCode(), 42, 'The code is copied from the original exception.'); + $this->assertEquals($flattened->getClass(), 'Symfony\Component\Debug\Exception\FatalThrowableError', 'The class is set to the class of the original exception'); + } + /** * @dataProvider flattenDataProvider */ diff --git a/vendor/symfony/debug/composer.json b/vendor/symfony/debug/composer.json index c1b128a..e739f75 100644 --- a/vendor/symfony/debug/composer.json +++ b/vendor/symfony/debug/composer.json @@ -23,16 +23,19 @@ "symfony/http-kernel": ">=2.3,<2.3.24|~2.4.0|>=2.5,<2.5.9|>=2.6,<2.6.2" }, "require-dev": { - "symfony/class-loader": "~2.2", - "symfony/http-kernel": "~2.3.24|~2.5.9|~2.6,>=2.6.2" + "symfony/class-loader": "~2.2|~3.0.0", + "symfony/http-kernel": "~2.3.24|~2.5.9|~2.6,>=2.6.2|~3.0.0" }, "autoload": { - "psr-4": { "Symfony\\Component\\Debug\\": "" } + "psr-4": { "Symfony\\Component\\Debug\\": "" }, + "exclude-from-classmap": [ + "/Tests/" + ] }, "minimum-stability": "dev", "extra": { "branch-alias": { - "dev-master": "2.7-dev" + "dev-master": "2.8-dev" } } } diff --git a/vendor/symfony/dom-crawler/LICENSE b/vendor/symfony/dom-crawler/LICENSE index 43028bc..12a7453 100644 --- a/vendor/symfony/dom-crawler/LICENSE +++ b/vendor/symfony/dom-crawler/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2015 Fabien Potencier +Copyright (c) 2004-2016 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/vendor/symfony/dom-crawler/Tests/CrawlerTest.php b/vendor/symfony/dom-crawler/Tests/CrawlerTest.php index 4cfd06f..45bbb2f 100755 --- a/vendor/symfony/dom-crawler/Tests/CrawlerTest.php +++ b/vendor/symfony/dom-crawler/Tests/CrawlerTest.php @@ -25,9 +25,6 @@ class CrawlerTest extends \PHPUnit_Framework_TestCase $this->assertCount(1, $crawler, '__construct() takes a node as a first argument'); } - /** - * @covers Symfony\Component\DomCrawler\Crawler::add - */ public function testAdd() { $crawler = new Crawler(); @@ -63,9 +60,6 @@ class CrawlerTest extends \PHPUnit_Framework_TestCase $crawler->add(1); } - /** - * @covers Symfony\Component\DomCrawler\Crawler::addHtmlContent - */ public function testAddHtmlContent() { $crawler = new Crawler(); @@ -80,7 +74,6 @@ class CrawlerTest extends \PHPUnit_Framework_TestCase } /** - * @covers Symfony\Component\DomCrawler\Crawler::addHtmlContent * @requires extension mbstring */ public function testAddHtmlContentCharset() @@ -91,9 +84,6 @@ class CrawlerTest extends \PHPUnit_Framework_TestCase $this->assertEquals('Tiếng Việt', $crawler->filterXPath('//div')->text()); } - /** - * @covers Symfony\Component\DomCrawler\Crawler::addHtmlContent - */ public function testAddHtmlContentInvalidBaseTag() { $crawler = new Crawler(null, 'http://symfony.com'); @@ -103,9 +93,6 @@ class CrawlerTest extends \PHPUnit_Framework_TestCase $this->assertEquals('http://symfony.com/contact', current($crawler->filterXPath('//a')->links())->getUri(), '->addHtmlContent() correctly handles a non-existent base tag href attribute'); } - /** - * @covers Symfony\Component\DomCrawler\Crawler::addHtmlContent - */ public function testAddHtmlContentUnsupportedCharset() { $crawler = new Crawler(); @@ -115,7 +102,6 @@ class CrawlerTest extends \PHPUnit_Framework_TestCase } /** - * @covers Symfony\Component\DomCrawler\Crawler::addHtmlContent * @requires extension mbstring */ public function testAddHtmlContentCharsetGbk() @@ -127,15 +113,12 @@ class CrawlerTest extends \PHPUnit_Framework_TestCase $this->assertEquals('中文', $crawler->filterXPath('//p')->text()); } - /** - * @covers Symfony\Component\DomCrawler\Crawler::addHtmlContent - */ public function testAddHtmlContentWithErrors() { $internalErrors = libxml_use_internal_errors(true); $crawler = new Crawler(); - $crawler->addHtmlContent(<<addHtmlContent(<<<'EOF' @@ -155,9 +138,6 @@ EOF libxml_use_internal_errors($internalErrors); } - /** - * @covers Symfony\Component\DomCrawler\Crawler::addXmlContent - */ public function testAddXmlContent() { $crawler = new Crawler(); @@ -166,9 +146,6 @@ EOF $this->assertEquals('foo', $crawler->filterXPath('//div')->attr('class'), '->addXmlContent() adds nodes from an XML string'); } - /** - * @covers Symfony\Component\DomCrawler\Crawler::addXmlContent - */ public function testAddXmlContentCharset() { $crawler = new Crawler(); @@ -177,15 +154,12 @@ EOF $this->assertEquals('Tiếng Việt', $crawler->filterXPath('//div')->text()); } - /** - * @covers Symfony\Component\DomCrawler\Crawler::addXmlContent - */ public function testAddXmlContentWithErrors() { $internalErrors = libxml_use_internal_errors(true); $crawler = new Crawler(); - $crawler->addXmlContent(<<addXmlContent(<<<'EOF' @@ -203,9 +177,6 @@ EOF libxml_use_internal_errors($internalErrors); } - /** - * @covers Symfony\Component\DomCrawler\Crawler::addContent - */ public function testAddContent() { $crawler = new Crawler(); @@ -241,9 +212,6 @@ EOF $this->assertEquals('日本語', $crawler->filterXPath('//body')->text(), '->addContent() can recognize "Shift_JIS" in html5 meta charset tag'); } - /** - * @covers Symfony\Component\DomCrawler\Crawler::addDocument - */ public function testAddDocument() { $crawler = new Crawler(); @@ -252,9 +220,6 @@ EOF $this->assertEquals('foo', $crawler->filterXPath('//div')->attr('class'), '->addDocument() adds nodes from a \DOMDocument'); } - /** - * @covers Symfony\Component\DomCrawler\Crawler::addNodeList - */ public function testAddNodeList() { $crawler = new Crawler(); @@ -263,9 +228,6 @@ EOF $this->assertEquals('foo', $crawler->filterXPath('//div')->attr('class'), '->addNodeList() adds nodes from a \DOMNodeList'); } - /** - * @covers Symfony\Component\DomCrawler\Crawler::addNodes - */ public function testAddNodes() { foreach ($this->createNodeList() as $node) { @@ -278,9 +240,6 @@ EOF $this->assertEquals('foo', $crawler->filterXPath('//div')->attr('class'), '->addNodes() adds nodes from an array of nodes'); } - /** - * @covers Symfony\Component\DomCrawler\Crawler::addNode - */ public function testAddNode() { $crawler = new Crawler(); @@ -430,9 +389,6 @@ EOF $this->assertCount(7, $crawler->filterXPath('( ( //a | //div )//img | //ul )')); } - /** - * @covers Symfony\Component\DomCrawler\Crawler::filterXPath - */ public function testFilterXPath() { $crawler = $this->createTestCrawler(); @@ -595,9 +551,6 @@ EOF $this->assertCount(9, $crawler->filterXPath('self::*/a')); } - /** - * @covers Symfony\Component\DomCrawler\Crawler::filter - */ public function testFilter() { $crawler = $this->createTestCrawler(); @@ -694,7 +647,7 @@ EOF public function testSelectButtonWithSingleQuotesInNameAttribute() { - $html = << @@ -715,7 +668,7 @@ HTML; public function testSelectButtonWithDoubleQuotesInNameAttribute() { - $html = << @@ -754,7 +707,7 @@ HTML; public function testSelectLinkAndLinkFiltered() { - $html = << diff --git a/vendor/symfony/dom-crawler/composer.json b/vendor/symfony/dom-crawler/composer.json index f8033c5..5ea57b2 100644 --- a/vendor/symfony/dom-crawler/composer.json +++ b/vendor/symfony/dom-crawler/composer.json @@ -25,7 +25,10 @@ "symfony/css-selector": "" }, "autoload": { - "psr-4": { "Symfony\\Component\\DomCrawler\\": "" } + "psr-4": { "Symfony\\Component\\DomCrawler\\": "" }, + "exclude-from-classmap": [ + "/Tests/" + ] }, "minimum-stability": "dev", "extra": { diff --git a/vendor/symfony/event-dispatcher/ContainerAwareEventDispatcher.php b/vendor/symfony/event-dispatcher/ContainerAwareEventDispatcher.php index b92defe..6a02e9f 100644 --- a/vendor/symfony/event-dispatcher/ContainerAwareEventDispatcher.php +++ b/vendor/symfony/event-dispatcher/ContainerAwareEventDispatcher.php @@ -131,6 +131,16 @@ class ContainerAwareEventDispatcher extends EventDispatcher return parent::getListeners($eventName); } + /** + * {@inheritdoc} + */ + public function getListenerPriority($eventName, $listener) + { + $this->lazyLoad($eventName); + + return parent::getListenerPriority($eventName, $listener); + } + /** * Adds a service as event subscriber. * diff --git a/vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php b/vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php index 7653ccf..35df816 100644 --- a/vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php +++ b/vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php @@ -99,6 +99,14 @@ class TraceableEventDispatcher implements TraceableEventDispatcherInterface return $this->dispatcher->getListeners($eventName); } + /** + * {@inheritdoc} + */ + public function getListenerPriority($eventName, $listener) + { + return $this->dispatcher->getListenerPriority($eventName, $listener); + } + /** * {@inheritdoc} */ @@ -186,6 +194,8 @@ class TraceableEventDispatcher implements TraceableEventDispatcherInterface } } + uasort($notCalled, array($this, 'sortListenersByPriority')); + return $notCalled; } @@ -285,6 +295,7 @@ class TraceableEventDispatcher implements TraceableEventDispatcherInterface { $info = array( 'event' => $eventName, + 'priority' => $this->getListenerPriority($eventName, $listener), ); if ($listener instanceof \Closure) { $info += array( @@ -332,4 +343,25 @@ class TraceableEventDispatcher implements TraceableEventDispatcherInterface return $info; } + + private function sortListenersByPriority($a, $b) + { + if (is_int($a['priority']) && !is_int($b['priority'])) { + return 1; + } + + if (!is_int($a['priority']) && is_int($b['priority'])) { + return -1; + } + + if ($a['priority'] === $b['priority']) { + return 0; + } + + if ($a['priority'] > $b['priority']) { + return -1; + } + + return 1; + } } diff --git a/vendor/symfony/event-dispatcher/EventDispatcher.php b/vendor/symfony/event-dispatcher/EventDispatcher.php index b54d07b..65c5cb6 100644 --- a/vendor/symfony/event-dispatcher/EventDispatcher.php +++ b/vendor/symfony/event-dispatcher/EventDispatcher.php @@ -75,6 +75,29 @@ class EventDispatcher implements EventDispatcherInterface return array_filter($this->sorted); } + /** + * Gets the listener priority for a specific event. + * + * Returns null if the event or the listener does not exist. + * + * @param string $eventName The name of the event + * @param callable $listener The listener + * + * @return int|null The event listener priority + */ + public function getListenerPriority($eventName, $listener) + { + if (!isset($this->listeners[$eventName])) { + return; + } + + foreach ($this->listeners[$eventName] as $priority => $listeners) { + if (false !== ($key = array_search($listener, $listeners, true))) { + return $priority; + } + } + } + /** * {@inheritdoc} */ @@ -169,8 +192,6 @@ class EventDispatcher implements EventDispatcherInterface */ private function sortListeners($eventName) { - $this->sorted[$eventName] = array(); - krsort($this->listeners[$eventName]); $this->sorted[$eventName] = call_user_func_array('array_merge', $this->listeners[$eventName]); } diff --git a/vendor/symfony/event-dispatcher/EventSubscriberInterface.php b/vendor/symfony/event-dispatcher/EventSubscriberInterface.php index ec53e54..8af7789 100644 --- a/vendor/symfony/event-dispatcher/EventSubscriberInterface.php +++ b/vendor/symfony/event-dispatcher/EventSubscriberInterface.php @@ -38,7 +38,7 @@ interface EventSubscriberInterface * * * array('eventName' => 'methodName') * * array('eventName' => array('methodName', $priority)) - * * array('eventName' => array(array('methodName1', $priority), array('methodName2')) + * * array('eventName' => array(array('methodName1', $priority), array('methodName2'))) * * @return array The event names to listen to */ diff --git a/vendor/symfony/event-dispatcher/ImmutableEventDispatcher.php b/vendor/symfony/event-dispatcher/ImmutableEventDispatcher.php index 7ef9ece..13e8572 100644 --- a/vendor/symfony/event-dispatcher/ImmutableEventDispatcher.php +++ b/vendor/symfony/event-dispatcher/ImmutableEventDispatcher.php @@ -83,6 +83,14 @@ class ImmutableEventDispatcher implements EventDispatcherInterface return $this->dispatcher->getListeners($eventName); } + /** + * {@inheritdoc} + */ + public function getListenerPriority($eventName, $listener) + { + return $this->dispatcher->getListenerPriority($eventName, $listener); + } + /** * {@inheritdoc} */ diff --git a/vendor/symfony/event-dispatcher/LICENSE b/vendor/symfony/event-dispatcher/LICENSE index 43028bc..12a7453 100644 --- a/vendor/symfony/event-dispatcher/LICENSE +++ b/vendor/symfony/event-dispatcher/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2015 Fabien Potencier +Copyright (c) 2004-2016 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/vendor/symfony/event-dispatcher/Tests/AbstractEventDispatcherTest.php b/vendor/symfony/event-dispatcher/Tests/AbstractEventDispatcherTest.php index 2e4c3fd..0169ede 100644 --- a/vendor/symfony/event-dispatcher/Tests/AbstractEventDispatcherTest.php +++ b/vendor/symfony/event-dispatcher/Tests/AbstractEventDispatcherTest.php @@ -108,6 +108,20 @@ abstract class AbstractEventDispatcherTest extends \PHPUnit_Framework_TestCase $this->assertSame($expected, $this->dispatcher->getListeners()); } + public function testGetListenerPriority() + { + $listener1 = new TestEventListener(); + $listener2 = new TestEventListener(); + + $this->dispatcher->addListener('pre.foo', $listener1, -10); + $this->dispatcher->addListener('pre.foo', $listener2); + + $this->assertSame(-10, $this->dispatcher->getListenerPriority('pre.foo', $listener1)); + $this->assertSame(0, $this->dispatcher->getListenerPriority('pre.foo', $listener2)); + $this->assertNull($this->dispatcher->getListenerPriority('pre.bar', $listener2)); + $this->assertNull($this->dispatcher->getListenerPriority('pre.foo', function () {})); + } + public function testDispatch() { $this->dispatcher->addListener('pre.foo', array($this->listener, 'preFoo')); diff --git a/vendor/symfony/event-dispatcher/Tests/ContainerAwareEventDispatcherTest.php b/vendor/symfony/event-dispatcher/Tests/ContainerAwareEventDispatcherTest.php index 6f2fbcb..18a4b3f 100644 --- a/vendor/symfony/event-dispatcher/Tests/ContainerAwareEventDispatcherTest.php +++ b/vendor/symfony/event-dispatcher/Tests/ContainerAwareEventDispatcherTest.php @@ -92,6 +92,7 @@ class ContainerAwareEventDispatcherTest extends AbstractEventDispatcherTest /** * @expectedException \InvalidArgumentException + * @group legacy */ public function testTriggerAListenerServiceOutOfScope() { @@ -111,6 +112,9 @@ class ContainerAwareEventDispatcherTest extends AbstractEventDispatcherTest $dispatcher->dispatch('onEvent'); } + /** + * @group legacy + */ public function testReEnteringAScope() { $event = new Event(); diff --git a/vendor/symfony/event-dispatcher/Tests/Debug/TraceableEventDispatcherTest.php b/vendor/symfony/event-dispatcher/Tests/Debug/TraceableEventDispatcherTest.php index 4aa6226..1d4a8c8 100644 --- a/vendor/symfony/event-dispatcher/Tests/Debug/TraceableEventDispatcherTest.php +++ b/vendor/symfony/event-dispatcher/Tests/Debug/TraceableEventDispatcherTest.php @@ -25,7 +25,7 @@ class TraceableEventDispatcherTest extends \PHPUnit_Framework_TestCase $dispatcher = new EventDispatcher(); $tdispatcher = new TraceableEventDispatcher($dispatcher, new Stopwatch()); - $tdispatcher->addListener('foo', $listener = function () {; }); + $tdispatcher->addListener('foo', $listener = function () {}); $listeners = $dispatcher->getListeners('foo'); $this->assertCount(1, $listeners); $this->assertSame($listener, $listeners[0]); @@ -39,7 +39,7 @@ class TraceableEventDispatcherTest extends \PHPUnit_Framework_TestCase $dispatcher = new EventDispatcher(); $tdispatcher = new TraceableEventDispatcher($dispatcher, new Stopwatch()); - $tdispatcher->addListener('foo', $listener = function () {; }); + $tdispatcher->addListener('foo', $listener = function () {}); $this->assertSame($dispatcher->getListeners('foo'), $tdispatcher->getListeners('foo')); } @@ -51,7 +51,7 @@ class TraceableEventDispatcherTest extends \PHPUnit_Framework_TestCase $this->assertFalse($dispatcher->hasListeners('foo')); $this->assertFalse($tdispatcher->hasListeners('foo')); - $tdispatcher->addListener('foo', $listener = function () {; }); + $tdispatcher->addListener('foo', $listener = function () {}); $this->assertTrue($dispatcher->hasListeners('foo')); $this->assertTrue($tdispatcher->hasListeners('foo')); } @@ -76,14 +76,14 @@ class TraceableEventDispatcherTest extends \PHPUnit_Framework_TestCase { $dispatcher = new EventDispatcher(); $tdispatcher = new TraceableEventDispatcher($dispatcher, new Stopwatch()); - $tdispatcher->addListener('foo', $listener = function () {; }); + $tdispatcher->addListener('foo', $listener = function () {}); $this->assertEquals(array(), $tdispatcher->getCalledListeners()); - $this->assertEquals(array('foo.closure' => array('event' => 'foo', 'type' => 'Closure', 'pretty' => 'closure')), $tdispatcher->getNotCalledListeners()); + $this->assertEquals(array('foo.closure' => array('event' => 'foo', 'type' => 'Closure', 'pretty' => 'closure', 'priority' => 0)), $tdispatcher->getNotCalledListeners()); $tdispatcher->dispatch('foo'); - $this->assertEquals(array('foo.closure' => array('event' => 'foo', 'type' => 'Closure', 'pretty' => 'closure')), $tdispatcher->getCalledListeners()); + $this->assertEquals(array('foo.closure' => array('event' => 'foo', 'type' => 'Closure', 'pretty' => 'closure', 'priority' => null)), $tdispatcher->getCalledListeners()); $this->assertEquals(array(), $tdispatcher->getNotCalledListeners()); } @@ -107,8 +107,8 @@ class TraceableEventDispatcherTest extends \PHPUnit_Framework_TestCase $dispatcher = new EventDispatcher(); $tdispatcher = new TraceableEventDispatcher($dispatcher, new Stopwatch(), $logger); - $tdispatcher->addListener('foo', $listener1 = function () {; }); - $tdispatcher->addListener('foo', $listener2 = function () {; }); + $tdispatcher->addListener('foo', $listener1 = function () {}); + $tdispatcher->addListener('foo', $listener2 = function () {}); $logger->expects($this->at(0))->method('debug')->with('Notified event "foo" to listener "closure".'); $logger->expects($this->at(1))->method('debug')->with('Notified event "foo" to listener "closure".'); @@ -123,7 +123,7 @@ class TraceableEventDispatcherTest extends \PHPUnit_Framework_TestCase $dispatcher = new EventDispatcher(); $tdispatcher = new TraceableEventDispatcher($dispatcher, new Stopwatch(), $logger); $tdispatcher->addListener('foo', $listener1 = function (Event $event) { $event->stopPropagation(); }); - $tdispatcher->addListener('foo', $listener2 = function () {; }); + $tdispatcher->addListener('foo', $listener2 = function () {}); $logger->expects($this->at(0))->method('debug')->with('Notified event "foo" to listener "closure".'); $logger->expects($this->at(1))->method('debug')->with('Listener "closure" stopped propagation of the event "foo".'); diff --git a/vendor/symfony/event-dispatcher/composer.json b/vendor/symfony/event-dispatcher/composer.json index 8a6a750..282b770 100644 --- a/vendor/symfony/event-dispatcher/composer.json +++ b/vendor/symfony/event-dispatcher/composer.json @@ -19,10 +19,10 @@ "php": ">=5.3.9" }, "require-dev": { - "symfony/dependency-injection": "~2.6", - "symfony/expression-language": "~2.6", - "symfony/config": "~2.0,>=2.0.5", - "symfony/stopwatch": "~2.3", + "symfony/dependency-injection": "~2.6|~3.0.0", + "symfony/expression-language": "~2.6|~3.0.0", + "symfony/config": "~2.0,>=2.0.5|~3.0.0", + "symfony/stopwatch": "~2.3|~3.0.0", "psr/log": "~1.0" }, "suggest": { @@ -30,12 +30,15 @@ "symfony/http-kernel": "" }, "autoload": { - "psr-4": { "Symfony\\Component\\EventDispatcher\\": "" } + "psr-4": { "Symfony\\Component\\EventDispatcher\\": "" }, + "exclude-from-classmap": [ + "/Tests/" + ] }, "minimum-stability": "dev", "extra": { "branch-alias": { - "dev-master": "2.7-dev" + "dev-master": "2.8-dev" } } } diff --git a/vendor/symfony/finder/Iterator/SortableIterator.php b/vendor/symfony/finder/Iterator/SortableIterator.php index b32ac8d..fa34580 100644 --- a/vendor/symfony/finder/Iterator/SortableIterator.php +++ b/vendor/symfony/finder/Iterator/SortableIterator.php @@ -55,15 +55,15 @@ class SortableIterator implements \IteratorAggregate }; } elseif (self::SORT_BY_ACCESSED_TIME === $sort) { $this->sort = function ($a, $b) { - return ($a->getATime() - $b->getATime()); + return $a->getATime() - $b->getATime(); }; } elseif (self::SORT_BY_CHANGED_TIME === $sort) { $this->sort = function ($a, $b) { - return ($a->getCTime() - $b->getCTime()); + return $a->getCTime() - $b->getCTime(); }; } elseif (self::SORT_BY_MODIFIED_TIME === $sort) { $this->sort = function ($a, $b) { - return ($a->getMTime() - $b->getMTime()); + return $a->getMTime() - $b->getMTime(); }; } elseif (is_callable($sort)) { $this->sort = $sort; diff --git a/vendor/symfony/finder/LICENSE b/vendor/symfony/finder/LICENSE index 43028bc..12a7453 100644 --- a/vendor/symfony/finder/LICENSE +++ b/vendor/symfony/finder/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2015 Fabien Potencier +Copyright (c) 2004-2016 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/vendor/symfony/finder/Tests/Iterator/MockSplFileInfo.php b/vendor/symfony/finder/Tests/Iterator/MockSplFileInfo.php index a895350..ec3f643 100644 --- a/vendor/symfony/finder/Tests/Iterator/MockSplFileInfo.php +++ b/vendor/symfony/finder/Tests/Iterator/MockSplFileInfo.php @@ -52,7 +52,7 @@ class MockSplFileInfo extends \SplFileInfo { if (null === $this->type) { return false !== strpos($this->getFilename(), 'file'); - }; + } return self::TYPE_FILE === $this->type; } diff --git a/vendor/symfony/finder/composer.json b/vendor/symfony/finder/composer.json index da8ac00..ec0f77a 100644 --- a/vendor/symfony/finder/composer.json +++ b/vendor/symfony/finder/composer.json @@ -19,7 +19,10 @@ "php": ">=5.3.9" }, "autoload": { - "psr-4": { "Symfony\\Component\\Finder\\": "" } + "psr-4": { "Symfony\\Component\\Finder\\": "" }, + "exclude-from-classmap": [ + "/Tests/" + ] }, "minimum-stability": "dev", "extra": { diff --git a/vendor/symfony/http-foundation/BinaryFileResponse.php b/vendor/symfony/http-foundation/BinaryFileResponse.php index ca407b4..108f040 100644 --- a/vendor/symfony/http-foundation/BinaryFileResponse.php +++ b/vendor/symfony/http-foundation/BinaryFileResponse.php @@ -193,6 +193,10 @@ class BinaryFileResponse extends Response // Use X-Sendfile, do not send any content. $type = $request->headers->get('X-Sendfile-Type'); $path = $this->file->getRealPath(); + // Fall back to scheme://path for stream wrapped locations. + if (false === $path) { + $path = $this->file->getPathname(); + } if (strtolower($type) == 'x-accel-redirect') { // Do X-Accel-Mapping substitutions. // @link http://wiki.nginx.org/X-accel#X-Accel-Redirect diff --git a/vendor/symfony/http-foundation/HeaderBag.php b/vendor/symfony/http-foundation/HeaderBag.php index dc12000..29bac5e 100644 --- a/vendor/symfony/http-foundation/HeaderBag.php +++ b/vendor/symfony/http-foundation/HeaderBag.php @@ -111,7 +111,7 @@ class HeaderBag implements \IteratorAggregate, \Countable */ public function get($key, $default = null, $first = true) { - $key = strtr(strtolower($key), '_', '-'); + $key = str_replace('_', '-', strtolower($key)); if (!array_key_exists($key, $this->headers)) { if (null === $default) { @@ -137,7 +137,7 @@ class HeaderBag implements \IteratorAggregate, \Countable */ public function set($key, $values, $replace = true) { - $key = strtr(strtolower($key), '_', '-'); + $key = str_replace('_', '-', strtolower($key)); $values = array_values((array) $values); @@ -161,7 +161,7 @@ class HeaderBag implements \IteratorAggregate, \Countable */ public function has($key) { - return array_key_exists(strtr(strtolower($key), '_', '-'), $this->headers); + return array_key_exists(str_replace('_', '-', strtolower($key)), $this->headers); } /** @@ -184,7 +184,7 @@ class HeaderBag implements \IteratorAggregate, \Countable */ public function remove($key) { - $key = strtr(strtolower($key), '_', '-'); + $key = str_replace('_', '-', strtolower($key)); unset($this->headers[$key]); diff --git a/vendor/symfony/http-foundation/JsonResponse.php b/vendor/symfony/http-foundation/JsonResponse.php index 5399d1b..8df683d 100644 --- a/vendor/symfony/http-foundation/JsonResponse.php +++ b/vendor/symfony/http-foundation/JsonResponse.php @@ -106,7 +106,7 @@ class JsonResponse extends Response // PHP 5.3 triggers annoying warnings for some // types that can't be serialized as JSON (INF, resources, etc.) // but doesn't provide the JsonSerializable interface. - set_error_handler('var_dump', 0); + set_error_handler(function () { return false; }); $data = @json_encode($data, $this->encodingOptions); } else { // PHP 5.4 and up wrap exceptions thrown by JsonSerializable diff --git a/vendor/symfony/http-foundation/LICENSE b/vendor/symfony/http-foundation/LICENSE index 43028bc..12a7453 100644 --- a/vendor/symfony/http-foundation/LICENSE +++ b/vendor/symfony/http-foundation/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2015 Fabien Potencier +Copyright (c) 2004-2016 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/vendor/symfony/http-foundation/ParameterBag.php b/vendor/symfony/http-foundation/ParameterBag.php index ecc0de1..2cfebfb 100644 --- a/vendor/symfony/http-foundation/ParameterBag.php +++ b/vendor/symfony/http-foundation/ParameterBag.php @@ -172,7 +172,7 @@ class ParameterBag implements \IteratorAggregate, \Countable * Returns the alphabetic characters of the parameter value. * * @param string $key The parameter key - * @param mixed $default The default value if the parameter key does not exist + * @param string $default The default value if the parameter key does not exist * @param bool $deep If true, a path like foo[bar] will find deeper items * * @return string The filtered value @@ -186,7 +186,7 @@ class ParameterBag implements \IteratorAggregate, \Countable * Returns the alphabetic characters and digits of the parameter value. * * @param string $key The parameter key - * @param mixed $default The default value if the parameter key does not exist + * @param string $default The default value if the parameter key does not exist * @param bool $deep If true, a path like foo[bar] will find deeper items * * @return string The filtered value @@ -200,7 +200,7 @@ class ParameterBag implements \IteratorAggregate, \Countable * Returns the digits of the parameter value. * * @param string $key The parameter key - * @param mixed $default The default value if the parameter key does not exist + * @param string $default The default value if the parameter key does not exist * @param bool $deep If true, a path like foo[bar] will find deeper items * * @return string The filtered value @@ -215,7 +215,7 @@ class ParameterBag implements \IteratorAggregate, \Countable * Returns the parameter value converted to integer. * * @param string $key The parameter key - * @param mixed $default The default value if the parameter key does not exist + * @param int $default The default value if the parameter key does not exist * @param bool $deep If true, a path like foo[bar] will find deeper items * * @return int The filtered value diff --git a/vendor/symfony/http-foundation/Response.php b/vendor/symfony/http-foundation/Response.php index cb706d5..97e1151 100644 --- a/vendor/symfony/http-foundation/Response.php +++ b/vendor/symfony/http-foundation/Response.php @@ -329,16 +329,16 @@ class Response return $this; } - // status - header(sprintf('HTTP/%s %s %s', $this->version, $this->statusCode, $this->statusText), true, $this->statusCode); - // headers foreach ($this->headers->allPreserveCase() as $name => $values) { foreach ($values as $value) { - header($name.': '.$value, false, $this->statusCode); + header($name.': '.$value, false); } } + // status + header(sprintf('HTTP/%s %s %s', $this->version, $this->statusCode, $this->statusText), true, $this->statusCode); + // cookies foreach ($this->headers->getCookies() as $cookie) { setcookie($cookie->getName(), $cookie->getValue(), $cookie->getExpiresTime(), $cookie->getPath(), $cookie->getDomain(), $cookie->isSecure(), $cookie->isHttpOnly()); @@ -455,7 +455,7 @@ class Response } if (null === $text) { - $this->statusText = isset(self::$statusTexts[$code]) ? self::$statusTexts[$code] : ''; + $this->statusText = isset(self::$statusTexts[$code]) ? self::$statusTexts[$code] : 'unknown status'; return $this; } @@ -972,7 +972,7 @@ class Response * Sets the Vary header. * * @param string|array $headers - * @param bool $replace Whether to replace the actual value of not (true by default) + * @param bool $replace Whether to replace the actual value or not (true by default) * * @return Response */ diff --git a/vendor/symfony/http-foundation/ResponseHeaderBag.php b/vendor/symfony/http-foundation/ResponseHeaderBag.php index 328bf49..06534aa 100644 --- a/vendor/symfony/http-foundation/ResponseHeaderBag.php +++ b/vendor/symfony/http-foundation/ResponseHeaderBag.php @@ -99,7 +99,7 @@ class ResponseHeaderBag extends HeaderBag { parent::set($key, $values, $replace); - $uniqueKey = strtr(strtolower($key), '_', '-'); + $uniqueKey = str_replace('_', '-', strtolower($key)); $this->headerNames[$uniqueKey] = $key; // ensure the cache-control header has sensible defaults @@ -118,7 +118,7 @@ class ResponseHeaderBag extends HeaderBag { parent::remove($key); - $uniqueKey = strtr(strtolower($key), '_', '-'); + $uniqueKey = str_replace('_', '-', strtolower($key)); unset($this->headerNames[$uniqueKey]); if ('cache-control' === $uniqueKey) { diff --git a/vendor/symfony/http-foundation/Session/Storage/Handler/NativeFileSessionHandler.php b/vendor/symfony/http-foundation/Session/Storage/Handler/NativeFileSessionHandler.php index f39235c..c00835d 100644 --- a/vendor/symfony/http-foundation/Session/Storage/Handler/NativeFileSessionHandler.php +++ b/vendor/symfony/http-foundation/Session/Storage/Handler/NativeFileSessionHandler.php @@ -48,8 +48,8 @@ class NativeFileSessionHandler extends NativeSessionHandler $baseDir = ltrim(strrchr($savePath, ';'), ';'); } - if ($baseDir && !is_dir($baseDir)) { - mkdir($baseDir, 0777, true); + if ($baseDir && !is_dir($baseDir) && !@mkdir($baseDir, 0777, true) && !is_dir($baseDir)) { + throw new \RuntimeException(sprintf('Session Storage was not able to create directory "%s"', $baseDir)); } ini_set('session.save_path', $savePath); diff --git a/vendor/symfony/http-foundation/Session/Storage/MockFileSessionStorage.php b/vendor/symfony/http-foundation/Session/Storage/MockFileSessionStorage.php index 1f4117b..00807cf 100644 --- a/vendor/symfony/http-foundation/Session/Storage/MockFileSessionStorage.php +++ b/vendor/symfony/http-foundation/Session/Storage/MockFileSessionStorage.php @@ -42,8 +42,8 @@ class MockFileSessionStorage extends MockArraySessionStorage $savePath = sys_get_temp_dir(); } - if (!is_dir($savePath)) { - mkdir($savePath, 0777, true); + if (!is_dir($savePath) && !@mkdir($savePath, 0777, true) && !is_dir($savePath)) { + throw new \RuntimeException(sprintf('Session Storage was not able to create directory "%s"', $savePath)); } $this->savePath = $savePath; diff --git a/vendor/symfony/http-foundation/Session/Storage/NativeSessionStorage.php b/vendor/symfony/http-foundation/Session/Storage/NativeSessionStorage.php index fd03dc8..137f0e8 100644 --- a/vendor/symfony/http-foundation/Session/Storage/NativeSessionStorage.php +++ b/vendor/symfony/http-foundation/Session/Storage/NativeSessionStorage.php @@ -351,7 +351,7 @@ class NativeSessionStorage implements SessionStorageInterface * session.save_handler and session.save_path e.g. * * ini_set('session.save_handler', 'files'); - * ini_set('session.save_path', /tmp'); + * ini_set('session.save_path', '/tmp'); * * or pass in a NativeSessionHandler instance which configures session.save_handler in the * constructor, for a template see NativeFileSessionHandler or use handlers in diff --git a/vendor/symfony/http-foundation/Session/Storage/Proxy/AbstractProxy.php b/vendor/symfony/http-foundation/Session/Storage/Proxy/AbstractProxy.php index 1036818..463677b 100644 --- a/vendor/symfony/http-foundation/Session/Storage/Proxy/AbstractProxy.php +++ b/vendor/symfony/http-foundation/Session/Storage/Proxy/AbstractProxy.php @@ -52,7 +52,7 @@ abstract class AbstractProxy */ public function isSessionHandlerInterface() { - return ($this instanceof \SessionHandlerInterface); + return $this instanceof \SessionHandlerInterface; } /** diff --git a/vendor/symfony/http-foundation/Tests/BinaryFileResponseTest.php b/vendor/symfony/http-foundation/Tests/BinaryFileResponseTest.php index 550014d..d7744ff 100644 --- a/vendor/symfony/http-foundation/Tests/BinaryFileResponseTest.php +++ b/vendor/symfony/http-foundation/Tests/BinaryFileResponseTest.php @@ -153,13 +153,16 @@ class BinaryFileResponseTest extends ResponseTestCase ); } - public function testXSendfile() + /** + * @dataProvider provideXSendfileFiles + */ + public function testXSendfile($file) { $request = Request::create('/'); $request->headers->set('X-Sendfile-Type', 'X-Sendfile'); BinaryFileResponse::trustXSendfileTypeHeader(); - $response = BinaryFileResponse::create(__DIR__.'/../README.md', 200, array('Content-Type' => 'application/octet-stream')); + $response = BinaryFileResponse::create($file, 200, array('Content-Type' => 'application/octet-stream')); $response->prepare($request); $this->expectOutputString(''); @@ -168,6 +171,14 @@ class BinaryFileResponseTest extends ResponseTestCase $this->assertContains('README.md', $response->headers->get('X-Sendfile')); } + public function provideXSendfileFiles() + { + return array( + array(__DIR__.'/../README.md'), + array('file://'.__DIR__.'/../README.md'), + ); + } + /** * @dataProvider getSampleXAccelMappings */ diff --git a/vendor/symfony/http-foundation/Tests/CookieTest.php b/vendor/symfony/http-foundation/Tests/CookieTest.php index b3bd4f6..fd90103 100644 --- a/vendor/symfony/http-foundation/Tests/CookieTest.php +++ b/vendor/symfony/http-foundation/Tests/CookieTest.php @@ -41,7 +41,6 @@ class CookieTest extends \PHPUnit_Framework_TestCase /** * @dataProvider invalidNames * @expectedException \InvalidArgumentException - * @covers Symfony\Component\HttpFoundation\Cookie::__construct */ public function testInstantiationThrowsExceptionIfCookieNameContainsInvalidCharacters($name) { @@ -56,9 +55,6 @@ class CookieTest extends \PHPUnit_Framework_TestCase $cookie = new Cookie('MyCookie', 'foo', 'bar'); } - /** - * @covers Symfony\Component\HttpFoundation\Cookie::getValue - */ public function testGetValue() { $value = 'MyValue'; diff --git a/vendor/symfony/http-foundation/Tests/HeaderBagTest.php b/vendor/symfony/http-foundation/Tests/HeaderBagTest.php index ada9ac0..d4d02d9 100644 --- a/vendor/symfony/http-foundation/Tests/HeaderBagTest.php +++ b/vendor/symfony/http-foundation/Tests/HeaderBagTest.php @@ -15,9 +15,6 @@ use Symfony\Component\HttpFoundation\HeaderBag; class HeaderBagTest extends \PHPUnit_Framework_TestCase { - /** - * @covers Symfony\Component\HttpFoundation\HeaderBag::__construct - */ public function testConstructor() { $bag = new HeaderBag(array('foo' => 'bar')); @@ -67,9 +64,6 @@ class HeaderBagTest extends \PHPUnit_Framework_TestCase $this->assertEquals('#a', $bag->getCacheControlDirective('public')); } - /** - * @covers Symfony\Component\HttpFoundation\HeaderBag::all - */ public function testAll() { $bag = new HeaderBag(array('foo' => 'bar')); @@ -79,9 +73,6 @@ class HeaderBagTest extends \PHPUnit_Framework_TestCase $this->assertEquals(array('foo' => array('BAR')), $bag->all(), '->all() gets all the input key are lower case'); } - /** - * @covers Symfony\Component\HttpFoundation\HeaderBag::replace - */ public function testReplace() { $bag = new HeaderBag(array('foo' => 'bar')); @@ -91,9 +82,6 @@ class HeaderBagTest extends \PHPUnit_Framework_TestCase $this->assertFalse($bag->has('foo'), '->replace() overrides previously set the input'); } - /** - * @covers Symfony\Component\HttpFoundation\HeaderBag::get - */ public function testGet() { $bag = new HeaderBag(array('foo' => 'bar', 'fuzz' => 'bizz')); @@ -119,9 +107,6 @@ class HeaderBagTest extends \PHPUnit_Framework_TestCase $this->assertEquals(array('value'), $bag->get('foo', 'nope', false), 'assoc indices of multi-valued headers are ignored'); } - /** - * @covers Symfony\Component\HttpFoundation\HeaderBag::contains - */ public function testContains() { $bag = new HeaderBag(array('foo' => 'bar', 'fuzz' => 'bizz')); @@ -186,9 +171,6 @@ class HeaderBagTest extends \PHPUnit_Framework_TestCase $this->assertEquals(10, $bag->getCacheControlDirective('max-age')); } - /** - * @covers Symfony\Component\HttpFoundation\HeaderBag::getIterator - */ public function testGetIterator() { $headers = array('foo' => 'bar', 'hello' => 'world', 'third' => 'charm'); @@ -203,9 +185,6 @@ class HeaderBagTest extends \PHPUnit_Framework_TestCase $this->assertEquals(count($headers), $i); } - /** - * @covers Symfony\Component\HttpFoundation\HeaderBag::count - */ public function testCount() { $headers = array('foo' => 'bar', 'HELLO' => 'WORLD'); diff --git a/vendor/symfony/http-foundation/Tests/ParameterBagTest.php b/vendor/symfony/http-foundation/Tests/ParameterBagTest.php index 16fedbf..b0e21ed 100644 --- a/vendor/symfony/http-foundation/Tests/ParameterBagTest.php +++ b/vendor/symfony/http-foundation/Tests/ParameterBagTest.php @@ -15,17 +15,11 @@ use Symfony\Component\HttpFoundation\ParameterBag; class ParameterBagTest extends \PHPUnit_Framework_TestCase { - /** - * @covers Symfony\Component\HttpFoundation\ParameterBag::__construct - */ public function testConstructor() { $this->testAll(); } - /** - * @covers Symfony\Component\HttpFoundation\ParameterBag::all - */ public function testAll() { $bag = new ParameterBag(array('foo' => 'bar')); @@ -54,9 +48,6 @@ class ParameterBagTest extends \PHPUnit_Framework_TestCase $this->assertEquals(array('foo' => 'bar'), $bag->all()); } - /** - * @covers Symfony\Component\HttpFoundation\ParameterBag::replace - */ public function testReplace() { $bag = new ParameterBag(array('foo' => 'bar')); @@ -66,9 +57,6 @@ class ParameterBagTest extends \PHPUnit_Framework_TestCase $this->assertFalse($bag->has('foo'), '->replace() overrides previously set the input'); } - /** - * @covers Symfony\Component\HttpFoundation\ParameterBag::get - */ public function testGet() { $bag = new ParameterBag(array('foo' => 'bar', 'null' => null)); @@ -116,9 +104,6 @@ class ParameterBagTest extends \PHPUnit_Framework_TestCase $this->assertEquals('default', $bag->get('bar[moo][foo]', 'default', true)); } - /** - * @covers Symfony\Component\HttpFoundation\ParameterBag::set - */ public function testSet() { $bag = new ParameterBag(array()); @@ -130,9 +115,6 @@ class ParameterBagTest extends \PHPUnit_Framework_TestCase $this->assertEquals('baz', $bag->get('foo'), '->set() overrides previously set parameter'); } - /** - * @covers Symfony\Component\HttpFoundation\ParameterBag::has - */ public function testHas() { $bag = new ParameterBag(array('foo' => 'bar')); @@ -141,9 +123,6 @@ class ParameterBagTest extends \PHPUnit_Framework_TestCase $this->assertFalse($bag->has('unknown'), '->has() return false if a parameter is not defined'); } - /** - * @covers Symfony\Component\HttpFoundation\ParameterBag::getAlpha - */ public function testGetAlpha() { $bag = new ParameterBag(array('word' => 'foo_BAR_012')); @@ -152,9 +131,6 @@ class ParameterBagTest extends \PHPUnit_Framework_TestCase $this->assertEquals('', $bag->getAlpha('unknown'), '->getAlpha() returns empty string if a parameter is not defined'); } - /** - * @covers Symfony\Component\HttpFoundation\ParameterBag::getAlnum - */ public function testGetAlnum() { $bag = new ParameterBag(array('word' => 'foo_BAR_012')); @@ -163,9 +139,6 @@ class ParameterBagTest extends \PHPUnit_Framework_TestCase $this->assertEquals('', $bag->getAlnum('unknown'), '->getAlnum() returns empty string if a parameter is not defined'); } - /** - * @covers Symfony\Component\HttpFoundation\ParameterBag::getDigits - */ public function testGetDigits() { $bag = new ParameterBag(array('word' => 'foo_BAR_012')); @@ -174,9 +147,6 @@ class ParameterBagTest extends \PHPUnit_Framework_TestCase $this->assertEquals('', $bag->getDigits('unknown'), '->getDigits() returns empty string if a parameter is not defined'); } - /** - * @covers Symfony\Component\HttpFoundation\ParameterBag::getInt - */ public function testGetInt() { $bag = new ParameterBag(array('digits' => '0123')); @@ -185,9 +155,6 @@ class ParameterBagTest extends \PHPUnit_Framework_TestCase $this->assertEquals(0, $bag->getInt('unknown'), '->getInt() returns zero if a parameter is not defined'); } - /** - * @covers Symfony\Component\HttpFoundation\ParameterBag::filter - */ public function testFilter() { $bag = new ParameterBag(array( @@ -223,9 +190,6 @@ class ParameterBagTest extends \PHPUnit_Framework_TestCase $this->assertEquals(array('bang'), $bag->filter('array', '', false), '->filter() gets a value of parameter as an array'); } - /** - * @covers Symfony\Component\HttpFoundation\ParameterBag::getIterator - */ public function testGetIterator() { $parameters = array('foo' => 'bar', 'hello' => 'world'); @@ -240,9 +204,6 @@ class ParameterBagTest extends \PHPUnit_Framework_TestCase $this->assertEquals(count($parameters), $i); } - /** - * @covers Symfony\Component\HttpFoundation\ParameterBag::count - */ public function testCount() { $parameters = array('foo' => 'bar', 'hello' => 'world'); @@ -251,9 +212,6 @@ class ParameterBagTest extends \PHPUnit_Framework_TestCase $this->assertEquals(count($parameters), count($bag)); } - /** - * @covers Symfony\Component\HttpFoundation\ParameterBag::getBoolean - */ public function testGetBoolean() { $parameters = array('string_true' => 'true', 'string_false' => 'false'); diff --git a/vendor/symfony/http-foundation/Tests/RequestTest.php b/vendor/symfony/http-foundation/Tests/RequestTest.php index 15f262e..202c6e8 100644 --- a/vendor/symfony/http-foundation/Tests/RequestTest.php +++ b/vendor/symfony/http-foundation/Tests/RequestTest.php @@ -17,17 +17,11 @@ use Symfony\Component\HttpFoundation\Request; class RequestTest extends \PHPUnit_Framework_TestCase { - /** - * @covers Symfony\Component\HttpFoundation\Request::__construct - */ public function testConstructor() { $this->testInitialize(); } - /** - * @covers Symfony\Component\HttpFoundation\Request::initialize - */ public function testInitialize() { $request = new Request(); @@ -94,9 +88,6 @@ class RequestTest extends \PHPUnit_Framework_TestCase $this->assertEquals('pl', $locale); } - /** - * @covers Symfony\Component\HttpFoundation\Request::create - */ public function testCreate() { $request = Request::create('http://test.com/foo?bar=baz'); @@ -224,7 +215,7 @@ class RequestTest extends \PHPUnit_Framework_TestCase $this->assertEquals('/?foo', $request->getRequestUri()); $this->assertEquals(array('foo' => ''), $request->query->all()); - ## assume rewrite rule: (.*) --> app/app.php ; app/ is a symlink to a symfony web/ directory + // assume rewrite rule: (.*) --> app/app.php; app/ is a symlink to a symfony web/ directory $request = Request::create('http://test.com/apparthotel-1234', 'GET', array(), array(), array(), array( 'DOCUMENT_ROOT' => '/var/www/www.test.com', @@ -240,9 +231,6 @@ class RequestTest extends \PHPUnit_Framework_TestCase $this->assertFalse($request->isSecure()); } - /** - * @covers Symfony\Component\HttpFoundation\Request::create - */ public function testCreateCheckPrecedence() { // server is used by default @@ -311,8 +299,6 @@ class RequestTest extends \PHPUnit_Framework_TestCase } /** - * @covers Symfony\Component\HttpFoundation\Request::getFormat - * @covers Symfony\Component\HttpFoundation\Request::setFormat * @dataProvider getFormatToMimeTypeMapProvider */ public function testGetFormatFromMimeType($format, $mimeTypes) @@ -327,9 +313,6 @@ class RequestTest extends \PHPUnit_Framework_TestCase } } - /** - * @covers Symfony\Component\HttpFoundation\Request::getFormat - */ public function testGetFormatFromMimeTypeWithParameters() { $request = new Request(); @@ -337,7 +320,6 @@ class RequestTest extends \PHPUnit_Framework_TestCase } /** - * @covers Symfony\Component\HttpFoundation\Request::getMimeType * @dataProvider getFormatToMimeTypeMapProvider */ public function testGetMimeTypeFromFormat($format, $mimeTypes) @@ -358,13 +340,10 @@ class RequestTest extends \PHPUnit_Framework_TestCase array('json', array('application/json', 'application/x-json')), array('xml', array('text/xml', 'application/xml', 'application/x-xml')), array('rdf', array('application/rdf+xml')), - array('atom',array('application/atom+xml')), + array('atom', array('application/atom+xml')), ); } - /** - * @covers Symfony\Component\HttpFoundation\Request::getUri - */ public function testGetUri() { $server = array(); @@ -480,9 +459,6 @@ class RequestTest extends \PHPUnit_Framework_TestCase $this->assertEquals('http://host:8080/ba%20se/index_dev.php/foo%20bar/in+fo?query=string', $request->getUri()); } - /** - * @covers Symfony\Component\HttpFoundation\Request::getUriForPath - */ public function testGetUriForPath() { $request = Request::create('http://test.com/foo?bar=baz'); @@ -610,14 +586,11 @@ class RequestTest extends \PHPUnit_Framework_TestCase ); } - /** - * @covers Symfony\Component\HttpFoundation\Request::getUserInfo - */ public function testGetUserInfo() { $request = new Request(); - $server['PHP_AUTH_USER'] = 'fabien'; + $server = array('PHP_AUTH_USER' => 'fabien'); $request->initialize(array(), array(), array(), array(), array(), $server); $this->assertEquals('fabien', $request->getUserInfo()); @@ -630,9 +603,6 @@ class RequestTest extends \PHPUnit_Framework_TestCase $this->assertEquals('0:0', $request->getUserInfo()); } - /** - * @covers Symfony\Component\HttpFoundation\Request::getSchemeAndHttpHost - */ public function testGetSchemeAndHttpHost() { $request = new Request(); @@ -657,8 +627,6 @@ class RequestTest extends \PHPUnit_Framework_TestCase } /** - * @covers Symfony\Component\HttpFoundation\Request::getQueryString - * @covers Symfony\Component\HttpFoundation\Request::normalizeQueryString * @dataProvider getQueryStringNormalizationData */ public function testGetQueryString($query, $expectedQuery, $msg) @@ -794,10 +762,6 @@ class RequestTest extends \PHPUnit_Framework_TestCase $request->getHost(); } - /** - * @covers Symfony\Component\HttpFoundation\Request::setMethod - * @covers Symfony\Component\HttpFoundation\Request::getMethod - */ public function testGetSetMethod() { $request = new Request(); diff --git a/vendor/symfony/http-foundation/Tests/ResponseHeaderBagTest.php b/vendor/symfony/http-foundation/Tests/ResponseHeaderBagTest.php index 96d9d55..8e487d6 100644 --- a/vendor/symfony/http-foundation/Tests/ResponseHeaderBagTest.php +++ b/vendor/symfony/http-foundation/Tests/ResponseHeaderBagTest.php @@ -20,7 +20,6 @@ use Symfony\Component\HttpFoundation\Cookie; class ResponseHeaderBagTest extends \PHPUnit_Framework_TestCase { /** - * @covers Symfony\Component\HttpFoundation\ResponseHeaderBag::allPreserveCase * @dataProvider provideAllPreserveCase */ public function testAllPreserveCase($headers, $expected) diff --git a/vendor/symfony/http-foundation/Tests/ResponseTest.php b/vendor/symfony/http-foundation/Tests/ResponseTest.php index 0f4ddfb..97674d4 100644 --- a/vendor/symfony/http-foundation/Tests/ResponseTest.php +++ b/vendor/symfony/http-foundation/Tests/ResponseTest.php @@ -695,7 +695,7 @@ class ResponseTest extends ResponseTestCase array('200', null, 'OK'), array('200', false, ''), array('200', 'foo', 'foo'), - array('199', null, ''), + array('199', null, 'unknown status'), array('199', false, ''), array('199', 'foo', 'foo'), ); diff --git a/vendor/symfony/http-foundation/Tests/Session/Attribute/AttributeBagTest.php b/vendor/symfony/http-foundation/Tests/Session/Attribute/AttributeBagTest.php index 5515003..8d0e7a5 100644 --- a/vendor/symfony/http-foundation/Tests/Session/Attribute/AttributeBagTest.php +++ b/vendor/symfony/http-foundation/Tests/Session/Attribute/AttributeBagTest.php @@ -169,9 +169,6 @@ class AttributeBagTest extends \PHPUnit_Framework_TestCase ); } - /** - * @covers Symfony\Component\HttpFoundation\Session\Attribute\AttributeBag::getIterator - */ public function testGetIterator() { $i = 0; @@ -183,9 +180,6 @@ class AttributeBagTest extends \PHPUnit_Framework_TestCase $this->assertEquals(count($this->array), $i); } - /** - * @covers Symfony\Component\HttpFoundation\Session\Attribute\AttributeBag::count - */ public function testCount() { $this->assertEquals(count($this->array), count($this->bag)); diff --git a/vendor/symfony/http-foundation/Tests/Session/Flash/FlashBagTest.php b/vendor/symfony/http-foundation/Tests/Session/Flash/FlashBagTest.php index 44ad61b..1dbbabd 100644 --- a/vendor/symfony/http-foundation/Tests/Session/Flash/FlashBagTest.php +++ b/vendor/symfony/http-foundation/Tests/Session/Flash/FlashBagTest.php @@ -133,7 +133,6 @@ class FlashBagTest extends \PHPUnit_Framework_TestCase } /** - * @covers Symfony\Component\HttpFoundation\Session\Flash\FlashBag::getIterator * @group legacy */ public function testLegacyGetIterator() diff --git a/vendor/symfony/http-foundation/Tests/Session/SessionTest.php b/vendor/symfony/http-foundation/Tests/Session/SessionTest.php index 385df1e..57460c6 100644 --- a/vendor/symfony/http-foundation/Tests/Session/SessionTest.php +++ b/vendor/symfony/http-foundation/Tests/Session/SessionTest.php @@ -190,9 +190,6 @@ class SessionTest extends \PHPUnit_Framework_TestCase $this->assertInstanceOf('Symfony\\Component\\HttpFoundation\\Session\\Flash\\FlashBagInterface', $this->session->getFlashBag()); } - /** - * @covers Symfony\Component\HttpFoundation\Session\Session::getIterator - */ public function testGetIterator() { $attributes = array('hello' => 'world', 'symfony' => 'rocks'); @@ -209,9 +206,6 @@ class SessionTest extends \PHPUnit_Framework_TestCase $this->assertEquals(count($attributes), $i); } - /** - * @covers \Symfony\Component\HttpFoundation\Session\Session::count - */ public function testGetCount() { $this->session->set('hello', 'world'); diff --git a/vendor/symfony/http-foundation/Tests/Session/Storage/Handler/MongoDbSessionHandlerTest.php b/vendor/symfony/http-foundation/Tests/Session/Storage/Handler/MongoDbSessionHandlerTest.php index 32f88ca..556f26a 100644 --- a/vendor/symfony/http-foundation/Tests/Session/Storage/Handler/MongoDbSessionHandlerTest.php +++ b/vendor/symfony/http-foundation/Tests/Session/Storage/Handler/MongoDbSessionHandlerTest.php @@ -34,6 +34,7 @@ class MongoDbSessionHandlerTest extends \PHPUnit_Framework_TestCase $mongoClass = version_compare(phpversion('mongo'), '1.3.0', '<') ? 'Mongo' : 'MongoClient'; $this->mongo = $this->getMockBuilder($mongoClass) + ->disableOriginalConstructor() ->getMock(); $this->options = array( @@ -241,13 +242,8 @@ class MongoDbSessionHandlerTest extends \PHPUnit_Framework_TestCase private function createMongoCollectionMock() { - $mongoClient = $this->getMockBuilder('MongoClient') - ->getMock(); - $mongoDb = $this->getMockBuilder('MongoDB') - ->setConstructorArgs(array($mongoClient, 'database-name')) - ->getMock(); $collection = $this->getMockBuilder('MongoCollection') - ->setConstructorArgs(array($mongoDb, 'collection-name')) + ->disableOriginalConstructor() ->getMock(); return $collection; diff --git a/vendor/symfony/http-foundation/composer.json b/vendor/symfony/http-foundation/composer.json index 09f9679..a9c8b40 100644 --- a/vendor/symfony/http-foundation/composer.json +++ b/vendor/symfony/http-foundation/composer.json @@ -23,7 +23,10 @@ }, "autoload": { "psr-4": { "Symfony\\Component\\HttpFoundation\\": "" }, - "classmap": [ "Resources/stubs" ] + "classmap": [ "Resources/stubs" ], + "exclude-from-classmap": [ + "/Tests/" + ] }, "minimum-stability": "dev", "extra": { diff --git a/vendor/symfony/http-kernel/Bundle/Bundle.php b/vendor/symfony/http-kernel/Bundle/Bundle.php index ebec7ff..9c2466d 100644 --- a/vendor/symfony/http-kernel/Bundle/Bundle.php +++ b/vendor/symfony/http-kernel/Bundle/Bundle.php @@ -166,6 +166,10 @@ abstract class Bundle extends ContainerAware implements BundleInterface return; } + if (!class_exists('Symfony\Component\Finder\Finder')) { + throw new \RuntimeException('You need the symfony/finder component to register bundle commands.'); + } + $finder = new Finder(); $finder->files()->name('*Command.php')->in($dir); @@ -173,7 +177,7 @@ abstract class Bundle extends ContainerAware implements BundleInterface foreach ($finder as $file) { $ns = $prefix; if ($relativePath = $file->getRelativePath()) { - $ns .= '\\'.strtr($relativePath, '/', '\\'); + $ns .= '\\'.str_replace('/', '\\', $relativePath); } $class = $ns.'\\'.$file->getBasename('.php'); if ($this->container) { diff --git a/vendor/symfony/http-kernel/Client.php b/vendor/symfony/http-kernel/Client.php index b344fa1..80b1bd6 100644 --- a/vendor/symfony/http-kernel/Client.php +++ b/vendor/symfony/http-kernel/Client.php @@ -105,7 +105,7 @@ class Client extends BaseClient $code = <<firstCall = false; if ($this->logger || null !== $this->throwAt) { - $handler = set_error_handler('var_dump', 0); + $handler = set_error_handler('var_dump'); $handler = is_array($handler) ? $handler[0] : null; restore_error_handler(); if ($handler instanceof ErrorHandler) { diff --git a/vendor/symfony/http-kernel/HttpCache/Store.php b/vendor/symfony/http-kernel/HttpCache/Store.php index 044d14e..433b0ef 100644 --- a/vendor/symfony/http-kernel/HttpCache/Store.php +++ b/vendor/symfony/http-kernel/HttpCache/Store.php @@ -32,12 +32,14 @@ class Store implements StoreInterface * Constructor. * * @param string $root The path to the cache directory + * + * @throws \RuntimeException */ public function __construct($root) { $this->root = $root; - if (!is_dir($this->root)) { - mkdir($this->root, 0777, true); + if (!is_dir($this->root) && !@mkdir($this->root, 0777, true) && !is_dir($this->root)) { + throw new \RuntimeException(sprintf('Unable to create the store directory (%s).', $this->root)); } $this->keyCache = new \SplObjectStorage(); $this->locks = array(); @@ -74,7 +76,7 @@ class Store implements StoreInterface public function lock(Request $request) { $path = $this->getPath($this->getCacheKey($request).'.lck'); - if (!is_dir(dirname($path)) && false === @mkdir(dirname($path), 0777, true)) { + if (!is_dir(dirname($path)) && false === @mkdir(dirname($path), 0777, true) && !is_dir(dirname($path))) { return false; } @@ -106,7 +108,10 @@ class Store implements StoreInterface public function isLocked(Request $request) { - return is_file($this->getPath($this->getCacheKey($request).'.lck')); + $path = $this->getPath($this->getCacheKey($request).'.lck'); + clearstatcache(true, $path); + + return is_file($path); } /** @@ -242,10 +247,8 @@ class Store implements StoreInterface } } - if ($modified) { - if (false === $this->save($key, serialize($entries))) { - throw new \RuntimeException('Unable to store the metadata.'); - } + if ($modified && false === $this->save($key, serialize($entries))) { + throw new \RuntimeException('Unable to store the metadata.'); } } @@ -266,7 +269,7 @@ class Store implements StoreInterface } foreach (preg_split('/[\s,]+/', $vary) as $header) { - $key = strtr(strtolower($header), '_', '-'); + $key = str_replace('_', '-', strtolower($header)); $v1 = isset($env1[$key]) ? $env1[$key] : null; $v2 = isset($env2[$key]) ? $env2[$key] : null; if ($v1 !== $v2) { @@ -338,7 +341,7 @@ class Store implements StoreInterface private function save($key, $data) { $path = $this->getPath($key); - if (!is_dir(dirname($path)) && false === @mkdir(dirname($path), 0777, true)) { + if (!is_dir(dirname($path)) && false === @mkdir(dirname($path), 0777, true) && !is_dir(dirname($path))) { return false; } diff --git a/vendor/symfony/http-kernel/Kernel.php b/vendor/symfony/http-kernel/Kernel.php index a02dcd9..cacc29d 100644 --- a/vendor/symfony/http-kernel/Kernel.php +++ b/vendor/symfony/http-kernel/Kernel.php @@ -58,11 +58,11 @@ abstract class Kernel implements KernelInterface, TerminableInterface protected $startTime; protected $loadClassCache; - const VERSION = '2.7.6'; - const VERSION_ID = 20706; + const VERSION = '2.7.9'; + const VERSION_ID = 20709; const MAJOR_VERSION = 2; const MINOR_VERSION = 7; - const RELEASE_VERSION = 6; + const RELEASE_VERSION = 9; const EXTRA_VERSION = ''; const END_OF_MAINTENANCE = '05/2018'; diff --git a/vendor/symfony/http-kernel/LICENSE b/vendor/symfony/http-kernel/LICENSE index 43028bc..12a7453 100644 --- a/vendor/symfony/http-kernel/LICENSE +++ b/vendor/symfony/http-kernel/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2015 Fabien Potencier +Copyright (c) 2004-2016 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/vendor/symfony/http-kernel/Profiler/FileProfilerStorage.php b/vendor/symfony/http-kernel/Profiler/FileProfilerStorage.php index 581ab64..29da4ab 100644 --- a/vendor/symfony/http-kernel/Profiler/FileProfilerStorage.php +++ b/vendor/symfony/http-kernel/Profiler/FileProfilerStorage.php @@ -41,8 +41,8 @@ class FileProfilerStorage implements ProfilerStorageInterface } $this->folder = substr($dsn, 5); - if (!is_dir($this->folder)) { - mkdir($this->folder, 0777, true); + if (!is_dir($this->folder) && false === @mkdir($this->folder, 0777, true) && !is_dir($this->folder)) { + throw new \RuntimeException(sprintf('Unable to create the storage directory (%s).', $this->folder)); } } @@ -128,6 +128,8 @@ class FileProfilerStorage implements ProfilerStorageInterface /** * {@inheritdoc} + * + * @throws \RuntimeException */ public function write(Profile $profile) { @@ -137,8 +139,8 @@ class FileProfilerStorage implements ProfilerStorageInterface if (!$profileIndexed) { // Create directory $dir = dirname($file); - if (!is_dir($dir)) { - mkdir($dir, 0777, true); + if (!is_dir($dir) && false === @mkdir($dir, 0777, true) && !is_dir($dir)) { + throw new \RuntimeException(sprintf('Unable to create the storage directory (%s).', $dir)); } } diff --git a/vendor/symfony/http-kernel/Profiler/PdoProfilerStorage.php b/vendor/symfony/http-kernel/Profiler/PdoProfilerStorage.php index 48f813f..dc273dd 100644 --- a/vendor/symfony/http-kernel/Profiler/PdoProfilerStorage.php +++ b/vendor/symfony/http-kernel/Profiler/PdoProfilerStorage.php @@ -188,9 +188,8 @@ abstract class PdoProfilerStorage implements ProfilerStorageInterface $stmt->bindValue($arg, $val, is_int($val) ? \PDO::PARAM_INT : \PDO::PARAM_STR); } $stmt->execute(); - $return = $stmt->fetchAll(\PDO::FETCH_ASSOC); - return $return; + return $stmt->fetchAll(\PDO::FETCH_ASSOC); } protected function close($db) diff --git a/vendor/symfony/http-kernel/Tests/Controller/ControllerResolverTest.php b/vendor/symfony/http-kernel/Tests/Controller/ControllerResolverTest.php index 32db4e4..c298c84 100644 --- a/vendor/symfony/http-kernel/Tests/Controller/ControllerResolverTest.php +++ b/vendor/symfony/http-kernel/Tests/Controller/ControllerResolverTest.php @@ -224,7 +224,7 @@ class ControllerResolverTest extends \PHPUnit_Framework_TestCase { } - protected function controllerMethod3($foo, $bar = null, $foobar) + protected function controllerMethod3($foo, $bar, $foobar) { } diff --git a/vendor/symfony/http-kernel/Tests/DataCollector/TimeDataCollectorTest.php b/vendor/symfony/http-kernel/Tests/DataCollector/TimeDataCollectorTest.php index b5d64bf..0bdcccd 100644 --- a/vendor/symfony/http-kernel/Tests/DataCollector/TimeDataCollectorTest.php +++ b/vendor/symfony/http-kernel/Tests/DataCollector/TimeDataCollectorTest.php @@ -15,6 +15,9 @@ use Symfony\Component\HttpKernel\DataCollector\TimeDataCollector; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; +/** + * @group time-sensitive + */ class TimeDataCollectorTest extends \PHPUnit_Framework_TestCase { public function testCollect() diff --git a/vendor/symfony/http-kernel/Tests/EventListener/ExceptionListenerTest.php b/vendor/symfony/http-kernel/Tests/EventListener/ExceptionListenerTest.php index 8fb00f5..947af11 100644 --- a/vendor/symfony/http-kernel/Tests/EventListener/ExceptionListenerTest.php +++ b/vendor/symfony/http-kernel/Tests/EventListener/ExceptionListenerTest.php @@ -23,6 +23,8 @@ use Symfony\Component\HttpKernel\Tests\Logger; * ExceptionListenerTest. * * @author Robert Schönthal + * + * @group time-sensitive */ class ExceptionListenerTest extends \PHPUnit_Framework_TestCase { diff --git a/vendor/symfony/http-kernel/Tests/Fixtures/ExtensionLoadedBundle/DependencyInjection/ExtensionLoadedExtension.php b/vendor/symfony/http-kernel/Tests/Fixtures/ExtensionLoadedBundle/DependencyInjection/ExtensionLoadedExtension.php index 3b31781..b43bc66 100644 --- a/vendor/symfony/http-kernel/Tests/Fixtures/ExtensionLoadedBundle/DependencyInjection/ExtensionLoadedExtension.php +++ b/vendor/symfony/http-kernel/Tests/Fixtures/ExtensionLoadedBundle/DependencyInjection/ExtensionLoadedExtension.php @@ -12,7 +12,7 @@ namespace Symfony\Component\HttpKernel\Tests\Fixtures\ExtensionLoadedBundle\DependencyInjection; use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\HttpKernel\DependencyInjection\Extension; +use Symfony\Component\DependencyInjection\Extension\Extension; class ExtensionLoadedExtension extends Extension { diff --git a/vendor/symfony/http-kernel/Tests/Fixtures/ExtensionPresentBundle/DependencyInjection/ExtensionPresentExtension.php b/vendor/symfony/http-kernel/Tests/Fixtures/ExtensionPresentBundle/DependencyInjection/ExtensionPresentExtension.php index e42f816..1085717 100644 --- a/vendor/symfony/http-kernel/Tests/Fixtures/ExtensionPresentBundle/DependencyInjection/ExtensionPresentExtension.php +++ b/vendor/symfony/http-kernel/Tests/Fixtures/ExtensionPresentBundle/DependencyInjection/ExtensionPresentExtension.php @@ -12,7 +12,7 @@ namespace Symfony\Component\HttpKernel\Tests\Fixtures\ExtensionPresentBundle\DependencyInjection; use Symfony\Component\DependencyInjection\ContainerBuilder; -use Symfony\Component\HttpKernel\DependencyInjection\Extension; +use Symfony\Component\DependencyInjection\Extension\Extension; class ExtensionPresentExtension extends Extension { diff --git a/vendor/symfony/http-kernel/Tests/Fragment/FragmentHandlerTest.php b/vendor/symfony/http-kernel/Tests/Fragment/FragmentHandlerTest.php index b2903b8..f8955f1 100644 --- a/vendor/symfony/http-kernel/Tests/Fragment/FragmentHandlerTest.php +++ b/vendor/symfony/http-kernel/Tests/Fragment/FragmentHandlerTest.php @@ -15,6 +15,9 @@ use Symfony\Component\HttpKernel\Fragment\FragmentHandler; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; +/** + * @group time-sensitive + */ class FragmentHandlerTest extends \PHPUnit_Framework_TestCase { private $requestStack; diff --git a/vendor/symfony/http-kernel/Tests/HttpCache/HttpCacheTest.php b/vendor/symfony/http-kernel/Tests/HttpCache/HttpCacheTest.php index 3c68d1f..ec6e8d6 100644 --- a/vendor/symfony/http-kernel/Tests/HttpCache/HttpCacheTest.php +++ b/vendor/symfony/http-kernel/Tests/HttpCache/HttpCacheTest.php @@ -716,7 +716,7 @@ class HttpCacheTest extends HttpCacheTestCase $this->assertTraceContains('store'); $this->assertEquals('Hello World', $this->response->getContent()); - # go in and play around with the cached metadata directly ... + // go in and play around with the cached metadata directly ... $values = $this->getMetaStorageValues(); $this->assertCount(1, $values); $tmp = unserialize($values[0]); diff --git a/vendor/symfony/http-kernel/Tests/HttpCache/HttpCacheTestCase.php b/vendor/symfony/http-kernel/Tests/HttpCache/HttpCacheTestCase.php index 53caf60..1fcd210 100644 --- a/vendor/symfony/http-kernel/Tests/HttpCache/HttpCacheTestCase.php +++ b/vendor/symfony/http-kernel/Tests/HttpCache/HttpCacheTestCase.php @@ -16,7 +16,6 @@ use Symfony\Component\HttpKernel\HttpCache\Esi; use Symfony\Component\HttpKernel\HttpCache\HttpCache; use Symfony\Component\HttpKernel\HttpCache\Store; use Symfony\Component\HttpKernel\HttpKernelInterface; -use Symfony\Bridge\PhpUnit\ClockMock; class HttpCacheTestCase extends \PHPUnit_Framework_TestCase { @@ -33,9 +32,6 @@ class HttpCacheTestCase extends \PHPUnit_Framework_TestCase protected function setUp() { - if (class_exists('Symfony\Bridge\PhpUnit\ClockMock')) { - ClockMock::register('Symfony\Component\HttpFoundation\Request'); - } $this->kernel = null; $this->cache = null; diff --git a/vendor/symfony/http-kernel/Tests/UriSignerTest.php b/vendor/symfony/http-kernel/Tests/UriSignerTest.php index 6b1fd90..10f41b3 100644 --- a/vendor/symfony/http-kernel/Tests/UriSignerTest.php +++ b/vendor/symfony/http-kernel/Tests/UriSignerTest.php @@ -33,6 +33,7 @@ class UriSignerTest extends \PHPUnit_Framework_TestCase $this->assertTrue($signer->check($signer->sign('http://example.com/foo'))); $this->assertTrue($signer->check($signer->sign('http://example.com/foo?foo=bar'))); + $this->assertTrue($signer->check($signer->sign('http://example.com/foo?foo=bar&0=integer'))); $this->assertTrue($signer->sign('http://example.com/foo?foo=bar&bar=foo') === $signer->sign('http://example.com/foo?bar=foo&foo=bar')); } diff --git a/vendor/symfony/http-kernel/UriSigner.php b/vendor/symfony/http-kernel/UriSigner.php index 6ddce87..c2d0d79 100644 --- a/vendor/symfony/http-kernel/UriSigner.php +++ b/vendor/symfony/http-kernel/UriSigner.php @@ -51,7 +51,7 @@ class UriSigner $uri = $this->buildUrl($url, $params); - return $uri.(false === (strpos($uri, '?')) ? '?' : '&').'_hash='.$this->computeHash($uri); + return $uri.(false === strpos($uri, '?') ? '?' : '&').'_hash='.$this->computeHash($uri); } /** @@ -91,7 +91,7 @@ class UriSigner private function buildUrl(array $url, array $params = array()) { - ksort($params); + ksort($params, SORT_STRING); $url['query'] = http_build_query($params, '', '&'); $scheme = isset($url['scheme']) ? $url['scheme'].'://' : ''; diff --git a/vendor/symfony/http-kernel/composer.json b/vendor/symfony/http-kernel/composer.json index 623d732..d1ae16b 100644 --- a/vendor/symfony/http-kernel/composer.json +++ b/vendor/symfony/http-kernel/composer.json @@ -52,7 +52,10 @@ "symfony/var-dumper": "" }, "autoload": { - "psr-4": { "Symfony\\Component\\HttpKernel\\": "" } + "psr-4": { "Symfony\\Component\\HttpKernel\\": "" }, + "exclude-from-classmap": [ + "/Tests/" + ] }, "minimum-stability": "dev", "extra": { diff --git a/vendor/symfony/http-kernel/phpunit.xml.dist b/vendor/symfony/http-kernel/phpunit.xml.dist index 1314966..17c4893 100644 --- a/vendor/symfony/http-kernel/phpunit.xml.dist +++ b/vendor/symfony/http-kernel/phpunit.xml.dist @@ -25,4 +25,14 @@ + + + + + + Symfony\Component\HttpFoundation + + + + diff --git a/vendor/symfony/process/LICENSE b/vendor/symfony/process/LICENSE index 43028bc..12a7453 100644 --- a/vendor/symfony/process/LICENSE +++ b/vendor/symfony/process/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2015 Fabien Potencier +Copyright (c) 2004-2016 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/vendor/symfony/process/PhpExecutableFinder.php b/vendor/symfony/process/PhpExecutableFinder.php index f8f57cc..fb29782 100644 --- a/vendor/symfony/process/PhpExecutableFinder.php +++ b/vendor/symfony/process/PhpExecutableFinder.php @@ -35,14 +35,17 @@ class PhpExecutableFinder */ public function find($includeArgs = true) { + $args = $this->findArguments(); + $args = $includeArgs && $args ? ' '.implode(' ', $args) : ''; + // HHVM support if (defined('HHVM_VERSION')) { - return (getenv('PHP_BINARY') ?: PHP_BINARY).($includeArgs ? ' '.implode(' ', $this->findArguments()) : ''); + return (getenv('PHP_BINARY') ?: PHP_BINARY).$args; } // PHP_BINARY return the current sapi executable - if (defined('PHP_BINARY') && PHP_BINARY && in_array(PHP_SAPI, array('cli', 'cli-server')) && is_file(PHP_BINARY)) { - return PHP_BINARY; + if (defined('PHP_BINARY') && PHP_BINARY && in_array(PHP_SAPI, array('cli', 'cli-server', 'phpdbg')) && is_file(PHP_BINARY)) { + return PHP_BINARY.$args; } if ($php = getenv('PHP_PATH')) { @@ -76,9 +79,10 @@ class PhpExecutableFinder { $arguments = array(); - // HHVM support if (defined('HHVM_VERSION')) { $arguments[] = '--php'; + } elseif ('phpdbg' === PHP_SAPI) { + $arguments[] = '-qrr'; } return $arguments; diff --git a/vendor/symfony/process/PhpProcess.php b/vendor/symfony/process/PhpProcess.php index 1adbd97..42ecb66 100644 --- a/vendor/symfony/process/PhpProcess.php +++ b/vendor/symfony/process/PhpProcess.php @@ -39,6 +39,19 @@ class PhpProcess extends Process if (false === $php = $executableFinder->find()) { $php = null; } + if ('phpdbg' === PHP_SAPI) { + $file = tempnam(sys_get_temp_dir(), 'dbg'); + file_put_contents($file, $script); + register_shutdown_function('unlink', $file); + $php .= ' '.ProcessUtils::escapeArgument($file); + $script = null; + } + if ('\\' !== DIRECTORY_SEPARATOR && null !== $php) { + // exec is mandatory to deal with sending a signal to the process + // see https://github.com/symfony/symfony/issues/5030 about prepending + // command with exec + $php = 'exec '.$php; + } parent::__construct($php, $cwd, $env, $script, $timeout, $options); } diff --git a/vendor/symfony/process/Process.php b/vendor/symfony/process/Process.php index 699151f..df36fd5 100644 --- a/vendor/symfony/process/Process.php +++ b/vendor/symfony/process/Process.php @@ -54,7 +54,7 @@ class Process private $idleTimeout; private $options; private $exitcode; - private $fallbackExitcode; + private $fallbackStatus = array(); private $processInformation; private $outputDisabled = false; private $stdout; @@ -169,8 +169,7 @@ class Process public function __destruct() { - // stop() will check if we have a process running. - $this->stop(); + $this->stop(0); } public function __clone() @@ -219,7 +218,7 @@ class Process */ public function mustRun($callback = null) { - if ($this->isSigchildEnabled() && !$this->enhanceSigchildCompatibility) { + if (!$this->enhanceSigchildCompatibility && $this->isSigchildEnabled()) { throw new RuntimeException('This PHP has been compiled with --enable-sigchild. You must use setEnhanceSigchildCompatibility() to use this method.'); } @@ -278,6 +277,17 @@ class Process if (!isset($this->options['bypass_shell'])) { $this->options['bypass_shell'] = true; } + } elseif (!$this->useFileHandles && $this->enhanceSigchildCompatibility && $this->isSigchildEnabled()) { + // last exit code is output on the fourth pipe and caught to work around --enable-sigchild + $descriptors[3] = array('pipe', 'w'); + + // See https://unix.stackexchange.com/questions/71205/background-process-pipe-input + $commandline = '{ ('.$this->commandline.') <&3 3<&- 3>/dev/null & } 3<&0;'; + $commandline .= 'pid=$!; echo $pid >&3; wait $pid; code=$?; echo $code >&3; exit $code'; + + // Workaround for the bug, when PTS functionality is enabled. + // @see : https://bugs.php.net/69442 + $ptsWorkaround = fopen(__FILE__, 'r'); } $this->process = proc_open($commandline, $descriptors, $this->processPipes->pipes, $this->cwd, $this->env, $this->options); @@ -287,6 +297,10 @@ class Process } $this->status = self::STATUS_STARTED; + if (isset($descriptors[3])) { + $this->fallbackStatus['pid'] = (int) fgets($this->processPipes->pipes[3]); + } + if ($this->tty) { return; } @@ -368,17 +382,9 @@ class Process * Returns the Pid (process identifier), if applicable. * * @return int|null The process id if running, null otherwise - * - * @throws RuntimeException In case --enable-sigchild is activated */ public function getPid() { - if ($this->isSigchildEnabled()) { - throw new RuntimeException('This PHP has been compiled with --enable-sigchild. The process identifier can not be retrieved.'); - } - - $this->updateStatus(false); - return $this->isRunning() ? $this->processInformation['pid'] : null; } @@ -390,7 +396,7 @@ class Process * @return Process * * @throws LogicException In case the process is not running - * @throws RuntimeException In case --enable-sigchild is activated + * @throws RuntimeException In case --enable-sigchild is activated and the process can't be killed * @throws RuntimeException In case of failure */ public function signal($signal) @@ -584,7 +590,7 @@ class Process */ public function getExitCode() { - if ($this->isSigchildEnabled() && !$this->enhanceSigchildCompatibility) { + if (!$this->enhanceSigchildCompatibility && $this->isSigchildEnabled()) { throw new RuntimeException('This PHP has been compiled with --enable-sigchild. You must use setEnhanceSigchildCompatibility() to use this method.'); } @@ -601,8 +607,6 @@ class Process * * @return null|string A string representation for the exit status code, null if the Process is not terminated. * - * @throws RuntimeException In case --enable-sigchild is activated and the sigchild compatibility mode is disabled - * * @see http://tldp.org/LDP/abs/html/exitcodes.html * @see http://en.wikipedia.org/wiki/Unix_signal */ @@ -639,12 +643,10 @@ class Process { $this->requireProcessIsTerminated(__FUNCTION__); - if ($this->isSigchildEnabled()) { + if (!$this->enhanceSigchildCompatibility && $this->isSigchildEnabled()) { throw new RuntimeException('This PHP has been compiled with --enable-sigchild. Term signal can not be retrieved.'); } - $this->updateStatus(false); - return $this->processInformation['signaled']; } @@ -662,12 +664,10 @@ class Process { $this->requireProcessIsTerminated(__FUNCTION__); - if ($this->isSigchildEnabled()) { + if ($this->isSigchildEnabled() && (!$this->enhanceSigchildCompatibility || -1 === $this->processInformation['termsig'])) { throw new RuntimeException('This PHP has been compiled with --enable-sigchild. Term signal can not be retrieved.'); } - $this->updateStatus(false); - return $this->processInformation['termsig']; } @@ -684,8 +684,6 @@ class Process { $this->requireProcessIsTerminated(__FUNCTION__); - $this->updateStatus(false); - return $this->processInformation['stopped']; } @@ -702,8 +700,6 @@ class Process { $this->requireProcessIsTerminated(__FUNCTION__); - $this->updateStatus(false); - return $this->processInformation['stopsig']; } @@ -763,41 +759,33 @@ class Process * Stops the process. * * @param int|float $timeout The timeout in seconds - * @param int $signal A POSIX signal to send in case the process has not stop at timeout, default is SIGKILL + * @param int $signal A POSIX signal to send in case the process has not stop at timeout, default is SIGKILL (9) * * @return int The exit-code of the process - * - * @throws RuntimeException if the process got signaled */ public function stop($timeout = 10, $signal = null) { $timeoutMicro = microtime(true) + $timeout; if ($this->isRunning()) { - if ('\\' === DIRECTORY_SEPARATOR && !$this->isSigchildEnabled()) { - exec(sprintf('taskkill /F /T /PID %d 2>&1', $this->getPid()), $output, $exitCode); - if ($exitCode > 0) { - throw new RuntimeException('Unable to kill the process'); - } - } // given `SIGTERM` may not be defined and that `proc_terminate` uses the constant value and not the constant itself, we use the same here $this->doSignal(15, false); do { usleep(1000); } while ($this->isRunning() && microtime(true) < $timeoutMicro); - if ($this->isRunning() && !$this->isSigchildEnabled()) { - if (null !== $signal || defined('SIGKILL')) { - // avoid exception here : - // process is supposed to be running, but it might have stop - // just after this line. - // in any case, let's silently discard the error, we can not do anything - $this->doSignal($signal ?: SIGKILL, false); - } + if ($this->isRunning()) { + // Avoid exception here: process is supposed to be running, but it might have stopped just + // after this line. In any case, let's silently discard the error, we cannot do anything. + $this->doSignal($signal ?: 9, false); } } - $this->updateStatus(false); - if ($this->processInformation['running']) { + if ($this->isRunning()) { + if (isset($this->fallbackStatus['pid'])) { + unset($this->fallbackStatus['pid']); + + return $this->stop(0, $signal); + } $this->close(); } @@ -1228,14 +1216,7 @@ class Process return $result = false; } - $proc = @proc_open('echo 1', array(array('pty'), array('pty'), array('pty')), $pipes); - if (is_resource($proc)) { - proc_close($proc); - - return $result = true; - } - - return $result = false; + return $result = (bool) @proc_open('echo 1', array(array('pty'), array('pty'), array('pty')), $pipes); } /** @@ -1250,16 +1231,8 @@ class Process } else { $this->processPipes = UnixPipes::create($this, $this->input); } - $descriptors = $this->processPipes->getDescriptors($this->outputDisabled); - if (!$this->useFileHandles && $this->enhanceSigchildCompatibility && $this->isSigchildEnabled()) { - // last exit code is output on the fourth pipe and caught to work around --enable-sigchild - $descriptors = array_merge($descriptors, array(array('pipe', 'w'))); - - $this->commandline = '('.$this->commandline.') 3>/dev/null; code=$?; echo $code >&3; exit $code'; - } - - return $descriptors; + return $this->processPipes->getDescriptors($this->outputDisabled); } /** @@ -1303,10 +1276,13 @@ class Process } $this->processInformation = proc_get_status($this->process); - $this->captureExitCode(); $this->readPipes($blocking, '\\' === DIRECTORY_SEPARATOR ? !$this->processInformation['running'] : true); + if ($this->fallbackStatus && $this->enhanceSigchildCompatibility && $this->isSigchildEnabled()) { + $this->processInformation = $this->fallbackStatus + $this->processInformation; + } + if (!$this->processInformation['running']) { $this->close(); } @@ -1323,7 +1299,7 @@ class Process return self::$sigchild; } - if (!function_exists('phpinfo')) { + if (!function_exists('phpinfo') || defined('HHVM_VERSION')) { return self::$sigchild = false; } @@ -1367,24 +1343,14 @@ class Process $callback = $this->callback; foreach ($result as $type => $data) { - if (3 == $type) { - $this->fallbackExitcode = (int) $data; - } else { + if (3 !== $type) { $callback($type === self::STDOUT ? self::OUT : self::ERR, $data); + } elseif (!isset($this->fallbackStatus['signaled'])) { + $this->fallbackStatus['exitcode'] = (int) $data; } } } - /** - * Captures the exitcode if mentioned in the process information. - */ - private function captureExitCode() - { - if (isset($this->processInformation['exitcode']) && -1 != $this->processInformation['exitcode']) { - $this->exitcode = $this->processInformation['exitcode']; - } - } - /** * Closes process resource, closes file handles, sets the exitcode. * @@ -1394,21 +1360,26 @@ class Process { $this->processPipes->close(); if (is_resource($this->process)) { - $exitcode = proc_close($this->process); - } else { - $exitcode = -1; + proc_close($this->process); } - - $this->exitcode = -1 !== $exitcode ? $exitcode : (null !== $this->exitcode ? $this->exitcode : -1); + $this->exitcode = $this->processInformation['exitcode']; $this->status = self::STATUS_TERMINATED; - if (-1 === $this->exitcode && null !== $this->fallbackExitcode) { - $this->exitcode = $this->fallbackExitcode; - } elseif (-1 === $this->exitcode && $this->processInformation['signaled'] && 0 < $this->processInformation['termsig']) { - // if process has been signaled, no exitcode but a valid termsig, apply Unix convention - $this->exitcode = 128 + $this->processInformation['termsig']; + if (-1 === $this->exitcode) { + if ($this->processInformation['signaled'] && 0 < $this->processInformation['termsig']) { + // if process has been signaled, no exitcode but a valid termsig, apply Unix convention + $this->exitcode = 128 + $this->processInformation['termsig']; + } elseif ($this->enhanceSigchildCompatibility && $this->isSigchildEnabled()) { + $this->processInformation['signaled'] = true; + $this->processInformation['termsig'] = -1; + } } + // Free memory from self-reference callback created by buildCallback + // Doing so in other contexts like __destruct or by garbage collector is ineffective + // Now pipes are closed, so the callback is no longer necessary + $this->callback = null; + return $this->exitcode; } @@ -1420,7 +1391,7 @@ class Process $this->starttime = null; $this->callback = null; $this->exitcode = null; - $this->fallbackExitcode = null; + $this->fallbackStatus = array(); $this->processInformation = null; $this->stdout = null; $this->stderr = null; @@ -1440,12 +1411,12 @@ class Process * @return bool True if the signal was sent successfully, false otherwise * * @throws LogicException In case the process is not running - * @throws RuntimeException In case --enable-sigchild is activated + * @throws RuntimeException In case --enable-sigchild is activated and the process can't be killed * @throws RuntimeException In case of failure */ private function doSignal($signal, $throwException) { - if (!$this->isRunning()) { + if (null === $pid = $this->getPid()) { if ($throwException) { throw new LogicException('Can not send signal on a non running process.'); } @@ -1453,23 +1424,36 @@ class Process return false; } - if ($this->isSigchildEnabled()) { - if ($throwException) { - throw new RuntimeException('This PHP has been compiled with --enable-sigchild. The process can not be signaled.'); - } + if ('\\' === DIRECTORY_SEPARATOR) { + exec(sprintf('taskkill /F /T /PID %d 2>&1', $pid), $output, $exitCode); + if ($exitCode && $this->isRunning()) { + if ($throwException) { + throw new RuntimeException(sprintf('Unable to kill the process (%s).', implode(' ', $output))); + } - return false; + return false; + } + } else { + if (!$this->enhanceSigchildCompatibility || !$this->isSigchildEnabled()) { + $ok = @proc_terminate($this->process, $signal); + } elseif (function_exists('posix_kill')) { + $ok = @posix_kill($pid, $signal); + } elseif ($ok = proc_open(sprintf('kill -%d %d', $signal, $pid), array(2 => array('pipe', 'w')), $pipes)) { + $ok = false === fgets($pipes[2]); + } + if (!$ok) { + if ($throwException) { + throw new RuntimeException(sprintf('Error while sending signal `%s`.', $signal)); + } + + return false; + } } - if (true !== @proc_terminate($this->process, $signal)) { - if ($throwException) { - throw new RuntimeException(sprintf('Error while sending signal `%s`.', $signal)); - } - - return false; - } - - $this->latestSignal = $signal; + $this->latestSignal = (int) $signal; + $this->fallbackStatus['signaled'] = true; + $this->fallbackStatus['exitcode'] = -1; + $this->fallbackStatus['termsig'] = $this->latestSignal; return true; } diff --git a/vendor/symfony/process/Tests/AbstractProcessTest.php b/vendor/symfony/process/Tests/AbstractProcessTest.php deleted file mode 100644 index b2f60f9..0000000 --- a/vendor/symfony/process/Tests/AbstractProcessTest.php +++ /dev/null @@ -1,1208 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Process\Tests; - -use Symfony\Component\Process\Exception\LogicException; -use Symfony\Component\Process\Exception\ProcessTimedOutException; -use Symfony\Component\Process\Exception\RuntimeException; -use Symfony\Component\Process\PhpExecutableFinder; -use Symfony\Component\Process\Pipes\PipesInterface; -use Symfony\Component\Process\Process; - -/** - * @author Robert Schönthal - */ -abstract class AbstractProcessTest extends \PHPUnit_Framework_TestCase -{ - protected static $phpBin; - - public static function setUpBeforeClass() - { - $phpBin = new PhpExecutableFinder(); - self::$phpBin = $phpBin->find(); - } - - public function testThatProcessDoesNotThrowWarningDuringRun() - { - @trigger_error('Test Error', E_USER_NOTICE); - $process = $this->getProcess(self::$phpBin." -r 'sleep(3)'"); - $process->run(); - $actualError = error_get_last(); - $this->assertEquals('Test Error', $actualError['message']); - $this->assertEquals(E_USER_NOTICE, $actualError['type']); - } - - /** - * @expectedException \Symfony\Component\Process\Exception\InvalidArgumentException - */ - public function testNegativeTimeoutFromConstructor() - { - $this->getProcess('', null, null, null, -1); - } - - /** - * @expectedException \Symfony\Component\Process\Exception\InvalidArgumentException - */ - public function testNegativeTimeoutFromSetter() - { - $p = $this->getProcess(''); - $p->setTimeout(-1); - } - - public function testFloatAndNullTimeout() - { - $p = $this->getProcess(''); - - $p->setTimeout(10); - $this->assertSame(10.0, $p->getTimeout()); - - $p->setTimeout(null); - $this->assertNull($p->getTimeout()); - - $p->setTimeout(0.0); - $this->assertNull($p->getTimeout()); - } - - public function testStopWithTimeoutIsActuallyWorking() - { - if (!extension_loaded('pcntl')) { - $this->markTestSkipped('Extension pcntl is required.'); - } - - // exec is mandatory here since we send a signal to the process - // see https://github.com/symfony/symfony/issues/5030 about prepending - // command with exec - $p = $this->getProcess('exec php '.__DIR__.'/NonStopableProcess.php 3'); - $p->start(); - usleep(100000); - $start = microtime(true); - $p->stop(1.1, SIGKILL); - while ($p->isRunning()) { - usleep(1000); - } - $duration = microtime(true) - $start; - - $this->assertLessThan(4, $duration); - } - - public function testAllOutputIsActuallyReadOnTermination() - { - // this code will result in a maximum of 2 reads of 8192 bytes by calling - // start() and isRunning(). by the time getOutput() is called the process - // has terminated so the internal pipes array is already empty. normally - // the call to start() will not read any data as the process will not have - // generated output, but this is non-deterministic so we must count it as - // a possibility. therefore we need 2 * PipesInterface::CHUNK_SIZE plus - // another byte which will never be read. - $expectedOutputSize = PipesInterface::CHUNK_SIZE * 2 + 2; - - $code = sprintf('echo str_repeat(\'*\', %d);', $expectedOutputSize); - $p = $this->getProcess(sprintf('%s -r %s', self::$phpBin, escapeshellarg($code))); - - $p->start(); - // Let's wait enough time for process to finish... - // Here we don't call Process::run or Process::wait to avoid any read of pipes - usleep(500000); - - if ($p->isRunning()) { - $this->markTestSkipped('Process execution did not complete in the required time frame'); - } - - $o = $p->getOutput(); - - $this->assertEquals($expectedOutputSize, strlen($o)); - } - - public function testCallbacksAreExecutedWithStart() - { - $data = ''; - - $process = $this->getProcess('echo foo && php -r "sleep(1);" && echo foo'); - $process->start(function ($type, $buffer) use (&$data) { - $data .= $buffer; - }); - - while ($process->isRunning()) { - usleep(10000); - } - - $this->assertEquals(2, preg_match_all('/foo/', $data, $matches)); - } - - /** - * tests results from sub processes. - * - * @dataProvider responsesCodeProvider - */ - public function testProcessResponses($expected, $getter, $code) - { - $p = $this->getProcess(sprintf('%s -r %s', self::$phpBin, escapeshellarg($code))); - $p->run(); - - $this->assertSame($expected, $p->$getter()); - } - - /** - * tests results from sub processes. - * - * @dataProvider pipesCodeProvider - */ - public function testProcessPipes($code, $size) - { - $expected = str_repeat(str_repeat('*', 1024), $size).'!'; - $expectedLength = (1024 * $size) + 1; - - $p = $this->getProcess(sprintf('%s -r %s', self::$phpBin, escapeshellarg($code))); - $p->setInput($expected); - $p->run(); - - $this->assertEquals($expectedLength, strlen($p->getOutput())); - $this->assertEquals($expectedLength, strlen($p->getErrorOutput())); - } - - /** - * @dataProvider pipesCodeProvider - */ - public function testSetStreamAsInput($code, $size) - { - if ('\\' === DIRECTORY_SEPARATOR) { - $this->markTestIncomplete('This test fails with a timeout on Windows, can someone investigate please?'); - } - $expected = str_repeat(str_repeat('*', 1024), $size).'!'; - $expectedLength = (1024 * $size) + 1; - - $stream = fopen('php://temporary', 'w+'); - fwrite($stream, $expected); - rewind($stream); - - $p = $this->getProcess(sprintf('%s -r %s', self::$phpBin, escapeshellarg($code)), null, null, null, 5); - $p->setInput($stream); - $p->run(); - - fclose($stream); - - $this->assertEquals($expectedLength, strlen($p->getOutput())); - $this->assertEquals($expectedLength, strlen($p->getErrorOutput())); - } - - public function testSetInputWhileRunningThrowsAnException() - { - $process = $this->getProcess(self::$phpBin.' -r "usleep(500000);"'); - $process->start(); - try { - $process->setInput('foobar'); - $process->stop(); - $this->fail('A LogicException should have been raised.'); - } catch (LogicException $e) { - $this->assertEquals('Input can not be set while the process is running.', $e->getMessage()); - } - $process->stop(); - } - - /** - * @dataProvider provideInvalidInputValues - * @expectedException \Symfony\Component\Process\Exception\InvalidArgumentException - * @expectedExceptionMessage Symfony\Component\Process\Process::setInput only accepts strings or stream resources. - */ - public function testInvalidInput($value) - { - $process = $this->getProcess(self::$phpBin.' -v'); - $process->setInput($value); - } - - public function provideInvalidInputValues() - { - return array( - array(array()), - array(new NonStringifiable()), - ); - } - - /** - * @dataProvider provideInputValues - */ - public function testValidInput($expected, $value) - { - $process = $this->getProcess(self::$phpBin.' -v'); - $process->setInput($value); - $this->assertSame($expected, $process->getInput()); - } - - public function provideInputValues() - { - return array( - array(null, null), - array('24.5', 24.5), - array('input data', 'input data'), - ); - } - - /** - * @dataProvider provideLegacyInputValues - * @group legacy - */ - public function testLegacyValidInput($expected, $value) - { - $process = $this->getProcess(self::$phpBin.' -v'); - $process->setInput($value); - $this->assertSame($expected, $process->getInput()); - } - - public function provideLegacyInputValues() - { - return array( - array('stringifiable', new Stringifiable()), - ); - } - - public function chainedCommandsOutputProvider() - { - if ('\\' === DIRECTORY_SEPARATOR) { - return array( - array("2 \r\n2\r\n", '&&', '2'), - ); - } - - return array( - array("1\n1\n", ';', '1'), - array("2\n2\n", '&&', '2'), - ); - } - - /** - * @dataProvider chainedCommandsOutputProvider - */ - public function testChainedCommandsOutput($expected, $operator, $input) - { - $process = $this->getProcess(sprintf('echo %s %s echo %s', $input, $operator, $input)); - $process->run(); - $this->assertEquals($expected, $process->getOutput()); - } - - public function testCallbackIsExecutedForOutput() - { - $p = $this->getProcess(sprintf('%s -r %s', self::$phpBin, escapeshellarg('echo \'foo\';'))); - - $called = false; - $p->run(function ($type, $buffer) use (&$called) { - $called = $buffer === 'foo'; - }); - - $this->assertTrue($called, 'The callback should be executed with the output'); - } - - public function testGetErrorOutput() - { - $p = $this->getProcess(sprintf('%s -r %s', self::$phpBin, escapeshellarg('$n = 0; while ($n < 3) { file_put_contents(\'php://stderr\', \'ERROR\'); $n++; }'))); - - $p->run(); - $this->assertEquals(3, preg_match_all('/ERROR/', $p->getErrorOutput(), $matches)); - } - - public function testGetIncrementalErrorOutput() - { - // use a lock file to toggle between writing ("W") and reading ("R") the - // error stream - $lock = tempnam(sys_get_temp_dir(), get_class($this).'Lock'); - file_put_contents($lock, 'W'); - - $p = $this->getProcess(sprintf('%s -r %s', self::$phpBin, escapeshellarg('$n = 0; while ($n < 3) { if (\'W\' === file_get_contents('.var_export($lock, true).')) { file_put_contents(\'php://stderr\', \'ERROR\'); $n++; file_put_contents('.var_export($lock, true).', \'R\'); } usleep(100); }'))); - - $p->start(); - while ($p->isRunning()) { - if ('R' === file_get_contents($lock)) { - $this->assertLessThanOrEqual(1, preg_match_all('/ERROR/', $p->getIncrementalErrorOutput(), $matches)); - file_put_contents($lock, 'W'); - } - usleep(100); - } - - unlink($lock); - } - - public function testFlushErrorOutput() - { - $p = $this->getProcess(sprintf('%s -r %s', self::$phpBin, escapeshellarg('$n = 0; while ($n < 3) { file_put_contents(\'php://stderr\', \'ERROR\'); $n++; }'))); - - $p->run(); - $p->clearErrorOutput(); - $this->assertEmpty($p->getErrorOutput()); - } - - public function testGetEmptyIncrementalErrorOutput() - { - // use a lock file to toggle between writing ("W") and reading ("R") the - // output stream - $lock = tempnam(sys_get_temp_dir(), get_class($this).'Lock'); - file_put_contents($lock, 'W'); - - $p = $this->getProcess(sprintf('%s -r %s', self::$phpBin, escapeshellarg('$n = 0; while ($n < 3) { if (\'W\' === file_get_contents('.var_export($lock, true).')) { file_put_contents(\'php://stderr\', \'ERROR\'); $n++; file_put_contents('.var_export($lock, true).', \'R\'); } usleep(100); }'))); - - $p->start(); - - $shouldWrite = false; - - while ($p->isRunning()) { - if ('R' === file_get_contents($lock)) { - if (!$shouldWrite) { - $this->assertLessThanOrEqual(1, preg_match_all('/ERROR/', $p->getIncrementalOutput(), $matches)); - $shouldWrite = true; - } else { - $this->assertSame('', $p->getIncrementalOutput()); - - file_put_contents($lock, 'W'); - $shouldWrite = false; - } - } - usleep(100); - } - - unlink($lock); - } - - public function testGetOutput() - { - $p = $this->getProcess(sprintf('%s -r %s', self::$phpBin, escapeshellarg('$n = 0; while ($n < 3) { echo \' foo \'; $n++; }'))); - - $p->run(); - $this->assertEquals(3, preg_match_all('/foo/', $p->getOutput(), $matches)); - } - - public function testGetIncrementalOutput() - { - // use a lock file to toggle between writing ("W") and reading ("R") the - // output stream - $lock = tempnam(sys_get_temp_dir(), get_class($this).'Lock'); - file_put_contents($lock, 'W'); - - $p = $this->getProcess(sprintf('%s -r %s', self::$phpBin, escapeshellarg('$n = 0; while ($n < 3) { if (\'W\' === file_get_contents('.var_export($lock, true).')) { echo \' foo \'; $n++; file_put_contents('.var_export($lock, true).', \'R\'); } usleep(100); }'))); - - $p->start(); - while ($p->isRunning()) { - if ('R' === file_get_contents($lock)) { - $this->assertLessThanOrEqual(1, preg_match_all('/foo/', $p->getIncrementalOutput(), $matches)); - file_put_contents($lock, 'W'); - } - usleep(100); - } - - unlink($lock); - } - - public function testFlushOutput() - { - $p = $this->getProcess(sprintf('%s -r %s', self::$phpBin, escapeshellarg('$n=0;while ($n<3) {echo \' foo \';$n++;}'))); - - $p->run(); - $p->clearOutput(); - $this->assertEmpty($p->getOutput()); - } - - public function testGetEmptyIncrementalOutput() - { - // use a lock file to toggle between writing ("W") and reading ("R") the - // output stream - $lock = tempnam(sys_get_temp_dir(), get_class($this).'Lock'); - file_put_contents($lock, 'W'); - - $p = $this->getProcess(sprintf('%s -r %s', self::$phpBin, escapeshellarg('$n = 0; while ($n < 3) { if (\'W\' === file_get_contents('.var_export($lock, true).')) { echo \' foo \'; $n++; file_put_contents('.var_export($lock, true).', \'R\'); } usleep(100); }'))); - - $p->start(); - - $shouldWrite = false; - - while ($p->isRunning()) { - if ('R' === file_get_contents($lock)) { - if (!$shouldWrite) { - $this->assertLessThanOrEqual(1, preg_match_all('/foo/', $p->getIncrementalOutput(), $matches)); - $shouldWrite = true; - } else { - $this->assertSame('', $p->getIncrementalOutput()); - - file_put_contents($lock, 'W'); - $shouldWrite = false; - } - } - usleep(100); - } - - unlink($lock); - } - - public function testZeroAsOutput() - { - if ('\\' === DIRECTORY_SEPARATOR) { - // see http://stackoverflow.com/questions/7105433/windows-batch-echo-without-new-line - $p = $this->getProcess('echo | set /p dummyName=0'); - } else { - $p = $this->getProcess('printf 0'); - } - - $p->run(); - $this->assertSame('0', $p->getOutput()); - } - - public function testExitCodeCommandFailed() - { - if ('\\' === DIRECTORY_SEPARATOR) { - $this->markTestSkipped('Windows does not support POSIX exit code'); - } - - // such command run in bash return an exitcode 127 - $process = $this->getProcess('nonexistingcommandIhopeneversomeonewouldnameacommandlikethis'); - $process->run(); - - $this->assertGreaterThan(0, $process->getExitCode()); - } - - public function testTTYCommand() - { - if ('\\' === DIRECTORY_SEPARATOR) { - $this->markTestSkipped('Windows does have /dev/tty support'); - } - - $process = $this->getProcess('echo "foo" >> /dev/null && php -r "usleep(100000);"'); - $process->setTty(true); - $process->start(); - $this->assertTrue($process->isRunning()); - $process->wait(); - - $this->assertSame(Process::STATUS_TERMINATED, $process->getStatus()); - } - - public function testTTYCommandExitCode() - { - if ('\\' === DIRECTORY_SEPARATOR) { - $this->markTestSkipped('Windows does have /dev/tty support'); - } - - $process = $this->getProcess('echo "foo" >> /dev/null'); - $process->setTty(true); - $process->run(); - - $this->assertTrue($process->isSuccessful()); - } - - public function testTTYInWindowsEnvironment() - { - if ('\\' !== DIRECTORY_SEPARATOR) { - $this->markTestSkipped('This test is for Windows platform only'); - } - - $process = $this->getProcess('echo "foo" >> /dev/null'); - $process->setTty(false); - $this->setExpectedException('Symfony\Component\Process\Exception\RuntimeException', 'TTY mode is not supported on Windows platform.'); - $process->setTty(true); - } - - public function testExitCodeTextIsNullWhenExitCodeIsNull() - { - $process = $this->getProcess(''); - $this->assertNull($process->getExitCodeText()); - } - - public function testPTYCommand() - { - if (!Process::isPtySupported()) { - $this->markTestSkipped('PTY is not supported on this operating system.'); - } - - $process = $this->getProcess('echo "foo"'); - $process->setPty(true); - $process->run(); - - $this->assertSame(Process::STATUS_TERMINATED, $process->getStatus()); - $this->assertEquals("foo\r\n", $process->getOutput()); - } - - public function testMustRun() - { - $process = $this->getProcess('echo foo'); - - $this->assertSame($process, $process->mustRun()); - $this->assertEquals('foo'.PHP_EOL, $process->getOutput()); - } - - public function testSuccessfulMustRunHasCorrectExitCode() - { - $process = $this->getProcess('echo foo')->mustRun(); - $this->assertEquals(0, $process->getExitCode()); - } - - /** - * @expectedException \Symfony\Component\Process\Exception\ProcessFailedException - */ - public function testMustRunThrowsException() - { - $process = $this->getProcess('exit 1'); - $process->mustRun(); - } - - public function testExitCodeText() - { - $process = $this->getProcess(''); - $r = new \ReflectionObject($process); - $p = $r->getProperty('exitcode'); - $p->setAccessible(true); - - $p->setValue($process, 2); - $this->assertEquals('Misuse of shell builtins', $process->getExitCodeText()); - } - - public function testStartIsNonBlocking() - { - $process = $this->getProcess(self::$phpBin.' -r "usleep(500000);"'); - $start = microtime(true); - $process->start(); - $end = microtime(true); - $this->assertLessThan(0.4, $end - $start); - $process->wait(); - } - - public function testUpdateStatus() - { - $process = $this->getProcess(self::$phpBin.' -v'); - $process->run(); - $this->assertTrue(strlen($process->getOutput()) > 0); - } - - public function testGetExitCodeIsNullOnStart() - { - $process = $this->getProcess(self::$phpBin.' -r "usleep(200000);"'); - $this->assertNull($process->getExitCode()); - $process->start(); - $this->assertNull($process->getExitCode()); - $process->wait(); - $this->assertEquals(0, $process->getExitCode()); - } - - public function testGetExitCodeIsNullOnWhenStartingAgain() - { - $process = $this->getProcess(self::$phpBin.' -r "usleep(200000);"'); - $process->run(); - $this->assertEquals(0, $process->getExitCode()); - $process->start(); - $this->assertNull($process->getExitCode()); - $process->wait(); - $this->assertEquals(0, $process->getExitCode()); - } - - public function testGetExitCode() - { - $process = $this->getProcess(self::$phpBin.' -v'); - $process->run(); - $this->assertSame(0, $process->getExitCode()); - } - - public function testStatus() - { - $process = $this->getProcess(self::$phpBin.' -r "usleep(500000);"'); - $this->assertFalse($process->isRunning()); - $this->assertFalse($process->isStarted()); - $this->assertFalse($process->isTerminated()); - $this->assertSame(Process::STATUS_READY, $process->getStatus()); - $process->start(); - $this->assertTrue($process->isRunning()); - $this->assertTrue($process->isStarted()); - $this->assertFalse($process->isTerminated()); - $this->assertSame(Process::STATUS_STARTED, $process->getStatus()); - $process->wait(); - $this->assertFalse($process->isRunning()); - $this->assertTrue($process->isStarted()); - $this->assertTrue($process->isTerminated()); - $this->assertSame(Process::STATUS_TERMINATED, $process->getStatus()); - } - - public function testStop() - { - $process = $this->getProcess(self::$phpBin.' -r "sleep(4);"'); - $process->start(); - $this->assertTrue($process->isRunning()); - $process->stop(); - $this->assertFalse($process->isRunning()); - } - - public function testIsSuccessful() - { - $process = $this->getProcess(self::$phpBin.' -v'); - $process->run(); - $this->assertTrue($process->isSuccessful()); - } - - public function testIsSuccessfulOnlyAfterTerminated() - { - $process = $this->getProcess(self::$phpBin.' -r "sleep(1);"'); - $process->start(); - - $this->assertFalse($process->isSuccessful()); - - while ($process->isRunning()) { - usleep(300000); - } - - $this->assertTrue($process->isSuccessful()); - } - - public function testIsNotSuccessful() - { - $process = $this->getProcess(self::$phpBin.' -r "usleep(500000);throw new \Exception(\'BOUM\');"'); - $process->start(); - $this->assertTrue($process->isRunning()); - $process->wait(); - $this->assertFalse($process->isSuccessful()); - } - - public function testProcessIsNotSignaled() - { - if ('\\' === DIRECTORY_SEPARATOR) { - $this->markTestSkipped('Windows does not support POSIX signals'); - } - - $process = $this->getProcess(self::$phpBin.' -v'); - $process->run(); - $this->assertFalse($process->hasBeenSignaled()); - } - - public function testProcessWithoutTermSignalIsNotSignaled() - { - if ('\\' === DIRECTORY_SEPARATOR) { - $this->markTestSkipped('Windows does not support POSIX signals'); - } - - $process = $this->getProcess(self::$phpBin.' -v'); - $process->run(); - $this->assertFalse($process->hasBeenSignaled()); - } - - public function testProcessWithoutTermSignal() - { - if ('\\' === DIRECTORY_SEPARATOR) { - $this->markTestSkipped('Windows does not support POSIX signals'); - } - - $process = $this->getProcess(self::$phpBin.' -v'); - $process->run(); - $this->assertEquals(0, $process->getTermSignal()); - } - - public function testProcessIsSignaledIfStopped() - { - if ('\\' === DIRECTORY_SEPARATOR) { - $this->markTestSkipped('Windows does not support POSIX signals'); - } - - $process = $this->getProcess(self::$phpBin.' -r "sleep(4);"'); - $process->start(); - $process->stop(); - $this->assertTrue($process->hasBeenSignaled()); - } - - public function testProcessWithTermSignal() - { - if ('\\' === DIRECTORY_SEPARATOR) { - $this->markTestSkipped('Windows does not support POSIX signals'); - } - - // SIGTERM is only defined if pcntl extension is present - $termSignal = defined('SIGTERM') ? SIGTERM : 15; - - $process = $this->getProcess(self::$phpBin.' -r "sleep(4);"'); - $process->start(); - $process->stop(); - - $this->assertEquals($termSignal, $process->getTermSignal()); - } - - public function testProcessThrowsExceptionWhenExternallySignaled() - { - if (!function_exists('posix_kill')) { - $this->markTestSkipped('Function posix_kill is required.'); - } - - $termSignal = defined('SIGKILL') ? SIGKILL : 9; - - $process = $this->getProcess('exec php -r "while (true) {}"'); - $process->start(); - posix_kill($process->getPid(), $termSignal); - - $this->setExpectedException('Symfony\Component\Process\Exception\RuntimeException', 'The process has been signaled with signal "9".'); - $process->wait(); - } - - public function testRestart() - { - $process1 = $this->getProcess(self::$phpBin.' -r "echo getmypid();"'); - $process1->run(); - $process2 = $process1->restart(); - - $process2->wait(); // wait for output - - // Ensure that both processed finished and the output is numeric - $this->assertFalse($process1->isRunning()); - $this->assertFalse($process2->isRunning()); - $this->assertTrue(is_numeric($process1->getOutput())); - $this->assertTrue(is_numeric($process2->getOutput())); - - // Ensure that restart returned a new process by check that the output is different - $this->assertNotEquals($process1->getOutput(), $process2->getOutput()); - } - - public function testPhpDeadlock() - { - $this->markTestSkipped('Can cause PHP to hang'); - - // Sleep doesn't work as it will allow the process to handle signals and close - // file handles from the other end. - $process = $this->getProcess(self::$phpBin.' -r "while (true) {}"'); - $process->start(); - - // PHP will deadlock when it tries to cleanup $process - } - - public function testRunProcessWithTimeout() - { - $timeout = 0.5; - $process = $this->getProcess(self::$phpBin.' -r "usleep(600000);"'); - $process->setTimeout($timeout); - $start = microtime(true); - try { - $process->run(); - $this->fail('A RuntimeException should have been raised'); - } catch (RuntimeException $e) { - } - $duration = microtime(true) - $start; - - if ('\\' === DIRECTORY_SEPARATOR) { - // Windows is a bit slower as it read file handles, then allow twice the precision - $maxDuration = $timeout + 2 * Process::TIMEOUT_PRECISION; - } else { - $maxDuration = $timeout + Process::TIMEOUT_PRECISION; - } - - $this->assertLessThan($maxDuration, $duration); - } - - public function testCheckTimeoutOnNonStartedProcess() - { - $process = $this->getProcess(self::$phpBin.' -r "sleep(3);"'); - $process->checkTimeout(); - } - - public function testCheckTimeoutOnTerminatedProcess() - { - $process = $this->getProcess(self::$phpBin.' -v'); - $process->run(); - $process->checkTimeout(); - } - - public function testCheckTimeoutOnStartedProcess() - { - $timeout = 0.5; - $precision = 100000; - $process = $this->getProcess(self::$phpBin.' -r "sleep(3);"'); - $process->setTimeout($timeout); - $start = microtime(true); - - $process->start(); - - try { - while ($process->isRunning()) { - $process->checkTimeout(); - usleep($precision); - } - $this->fail('A RuntimeException should have been raised'); - } catch (RuntimeException $e) { - } - $duration = microtime(true) - $start; - - $this->assertLessThan($timeout + $precision, $duration); - $this->assertFalse($process->isSuccessful()); - } - - public function testIdleTimeout() - { - $process = $this->getProcess(self::$phpBin.' -r "sleep(3);"'); - $process->setTimeout(10); - $process->setIdleTimeout(0.5); - - try { - $process->run(); - - $this->fail('A timeout exception was expected.'); - } catch (ProcessTimedOutException $ex) { - $this->assertTrue($ex->isIdleTimeout()); - $this->assertFalse($ex->isGeneralTimeout()); - $this->assertEquals(0.5, $ex->getExceededTimeout()); - } - } - - public function testIdleTimeoutNotExceededWhenOutputIsSent() - { - if ('\\' === DIRECTORY_SEPARATOR) { - $this->markTestIncomplete('This test fails with a timeout on Windows, can someone investigate please?'); - } - $process = $this->getProcess(sprintf('%s -r %s', self::$phpBin, escapeshellarg('$n = 30; while ($n--) {echo "foo\n"; usleep(100000); }'))); - $process->setTimeout(2); - $process->setIdleTimeout(1); - - try { - $process->run(); - $this->fail('A timeout exception was expected.'); - } catch (ProcessTimedOutException $ex) { - $this->assertTrue($ex->isGeneralTimeout(), 'A general timeout is expected.'); - $this->assertFalse($ex->isIdleTimeout(), 'No idle timeout is expected.'); - $this->assertEquals(2, $ex->getExceededTimeout()); - } - } - - public function testStartAfterATimeout() - { - $process = $this->getProcess(sprintf('%s -r %s', self::$phpBin, escapeshellarg('$n = 1000; while ($n--) {echo \'\'; usleep(1000); }'))); - $process->setTimeout(0.1); - - try { - $process->run(); - $this->fail('A RuntimeException should have been raised.'); - } catch (RuntimeException $e) { - } - $process->start(); - usleep(1000); - $process->stop(); - } - - public function testGetPid() - { - $process = $this->getProcess(self::$phpBin.' -r "usleep(500000);"'); - $process->start(); - $this->assertGreaterThan(0, $process->getPid()); - $process->wait(); - } - - public function testGetPidIsNullBeforeStart() - { - $process = $this->getProcess(self::$phpBin.' -r "sleep(1);"'); - $this->assertNull($process->getPid()); - } - - public function testGetPidIsNullAfterRun() - { - $process = $this->getProcess(self::$phpBin.' -v'); - $process->run(); - $this->assertNull($process->getPid()); - } - - public function testSignal() - { - if (!extension_loaded('pcntl')) { - $this->markTestSkipped('Extension pcntl is required.'); - } - - $process = $this->getProcess('exec php -f '.__DIR__.'/SignalListener.php'); - $process->start(); - usleep(500000); - $process->signal(SIGUSR1); - - while ($process->isRunning() && false === strpos($process->getOutput(), 'Caught SIGUSR1')) { - usleep(10000); - } - - $this->assertEquals('Caught SIGUSR1', $process->getOutput()); - } - - public function testExitCodeIsAvailableAfterSignal() - { - if (!extension_loaded('pcntl')) { - $this->markTestSkipped('Extension pcntl is required.'); - } - - $process = $this->getProcess('sleep 4'); - $process->start(); - $process->signal(SIGKILL); - - while ($process->isRunning()) { - usleep(10000); - } - - $this->assertFalse($process->isRunning()); - $this->assertTrue($process->hasBeenSignaled()); - $this->assertFalse($process->isSuccessful()); - $this->assertEquals(137, $process->getExitCode()); - } - - /** - * @expectedException \Symfony\Component\Process\Exception\LogicException - */ - public function testSignalProcessNotRunning() - { - if (!extension_loaded('pcntl')) { - $this->markTestSkipped('Extension pcntl is required.'); - } - - $process = $this->getProcess(self::$phpBin.' -v'); - $process->signal(SIGHUP); - } - - /** - * @dataProvider provideMethodsThatNeedARunningProcess - */ - public function testMethodsThatNeedARunningProcess($method) - { - $process = $this->getProcess(self::$phpBin.' -v'); - $this->setExpectedException('Symfony\Component\Process\Exception\LogicException', sprintf('Process must be started before calling %s.', $method)); - $process->{$method}(); - } - - public function provideMethodsThatNeedARunningProcess() - { - return array( - array('getOutput'), - array('getIncrementalOutput'), - array('getErrorOutput'), - array('getIncrementalErrorOutput'), - array('wait'), - ); - } - - /** - * @dataProvider provideMethodsThatNeedATerminatedProcess - */ - public function testMethodsThatNeedATerminatedProcess($method) - { - $process = $this->getProcess(self::$phpBin.' -r "sleep(1);"'); - $process->start(); - try { - $process->{$method}(); - $process->stop(0); - $this->fail('A LogicException must have been thrown'); - } catch (\Exception $e) { - $this->assertInstanceOf('Symfony\Component\Process\Exception\LogicException', $e); - $this->assertEquals(sprintf('Process must be terminated before calling %s.', $method), $e->getMessage()); - } - $process->stop(0); - } - - public function provideMethodsThatNeedATerminatedProcess() - { - return array( - array('hasBeenSignaled'), - array('getTermSignal'), - array('hasBeenStopped'), - array('getStopSignal'), - ); - } - - /** - * @expectedException \Symfony\Component\Process\Exception\RuntimeException - */ - public function testSignalWithWrongIntSignal() - { - if ('\\' === DIRECTORY_SEPARATOR) { - $this->markTestSkipped('POSIX signals do not work on Windows'); - } - - $process = $this->getProcess(self::$phpBin.' -r "sleep(3);"'); - $process->start(); - $process->signal(-4); - } - - /** - * @expectedException \Symfony\Component\Process\Exception\RuntimeException - */ - public function testSignalWithWrongNonIntSignal() - { - if ('\\' === DIRECTORY_SEPARATOR) { - $this->markTestSkipped('POSIX signals do not work on Windows'); - } - - $process = $this->getProcess(self::$phpBin.' -r "sleep(3);"'); - $process->start(); - $process->signal('Céphalopodes'); - } - - public function testDisableOutputDisablesTheOutput() - { - $p = $this->getProcess(self::$phpBin.' -r "usleep(500000);"'); - $this->assertFalse($p->isOutputDisabled()); - $p->disableOutput(); - $this->assertTrue($p->isOutputDisabled()); - $p->enableOutput(); - $this->assertFalse($p->isOutputDisabled()); - } - - public function testDisableOutputWhileRunningThrowsException() - { - $p = $this->getProcess(self::$phpBin.' -r "usleep(500000);"'); - $p->start(); - $this->setExpectedException('Symfony\Component\Process\Exception\RuntimeException', 'Disabling output while the process is running is not possible.'); - $p->disableOutput(); - } - - public function testEnableOutputWhileRunningThrowsException() - { - $p = $this->getProcess(self::$phpBin.' -r "usleep(500000);"'); - $p->disableOutput(); - $p->start(); - $this->setExpectedException('Symfony\Component\Process\Exception\RuntimeException', 'Enabling output while the process is running is not possible.'); - $p->enableOutput(); - } - - public function testEnableOrDisableOutputAfterRunDoesNotThrowException() - { - $p = $this->getProcess(self::$phpBin.' -r "usleep(500000);"'); - $p->disableOutput(); - $p->start(); - $p->wait(); - $p->enableOutput(); - $p->disableOutput(); - } - - public function testDisableOutputWhileIdleTimeoutIsSet() - { - $process = $this->getProcess('sleep 3'); - $process->setIdleTimeout(1); - $this->setExpectedException('Symfony\Component\Process\Exception\LogicException', 'Output can not be disabled while an idle timeout is set.'); - $process->disableOutput(); - } - - public function testSetIdleTimeoutWhileOutputIsDisabled() - { - $process = $this->getProcess('sleep 3'); - $process->disableOutput(); - $this->setExpectedException('Symfony\Component\Process\Exception\LogicException', 'Idle timeout can not be set while the output is disabled.'); - $process->setIdleTimeout(1); - } - - public function testSetNullIdleTimeoutWhileOutputIsDisabled() - { - $process = $this->getProcess('sleep 3'); - $process->disableOutput(); - $process->setIdleTimeout(null); - } - - /** - * @dataProvider provideStartMethods - */ - public function testStartWithACallbackAndDisabledOutput($startMethod, $exception, $exceptionMessage) - { - $p = $this->getProcess(self::$phpBin.' -r "usleep(500000);"'); - $p->disableOutput(); - $this->setExpectedException($exception, $exceptionMessage); - $p->{$startMethod}(function () {}); - } - - public function provideStartMethods() - { - return array( - array('start', 'Symfony\Component\Process\Exception\LogicException', 'Output has been disabled, enable it to allow the use of a callback.'), - array('run', 'Symfony\Component\Process\Exception\LogicException', 'Output has been disabled, enable it to allow the use of a callback.'), - array('mustRun', 'Symfony\Component\Process\Exception\LogicException', 'Output has been disabled, enable it to allow the use of a callback.'), - ); - } - - /** - * @dataProvider provideOutputFetchingMethods - */ - public function testGetOutputWhileDisabled($fetchMethod) - { - $p = $this->getProcess(self::$phpBin.' -r "usleep(500000);"'); - $p->disableOutput(); - $p->start(); - $this->setExpectedException('Symfony\Component\Process\Exception\LogicException', 'Output has been disabled.'); - $p->{$fetchMethod}(); - } - - public function provideOutputFetchingMethods() - { - return array( - array('getOutput'), - array('getIncrementalOutput'), - array('getErrorOutput'), - array('getIncrementalErrorOutput'), - ); - } - - public function responsesCodeProvider() - { - return array( - //expected output / getter / code to execute - //array(1,'getExitCode','exit(1);'), - //array(true,'isSuccessful','exit();'), - array('output', 'getOutput', 'echo \'output\';'), - ); - } - - public function pipesCodeProvider() - { - $variations = array( - 'fwrite(STDOUT, $in = file_get_contents(\'php://stdin\')); fwrite(STDERR, $in);', - 'include \''.__DIR__.'/PipeStdinInStdoutStdErrStreamSelect.php\';', - ); - - if ('\\' === DIRECTORY_SEPARATOR) { - // Avoid XL buffers on Windows because of https://bugs.php.net/bug.php?id=65650 - $sizes = array(1, 2, 4, 8); - } else { - $sizes = array(1, 16, 64, 1024, 4096); - } - - $codes = array(); - foreach ($sizes as $size) { - foreach ($variations as $code) { - $codes[] = array($code, $size); - } - } - - return $codes; - } - - /** - * provides default method names for simple getter/setter. - */ - public function methodProvider() - { - $defaults = array( - array('CommandLine'), - array('Timeout'), - array('WorkingDirectory'), - array('Env'), - array('Stdin'), - array('Input'), - array('Options'), - ); - - return $defaults; - } - - /** - * @param string $commandline - * @param null|string $cwd - * @param null|array $env - * @param null|string $input - * @param int $timeout - * @param array $options - * - * @return Process - */ - abstract protected function getProcess($commandline, $cwd = null, array $env = null, $input = null, $timeout = 60, array $options = array()); -} - -class Stringifiable -{ - public function __toString() - { - return 'stringifiable'; - } -} - -class NonStringifiable -{ -} diff --git a/vendor/symfony/process/Tests/ExecutableFinderTest.php b/vendor/symfony/process/Tests/ExecutableFinderTest.php index 812429e..0e97ae9 100644 --- a/vendor/symfony/process/Tests/ExecutableFinderTest.php +++ b/vendor/symfony/process/Tests/ExecutableFinderTest.php @@ -99,7 +99,7 @@ class ExecutableFinderTest extends \PHPUnit_Framework_TestCase $this->markTestSkipped('Cannot test when open_basedir is set'); } - $this->iniSet('open_basedir', dirname(PHP_BINARY).(!defined('HHVM_VERSION') ? PATH_SEPARATOR.'/' : '')); + $this->iniSet('open_basedir', dirname(PHP_BINARY).(!defined('HHVM_VERSION') || HHVM_VERSION_ID >= 30800 ? PATH_SEPARATOR.'/' : '')); $finder = new ExecutableFinder(); $result = $finder->find($this->getPhpBinaryName()); @@ -120,7 +120,7 @@ class ExecutableFinderTest extends \PHPUnit_Framework_TestCase } $this->setPath(''); - $this->iniSet('open_basedir', PHP_BINARY.(!defined('HHVM_VERSION') ? PATH_SEPARATOR.'/' : '')); + $this->iniSet('open_basedir', PHP_BINARY.(!defined('HHVM_VERSION') || HHVM_VERSION_ID >= 30800 ? PATH_SEPARATOR.'/' : '')); $finder = new ExecutableFinder(); $result = $finder->find($this->getPhpBinaryName(), false); diff --git a/vendor/symfony/process/Tests/NonStopableProcess.php b/vendor/symfony/process/Tests/NonStopableProcess.php index 54510c1..5643259 100644 --- a/vendor/symfony/process/Tests/NonStopableProcess.php +++ b/vendor/symfony/process/Tests/NonStopableProcess.php @@ -30,16 +30,18 @@ function handleSignal($signal) break; } - echo "received signal $name\n"; + echo "signal $name\n"; } -declare (ticks = 1); pcntl_signal(SIGTERM, 'handleSignal'); pcntl_signal(SIGINT, 'handleSignal'); +echo 'received '; + $duration = isset($argv[1]) ? (int) $argv[1] : 3; $start = microtime(true); while ($duration > (microtime(true) - $start)) { - usleep(1000); + usleep(10000); + pcntl_signal_dispatch(); } diff --git a/vendor/symfony/process/Tests/PhpExecutableFinderTest.php b/vendor/symfony/process/Tests/PhpExecutableFinderTest.php index cd4abed..28bafe3 100644 --- a/vendor/symfony/process/Tests/PhpExecutableFinderTest.php +++ b/vendor/symfony/process/Tests/PhpExecutableFinderTest.php @@ -68,6 +68,8 @@ class PhpExecutableFinderTest extends \PHPUnit_Framework_TestCase if (defined('HHVM_VERSION')) { $this->assertEquals($f->findArguments(), array('--php'), '::findArguments() returns HHVM arguments'); + } elseif ('phpdbg' === PHP_SAPI) { + $this->assertEquals($f->findArguments(), array('-qrr'), '::findArguments() returns phpdbg arguments'); } else { $this->assertEquals($f->findArguments(), array(), '::findArguments() returns no arguments'); } diff --git a/vendor/symfony/process/Tests/PhpProcessTest.php b/vendor/symfony/process/Tests/PhpProcessTest.php index 5dc546c..f54623a 100644 --- a/vendor/symfony/process/Tests/PhpProcessTest.php +++ b/vendor/symfony/process/Tests/PhpProcessTest.php @@ -30,20 +30,20 @@ PHP public function testCommandLine() { - $process = new PhpProcess(<<find(); + $commandLine = $process->getCommandLine(); - $this->assertSame($commandLine, $process->getCommandLine(), '::getCommandLine() returns the command line of PHP before start'); + $f = new PhpExecutableFinder(); + $this->assertContains($f->find(), $commandLine, '::getCommandLine() returns the command line of PHP before start'); $process->start(); - $this->assertSame($commandLine, $process->getCommandLine(), '::getCommandLine() returns the command line of PHP after start'); + $this->assertContains($commandLine, $process->getCommandLine(), '::getCommandLine() returns the command line of PHP after start'); $process->wait(); - $this->assertSame($commandLine, $process->getCommandLine(), '::getCommandLine() returns the command line of PHP after wait'); + $this->assertContains($commandLine, $process->getCommandLine(), '::getCommandLine() returns the command line of PHP after wait'); } } diff --git a/vendor/symfony/process/Tests/ProcessInSigchildEnvironment.php b/vendor/symfony/process/Tests/ProcessInSigchildEnvironment.php deleted file mode 100644 index 3977bcd..0000000 --- a/vendor/symfony/process/Tests/ProcessInSigchildEnvironment.php +++ /dev/null @@ -1,22 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Process\Tests; - -use Symfony\Component\Process\Process; - -class ProcessInSigchildEnvironment extends Process -{ - protected function isSigchildEnabled() - { - return true; - } -} diff --git a/vendor/symfony/process/Tests/SigchildDisabledProcessTest.php b/vendor/symfony/process/Tests/SigchildDisabledProcessTest.php deleted file mode 100644 index fdae5ec..0000000 --- a/vendor/symfony/process/Tests/SigchildDisabledProcessTest.php +++ /dev/null @@ -1,263 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Process\Tests; - -class SigchildDisabledProcessTest extends AbstractProcessTest -{ - /** - * @expectedException \Symfony\Component\Process\Exception\RuntimeException - * @expectedExceptionMessage This PHP has been compiled with --enable-sigchild. You must use setEnhanceSigchildCompatibility() to use this method. - */ - public function testGetExitCode() - { - parent::testGetExitCode(); - } - - /** - * @expectedException \Symfony\Component\Process\Exception\RuntimeException - * @expectedExceptionMessage This PHP has been compiled with --enable-sigchild. You must use setEnhanceSigchildCompatibility() to use this method. - */ - public function testGetExitCodeIsNullOnStart() - { - parent::testGetExitCodeIsNullOnStart(); - } - - /** - * @expectedException \Symfony\Component\Process\Exception\RuntimeException - * @expectedExceptionMessage This PHP has been compiled with --enable-sigchild. You must use setEnhanceSigchildCompatibility() to use this method. - */ - public function testGetExitCodeIsNullOnWhenStartingAgain() - { - parent::testGetExitCodeIsNullOnWhenStartingAgain(); - } - - /** - * @expectedException \Symfony\Component\Process\Exception\RuntimeException - * @expectedExceptionMessage This PHP has been compiled with --enable-sigchild. You must use setEnhanceSigchildCompatibility() to use this method. - */ - public function testExitCodeCommandFailed() - { - parent::testExitCodeCommandFailed(); - } - - /** - * @expectedException \Symfony\Component\Process\Exception\RuntimeException - * @expectedExceptionMessage This PHP has been compiled with --enable-sigchild. You must use setEnhanceSigchildCompatibility() to use this method. - */ - public function testMustRun() - { - parent::testMustRun(); - } - - /** - * @expectedException \Symfony\Component\Process\Exception\RuntimeException - * @expectedExceptionMessage This PHP has been compiled with --enable-sigchild. You must use setEnhanceSigchildCompatibility() to use this method. - */ - public function testSuccessfulMustRunHasCorrectExitCode() - { - parent::testSuccessfulMustRunHasCorrectExitCode(); - } - - /** - * @expectedException \Symfony\Component\Process\Exception\RuntimeException - */ - public function testMustRunThrowsException() - { - parent::testMustRunThrowsException(); - } - - /** - * @expectedException \Symfony\Component\Process\Exception\RuntimeException - */ - public function testProcessIsSignaledIfStopped() - { - parent::testProcessIsSignaledIfStopped(); - } - - /** - * @expectedException \Symfony\Component\Process\Exception\RuntimeException - * @expectedExceptionMessage This PHP has been compiled with --enable-sigchild. Term signal can not be retrieved. - */ - public function testProcessWithTermSignal() - { - parent::testProcessWithTermSignal(); - } - - /** - * @expectedException \Symfony\Component\Process\Exception\RuntimeException - * @expectedExceptionMessage This PHP has been compiled with --enable-sigchild. Term signal can not be retrieved. - */ - public function testProcessIsNotSignaled() - { - parent::testProcessIsNotSignaled(); - } - - /** - * @expectedException \Symfony\Component\Process\Exception\RuntimeException - * @expectedExceptionMessage This PHP has been compiled with --enable-sigchild. Term signal can not be retrieved. - */ - public function testProcessWithoutTermSignal() - { - parent::testProcessWithoutTermSignal(); - } - - /** - * @expectedException \Symfony\Component\Process\Exception\RuntimeException - * @expectedExceptionMessage This PHP has been compiled with --enable-sigchild. You must use setEnhanceSigchildCompatibility() to use this method. - */ - public function testCheckTimeoutOnStartedProcess() - { - parent::testCheckTimeoutOnStartedProcess(); - } - - /** - * @expectedException \Symfony\Component\Process\Exception\RuntimeException - * @expectedExceptionMessage This PHP has been compiled with --enable-sigchild. The process identifier can not be retrieved. - */ - public function testGetPid() - { - parent::testGetPid(); - } - - /** - * @expectedException \Symfony\Component\Process\Exception\RuntimeException - * @expectedExceptionMessage This PHP has been compiled with --enable-sigchild. The process identifier can not be retrieved. - */ - public function testGetPidIsNullBeforeStart() - { - parent::testGetPidIsNullBeforeStart(); - } - - /** - * @expectedException \Symfony\Component\Process\Exception\RuntimeException - * @expectedExceptionMessage This PHP has been compiled with --enable-sigchild. The process identifier can not be retrieved. - */ - public function testGetPidIsNullAfterRun() - { - parent::testGetPidIsNullAfterRun(); - } - - /** - * @expectedException \Symfony\Component\Process\Exception\RuntimeException - * @expectedExceptionMessage This PHP has been compiled with --enable-sigchild. You must use setEnhanceSigchildCompatibility() to use this method. - */ - public function testExitCodeText() - { - $process = $this->getProcess('qdfsmfkqsdfmqmsd'); - $process->run(); - - $process->getExitCodeText(); - } - - /** - * @expectedException \Symfony\Component\Process\Exception\RuntimeException - * @expectedExceptionMessage This PHP has been compiled with --enable-sigchild. You must use setEnhanceSigchildCompatibility() to use this method. - */ - public function testExitCodeTextIsNullWhenExitCodeIsNull() - { - parent::testExitCodeTextIsNullWhenExitCodeIsNull(); - } - - /** - * @expectedException \Symfony\Component\Process\Exception\RuntimeException - * @expectedExceptionMessage This PHP has been compiled with --enable-sigchild. You must use setEnhanceSigchildCompatibility() to use this method. - */ - public function testIsSuccessful() - { - parent::testIsSuccessful(); - } - - /** - * @expectedException \Symfony\Component\Process\Exception\RuntimeException - * @expectedExceptionMessage This PHP has been compiled with --enable-sigchild. You must use setEnhanceSigchildCompatibility() to use this method. - */ - public function testIsSuccessfulOnlyAfterTerminated() - { - parent::testIsSuccessfulOnlyAfterTerminated(); - } - - /** - * @expectedException \Symfony\Component\Process\Exception\RuntimeException - * @expectedExceptionMessage This PHP has been compiled with --enable-sigchild. You must use setEnhanceSigchildCompatibility() to use this method. - */ - public function testIsNotSuccessful() - { - parent::testIsNotSuccessful(); - } - - /** - * @expectedException \Symfony\Component\Process\Exception\RuntimeException - * @expectedExceptionMessage This PHP has been compiled with --enable-sigchild. You must use setEnhanceSigchildCompatibility() to use this method. - */ - public function testTTYCommandExitCode() - { - parent::testTTYCommandExitCode(); - } - - /** - * @expectedException \Symfony\Component\Process\Exception\RuntimeException - * @expectedExceptionMessage This PHP has been compiled with --enable-sigchild. The process can not be signaled. - */ - public function testSignal() - { - parent::testSignal(); - } - - /** - * @expectedException \Symfony\Component\Process\Exception\RuntimeException - * @expectedExceptionMessage This PHP has been compiled with --enable-sigchild. Term signal can not be retrieved. - */ - public function testProcessWithoutTermSignalIsNotSignaled() - { - parent::testProcessWithoutTermSignalIsNotSignaled(); - } - - public function testStopWithTimeoutIsActuallyWorking() - { - $this->markTestSkipped('Stopping with signal is not supported in sigchild environment'); - } - - public function testProcessThrowsExceptionWhenExternallySignaled() - { - $this->markTestSkipped('Retrieving Pid is not supported in sigchild environment'); - } - - public function testExitCodeIsAvailableAfterSignal() - { - $this->markTestSkipped('Signal is not supported in sigchild environment'); - } - - public function testRunProcessWithTimeout() - { - $this->markTestSkipped('Signal (required for timeout) is not supported in sigchild environment'); - } - - public function provideStartMethods() - { - return array( - array('start', 'Symfony\Component\Process\Exception\LogicException', 'Output has been disabled, enable it to allow the use of a callback.'), - array('run', 'Symfony\Component\Process\Exception\LogicException', 'Output has been disabled, enable it to allow the use of a callback.'), - array('mustRun', 'Symfony\Component\Process\Exception\RuntimeException', 'This PHP has been compiled with --enable-sigchild. You must use setEnhanceSigchildCompatibility() to use this method.'), - ); - } - - /** - * {@inheritdoc} - */ - protected function getProcess($commandline, $cwd = null, array $env = null, $input = null, $timeout = 60, array $options = array()) - { - $process = new ProcessInSigchildEnvironment($commandline, $cwd, $env, $input, $timeout, $options); - $process->setEnhanceSigchildCompatibility(false); - - return $process; - } -} diff --git a/vendor/symfony/process/Tests/SigchildEnabledProcessTest.php b/vendor/symfony/process/Tests/SigchildEnabledProcessTest.php deleted file mode 100644 index 2668a9b..0000000 --- a/vendor/symfony/process/Tests/SigchildEnabledProcessTest.php +++ /dev/null @@ -1,148 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Process\Tests; - -class SigchildEnabledProcessTest extends AbstractProcessTest -{ - /** - * @expectedException \Symfony\Component\Process\Exception\RuntimeException - * @expectedExceptionMessage This PHP has been compiled with --enable-sigchild. Term signal can not be retrieved. - */ - public function testProcessIsSignaledIfStopped() - { - parent::testProcessIsSignaledIfStopped(); - } - - /** - * @expectedException \Symfony\Component\Process\Exception\RuntimeException - * @expectedExceptionMessage This PHP has been compiled with --enable-sigchild. Term signal can not be retrieved. - */ - public function testProcessWithTermSignal() - { - parent::testProcessWithTermSignal(); - } - - /** - * @expectedException \Symfony\Component\Process\Exception\RuntimeException - * @expectedExceptionMessage This PHP has been compiled with --enable-sigchild. Term signal can not be retrieved. - */ - public function testProcessIsNotSignaled() - { - parent::testProcessIsNotSignaled(); - } - - /** - * @expectedException \Symfony\Component\Process\Exception\RuntimeException - * @expectedExceptionMessage This PHP has been compiled with --enable-sigchild. Term signal can not be retrieved. - */ - public function testProcessWithoutTermSignal() - { - parent::testProcessWithoutTermSignal(); - } - - /** - * @expectedException \Symfony\Component\Process\Exception\RuntimeException - * @expectedExceptionMessage This PHP has been compiled with --enable-sigchild. The process identifier can not be retrieved. - */ - public function testGetPid() - { - parent::testGetPid(); - } - - /** - * @expectedException \Symfony\Component\Process\Exception\RuntimeException - * @expectedExceptionMessage This PHP has been compiled with --enable-sigchild. The process identifier can not be retrieved. - */ - public function testGetPidIsNullBeforeStart() - { - parent::testGetPidIsNullBeforeStart(); - } - - /** - * @expectedException \Symfony\Component\Process\Exception\RuntimeException - * @expectedExceptionMessage This PHP has been compiled with --enable-sigchild. The process identifier can not be retrieved. - */ - public function testGetPidIsNullAfterRun() - { - parent::testGetPidIsNullAfterRun(); - } - - public function testExitCodeText() - { - $process = $this->getProcess('qdfsmfkqsdfmqmsd'); - $process->run(); - - $this->assertInternalType('string', $process->getExitCodeText()); - } - - /** - * @expectedException \Symfony\Component\Process\Exception\RuntimeException - * @expectedExceptionMessage This PHP has been compiled with --enable-sigchild. The process can not be signaled. - */ - public function testSignal() - { - parent::testSignal(); - } - - /** - * @expectedException \Symfony\Component\Process\Exception\RuntimeException - * @expectedExceptionMessage This PHP has been compiled with --enable-sigchild. Term signal can not be retrieved. - */ - public function testProcessWithoutTermSignalIsNotSignaled() - { - parent::testProcessWithoutTermSignalIsNotSignaled(); - } - - public function testProcessThrowsExceptionWhenExternallySignaled() - { - $this->markTestSkipped('Retrieving Pid is not supported in sigchild environment'); - } - - public function testExitCodeIsAvailableAfterSignal() - { - $this->markTestSkipped('Signal is not supported in sigchild environment'); - } - - public function testStartAfterATimeout() - { - if ('\\' === DIRECTORY_SEPARATOR) { - $this->markTestSkipped('Restarting a timed-out process on Windows is not supported in sigchild environment'); - } - parent::testStartAfterATimeout(); - } - - public function testStopWithTimeoutIsActuallyWorking() - { - $this->markTestSkipped('Stopping with signal is not supported in sigchild environment'); - } - - public function testRunProcessWithTimeout() - { - $this->markTestSkipped('Signal (required for timeout) is not supported in sigchild environment'); - } - - public function testCheckTimeoutOnStartedProcess() - { - $this->markTestSkipped('Signal (required for timeout) is not supported in sigchild environment'); - } - - /** - * {@inheritdoc} - */ - protected function getProcess($commandline, $cwd = null, array $env = null, $input = null, $timeout = 60, array $options = array()) - { - $process = new ProcessInSigchildEnvironment($commandline, $cwd, $env, $input, $timeout, $options); - $process->setEnhanceSigchildCompatibility(true); - - return $process; - } -} diff --git a/vendor/symfony/process/Tests/SignalListener.php b/vendor/symfony/process/Tests/SignalListener.php index 4206550..0353657 100644 --- a/vendor/symfony/process/Tests/SignalListener.php +++ b/vendor/symfony/process/Tests/SignalListener.php @@ -9,17 +9,13 @@ * file that was distributed with this source code. */ -// required for signal handling -declare (ticks = 1); +pcntl_signal(SIGUSR1, function () {echo 'SIGUSR1'; exit;}); -pcntl_signal(SIGUSR1, function () {echo 'Caught SIGUSR1'; exit;}); +echo 'Caught '; $n = 0; -// ticks require activity to work - sleep(4); does not work -while ($n < 400) { +while ($n++ < 400) { usleep(10000); - ++$n; + pcntl_signal_dispatch(); } - -return; diff --git a/vendor/symfony/process/Tests/SimpleProcessTest.php b/vendor/symfony/process/Tests/SimpleProcessTest.php deleted file mode 100644 index b3ee5c0..0000000 --- a/vendor/symfony/process/Tests/SimpleProcessTest.php +++ /dev/null @@ -1,225 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Process\Tests; - -use Symfony\Component\Process\Process; - -class SimpleProcessTest extends AbstractProcessTest -{ - private $enabledSigchild = false; - - protected function setUp() - { - ob_start(); - phpinfo(INFO_GENERAL); - - $this->enabledSigchild = false !== strpos(ob_get_clean(), '--enable-sigchild'); - } - - public function testGetExitCode() - { - $this->skipIfPHPSigchild(); // This test use exitcode that is not available in this case - parent::testGetExitCode(); - } - - public function testExitCodeCommandFailed() - { - $this->skipIfPHPSigchild(); // This test use exitcode that is not available in this case - parent::testExitCodeCommandFailed(); - } - - public function testProcessIsSignaledIfStopped() - { - $this->expectExceptionIfPHPSigchild('Symfony\Component\Process\Exception\RuntimeException', 'This PHP has been compiled with --enable-sigchild. Term signal can not be retrieved'); - parent::testProcessIsSignaledIfStopped(); - } - - public function testProcessWithTermSignal() - { - $this->expectExceptionIfPHPSigchild('Symfony\Component\Process\Exception\RuntimeException', 'This PHP has been compiled with --enable-sigchild. Term signal can not be retrieved'); - parent::testProcessWithTermSignal(); - } - - public function testProcessIsNotSignaled() - { - $this->expectExceptionIfPHPSigchild('Symfony\Component\Process\Exception\RuntimeException', 'This PHP has been compiled with --enable-sigchild. Term signal can not be retrieved'); - parent::testProcessIsNotSignaled(); - } - - public function testProcessWithoutTermSignal() - { - $this->expectExceptionIfPHPSigchild('Symfony\Component\Process\Exception\RuntimeException', 'This PHP has been compiled with --enable-sigchild. Term signal can not be retrieved'); - parent::testProcessWithoutTermSignal(); - } - - public function testExitCodeText() - { - $this->skipIfPHPSigchild(); // This test use exitcode that is not available in this case - parent::testExitCodeText(); - } - - public function testIsSuccessful() - { - $this->skipIfPHPSigchild(); // This test use PID that is not available in this case - parent::testIsSuccessful(); - } - - public function testIsNotSuccessful() - { - $this->skipIfPHPSigchild(); // This test use PID that is not available in this case - parent::testIsNotSuccessful(); - } - - public function testGetPid() - { - $this->skipIfPHPSigchild(); // This test use PID that is not available in this case - parent::testGetPid(); - } - - public function testGetPidIsNullBeforeStart() - { - $this->skipIfPHPSigchild(); // This test use PID that is not available in this case - parent::testGetPidIsNullBeforeStart(); - } - - public function testGetPidIsNullAfterRun() - { - $this->skipIfPHPSigchild(); // This test use PID that is not available in this case - parent::testGetPidIsNullAfterRun(); - } - - public function testSignal() - { - $this->expectExceptionIfPHPSigchild('Symfony\Component\Process\Exception\RuntimeException', 'This PHP has been compiled with --enable-sigchild. The process can not be signaled.'); - parent::testSignal(); - } - - public function testProcessWithoutTermSignalIsNotSignaled() - { - $this->expectExceptionIfPHPSigchild('Symfony\Component\Process\Exception\RuntimeException', 'This PHP has been compiled with --enable-sigchild. Term signal can not be retrieved'); - parent::testProcessWithoutTermSignalIsNotSignaled(); - } - - public function testProcessThrowsExceptionWhenExternallySignaled() - { - $this->skipIfPHPSigchild(); // This test use PID that is not available in this case - parent::testProcessThrowsExceptionWhenExternallySignaled(); - } - - public function testExitCodeIsAvailableAfterSignal() - { - $this->expectExceptionIfPHPSigchild('Symfony\Component\Process\Exception\RuntimeException', 'This PHP has been compiled with --enable-sigchild. The process can not be signaled.'); - parent::testExitCodeIsAvailableAfterSignal(); - } - - /** - * @expectedException \Symfony\Component\Process\Exception\LogicException - * @expectedExceptionMessage Can not send signal on a non running process. - */ - public function testSignalProcessNotRunning() - { - parent::testSignalProcessNotRunning(); - } - - public function testSignalWithWrongIntSignal() - { - if ($this->enabledSigchild) { - $this->expectExceptionIfPHPSigchild('Symfony\Component\Process\Exception\RuntimeException', 'This PHP has been compiled with --enable-sigchild. The process can not be signaled.'); - } else { - $this->setExpectedException('Symfony\Component\Process\Exception\RuntimeException', 'Error while sending signal `-4`.'); - } - parent::testSignalWithWrongIntSignal(); - } - - public function testSignalWithWrongNonIntSignal() - { - if ($this->enabledSigchild) { - $this->expectExceptionIfPHPSigchild('Symfony\Component\Process\Exception\RuntimeException', 'This PHP has been compiled with --enable-sigchild. The process can not be signaled.'); - } else { - $this->setExpectedException('Symfony\Component\Process\Exception\RuntimeException', 'Error while sending signal `Céphalopodes`.'); - } - parent::testSignalWithWrongNonIntSignal(); - } - - public function testStopTerminatesProcessCleanly() - { - try { - $process = $this->getProcess(self::$phpBin.' -r "echo \'foo\'; sleep(1); echo \'bar\';"'); - $process->run(function () use ($process) { - $process->stop(); - }); - } catch (\RuntimeException $e) { - $this->fail('A call to stop() is not expected to cause wait() to throw a RuntimeException'); - } - } - - public function testKillSignalTerminatesProcessCleanly() - { - $this->expectExceptionIfPHPSigchild('Symfony\Component\Process\Exception\RuntimeException', 'This PHP has been compiled with --enable-sigchild. The process can not be signaled.'); - - try { - $process = $this->getProcess(self::$phpBin.' -r "echo \'foo\'; sleep(1); echo \'bar\';"'); - $process->run(function () use ($process) { - if ($process->isRunning()) { - $process->signal(defined('SIGKILL') ? SIGKILL : 9); - } - }); - } catch (\RuntimeException $e) { - $this->fail('A call to signal() is not expected to cause wait() to throw a RuntimeException'); - } - } - - public function testTermSignalTerminatesProcessCleanly() - { - $this->expectExceptionIfPHPSigchild('Symfony\Component\Process\Exception\RuntimeException', 'This PHP has been compiled with --enable-sigchild. The process can not be signaled.'); - - try { - $process = $this->getProcess(self::$phpBin.' -r "echo \'foo\'; sleep(1); echo \'bar\';"'); - $process->run(function () use ($process) { - if ($process->isRunning()) { - $process->signal(defined('SIGTERM') ? SIGTERM : 15); - } - }); - } catch (\RuntimeException $e) { - $this->fail('A call to signal() is not expected to cause wait() to throw a RuntimeException'); - } - } - - public function testStopWithTimeoutIsActuallyWorking() - { - $this->skipIfPHPSigchild(); - - parent::testStopWithTimeoutIsActuallyWorking(); - } - - /** - * {@inheritdoc} - */ - protected function getProcess($commandline, $cwd = null, array $env = null, $input = null, $timeout = 60, array $options = array()) - { - return new Process($commandline, $cwd, $env, $input, $timeout, $options); - } - - private function skipIfPHPSigchild() - { - if ($this->enabledSigchild) { - $this->markTestSkipped('Your PHP has been compiled with --enable-sigchild, this test can not be executed'); - } - } - - private function expectExceptionIfPHPSigchild($classname, $message) - { - if ($this->enabledSigchild) { - $this->setExpectedException($classname, $message); - } - } -} diff --git a/vendor/symfony/process/composer.json b/vendor/symfony/process/composer.json index 8d21baf..28b3716 100644 --- a/vendor/symfony/process/composer.json +++ b/vendor/symfony/process/composer.json @@ -19,7 +19,10 @@ "php": ">=5.3.9" }, "autoload": { - "psr-4": { "Symfony\\Component\\Process\\": "" } + "psr-4": { "Symfony\\Component\\Process\\": "" }, + "exclude-from-classmap": [ + "/Tests/" + ] }, "minimum-stability": "dev", "extra": { diff --git a/vendor/symfony/process/phpunit.xml.dist b/vendor/symfony/process/phpunit.xml.dist index b5d605c..7885000 100644 --- a/vendor/symfony/process/phpunit.xml.dist +++ b/vendor/symfony/process/phpunit.xml.dist @@ -21,6 +21,7 @@ ./ ./Tests + ./vendor diff --git a/vendor/symfony/security-core/Encoder/BCryptPasswordEncoder.php b/vendor/symfony/security-core/Encoder/BCryptPasswordEncoder.php index d2b0319..83ae334 100644 --- a/vendor/symfony/security-core/Encoder/BCryptPasswordEncoder.php +++ b/vendor/symfony/security-core/Encoder/BCryptPasswordEncoder.php @@ -19,6 +19,8 @@ use Symfony\Component\Security\Core\Exception\BadCredentialsException; */ class BCryptPasswordEncoder extends BasePasswordEncoder { + const MAX_PASSWORD_LENGTH = 72; + /** * @var string */ diff --git a/vendor/symfony/security-core/Encoder/BasePasswordEncoder.php b/vendor/symfony/security-core/Encoder/BasePasswordEncoder.php index 1c9ada1..fcf2e47 100644 --- a/vendor/symfony/security-core/Encoder/BasePasswordEncoder.php +++ b/vendor/symfony/security-core/Encoder/BasePasswordEncoder.php @@ -95,6 +95,6 @@ abstract class BasePasswordEncoder implements PasswordEncoderInterface */ protected function isPasswordTooLong($password) { - return strlen($password) > self::MAX_PASSWORD_LENGTH; + return strlen($password) > static::MAX_PASSWORD_LENGTH; } } diff --git a/vendor/symfony/security-core/LICENSE b/vendor/symfony/security-core/LICENSE index 43028bc..12a7453 100644 --- a/vendor/symfony/security-core/LICENSE +++ b/vendor/symfony/security-core/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2015 Fabien Potencier +Copyright (c) 2004-2016 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/vendor/symfony/security-core/Tests/Authentication/Token/AbstractTokenTest.php b/vendor/symfony/security-core/Tests/Authentication/Token/AbstractTokenTest.php index 6f2b6ed..1a786d7 100644 --- a/vendor/symfony/security-core/Tests/Authentication/Token/AbstractTokenTest.php +++ b/vendor/symfony/security-core/Tests/Authentication/Token/AbstractTokenTest.php @@ -85,10 +85,6 @@ class AbstractTokenTest extends \PHPUnit_Framework_TestCase $token->eraseCredentials(); } - /** - * @covers Symfony\Component\Security\Core\Authentication\Token\AbstractToken::serialize - * @covers Symfony\Component\Security\Core\Authentication\Token\AbstractToken::unserialize - */ public function testSerialize() { $token = $this->getToken(array('ROLE_FOO')); @@ -114,9 +110,6 @@ class AbstractTokenTest extends \PHPUnit_Framework_TestCase ); } - /** - * @covers Symfony\Component\Security\Core\Authentication\Token\AbstractToken::__construct - */ public function testConstructor() { $token = $this->getToken(array('ROLE_FOO')); @@ -129,10 +122,6 @@ class AbstractTokenTest extends \PHPUnit_Framework_TestCase $this->assertEquals(array(new Role('ROLE_FOO'), new Role('ROLE_BAR')), $token->getRoles()); } - /** - * @covers Symfony\Component\Security\Core\Authentication\Token\AbstractToken::isAuthenticated - * @covers Symfony\Component\Security\Core\Authentication\Token\AbstractToken::setAuthenticated - */ public function testAuthenticatedFlag() { $token = $this->getToken(); @@ -145,13 +134,6 @@ class AbstractTokenTest extends \PHPUnit_Framework_TestCase $this->assertFalse($token->isAuthenticated()); } - /** - * @covers Symfony\Component\Security\Core\Authentication\Token\AbstractToken::getAttributes - * @covers Symfony\Component\Security\Core\Authentication\Token\AbstractToken::setAttributes - * @covers Symfony\Component\Security\Core\Authentication\Token\AbstractToken::hasAttribute - * @covers Symfony\Component\Security\Core\Authentication\Token\AbstractToken::getAttribute - * @covers Symfony\Component\Security\Core\Authentication\Token\AbstractToken::setAttribute - */ public function testAttributes() { $attributes = array('foo' => 'bar'); diff --git a/vendor/symfony/security-core/Tests/Encoder/BCryptPasswordEncoderTest.php b/vendor/symfony/security-core/Tests/Encoder/BCryptPasswordEncoderTest.php index ebd845d..40de8af 100644 --- a/vendor/symfony/security-core/Tests/Encoder/BCryptPasswordEncoderTest.php +++ b/vendor/symfony/security-core/Tests/Encoder/BCryptPasswordEncoderTest.php @@ -67,13 +67,15 @@ class BCryptPasswordEncoderTest extends \PHPUnit_Framework_TestCase { $encoder = new BCryptPasswordEncoder(self::VALID_COST); - $encoder->encodePassword(str_repeat('a', 5000), 'salt'); + $encoder->encodePassword(str_repeat('a', 73), 'salt'); } public function testCheckPasswordLength() { $encoder = new BCryptPasswordEncoder(self::VALID_COST); + $result = $encoder->encodePassword(str_repeat('a', 72), null); - $this->assertFalse($encoder->isPasswordValid('encoded', str_repeat('a', 5000), 'salt')); + $this->assertFalse($encoder->isPasswordValid($result, str_repeat('a', 73), 'salt')); + $this->assertTrue($encoder->isPasswordValid($result, str_repeat('a', 72), 'salt')); } } diff --git a/vendor/symfony/security-core/Tests/User/UserTest.php b/vendor/symfony/security-core/Tests/User/UserTest.php index f514eda..b589b4a 100644 --- a/vendor/symfony/security-core/Tests/User/UserTest.php +++ b/vendor/symfony/security-core/Tests/User/UserTest.php @@ -16,7 +16,6 @@ use Symfony\Component\Security\Core\User\User; class UserTest extends \PHPUnit_Framework_TestCase { /** - * @covers Symfony\Component\Security\Core\User\User::__construct * @expectedException \InvalidArgumentException */ public function testConstructorException() @@ -24,10 +23,6 @@ class UserTest extends \PHPUnit_Framework_TestCase new User('', 'superpass'); } - /** - * @covers Symfony\Component\Security\Core\User\User::__construct - * @covers Symfony\Component\Security\Core\User\User::getRoles - */ public function testGetRoles() { $user = new User('fabien', 'superpass'); @@ -37,38 +32,24 @@ class UserTest extends \PHPUnit_Framework_TestCase $this->assertEquals(array('ROLE_ADMIN'), $user->getRoles()); } - /** - * @covers Symfony\Component\Security\Core\User\User::__construct - * @covers Symfony\Component\Security\Core\User\User::getPassword - */ public function testGetPassword() { $user = new User('fabien', 'superpass'); $this->assertEquals('superpass', $user->getPassword()); } - /** - * @covers Symfony\Component\Security\Core\User\User::__construct - * @covers Symfony\Component\Security\Core\User\User::getUsername - */ public function testGetUsername() { $user = new User('fabien', 'superpass'); $this->assertEquals('fabien', $user->getUsername()); } - /** - * @covers Symfony\Component\Security\Core\User\User::getSalt - */ public function testGetSalt() { $user = new User('fabien', 'superpass'); $this->assertEquals('', $user->getSalt()); } - /** - * @covers Symfony\Component\Security\Core\User\User::isAccountNonExpired - */ public function testIsAccountNonExpired() { $user = new User('fabien', 'superpass'); @@ -78,9 +59,6 @@ class UserTest extends \PHPUnit_Framework_TestCase $this->assertFalse($user->isAccountNonExpired()); } - /** - * @covers Symfony\Component\Security\Core\User\User::isCredentialsNonExpired - */ public function testIsCredentialsNonExpired() { $user = new User('fabien', 'superpass'); @@ -90,9 +68,6 @@ class UserTest extends \PHPUnit_Framework_TestCase $this->assertFalse($user->isCredentialsNonExpired()); } - /** - * @covers Symfony\Component\Security\Core\User\User::isAccountNonLocked - */ public function testIsAccountNonLocked() { $user = new User('fabien', 'superpass'); @@ -102,9 +77,6 @@ class UserTest extends \PHPUnit_Framework_TestCase $this->assertFalse($user->isAccountNonLocked()); } - /** - * @covers Symfony\Component\Security\Core\User\User::isEnabled - */ public function testIsEnabled() { $user = new User('fabien', 'superpass'); @@ -114,9 +86,6 @@ class UserTest extends \PHPUnit_Framework_TestCase $this->assertFalse($user->isEnabled()); } - /** - * @covers Symfony\Component\Security\Core\User\User::eraseCredentials - */ public function testEraseCredentials() { $user = new User('fabien', 'superpass'); @@ -124,9 +93,6 @@ class UserTest extends \PHPUnit_Framework_TestCase $this->assertEquals('superpass', $user->getPassword()); } - /** - * @covers Symfony\Component\Security\Core\User\User::__toString - */ public function testToString() { $user = new User('fabien', 'superpass'); diff --git a/vendor/symfony/security-core/Tests/Util/SecureRandomTest.php b/vendor/symfony/security-core/Tests/Util/SecureRandomTest.php deleted file mode 100644 index 2e94cc1..0000000 --- a/vendor/symfony/security-core/Tests/Util/SecureRandomTest.php +++ /dev/null @@ -1,201 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\Security\Core\Tests\Util; - -use Symfony\Component\Security\Core\Util\SecureRandom; - -class SecureRandomTest extends \PHPUnit_Framework_TestCase -{ - /** - * T1: Monobit test. - * - * @dataProvider getSecureRandoms - */ - public function testMonobit($secureRandom) - { - $nbOnBits = substr_count($this->getBitSequence($secureRandom, 20000), '1'); - $this->assertTrue($nbOnBits > 9654 && $nbOnBits < 10346, 'Monobit test failed, number of turned on bits: '.$nbOnBits); - } - - /** - * T2: Chi-square test with 15 degrees of freedom (chi-Quadrat-Anpassungstest). - * - * @dataProvider getSecureRandoms - */ - public function testPoker($secureRandom) - { - $b = $this->getBitSequence($secureRandom, 20000); - $c = array(); - for ($i = 0; $i <= 15; ++$i) { - $c[$i] = 0; - } - - for ($j = 1; $j <= 5000; ++$j) { - $k = 4 * $j - 1; - ++$c[8 * $b[$k - 3] + 4 * $b[$k - 2] + 2 * $b[$k - 1] + $b[$k]]; - } - - $f = 0; - for ($i = 0; $i <= 15; ++$i) { - $f += $c[$i] * $c[$i]; - } - - $Y = 16 / 5000 * $f - 5000; - - $this->assertTrue($Y > 1.03 && $Y < 57.4, 'Poker test failed, Y = '.$Y); - } - - /** - * Run test. - * - * @dataProvider getSecureRandoms - */ - public function testRun($secureRandom) - { - $b = $this->getBitSequence($secureRandom, 20000); - - $runs = array(); - for ($i = 1; $i <= 6; ++$i) { - $runs[$i] = 0; - } - - $addRun = function ($run) use (&$runs) { - if ($run > 6) { - $run = 6; - } - - ++$runs[$run]; - }; - - $currentRun = 0; - $lastBit = null; - for ($i = 0; $i < 20000; ++$i) { - if ($lastBit === $b[$i]) { - ++$currentRun; - } else { - if ($currentRun > 0) { - $addRun($currentRun); - } - - $lastBit = $b[$i]; - $currentRun = 0; - } - } - if ($currentRun > 0) { - $addRun($currentRun); - } - - $this->assertTrue($runs[1] > 2267 && $runs[1] < 2733, 'Runs of length 1 outside of defined interval: '.$runs[1]); - $this->assertTrue($runs[2] > 1079 && $runs[2] < 1421, 'Runs of length 2 outside of defined interval: '.$runs[2]); - $this->assertTrue($runs[3] > 502 && $runs[3] < 748, 'Runs of length 3 outside of defined interval: '.$runs[3]); - $this->assertTrue($runs[4] > 233 && $runs[4] < 402, 'Runs of length 4 outside of defined interval: '.$runs[4]); - $this->assertTrue($runs[5] > 90 && $runs[5] < 223, 'Runs of length 5 outside of defined interval: '.$runs[5]); - $this->assertTrue($runs[6] > 90 && $runs[6] < 233, 'Runs of length 6 outside of defined interval: '.$runs[6]); - } - - /** - * Long-run test. - * - * @dataProvider getSecureRandoms - */ - public function testLongRun($secureRandom) - { - $b = $this->getBitSequence($secureRandom, 20000); - - $longestRun = $currentRun = 0; - $lastBit = null; - for ($i = 0; $i < 20000; ++$i) { - if ($lastBit === $b[$i]) { - ++$currentRun; - } else { - if ($currentRun > $longestRun) { - $longestRun = $currentRun; - } - $lastBit = $b[$i]; - $currentRun = 0; - } - } - if ($currentRun > $longestRun) { - $longestRun = $currentRun; - } - - $this->assertTrue($longestRun < 34, 'Failed longest run test: '.$longestRun); - } - - /** - * Serial Correlation (Autokorrelationstest). - * - * @dataProvider getSecureRandoms - */ - public function testSerialCorrelation($secureRandom) - { - $shift = mt_rand(1, 5000); - $b = $this->getBitSequence($secureRandom, 20000); - - $Z = 0; - for ($i = 0; $i < 5000; ++$i) { - $Z += $b[$i] === $b[$i + $shift] ? 1 : 0; - } - - $this->assertTrue($Z > 2326 && $Z < 2674, 'Failed serial correlation test: '.$Z); - } - - public function getSecureRandoms() - { - $secureRandoms = array(); - - // only add if openssl is indeed present - $secureRandom = new SecureRandom(); - if ($this->hasOpenSsl($secureRandom)) { - $secureRandoms[] = array($secureRandom); - } - - // no-openssl with custom seed provider - $secureRandom = new SecureRandom(sys_get_temp_dir().'/_sf2.seed'); - $this->disableOpenSsl($secureRandom); - $secureRandoms[] = array($secureRandom); - - return $secureRandoms; - } - - protected function disableOpenSsl($secureRandom) - { - $ref = new \ReflectionProperty($secureRandom, 'useOpenSsl'); - $ref->setAccessible(true); - $ref->setValue($secureRandom, false); - $ref->setAccessible(false); - } - - protected function hasOpenSsl($secureRandom) - { - $ref = new \ReflectionProperty($secureRandom, 'useOpenSsl'); - $ref->setAccessible(true); - - $ret = $ref->getValue($secureRandom); - - $ref->setAccessible(false); - - return $ret; - } - - private function getBitSequence($secureRandom, $length) - { - $bitSequence = ''; - for ($i = 0; $i < $length; $i += 40) { - $value = unpack('H*', $secureRandom->nextBytes(5)); - $value = str_pad(base_convert($value[1], 16, 2), 40, '0', STR_PAD_LEFT); - $bitSequence .= $value; - } - - return substr($bitSequence, 0, $length); - } -} diff --git a/vendor/symfony/security-core/User/InMemoryUserProvider.php b/vendor/symfony/security-core/User/InMemoryUserProvider.php index 9aa39ca..c1981de 100644 --- a/vendor/symfony/security-core/User/InMemoryUserProvider.php +++ b/vendor/symfony/security-core/User/InMemoryUserProvider.php @@ -97,7 +97,7 @@ class InMemoryUserProvider implements UserProviderInterface /** * Returns the user by given username. * - * @param string $username The username. + * @param string $username The username. * * @return User * diff --git a/vendor/symfony/security-core/Util/SecureRandom.php b/vendor/symfony/security-core/Util/SecureRandom.php index 65722ce..478f556 100644 --- a/vendor/symfony/security-core/Util/SecureRandom.php +++ b/vendor/symfony/security-core/Util/SecureRandom.php @@ -11,8 +11,6 @@ namespace Symfony\Component\Security\Core\Util; -use Psr\Log\LoggerInterface; - /** * A secure random number generator implementation. * @@ -21,96 +19,11 @@ use Psr\Log\LoggerInterface; */ final class SecureRandom implements SecureRandomInterface { - private $logger; - private $useOpenSsl; - private $seed; - private $seedUpdated; - private $seedLastUpdatedAt; - private $seedFile; - - /** - * Constructor. - * - * Be aware that a guessable seed will severely compromise the PRNG - * algorithm that is employed. - * - * @param string $seedFile - * @param LoggerInterface $logger - */ - public function __construct($seedFile = null, LoggerInterface $logger = null) - { - $this->seedFile = $seedFile; - $this->logger = $logger; - - // determine whether to use OpenSSL - if (!function_exists('random_bytes') && !function_exists('openssl_random_pseudo_bytes')) { - if (null !== $this->logger) { - $this->logger->notice('It is recommended that you install the "paragonie/random_compat" library or enable the "openssl" extension for random number generation.'); - } - $this->useOpenSsl = false; - } else { - $this->useOpenSsl = true; - } - } - /** * {@inheritdoc} */ public function nextBytes($nbBytes) { - if (function_exists('random_bytes')) { - return random_bytes($nbBytes); - } - - // try OpenSSL - if ($this->useOpenSsl) { - $bytes = openssl_random_pseudo_bytes($nbBytes, $strong); - - if (false !== $bytes && true === $strong) { - return $bytes; - } - - if (null !== $this->logger) { - $this->logger->info('OpenSSL did not produce a secure random number.'); - } - } - - // initialize seed - if (null === $this->seed) { - if (null === $this->seedFile) { - throw new \RuntimeException('You need to specify a file path to store the seed.'); - } - - if (is_file($this->seedFile)) { - list($this->seed, $this->seedLastUpdatedAt) = $this->readSeed(); - } else { - $this->seed = uniqid(mt_rand(), true); - $this->updateSeed(); - } - } - - $bytes = ''; - while (strlen($bytes) < $nbBytes) { - static $incr = 1; - $bytes .= hash('sha512', $incr++.$this->seed.uniqid(mt_rand(), true).$nbBytes, true); - $this->seed = base64_encode(hash('sha512', $this->seed.$bytes.$nbBytes, true)); - $this->updateSeed(); - } - - return substr($bytes, 0, $nbBytes); - } - - private function readSeed() - { - return json_decode(file_get_contents($this->seedFile)); - } - - private function updateSeed() - { - if (!$this->seedUpdated && $this->seedLastUpdatedAt < time() - mt_rand(1, 10)) { - file_put_contents($this->seedFile, json_encode(array($this->seed, microtime(true)))); - } - - $this->seedUpdated = true; + return random_bytes($nbBytes); } } diff --git a/vendor/symfony/security-core/composer.json b/vendor/symfony/security-core/composer.json index c73a5b5..354c55e 100644 --- a/vendor/symfony/security-core/composer.json +++ b/vendor/symfony/security-core/composer.json @@ -16,14 +16,14 @@ } ], "require": { - "php": ">=5.3.9" + "php": ">=5.3.9", + "paragonie/random_compat": "~1.0" }, "require-dev": { "symfony/event-dispatcher": "~2.1", "symfony/expression-language": "~2.6", "symfony/http-foundation": "~2.4", - "symfony/translation": "~2.0,>=2.0.5", - "symfony/validator": "~2.5,>=2.5.5", + "symfony/validator": "~2.5,>=2.5.9", "psr/log": "~1.0", "ircmaxell/password-compat": "1.0.*" }, @@ -35,7 +35,10 @@ "ircmaxell/password-compat": "For using the BCrypt password encoder in PHP <5.5" }, "autoload": { - "psr-4": { "Symfony\\Component\\Security\\Core\\": "" } + "psr-4": { "Symfony\\Component\\Security\\Core\\": "" }, + "exclude-from-classmap": [ + "/Tests/" + ] }, "minimum-stability": "dev", "extra": { diff --git a/vendor/symfony/security-core/phpunit.xml.dist b/vendor/symfony/security-core/phpunit.xml.dist index 8a1a291..2dc341a 100644 --- a/vendor/symfony/security-core/phpunit.xml.dist +++ b/vendor/symfony/security-core/phpunit.xml.dist @@ -25,8 +25,9 @@ ./ - ./vendor + ./Resources ./Tests + ./vendor diff --git a/vendor/symfony/translation/Dumper/IcuResFileDumper.php b/vendor/symfony/translation/Dumper/IcuResFileDumper.php index 0a2ed9f..126e9b7 100644 --- a/vendor/symfony/translation/Dumper/IcuResFileDumper.php +++ b/vendor/symfony/translation/Dumper/IcuResFileDumper.php @@ -79,11 +79,7 @@ class IcuResFileDumper extends FileDumper 1, 4, 0, 0 // Unicode version ); - $output = $header - .$root - .$data; - - return $output; + return $header.$root.$data; } private function writePadding($data) @@ -97,9 +93,7 @@ class IcuResFileDumper extends FileDumper private function getPosition($data) { - $position = (strlen($data) + 28) / 4; - - return $position; + return (strlen($data) + 28) / 4; } /** diff --git a/vendor/symfony/translation/LICENSE b/vendor/symfony/translation/LICENSE index 43028bc..12a7453 100644 --- a/vendor/symfony/translation/LICENSE +++ b/vendor/symfony/translation/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2015 Fabien Potencier +Copyright (c) 2004-2016 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/vendor/symfony/translation/PluralizationRules.php b/vendor/symfony/translation/PluralizationRules.php index f250423..0974821 100644 --- a/vendor/symfony/translation/PluralizationRules.php +++ b/vendor/symfony/translation/PluralizationRules.php @@ -131,6 +131,7 @@ class PluralizationRules case 'fr': case 'gun': case 'hi': + case 'hy': case 'ln': case 'mg': case 'nso': diff --git a/vendor/symfony/translation/Tests/Loader/XliffFileLoaderTest.php b/vendor/symfony/translation/Tests/Loader/XliffFileLoaderTest.php index af5ea3c..eab501a 100644 --- a/vendor/symfony/translation/Tests/Loader/XliffFileLoaderTest.php +++ b/vendor/symfony/translation/Tests/Loader/XliffFileLoaderTest.php @@ -30,7 +30,7 @@ class XliffFileLoaderTest extends \PHPUnit_Framework_TestCase public function testLoadWithInternalErrorsEnabled() { - libxml_use_internal_errors(true); + $internalErrors = libxml_use_internal_errors(true); $this->assertSame(array(), libxml_get_errors()); @@ -41,6 +41,9 @@ class XliffFileLoaderTest extends \PHPUnit_Framework_TestCase $this->assertEquals('en', $catalogue->getLocale()); $this->assertEquals(array(new FileResource($resource)), $catalogue->getResources()); $this->assertSame(array(), libxml_get_errors()); + + libxml_clear_errors(); + libxml_use_internal_errors($internalErrors); } public function testLoadWithResname() diff --git a/vendor/symfony/translation/Tests/PluralizationRulesTest.php b/vendor/symfony/translation/Tests/PluralizationRulesTest.php index 066e07f..5de544e 100644 --- a/vendor/symfony/translation/Tests/PluralizationRulesTest.php +++ b/vendor/symfony/translation/Tests/PluralizationRulesTest.php @@ -60,10 +60,10 @@ class PluralizationRulesTest extends \PHPUnit_Framework_TestCase public function successLangcodes() { return array( - array('1', array('ay','bo', 'cgg','dz','id', 'ja', 'jbo', 'ka','kk','km','ko','ky')), - array('2', array('nl', 'fr', 'en', 'de', 'de_GE')), - array('3', array('be','bs','cs','hr')), - array('4', array('cy','mt', 'sl')), + array('1', array('ay', 'bo', 'cgg', 'dz', 'id', 'ja', 'jbo', 'ka', 'kk', 'km', 'ko', 'ky')), + array('2', array('nl', 'fr', 'en', 'de', 'de_GE', 'hy', 'hy_AM')), + array('3', array('be', 'bs', 'cs', 'hr')), + array('4', array('cy', 'mt', 'sl')), array('5', array()), array('6', array('ar')), ); @@ -83,7 +83,7 @@ class PluralizationRulesTest extends \PHPUnit_Framework_TestCase array('1', array('fa')), array('2', array('jbo')), array('3', array('cbs')), - array('4', array('gd','kw')), + array('4', array('gd', 'kw')), array('5', array('ga')), array('6', array()), ); diff --git a/vendor/symfony/translation/Writer/TranslationWriter.php b/vendor/symfony/translation/Writer/TranslationWriter.php index 44ac182..20d541d 100644 --- a/vendor/symfony/translation/Writer/TranslationWriter.php +++ b/vendor/symfony/translation/Writer/TranslationWriter.php @@ -77,8 +77,8 @@ class TranslationWriter // get the right dumper $dumper = $this->dumpers[$format]; - if (isset($options['path']) && !is_dir($options['path'])) { - mkdir($options['path'], 0777, true); + if (isset($options['path']) && !is_dir($options['path']) && !@mkdir($options['path'], 0777, true) && !is_dir($options['path'])) { + throw new \RuntimeException(sprintf('Translation Writer was not able to create directory "%s"', $options['path'])); } // save diff --git a/vendor/symfony/translation/composer.json b/vendor/symfony/translation/composer.json index ac833a4..8779047 100644 --- a/vendor/symfony/translation/composer.json +++ b/vendor/symfony/translation/composer.json @@ -33,7 +33,10 @@ "psr/log": "To use logging capability in translator" }, "autoload": { - "psr-4": { "Symfony\\Component\\Translation\\": "" } + "psr-4": { "Symfony\\Component\\Translation\\": "" }, + "exclude-from-classmap": [ + "/Tests/" + ] }, "minimum-stability": "dev", "extra": { diff --git a/vendor/symfony/translation/phpunit.xml.dist b/vendor/symfony/translation/phpunit.xml.dist index 16cca4a..c25ec5e 100644 --- a/vendor/symfony/translation/phpunit.xml.dist +++ b/vendor/symfony/translation/phpunit.xml.dist @@ -20,8 +20,8 @@ ./ - ./vendor ./Tests + ./vendor diff --git a/vendor/symfony/var-dumper/Caster/AmqpCaster.php b/vendor/symfony/var-dumper/Caster/AmqpCaster.php index 4e9b351..98eede2 100644 --- a/vendor/symfony/var-dumper/Caster/AmqpCaster.php +++ b/vendor/symfony/var-dumper/Caster/AmqpCaster.php @@ -48,7 +48,7 @@ class AmqpCaster { $prefix = Caster::PREFIX_VIRTUAL; - // BC layer in the ampq lib + // BC layer in the amqp lib if (method_exists($c, 'getReadTimeout')) { $timeout = $c->getReadTimeout(); } else { diff --git a/vendor/symfony/var-dumper/Caster/ReflectionCaster.php b/vendor/symfony/var-dumper/Caster/ReflectionCaster.php index 04cf7b0..cacd211 100644 --- a/vendor/symfony/var-dumper/Caster/ReflectionCaster.php +++ b/vendor/symfony/var-dumper/Caster/ReflectionCaster.php @@ -157,6 +157,9 @@ class ReflectionCaster { $prefix = Caster::PREFIX_VIRTUAL; + // Added by HHVM + unset($a['info']); + self::addMap($a, $c, array( 'position' => 'getPosition', 'isVariadic' => 'isVariadic', @@ -164,7 +167,11 @@ class ReflectionCaster )); try { - if ($c->isArray()) { + if (method_exists($c, 'hasType')) { + if ($c->hasType()) { + $a[$prefix.'typeHint'] = $c->getType()->__toString(); + } + } elseif ($c->isArray()) { $a[$prefix.'typeHint'] = 'array'; } elseif (method_exists($c, 'isCallable') && $c->isCallable()) { $a[$prefix.'typeHint'] = 'callable'; @@ -172,6 +179,9 @@ class ReflectionCaster $a[$prefix.'typeHint'] = $v->name; } } catch (\ReflectionException $e) { + if (preg_match('/^Class ([^ ]++) does not exist$/', $e->getMessage(), $m)) { + $a[$prefix.'typeHint'] = $m[1]; + } } try { @@ -180,6 +190,9 @@ class ReflectionCaster $a[$prefix.'default'] = new ConstStub($c->getDefaultValueConstantName(), $v); } } catch (\ReflectionException $e) { + if (isset($a[$prefix.'typeHint']) && $c->allowsNull()) { + $a[$prefix.'default'] = null; + } } return $a; diff --git a/vendor/symfony/var-dumper/Cloner/Data.php b/vendor/symfony/var-dumper/Cloner/Data.php index 20527e8..0aa13ef 100644 --- a/vendor/symfony/var-dumper/Cloner/Data.php +++ b/vendor/symfony/var-dumper/Cloner/Data.php @@ -53,7 +53,7 @@ class Data } /** - * Limits the numbers of elements per depth level. + * Limits the number of elements per depth level. * * @param int $maxItemsPerDepth The max number of items dumped per depth level. * diff --git a/vendor/symfony/var-dumper/Dumper/HtmlDumper.php b/vendor/symfony/var-dumper/Dumper/HtmlDumper.php index 0ae7521..1de1801 100644 --- a/vendor/symfony/var-dumper/Dumper/HtmlDumper.php +++ b/vendor/symfony/var-dumper/Dumper/HtmlDumper.php @@ -31,7 +31,7 @@ class HtmlDumper extends CliDumper protected $headerIsDumped = false; protected $lastDepth = -1; protected $styles = array( - 'default' => 'background-color:#18171B; color:#FF8400; line-height:1.2em; font:12px Menlo, Monaco, Consolas, monospace; word-wrap: break-word; white-space: pre-wrap; position:relative; z-index:100000; word-break: normal', + 'default' => 'background-color:#18171B; color:#FF8400; line-height:1.2em; font:12px Menlo, Monaco, Consolas, monospace; word-wrap: break-word; white-space: pre-wrap; position:relative; z-index:99999; word-break: normal', 'num' => 'font-weight:bold; color:#1299DA', 'const' => 'font-weight:bold', 'str' => 'font-weight:bold; color:#56DB3A', diff --git a/vendor/symfony/var-dumper/LICENSE b/vendor/symfony/var-dumper/LICENSE index ef1cde9..39fa189 100644 --- a/vendor/symfony/var-dumper/LICENSE +++ b/vendor/symfony/var-dumper/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2014-2015 Fabien Potencier +Copyright (c) 2014-2016 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/vendor/symfony/var-dumper/Tests/Caster/ReflectionCasterTest.php b/vendor/symfony/var-dumper/Tests/Caster/ReflectionCasterTest.php index edb6b1f..5c306a6 100644 --- a/vendor/symfony/var-dumper/Tests/Caster/ReflectionCasterTest.php +++ b/vendor/symfony/var-dumper/Tests/Caster/ReflectionCasterTest.php @@ -61,20 +61,58 @@ EOTXT ); } + public function testReflectionParameter() + { + $var = new \ReflectionParameter(__NAMESPACE__.'\reflectionParameterFixture', 0); + + $this->assertDumpMatchesFormat( + <<<'EOTXT' +ReflectionParameter { + +name: "arg1" + position: 0 + typeHint: "Symfony\Component\VarDumper\Tests\Caster\NotExistingClass" + default: null +} +EOTXT + , $var + ); + } + + /** + * @requires PHP 7.0 + */ + public function testReflectionParameterScalar() + { + $f = eval('return function (int $a) {};'); + $var = new \ReflectionParameter($f, 0); + + $this->assertDumpMatchesFormat( + <<<'EOTXT' +ReflectionParameter { + +name: "a" + position: 0 + typeHint: "int" +} +EOTXT + , $var + ); + } + /** * @requires PHP 7.0 */ public function testReturnType() { $f = eval('return function ():int {};'); + $line = __LINE__ - 1; $this->assertDumpMatchesFormat( - <<<'EOTXT' + << - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -namespace Symfony\Component\VarDumper\Tests\Test; - -use Symfony\Component\VarDumper\Test\VarDumperTestCase; -use Symfony\Component\VarDumper\Test\VarDumperTestTrait; - -class VarDumperTestTraitTest extends VarDumperTestCase -{ - use VarDumperTestTrait; - - public function testItComparesLargeData() - { - $howMany = 700; - $data = array_fill_keys(range(0, $howMany), array('a', 'b', 'c', 'd')); - - $expected = sprintf("array:%d [\n", $howMany + 1); - for ($i = 0; $i <= $howMany; ++$i) { - $expected .= << array:4 [ - 0 => "a" - 1 => "b" - 2 => "c" - 3 => "d" - ]\n -EODUMP; - } - $expected .= "]\n"; - - $this->assertDumpEquals($expected, $data); - } -} diff --git a/vendor/symfony/var-dumper/Tests/Test/VarDumpTestTraitTest.php b/vendor/symfony/var-dumper/Tests/Test/VarDumpTestTraitTest.php deleted file mode 100644 index 21ef14d..0000000 --- a/vendor/symfony/var-dumper/Tests/Test/VarDumpTestTraitTest.php +++ /dev/null @@ -1,16 +0,0 @@ - - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ - -// Skipping trait tests for PHP < 5.4 -if (version_compare(PHP_VERSION, '5.4.0-dev', '>=')) { - require 'VarDumpTestTraitRequire54.php'; -} - diff --git a/vendor/symfony/var-dumper/composer.json b/vendor/symfony/var-dumper/composer.json index 5b611b8..422e13c 100644 --- a/vendor/symfony/var-dumper/composer.json +++ b/vendor/symfony/var-dumper/composer.json @@ -23,7 +23,10 @@ }, "autoload": { "files": [ "Resources/functions/dump.php" ], - "psr-4": { "Symfony\\Component\\VarDumper\\": "" } + "psr-4": { "Symfony\\Component\\VarDumper\\": "" }, + "exclude-from-classmap": [ + "/Tests/" + ] }, "minimum-stability": "dev", "extra": { diff --git a/vendor/symfony/var-dumper/phpunit.xml.dist b/vendor/symfony/var-dumper/phpunit.xml.dist index 05128b9..bb16a3a 100644 --- a/vendor/symfony/var-dumper/phpunit.xml.dist +++ b/vendor/symfony/var-dumper/phpunit.xml.dist @@ -20,8 +20,8 @@ ./ - ./Tests ./Resources + ./Tests ./vendor diff --git a/vendor/symfony/yaml/CHANGELOG.md b/vendor/symfony/yaml/CHANGELOG.md index 096cf65..fe77de7 100644 --- a/vendor/symfony/yaml/CHANGELOG.md +++ b/vendor/symfony/yaml/CHANGELOG.md @@ -1,6 +1,32 @@ CHANGELOG ========= +3.0.0 +----- + + * Yaml::parse() now throws an exception when a blackslash is not escaped + in double-quoted strings + +2.8.0 +----- + + * Deprecated usage of a colon in an unquoted mapping value + * Deprecated usage of @, \`, | and > at the beginning of an unquoted string + * When surrounding strings with double-quotes, you must now escape `\` characters. Not + escaping those characters (when surrounded by double-quotes) is deprecated. + + Before: + + ```yml + class: "Foo\Var" + ``` + + After: + + ```yml + class: "Foo\\Var" + ``` + 2.1.0 ----- diff --git a/vendor/symfony/yaml/Escaper.php b/vendor/symfony/yaml/Escaper.php index ac325a2..7bac8dd 100644 --- a/vendor/symfony/yaml/Escaper.php +++ b/vendor/symfony/yaml/Escaper.php @@ -16,6 +16,8 @@ namespace Symfony\Component\Yaml; * YAML strings. * * @author Matthew Lewinski + * + * @internal */ class Escaper { @@ -31,13 +33,13 @@ class Escaper "\x08", "\x09", "\x0a", "\x0b", "\x0c", "\x0d", "\x0e", "\x0f", "\x10", "\x11", "\x12", "\x13", "\x14", "\x15", "\x16", "\x17", "\x18", "\x19", "\x1a", "\x1b", "\x1c", "\x1d", "\x1e", "\x1f", - "\xc2\x85", "\xc2\xa0", "\xe2\x80\xa8", "\xe2\x80\xa9",); + "\xc2\x85", "\xc2\xa0", "\xe2\x80\xa8", "\xe2\x80\xa9"); private static $escaped = array('\\\\', '\\"', '\\\\', '\\"', '\\0', '\\x01', '\\x02', '\\x03', '\\x04', '\\x05', '\\x06', '\\a', '\\b', '\\t', '\\n', '\\v', '\\f', '\\r', '\\x0e', '\\x0f', '\\x10', '\\x11', '\\x12', '\\x13', '\\x14', '\\x15', '\\x16', '\\x17', '\\x18', '\\x19', '\\x1a', '\\e', '\\x1c', '\\x1d', '\\x1e', '\\x1f', - '\\N', '\\_', '\\L', '\\P',); + '\\N', '\\_', '\\L', '\\P'); /** * Determines if a PHP value would require double quoting in YAML. diff --git a/vendor/symfony/yaml/Exception/ParseException.php b/vendor/symfony/yaml/Exception/ParseException.php index b74eb91..ba3be7d 100644 --- a/vendor/symfony/yaml/Exception/ParseException.php +++ b/vendor/symfony/yaml/Exception/ParseException.php @@ -123,12 +123,7 @@ class ParseException extends RuntimeException } if (null !== $this->parsedFile) { - if (PHP_VERSION_ID >= 50400) { - $jsonOptions = JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE; - } else { - $jsonOptions = 0; - } - $this->message .= sprintf(' in %s', json_encode($this->parsedFile, $jsonOptions)); + $this->message .= sprintf(' in %s', json_encode($this->parsedFile, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE)); } if ($this->parsedLine >= 0) { diff --git a/vendor/symfony/yaml/Inline.php b/vendor/symfony/yaml/Inline.php index a5b53bd..0e0b4ee 100644 --- a/vendor/symfony/yaml/Inline.php +++ b/vendor/symfony/yaml/Inline.php @@ -52,7 +52,7 @@ class Inline return ''; } - if (function_exists('mb_internal_encoding') && ((int) ini_get('mbstring.func_overload')) & 2) { + if (2 /* MB_OVERLOAD_STRING */ & (int) ini_get('mbstring.func_overload')) { $mbEncoding = mb_internal_encoding(); mb_internal_encoding('ASCII'); } @@ -105,7 +105,7 @@ class Inline return 'null'; case is_object($value): if ($objectSupport) { - return '!!php/object:'.serialize($value); + return '!php/object:'.serialize($value); } if ($exceptionOnInvalidType) { @@ -204,6 +204,8 @@ class Inline * @return string A YAML string * * @throws ParseException When malformed inline YAML string is parsed + * + * @internal */ public static function parseScalar($scalar, $delimiters = null, $stringDelimiters = array('"', "'"), &$i = 0, $evaluate = true, $references = array()) { @@ -234,6 +236,11 @@ class Inline throw new ParseException(sprintf('Malformed inline YAML string (%s).', $scalar)); } + // a non-quoted string cannot start with @ or ` (reserved) nor with a scalar indicator (| or >) + if ($output && ('@' === $output[0] || '`' === $output[0] || '|' === $output[0] || '>' === $output[0])) { + throw new ParseException(sprintf('The reserved indicator "%s" cannot start a plain scalar; you need to quote the scalar.', $output[0])); + } + if ($evaluate) { $output = self::evaluateScalar($output, $references); } @@ -469,6 +476,16 @@ class Inline return (string) substr($scalar, 5); case 0 === strpos($scalar, '! '): return (int) self::parseScalar(substr($scalar, 2)); + case 0 === strpos($scalar, '!php/object:'): + if (self::$objectSupport) { + return unserialize(substr($scalar, 12)); + } + + if (self::$exceptionOnInvalidType) { + throw new ParseException('Object support when parsing a YAML file has been disabled.'); + } + + return; case 0 === strpos($scalar, '!!php/object:'): if (self::$objectSupport) { return unserialize(substr($scalar, 13)); diff --git a/vendor/symfony/yaml/LICENSE b/vendor/symfony/yaml/LICENSE index 43028bc..12a7453 100644 --- a/vendor/symfony/yaml/LICENSE +++ b/vendor/symfony/yaml/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2004-2015 Fabien Potencier +Copyright (c) 2004-2016 Fabien Potencier Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/vendor/symfony/yaml/Parser.php b/vendor/symfony/yaml/Parser.php index 04f2237..9e4da17 100644 --- a/vendor/symfony/yaml/Parser.php +++ b/vendor/symfony/yaml/Parser.php @@ -21,8 +21,6 @@ use Symfony\Component\Yaml\Exception\ParseException; class Parser { const BLOCK_SCALAR_HEADER_PATTERN = '(?P\||>)(?P\+|\-|\d+|\+\d+|\-\d+|\d+\+|\d+\-)?(?P +#.*)?'; - // BC - wrongly named - const FOLDED_SCALAR_PATTERN = self::BLOCK_SCALAR_HEADER_PATTERN; private $offset = 0; private $lines = array(); @@ -62,7 +60,7 @@ class Parser $value = $this->cleanup($value); $this->lines = explode("\n", $value); - if (function_exists('mb_internal_encoding') && ((int) ini_get('mbstring.func_overload')) & 2) { + if (2 /* MB_OVERLOAD_STRING */ & (int) ini_get('mbstring.func_overload')) { $mbEncoding = mb_internal_encoding(); mb_internal_encoding('UTF-8'); } @@ -114,7 +112,7 @@ class Parser $data[] = $parser->parse($block, $exceptionOnInvalidType, $objectSupport, $objectForMap); } else { - $data[] = $this->parseValue($values['value'], $exceptionOnInvalidType, $objectSupport, $objectForMap); + $data[] = $this->parseValue($values['value'], $exceptionOnInvalidType, $objectSupport, $objectForMap, $context); } } if ($isRef) { @@ -230,7 +228,7 @@ class Parser } } } else { - $value = $this->parseValue($values['value'], $exceptionOnInvalidType, $objectSupport, $objectForMap); + $value = $this->parseValue($values['value'], $exceptionOnInvalidType, $objectSupport, $objectForMap, $context); // Spec: Keys MUST be unique; first one wins. // But overwriting is allowed when a merge node is used in current block. if ($allowOverwrite || !isset($data[$key])) { @@ -303,6 +301,10 @@ class Parser mb_internal_encoding($mbEncoding); } + if ($objectForMap && !is_object($data)) { + $data = (object) $data; + } + return empty($data) ? null : $data; } @@ -339,6 +341,11 @@ class Parser private function getNextEmbedBlock($indentation = null, $inSequence = false) { $oldLineIndentation = $this->getCurrentLineIndentation(); + $blockScalarIndentations = array(); + + if ($this->isBlockScalarHeader()) { + $blockScalarIndentations[] = $this->getCurrentLineIndentation(); + } if (!$this->moveToNextLine()) { return; @@ -347,7 +354,7 @@ class Parser if (null === $indentation) { $newIndent = $this->getCurrentLineIndentation(); - $unindentedEmbedBlock = $this->isStringUnIndentedCollectionItem($this->currentLine); + $unindentedEmbedBlock = $this->isStringUnIndentedCollectionItem(); if (!$this->isCurrentLineEmpty() && 0 === $newIndent && !$unindentedEmbedBlock) { throw new ParseException('Indentation problem.', $this->getRealCurrentLineNb() + 1, $this->currentLine); @@ -373,20 +380,33 @@ class Parser return; } - $isItUnindentedCollection = $this->isStringUnIndentedCollectionItem($this->currentLine); + $isItUnindentedCollection = $this->isStringUnIndentedCollectionItem(); - // Comments must not be removed inside a block scalar - $removeCommentsPattern = '~'.self::BLOCK_SCALAR_HEADER_PATTERN.'$~'; - $removeComments = !preg_match($removeCommentsPattern, $this->currentLine); + if (empty($blockScalarIndentations) && $this->isBlockScalarHeader()) { + $blockScalarIndentations[] = $this->getCurrentLineIndentation(); + } + + $previousLineIndentation = $this->getCurrentLineIndentation(); while ($this->moveToNextLine()) { $indent = $this->getCurrentLineIndentation(); - if ($indent === $newIndent) { - $removeComments = !preg_match($removeCommentsPattern, $this->currentLine); + // terminate all block scalars that are more indented than the current line + if (!empty($blockScalarIndentations) && $indent < $previousLineIndentation && trim($this->currentLine) !== '') { + foreach ($blockScalarIndentations as $key => $blockScalarIndentation) { + if ($blockScalarIndentation >= $this->getCurrentLineIndentation()) { + unset($blockScalarIndentations[$key]); + } + } } - if ($isItUnindentedCollection && !$this->isStringUnIndentedCollectionItem($this->currentLine) && $newIndent === $indent) { + if (empty($blockScalarIndentations) && !$this->isCurrentLineComment() && $this->isBlockScalarHeader()) { + $blockScalarIndentations[] = $this->getCurrentLineIndentation(); + } + + $previousLineIndentation = $indent; + + if ($isItUnindentedCollection && !$this->isStringUnIndentedCollectionItem() && $newIndent === $indent) { $this->moveToPreviousLine(); break; } @@ -396,7 +416,8 @@ class Parser continue; } - if ($removeComments && $this->isCurrentLineComment()) { + // we ignore "comment" lines only when we are not inside a scalar block + if (empty($blockScalarIndentations) && $this->isCurrentLineComment()) { continue; } @@ -445,12 +466,13 @@ class Parser * @param bool $exceptionOnInvalidType True if an exception must be thrown on invalid types false otherwise * @param bool $objectSupport True if object support is enabled, false otherwise * @param bool $objectForMap true if maps should return a stdClass instead of array() + * @param string $context The parser context (either sequence or mapping) * * @return mixed A PHP value * * @throws ParseException When reference does not exist */ - private function parseValue($value, $exceptionOnInvalidType, $objectSupport, $objectForMap) + private function parseValue($value, $exceptionOnInvalidType, $objectSupport, $objectForMap, $context) { if (0 === strpos($value, '*')) { if (false !== $pos = strpos($value, '#')) { @@ -473,7 +495,13 @@ class Parser } try { - return Inline::parse($value, $exceptionOnInvalidType, $objectSupport, $objectForMap, $this->refs); + $parsedValue = Inline::parse($value, $exceptionOnInvalidType, $objectSupport, $objectForMap, $this->refs); + + if ('mapping' === $context && '"' !== $value[0] && "'" !== $value[0] && '[' !== $value[0] && '{' !== $value[0] && '!' !== $value[0] && false !== strpos($parsedValue, ': ')) { + throw new ParseException('A colon cannot be used in an unquoted mapping value.'); + } + + return $parsedValue; } catch (ParseException $e) { $e->setParsedLine($this->getRealCurrentLineNb() + 1); $e->setSnippet($this->currentLine); @@ -499,13 +527,13 @@ class Parser } $isCurrentLineBlank = $this->isCurrentLineBlank(); - $text = ''; + $blockLines = array(); // leading blank lines are consumed before determining indentation while ($notEOF && $isCurrentLineBlank) { // newline only if not EOF if ($notEOF = $this->moveToNextLine()) { - $text .= "\n"; + $blockLines[] = ''; $isCurrentLineBlank = $this->isCurrentLineBlank(); } } @@ -526,37 +554,59 @@ class Parser preg_match($pattern, $this->currentLine, $matches) ) ) { - if ($isCurrentLineBlank) { - $text .= substr($this->currentLine, $indentation); + if ($isCurrentLineBlank && strlen($this->currentLine) > $indentation) { + $blockLines[] = substr($this->currentLine, $indentation); + } elseif ($isCurrentLineBlank) { + $blockLines[] = ''; } else { - $text .= $matches[1]; + $blockLines[] = $matches[1]; } // newline only if not EOF if ($notEOF = $this->moveToNextLine()) { - $text .= "\n"; $isCurrentLineBlank = $this->isCurrentLineBlank(); } } } elseif ($notEOF) { - $text .= "\n"; + $blockLines[] = ''; } if ($notEOF) { + $blockLines[] = ''; $this->moveToPreviousLine(); } // folded style if ('>' === $style) { - // folded lines - // replace all non-leading/non-trailing single newlines with spaces - preg_match('/(\n*)$/', $text, $matches); - $text = preg_replace('/(?currentLine, ' '); - return $ltrimmedLine[0] === '#'; + return '' !== $ltrimmedLine && $ltrimmedLine[0] === '#'; } /** @@ -690,7 +740,7 @@ class Parser if ( $this->getCurrentLineIndentation() == $currentIndentation && - $this->isStringUnIndentedCollectionItem($this->currentLine) + $this->isStringUnIndentedCollectionItem() ) { $ret = true; } @@ -707,6 +757,16 @@ class Parser */ private function isStringUnIndentedCollectionItem() { - return (0 === strpos($this->currentLine, '- ')); + return 0 === strpos($this->currentLine, '- '); + } + + /** + * Tests whether or not the current line is the header of a block scalar. + * + * @return bool + */ + private function isBlockScalarHeader() + { + return (bool) preg_match('~'.self::BLOCK_SCALAR_HEADER_PATTERN.'$~', $this->currentLine); } } diff --git a/vendor/symfony/yaml/Tests/DumperTest.php b/vendor/symfony/yaml/Tests/DumperTest.php index b103b9a..2a0df69 100644 --- a/vendor/symfony/yaml/Tests/DumperTest.php +++ b/vendor/symfony/yaml/Tests/DumperTest.php @@ -54,7 +54,7 @@ class DumperTest extends \PHPUnit_Framework_TestCase { $this->dumper->setIndentation(7); - $expected = <<assertEquals($expected, $this->dumper->dump($this->array, -10), '->dump() takes an inline level argument'); $this->assertEquals($expected, $this->dumper->dump($this->array, 0), '->dump() takes an inline level argument'); - $expected = <<assertEquals($expected, $this->dumper->dump($this->array, 1), '->dump() takes an inline level argument'); - $expected = <<assertEquals($expected, $this->dumper->dump($this->array, 2), '->dump() takes an inline level argument'); - $expected = <<assertEquals($expected, $this->dumper->dump($this->array, 3), '->dump() takes an inline level argument'); - $expected = <<dumper->dump(array('foo' => new A(), 'bar' => 1), 0, 0, false, true); - $this->assertEquals('{ foo: !!php/object:O:30:"Symfony\Component\Yaml\Tests\A":1:{s:1:"a";s:3:"foo";}, bar: 1 }', $dump, '->dump() is able to dump objects'); + $this->assertEquals('{ foo: !php/object:O:30:"Symfony\Component\Yaml\Tests\A":1:{s:1:"a";s:3:"foo";}, bar: 1 }', $dump, '->dump() is able to dump objects'); } public function testObjectSupportDisabledButNoExceptions() diff --git a/vendor/symfony/yaml/Tests/Fixtures/YtsSpecificationExamples.yml b/vendor/symfony/yaml/Tests/Fixtures/YtsSpecificationExamples.yml index 0a8b5de..d69e97a 100644 --- a/vendor/symfony/yaml/Tests/Fixtures/YtsSpecificationExamples.yml +++ b/vendor/symfony/yaml/Tests/Fixtures/YtsSpecificationExamples.yml @@ -515,7 +515,7 @@ yaml: | php: | array( 'canonical' => 12345, - 'decimal' => 12345, + 'decimal' => 12345.0, 'octal' => 014, 'hexadecimal' => 0xC ) @@ -1538,7 +1538,7 @@ yaml: | php: | array( 'canonical' => 12345, - 'decimal' => 12345, + 'decimal' => 12345.0, 'octal' => 12, 'hexadecimal' => 12 ) diff --git a/vendor/symfony/yaml/Tests/Fixtures/YtsTypeTransfers.yml b/vendor/symfony/yaml/Tests/Fixtures/YtsTypeTransfers.yml index aac4e68..46c8d4a 100644 --- a/vendor/symfony/yaml/Tests/Fixtures/YtsTypeTransfers.yml +++ b/vendor/symfony/yaml/Tests/Fixtures/YtsTypeTransfers.yml @@ -182,8 +182,8 @@ php: | array( 'zero' => 0, 'simple' => 12, - 'one-thousand' => 1000, - 'negative one-thousand' => -1000 + 'one-thousand' => 1000.0, + 'negative one-thousand' => -1000.0 ) --- test: Integers as Map Keys diff --git a/vendor/symfony/yaml/Tests/Fixtures/escapedCharacters.yml b/vendor/symfony/yaml/Tests/Fixtures/escapedCharacters.yml index 09bf86e..6ca044c 100644 --- a/vendor/symfony/yaml/Tests/Fixtures/escapedCharacters.yml +++ b/vendor/symfony/yaml/Tests/Fixtures/escapedCharacters.yml @@ -145,3 +145,11 @@ php: | array( 'double' => "some value\n \"some quoted string\" and 'some single quotes one'" ) +--- +test: Backslashes +yaml: | + { single: 'foo\Var', no-quotes: foo\Var, double: "foo\\Var" } +php: | + array( + 'single' => 'foo\Var', 'no-quotes' => 'foo\Var', 'double' => 'foo\Var' + ) diff --git a/vendor/symfony/yaml/Tests/Fixtures/sfQuotes.yml b/vendor/symfony/yaml/Tests/Fixtures/sfQuotes.yml index 741f1be..7c60bae 100644 --- a/vendor/symfony/yaml/Tests/Fixtures/sfQuotes.yml +++ b/vendor/symfony/yaml/Tests/Fixtures/sfQuotes.yml @@ -3,7 +3,7 @@ test: Some characters at the beginning of a string must be escaped brief: > Some characters at the beginning of a string must be escaped yaml: | - foo: | bar + foo: '| bar' php: | array('foo' => '| bar') --- diff --git a/vendor/symfony/yaml/Tests/InlineTest.php b/vendor/symfony/yaml/Tests/InlineTest.php index 522d770..ab541da 100644 --- a/vendor/symfony/yaml/Tests/InlineTest.php +++ b/vendor/symfony/yaml/Tests/InlineTest.php @@ -58,10 +58,8 @@ class InlineTest extends \PHPUnit_Framework_TestCase $this->assertEquals('1.2', Inline::dump(1.2)); $this->assertContains('fr', strtolower(setlocale(LC_NUMERIC, 0))); + } finally { setlocale(LC_NUMERIC, $locale); - } catch (\Exception $e) { - setlocale(LC_NUMERIC, $locale); - throw $e; } } @@ -72,6 +70,23 @@ class InlineTest extends \PHPUnit_Framework_TestCase $this->assertSame($value, Inline::parse(Inline::dump($value))); } + /** + * @expectedException \Symfony\Component\Yaml\Exception\ParseException + * @expectedExceptionMessage Found unknown escape character "\V". + */ + public function testParseScalarWithNonEscapedBlackslashShouldThrowException() + { + Inline::parse('"Foo\Var"'); + } + + /** + * @expectedException \Symfony\Component\Yaml\Exception\ParseException + */ + public function testParseScalarWithNonEscapedBlackslashAtTheEndShouldThrowException() + { + Inline::parse('"Foo\\"'); + } + /** * @expectedException \Symfony\Component\Yaml\Exception\ParseException */ @@ -173,6 +188,36 @@ class InlineTest extends \PHPUnit_Framework_TestCase Inline::parse('{ foo: * #foo }'); } + /** + * @dataProvider getReservedIndicators + * @expectedException Symfony\Component\Yaml\Exception\ParseException + * @expectedExceptionMessage cannot start a plain scalar; you need to quote the scalar. + */ + public function testParseUnquotedScalarStartingWithReservedIndicator($indicator) + { + Inline::parse(sprintf('{ foo: %sfoo }', $indicator)); + } + + public function getReservedIndicators() + { + return array(array('@'), array('`')); + } + + /** + * @dataProvider getScalarIndicators + * @expectedException Symfony\Component\Yaml\Exception\ParseException + * @expectedExceptionMessage cannot start a plain scalar; you need to quote the scalar. + */ + public function testParseUnquotedScalarStartingWithScalarIndicator($indicator) + { + Inline::parse(sprintf('{ foo: %sfoo }', $indicator)); + } + + public function getScalarIndicators() + { + return array(array('|'), array('>')); + } + public function getTestsForParse() { return array( diff --git a/vendor/symfony/yaml/Tests/ParseExceptionTest.php b/vendor/symfony/yaml/Tests/ParseExceptionTest.php index e4eb9c9..7286d45 100644 --- a/vendor/symfony/yaml/Tests/ParseExceptionTest.php +++ b/vendor/symfony/yaml/Tests/ParseExceptionTest.php @@ -18,11 +18,7 @@ class ParseExceptionTest extends \PHPUnit_Framework_TestCase public function testGetMessage() { $exception = new ParseException('Error message', 42, 'foo: bar', '/var/www/app/config.yml'); - if (PHP_VERSION_ID >= 50400) { - $message = 'Error message in "/var/www/app/config.yml" at line 42 (near "foo: bar")'; - } else { - $message = 'Error message in "\\/var\\/www\\/app\\/config.yml" at line 42 (near "foo: bar")'; - } + $message = 'Error message in "/var/www/app/config.yml" at line 42 (near "foo: bar")'; $this->assertEquals($message, $exception->getMessage()); } @@ -30,11 +26,7 @@ class ParseExceptionTest extends \PHPUnit_Framework_TestCase public function testGetMessageWithUnicodeInFilename() { $exception = new ParseException('Error message', 42, 'foo: bar', 'äöü.yml'); - if (PHP_VERSION_ID >= 50400) { - $message = 'Error message in "äöü.yml" at line 42 (near "foo: bar")'; - } else { - $message = 'Error message in "\u00e4\u00f6\u00fc.yml" at line 42 (near "foo: bar")'; - } + $message = 'Error message in "äöü.yml" at line 42 (near "foo: bar")'; $this->assertEquals($message, $exception->getMessage()); } diff --git a/vendor/symfony/yaml/Tests/ParserTest.php b/vendor/symfony/yaml/Tests/ParserTest.php index 0ccc6ee..81f9791 100644 --- a/vendor/symfony/yaml/Tests/ParserTest.php +++ b/vendor/symfony/yaml/Tests/ParserTest.php @@ -90,7 +90,7 @@ class ParserTest extends \PHPUnit_Framework_TestCase public function testEndOfTheDocumentMarker() { - $yaml = <<assertEquals(array('foo' => new B(), 'bar' => 1), $this->parser->parse($input, false, true), '->parse() is able to parse objects'); - } - public function testObjectSupportDisabledButNoExceptions() - { $input = <<assertEquals(array('foo' => null, 'bar' => 1), $this->parser->parse($input), '->parse() does not parse objects'); + $this->assertEquals(array('foo' => new B(), 'bar' => 1), $this->parser->parse($input, false, true), '->parse() is able to parse objects'); } /** + * @dataProvider invalidDumpedObjectProvider + */ + public function testObjectSupportDisabledButNoExceptions($input) + { + $this->assertEquals(array('foo' => null, 'bar' => 1), $this->parser->parse($input), '->parse() does not parse objects'); + } + + public function testObjectForMapEnabledWithMapping() + { + $yaml = <<parser->parse($yaml, false, false, true); + + $this->assertInstanceOf('stdClass', $result); + $this->assertInstanceOf('stdClass', $result->foo); + $this->assertEquals(array('cat'), $result->foo->fiz); + } + + public function testObjectForMapEnabledWithInlineMapping() + { + $result = $this->parser->parse('{ "foo": "bar", "fiz": "cat" }', false, false, true); + + $this->assertInstanceOf('stdClass', $result); + $this->assertEquals('bar', $result->foo); + $this->assertEquals('cat', $result->fiz); + } + + public function testObjectForMapIsAppliedAfterParsing() + { + $expected = new \stdClass(); + $expected->foo = 'bar'; + $expected->baz = 'foobar'; + + $this->assertEquals($expected, $this->parser->parse("foo: bar\nbaz: foobar", false, false, true)); + } + + /** + * @dataProvider invalidDumpedObjectProvider * @expectedException \Symfony\Component\Yaml\Exception\ParseException */ - public function testObjectsSupportDisabledWithExceptions() + public function testObjectsSupportDisabledWithExceptions($yaml) { - $this->parser->parse('foo: !!php/object:O:30:"Symfony\Tests\Component\Yaml\B":1:{s:1:"b";s:3:"foo";}', true, false); + $this->parser->parse($yaml, true, false); + } + + public function invalidDumpedObjectProvider() + { + $yamlTag = << array($yamlTag), + 'local-tag' => array($localTag), + ); } /** @@ -473,7 +526,7 @@ EOF; */ public function testUnindentedCollectionException() { - $yaml = <<assertSame($expected, Yaml::parse($input)); } - /** - * @covers \Symfony\Component\Yaml\Inline::parseMapping - */ public function testMappingDuplicateKeyFlow() { $input = << 'Bar', ), ), - ), Yaml::parse(<<assertEquals(array('content' => <<assertEquals(array('content' => <<<'EOT' # comment 1 header @@ -658,7 +706,7 @@ header footer # comment3 EOT - ), Yaml::parse(<<assertEquals(array(array('content' => <<assertEquals(array(array('content' => <<<'EOT' # comment 1 header @@ -686,7 +734,7 @@ header footer # comment3 EOT - )), Yaml::parse(<<assertEquals(array(array( 'title' => 'some title', - 'content' => << <<<'EOT' # comment 1 header @@ -717,7 +765,7 @@ header footer # comment3 EOT - )), Yaml::parse(<< array('key' => 'var-value'), 'list_in_map' => array('key' => array('var-value')), 'map_in_map' => array('foo' => array('bar' => 'var-value')), - ), Yaml::parse(<<assertEquals($expected, $this->parser->parse($yaml)); } + + /** + * @expectedException \Symfony\Component\Yaml\Exception\ParseException + * @expectedExceptionMessage A colon cannot be used in an unquoted mapping value + */ + public function testColonInMappingValueException() + { + $yaml = <<parser->parse($yaml); + } + + public function testColonInMappingValueExceptionNotTriggeredByColonInComment() + { + $yaml = <<assertSame(array('foo' => array('bar' => 'foobar')), $this->parser->parse($yaml)); + } + + /** + * @dataProvider getCommentLikeStringInScalarBlockData + */ + public function testCommentLikeStringsAreNotStrippedInBlockScalars($yaml, $expectedParserResult) + { + $this->assertSame($expectedParserResult, $this->parser->parse($yaml)); + } + + public function getCommentLikeStringInScalarBlockData() + { + $tests = array(); + + $yaml = <<<'EOT' +pages: + - + title: some title + content: | + # comment 1 + header + + # comment 2 + +

title

+ + + footer # comment3 +EOT; + $expected = array( + 'pages' => array( + array( + 'title' => 'some title', + 'content' => <<<'EOT' +# comment 1 +header + + # comment 2 + +

title

+ + +footer # comment3 +EOT + , + ), + ), + ); + $tests[] = array($yaml, $expected); + + $yaml = <<<'EOT' +test: | + foo + # bar + baz +collection: + - one: | + foo + # bar + baz + - two: | + foo + # bar + baz +EOT; + $expected = array( + 'test' => <<<'EOT' +foo +# bar +baz + +EOT + , + 'collection' => array( + array( + 'one' => <<<'EOT' +foo +# bar +baz +EOT + , + ), + array( + 'two' => <<<'EOT' +foo +# bar +baz +EOT + , + ), + ), + ); + $tests[] = array($yaml, $expected); + + $yaml = << + line1 + line2> + baz: +# comment + foobar: ~ +EOT; + $expected = array( + 'foo' => array( + 'bar' => array( + 'scalar-block' => 'line1 line2>', + ), + 'baz' => array( + 'foobar' => null, + ), + ), + ); + $tests[] = array($yaml, $expected); + + $yaml = <<<'EOT' +a: + b: hello +# c: | +# first row +# second row + d: hello +EOT; + $expected = array( + 'a' => array( + 'b' => 'hello', + 'd' => 'hello', + ), + ); + $tests[] = array($yaml, $expected); + + return $tests; + } + + public function testBlankLinesAreParsedAsNewLinesInFoldedBlocks() + { + $yaml = << +

A heading

+ +
    +
  • a list
  • +
  • may be a good example
  • +
+EOT; + + $this->assertSame( + array( + 'test' => <<A heading +
  • a list
  • may be a good example
+EOT + , + ), + $this->parser->parse($yaml) + ); + } + + public function testAdditionallyIndentedLinesAreParsedAsNewLinesInFoldedBlocks() + { + $yaml = << +

A heading

+ +
    +
  • a list
  • +
  • may be a good example
  • +
+EOT; + + $this->assertSame( + array( + 'test' => <<A heading +
    +
  • a list
  • +
  • may be a good example
  • +
+EOT + , + ), + $this->parser->parse($yaml) + ); + } } class B diff --git a/vendor/symfony/yaml/Tests/YamlTest.php b/vendor/symfony/yaml/Tests/YamlTest.php index 8db65e3..ee008cf 100644 --- a/vendor/symfony/yaml/Tests/YamlTest.php +++ b/vendor/symfony/yaml/Tests/YamlTest.php @@ -22,16 +22,4 @@ class YamlTest extends \PHPUnit_Framework_TestCase $parsed = Yaml::parse($yml); $this->assertEquals($data, $parsed); } - - /** - * @group legacy - */ - public function testLegacyParseFromFile() - { - $filename = __DIR__.'/Fixtures/index.yml'; - $contents = file_get_contents($filename); - $parsedByFilename = Yaml::parse($filename); - $parsedByContents = Yaml::parse($contents); - $this->assertEquals($parsedByFilename, $parsedByContents); - } } diff --git a/vendor/symfony/yaml/Unescaper.php b/vendor/symfony/yaml/Unescaper.php index 1b5e5ec..6e4f1d7 100644 --- a/vendor/symfony/yaml/Unescaper.php +++ b/vendor/symfony/yaml/Unescaper.php @@ -11,28 +11,22 @@ namespace Symfony\Component\Yaml; +use Symfony\Component\Yaml\Exception\ParseException; + /** * Unescaper encapsulates unescaping rules for single and double-quoted * YAML strings. * * @author Matthew Lewinski + * + * @internal */ class Unescaper { - /** - * Parser and Inline assume UTF-8 encoding, so escaped Unicode characters - * must be converted to that encoding. - * - * @deprecated since version 2.5, to be removed in 3.0 - * - * @internal - */ - const ENCODING = 'UTF-8'; - /** * Regex fragment that matches an escaped character in a double quoted string. */ - const REGEX_ESCAPED_CHARACTER = "\\\\([0abt\tnvfre \\\"\\/\\\\N_LP]|x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|U[0-9a-fA-F]{8})"; + const REGEX_ESCAPED_CHARACTER = '\\\\(x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|U[0-9a-fA-F]{8}|.)'; /** * Unescapes a single quoted string. @@ -55,9 +49,8 @@ class Unescaper */ public function unescapeDoubleQuotedString($value) { - $self = $this; - $callback = function ($match) use ($self) { - return $self->unescapeCharacter($match[0]); + $callback = function ($match) { + return $this->unescapeCharacter($match[0]); }; // evaluate the string @@ -71,9 +64,9 @@ class Unescaper * * @return string The unescaped character */ - public function unescapeCharacter($value) + private function unescapeCharacter($value) { - switch ($value{1}) { + switch ($value[1]) { case '0': return "\x0"; case 'a': @@ -120,6 +113,8 @@ class Unescaper return self::utf8chr(hexdec(substr($value, 2, 4))); case 'U': return self::utf8chr(hexdec(substr($value, 2, 8))); + default: + throw new ParseException(sprintf('Found unknown escape character "%s".', $value)); } } diff --git a/vendor/symfony/yaml/Yaml.php b/vendor/symfony/yaml/Yaml.php index 2d5f62c..426896b 100644 --- a/vendor/symfony/yaml/Yaml.php +++ b/vendor/symfony/yaml/Yaml.php @@ -21,10 +21,7 @@ use Symfony\Component\Yaml\Exception\ParseException; class Yaml { /** - * Parses YAML into a PHP array. - * - * The parse method, when supplied with a YAML stream (string or file), - * will do its best to convert YAML in a file into a PHP array. + * Parses YAML into a PHP value. * * Usage: * @@ -32,47 +29,20 @@ class Yaml * print_r($array); * * - * As this method accepts both plain strings and file names as an input, - * you must validate the input before calling this method. Passing a file - * as an input is a deprecated feature and will be removed in 3.0. - * - * Note: the ability to pass file names to the Yaml::parse method is deprecated since version 2.2 and will be removed in 3.0. Pass the YAML contents of the file instead. - * - * @param string $input Path to a YAML file or a string containing YAML + * @param string $input A string containing YAML * @param bool $exceptionOnInvalidType True if an exception must be thrown on invalid types false otherwise * @param bool $objectSupport True if object support is enabled, false otherwise * @param bool $objectForMap True if maps should return a stdClass instead of array() * - * @return array The YAML converted to a PHP array + * @return mixed The YAML converted to a PHP value * * @throws ParseException If the YAML is not valid */ public static function parse($input, $exceptionOnInvalidType = false, $objectSupport = false, $objectForMap = false) { - // if input is a file, process it - $file = ''; - if (strpos($input, "\n") === false && is_file($input)) { - @trigger_error('The ability to pass file names to the '.__METHOD__.' method is deprecated since version 2.2 and will be removed in 3.0. Pass the YAML contents of the file instead.', E_USER_DEPRECATED); - - if (false === is_readable($input)) { - throw new ParseException(sprintf('Unable to parse "%s" as the file is not readable.', $input)); - } - - $file = $input; - $input = file_get_contents($file); - } - $yaml = new Parser(); - try { - return $yaml->parse($input, $exceptionOnInvalidType, $objectSupport, $objectForMap); - } catch (ParseException $e) { - if ($file) { - $e->setParsedFile($file); - } - - throw $e; - } + return $yaml->parse($input, $exceptionOnInvalidType, $objectSupport, $objectForMap); } /** diff --git a/vendor/symfony/yaml/composer.json b/vendor/symfony/yaml/composer.json index b798141..db1714c 100644 --- a/vendor/symfony/yaml/composer.json +++ b/vendor/symfony/yaml/composer.json @@ -16,15 +16,18 @@ } ], "require": { - "php": ">=5.3.9" + "php": ">=5.5.9" }, "autoload": { - "psr-4": { "Symfony\\Component\\Yaml\\": "" } + "psr-4": { "Symfony\\Component\\Yaml\\": "" }, + "exclude-from-classmap": [ + "/Tests/" + ] }, "minimum-stability": "dev", "extra": { "branch-alias": { - "dev-master": "2.7-dev" + "dev-master": "3.0-dev" } } } diff --git a/vendor/symfony/yaml/phpunit.xml.dist b/vendor/symfony/yaml/phpunit.xml.dist index 418b2c6..6bdbea1 100644 --- a/vendor/symfony/yaml/phpunit.xml.dist +++ b/vendor/symfony/yaml/phpunit.xml.dist @@ -20,8 +20,8 @@ ./ - ./vendor ./Tests + ./vendor